Probleme Fisiere

Description
Index

Please download to get full document.

View again

of 7
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information
Category:

Documents

Publish on:

Views: 0 | Pages: 7

Extension: PDF | Download: 0

Share
Transcript
  #include <string.h>#define fisier FILE*typedef struct{ char cheie[7];char den[3];fl!at pu;fl!at cant; $%I&'L; ((tipul artic!l din fisierul de datetypedef struct{ char is;char cheie[7];l!ng nrrel; $%I+,E-; ((tipul artic!l din taela inde/fisier ind; ((fisierul inde/char nu0einde/[12]; ((nu0ele e/tern al fisierului inde/!id 4!rt56{ $%I+,E- a;fisier ind8;l!ng i9;ind8:f!pen5te0p.id/?6;reind5ind6;fread5AasiBe!f5a68ind6;hile5Cfe!f5ind66{ if5a.is6frite5AasiBe!f5a68ind86;fread5AasiBe!f5a68ind6; fcl!se5ind6;fseeD5ind824EEE+,6;l!ng n:ftell5ind86(siBe!f5a6;f!r5i:2;i<n8;i??6{ fseeD5ind8i*siBe!f5a64EE4E%6;fread5AasiBe!f5a68ind86;f!r59:i?8;9<n;9??6{ fseeD5ind89*siBe!f5a64EE4E%6;fread5AsiBe!f5a68ind86;if5strc0p5a.cheie.cheie6>26{ fseeD5ind8i*siBe!f5a64EE4E%6;frite5AsiBe!f5a68ind86;fseeD5ind89*siBe!f5a64EE4E%6;frite5AasiBe!f5a68ind86; reind5ind86;ind:f!pen5nu0einde/?6;fread5AasiBe!f5a68ind86;hile5Cfe!f5ind866{ if5a.is6frite5AasiBe!f5a68ind6;fread5AasiBe!f5a68ind86;  fcl!se5ind86;re0!e5te0p.id/6; (* cautarea artic!lului cu cheia ey si plasareap!interului defisier in taela de inde/uri pe artic!lul respecti*(int 4eeDey5char *ey6{ l!ng ls:2 ld 0 n;$%I+,E- a;int gasit:2;fseeD5ind24EEE+,6;n:ftell5ind6(siBe!f5$%I+,E-6;ld:n8;hile55ls<:ld6AA5Cgasit66{ 0:5ls?ld6(1;fseeD5ind0*siBe!f5a64EE4E%6;fread5AasiBe!f5a68ind6;if5strc0p5a.cheieey6::26 gasit:8;else if5strc0p5a.cheieey6>26 ld:08;else ls:0?8; if5gasit6 fseeD5ind0*siBe!f5a64EE4E%6;return gasit; !id neinde/5char *nu0e6{ strcpy5nu0einde/nu0e6;strcat5nu0einde/.id/6;ind:f!pen5nu0einde/?6; !id !peninde/5char *nu0e6{ strcpy5nu0einde/nu0e6;strcat5nu0einde/.id/6;ind:f!pen5nu0einde/r?6; !id cl!seinde/56{ fcl!se5ind6; int $ead4ec5fisier f$%I&'L *a6{ $%I+,E- a8;int r;fread5Aa8siBe!f5a868ind6;if5fe!f5ind66r:2;else { fseeD5fa8.nrrel*siBe!f5*a64EE4E%6;fread5asiBe!f5*a68f6;r:8;   return r; int $eadey5fisier f$%I&'L *achar *ey6{ $%I+,E- a8;int r;if54eeDey5ey66{ fread5Aa8siBe!f5a868ind6;fseeD5fa8.nrrel*siBe!f5*a64EE4E%6;fread5asiBe!f5*a68f6;r:8; else r:2;return r; int Grite4ec5fisier f$%I&'L a6{ $%I+,E- a8 ai;l!ng n nl;int r;fseeD5ind24EEE+,6;n:ftell5ind6(siBe!f5a86;if5n>26{ fseeD5ind5n86*siBe!f5a864EE4E%6;fread5Aa8siBe!f5a868ind6;if5strc0p5a8.cheiea.cheie6>26 r:2;else { ai.is:8;strcpy5ai.cheiea.cheie6;fseeD5f24EEE+,6;n8:ftell5f6(siBe!f5a6;ai.nrrel:n8;fseeD5ind24EEE+,6;frite5AaisiBe!f5ai68ind6;frite5AasiBe!f5a68f6;r:8; else r:2;return r; int Griteey5fisier f$%I&'L a6{ char ey[7];$%I+,E- a8;l!ng n;strcpy5eya.cheie6;if54eeDey5ey66 r:2;else { a8.is:8;strcpy5a8.cheiea.cheie6;fseeD5f24EEE+,6;  n:ftell5f6(siBe!f5a6;a8.nrrel:n;frite5AasiBe!f5a68f6;fseeD5ind24EEE+,6;frite5Aa8siBe!f5a868ind6;4!rt56;r:8; return r; int ,elete4ec56{ $%I+,E- a8;l!ng p!s:ftell5ind6;fread5Aa8siBe!f5a868ind6;if5fe!f5ind66 r:2;else { fseeD5indp!s4EE4E%6;a8.is:2;frite5Aa8siBe!f5a868ind6;4!rt56;r:8; return r; int ,eleteey5char *ey6{ int r;if54eeDey5ey66r:,elete4ec56;else r:2;return r;
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks