1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
pf = fopen(p,"rb"); /* open fichier cpc */
if (pf!=NULL) { /* open OK */
while (fgets(record,sizeof record,pf) !=NULL) {
status = substr(record,PCPC_STATUS,TCPC_STATUS);
cpcid = substr(record,PCPC_ID,TCPC_ID);
cpcname = substr(record,PCPC_NAME,TCPC_NAME);
family = substr(record,PCPC_FAMILY,TCPC_FAMILY);
model = substr(record,PCPC_MODEL,TCPC_MODEL);
capacity = substr(record,PCPC_CAPACITY,TCPC_CAPACITY);
cp = substr(record,PCPC_PROCESSOR,TCPC_PROCESSOR);
List = AddCPC(List,status,cpcid,cpcname,family,model,
capacity,cp);
memset(record,'\0',sizeof(record)); /* init memoire */
} /* */
} /* */ |