| author | ecalot
<ecalot> 2004-06-18 18:32:26 UTC |
| committer | ecalot
<ecalot> 2004-06-18 18:32:26 UTC |
| parent | 5685af99b6331e76b86f2a98ed0a4ad4a85e8f0d |
| stuff/data/bin/makeindex | +0 | -0 |
| stuff/data/bin/src/makeindex.c | +13 | -3 |
diff --git a/stuff/data/bin/makeindex b/stuff/data/bin/makeindex index e22225e..bea7fc6 100755 Binary files a/stuff/data/bin/makeindex and b/stuff/data/bin/makeindex differ diff --git a/stuff/data/bin/src/makeindex.c b/stuff/data/bin/src/makeindex.c index 0acc6f7..82ce478 100644 --- a/stuff/data/bin/src/makeindex.c +++ b/stuff/data/bin/src/makeindex.c @@ -6,8 +6,9 @@ int main(int c, char** files) { char* index; FILE* fpd; FILE* fpi; - char filename[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - unsigned short int i; + char filename[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + char filenameaux[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + unsigned short int i,j; unsigned short int numbers[500]; if (c!=3) { @@ -35,7 +36,16 @@ int main(int c, char** files) { //process filename fgets(filename,sizeof(filename),fpd); - fwrite(filename,1,20,fpi); + for(i=0,j=0;filename[i];i++) { + if (filename[i]==' ') { + j=14; + continue; + } + if (filename[i]=='\n') break; + filenameaux[j]=filename[i]; + j++; + } + fwrite(filenameaux,1,28,fpi); //resd numbers i=0;