Changed indentation

SVN revision: 712
This commit is contained in:
Stefan Ritt 2004-01-26 14:52:17 +00:00
parent a42d6ca87a
commit aad0d60523

View File

@ -7,6 +7,9 @@
them into eloglang.xxxx them into eloglang.xxxx
$Log$ $Log$
Revision 1.5 2004/01/26 14:52:17 midas
Changed indentation
Revision 1.4 2004/01/23 07:08:44 midas Revision 1.4 2004/01/23 07:08:44 midas
Adjusted comments Adjusted comments
@ -51,7 +54,7 @@ void read_buf(char *filename, char **buf)
size = lseek(fh, 0, SEEK_END); size = lseek(fh, 0, SEEK_END);
lseek(fh, 0, SEEK_SET); lseek(fh, 0, SEEK_SET);
*buf = malloc(size+1); *buf = malloc(size + 1);
assert(*buf); assert(*buf);
i = read(fh, *buf, size); i = read(fh, *buf, size);
@ -120,7 +123,8 @@ int scan_file(char *infile, char *outfile)
} }
if (first && !strstr(bufout, "please translate following")) { if (first && !strstr(bufout, "please translate following")) {
sprintf(line, "\r\n#\r\n#---- please translate following items and then remove this comment ----#\r\n#\r\n"); sprintf(line,
"\r\n#\r\n#---- please translate following items and then remove this comment ----#\r\n#\r\n");
write(fho, line, strlen(line)); write(fho, line, strlen(line));
first = FALSE; first = FALSE;
@ -162,15 +166,15 @@ int scan_file(char *infile, char *outfile)
if (strlen(line) <= 1) if (strlen(line) <= 1)
continue; continue;
while (line[strlen(line)-1] == ' ') while (line[strlen(line) - 1] == ' ')
line[strlen(line)-1] = 0; line[strlen(line) - 1] = 0;
/* change " to \" */ /* change " to \" */
for (i=0 ; i<(int)strlen(line) ; i++) for (i = 0; i < (int) strlen(line); i++)
if (line[i] == '"') { if (line[i] == '"') {
strcpy(str, line+i); strcpy(str, line + i);
line[i++] = '\\'; line[i++] = '\\';
strcpy(line+i, str); strcpy(line + i, str);
} }
sprintf(str, "loc(\"%s\")", line); sprintf(str, "loc(\"%s\")", line);