Applied indent

SVN revision: 692
This commit is contained in:
Stefan Ritt 2004-01-18 21:46:20 +00:00
parent 0cbb9e60a1
commit d0e83a59d1

View File

@ -7,6 +7,9 @@
them into eloglang.xxxx them into eloglang.xxxx
$Log$ $Log$
Revision 1.2 2004/01/18 21:46:20 midas
Applied indent
Revision 1.1 2004/01/15 14:22:38 midas Revision 1.1 2004/01/15 14:22:38 midas
Initial revision Initial revision
@ -67,7 +70,7 @@ int scan_file(char *infile, char *outfile)
break; break;
/* check that we did not find "malloc(" */ /* check that we did not find "malloc(" */
if (isalpha(*(p-1))) { if (isalpha(*(p - 1))) {
p++; p++;
continue; continue;
} }
@ -75,12 +78,12 @@ int scan_file(char *infile, char *outfile)
p += 5; p += 5;
p2 = p; p2 = p;
while (*p2) { while (*p2) {
if (*p2 == '"' && *(p2-1) != '\\') if (*p2 == '"' && *(p2 - 1) != '\\')
break; break;
p2++; p2++;
} }
size = (int)p2 - (int)p; size = (int) p2 - (int) p;
if (size >= sizeof(str)) { if (size >= sizeof(str)) {
printf("Error: string too long\n"); printf("Error: string too long\n");
free(buf); free(buf);
@ -91,9 +94,9 @@ int scan_file(char *infile, char *outfile)
memcpy(str, p, size); memcpy(str, p, size);
/* convert \" to " */ /* convert \" to " */
for (p2 = str ; *p2 ; p2++) for (p2 = str; *p2; p2++)
if (*p2 == '\\') if (*p2 == '\\')
strcpy(p2, p2+1); strcpy(p2, p2 + 1);
/* check if string exists in output file */ /* check if string exists in output file */
read_buf(outfile, &bufout); read_buf(outfile, &bufout);
@ -133,4 +136,4 @@ int main(int argc, char *argv[])
} }
return scan_file(argv[1], argv[2]); return scan_file(argv[1], argv[2]);
} }