earlybrowserreborn - Diff between revs 1 and 3

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 1 Rev 3
Line 1... Line 1...
1 #include <stdio.h> 1 #include <stdio.h>
2 #include <string.h> 2 #include <string.h>
3 3
4 /* convert uid file to ascii file to use in c */ 4 /* convert uid file to ascii file to use in c */
5 void converttoc (); 5 void converttoc ();
6 char *getfilename(); -  
-   6 void getfilename();
7 7
8 main ( argc, agrv) 8 main ( argc, agrv)
9 int argc; 9 int argc;
10 char *agrv[]; 10 char *agrv[];
11 { 11 {
Line 35... Line 35...
35 void converttoc (infp, filein) 35 void converttoc (infp, filein)
36 FILE *infp; 36 FILE *infp;
37 char *filein; 37 char *filein;
38 { 38 {
39         FILE *outfp; 39         FILE *outfp;
40         char fileout[100], name[100], *tempf; -  
-   40         char fileout[100], name[100], tempf[100];
41         int c, i; 41         int c, i;
42 42
43         tempf = getfilename(filein); -  
-   43         getfilename(filein,tempf);
44         strcpy(fileout, tempf); 44         strcpy(fileout, tempf);
45         strcpy(name, tempf); 45         strcpy(name, tempf);
46         strcat(fileout,".uic"); 46         strcat(fileout,".uic");
47 47
48         if ((outfp = fopen(fileout,"w")) == NULL) 48         if ((outfp = fopen(fileout,"w")) == NULL)
Line 68... Line 68...
68           fprintf(outfp," };\n"); 68           fprintf(outfp," };\n");
69           fclose(outfp); 69           fclose(outfp);
70         } 70         }
71 } 71 }
72 72
73 char *getfilename (infile) -  
-   73 void getfilename (infile, outfile)
74 char *infile; 74 char *infile;
-   75 char *outfile;
75 { 76 {
76         char filename[100]; -  
77 -  
78         strcpy(filename, infile); -  
79         filename[strlen(infile)-4] = '\0'; -  
80         return filename; -  
-   77         strcpy(outfile, infile);
-   78         *(outfile+strlen(outfile)-4) = '\0';
81 } 79 }