summaryrefslogtreecommitdiffstats
path: root/gtk/src/quotestring.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-12-27 23:27:10 +0000
committerjstebbins <[email protected]>2012-12-27 23:27:10 +0000
commitf89475c8a426907cc85a335460cc1d6e7750614b (patch)
tree704c7f708f4b7d76edaf0ad477b9c7a712db480b /gtk/src/quotestring.c
parent0dea09fd27e10f362a94897d993fd540eea5c79f (diff)
lingui: convert tabs to spaces
Makes lingui source conform to hb standard for indentation. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5112 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/quotestring.c')
-rw-r--r--gtk/src/quotestring.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/gtk/src/quotestring.c b/gtk/src/quotestring.c
index c691f5f7f..f29969bd2 100644
--- a/gtk/src/quotestring.c
+++ b/gtk/src/quotestring.c
@@ -35,44 +35,44 @@ main(int argc, char *argv[])
}
while (fgets(in_buffer, BUF_SIZE, infile) != NULL)
{
- int ii, jj;
+ int ii, jj;
int len;
- int eol = 0;
+ int eol = 0;
// Step on any CR LF at end of line
len = strlen(in_buffer);
- if (len > 1 && in_buffer[len-1] == '\n' && in_buffer[len-2] == '\r')
- {
- in_buffer[len-1] = 0;
- in_buffer[len-2] = 0;
- eol = 1;
- }
- else if (len > 0 && in_buffer[len-1] == '\n')
- {
- in_buffer[len-1] = 0;
- eol = 1;
- }
- for (jj = 0, ii = 0; ii < len; ii++)
- {
- if (in_buffer[ii] == '"')
- {
- out_buffer[jj++] = '\\';
- out_buffer[jj++] = in_buffer[ii];
- }
- else if (in_buffer[ii] == '\r')
- { // Skip it
- }
- else
- {
- out_buffer[jj++] = in_buffer[ii];
- }
- }
- out_buffer[jj] = 0;
- if (eol)
- fprintf(outfile, "\"%s\\n\"\n", out_buffer);
- else
- fprintf(outfile, "\"%s\"\n", out_buffer);
+ if (len > 1 && in_buffer[len-1] == '\n' && in_buffer[len-2] == '\r')
+ {
+ in_buffer[len-1] = 0;
+ in_buffer[len-2] = 0;
+ eol = 1;
+ }
+ else if (len > 0 && in_buffer[len-1] == '\n')
+ {
+ in_buffer[len-1] = 0;
+ eol = 1;
+ }
+ for (jj = 0, ii = 0; ii < len; ii++)
+ {
+ if (in_buffer[ii] == '"')
+ {
+ out_buffer[jj++] = '\\';
+ out_buffer[jj++] = in_buffer[ii];
+ }
+ else if (in_buffer[ii] == '\r')
+ { // Skip it
+ }
+ else
+ {
+ out_buffer[jj++] = in_buffer[ii];
+ }
+ }
+ out_buffer[jj] = 0;
+ if (eol)
+ fprintf(outfile, "\"%s\\n\"\n", out_buffer);
+ else
+ fprintf(outfile, "\"%s\"\n", out_buffer);
}
fclose(infile);
fclose(outfile);
- return 0;
+ return 0;
}