+ if (arrayfile!=NULL) {
+ char buf[512];
+ char sizebuf[512];
+ char a;
+ int fd=open(arrayfile,O_RDONLY);
+ int offset=0;
+ int readmore=1;
+ int state=0;
+ arrayt=genallocatehashtable((unsigned int (*)(void *)) & hashstring,(int (*)(void *,void *)) &equivalentstrings);
+ arraytype=genallocatehashtable((unsigned int (*)(void *)) & hashstring,(int (*)(void *,void *)) &equivalentstrings);
+ while(readmore) {
+ if (read(fd,&a,1)<=0)
+ readmore=0;
+ if (readmore) {
+ if (a==' ') {
+ state=1;
+ buf[offset]=0;
+ offset=0;
+ } else if (a!=13&&a!=10) {
+ if (state==0)
+ buf[offset++]=a;
+ else
+ sizebuf[offset++]=a;
+ }
+ }
+ if ((state==1)&&offset>0&&(a==13||a==10||!readmore)) {
+ state=0;
+ sizebuf[offset]=0;
+ {
+ char *str=copystr(buf);
+ char *sizestr=copystr(sizebuf);
+ genputtable(arrayt,str,sizestr);
+ }
+ offset=0;
+ }
+ }
+ }
+