Lines 83-88
Link Here
|
83 |
static void term_handler(int signum); |
83 |
static void term_handler(int signum); |
84 |
static void usage(void); |
84 |
static void usage(void); |
85 |
|
85 |
|
|
|
86 |
/* |
87 |
* Local variables... |
88 |
*/ |
89 |
|
90 |
int autocharset = 0; |
91 |
|
86 |
|
92 |
|
87 |
/* |
93 |
/* |
88 |
* 'main()' - Main entry for HTMLDOC. |
94 |
* 'main()' - Main entry for HTMLDOC. |
Lines 247-253
Link Here
|
247 |
{ |
253 |
{ |
248 |
i ++; |
254 |
i ++; |
249 |
if (i < argc) |
255 |
if (i < argc) |
250 |
htmlSetCharSet(argv[i]); |
256 |
{ |
|
|
257 |
if (strcmp(argv[i], "auto") == 0) |
258 |
{ |
259 |
autocharset = 1; |
260 |
} |
261 |
else htmlSetCharSet(argv[i]); |
262 |
} |
251 |
else |
263 |
else |
252 |
usage(); |
264 |
usage(); |
253 |
} |
265 |
} |
Lines 1034-1039
Link Here
|
1034 |
|
1046 |
|
1035 |
while (document->prev != NULL) |
1047 |
while (document->prev != NULL) |
1036 |
document = document->prev; |
1048 |
document = document->prev; |
|
|
1049 |
|
1050 |
if (autocharset) |
1051 |
htmlSetMetaCharSet(document); |
1037 |
|
1052 |
|
1038 |
htmlDebugStats("Document Tree", document); |
1053 |
htmlDebugStats("Document Tree", document); |
1039 |
|
1054 |
|
Lines 1269-1275
Link Here
|
1269 |
else if (strncasecmp(line, "XRXCOMMENTS=", 12) == 0) |
1284 |
else if (strncasecmp(line, "XRXCOMMENTS=", 12) == 0) |
1270 |
XRXComments = atoi(line + 12); |
1285 |
XRXComments = atoi(line + 12); |
1271 |
else if (strncasecmp(line, "CHARSET=", 8) == 0) |
1286 |
else if (strncasecmp(line, "CHARSET=", 8) == 0) |
1272 |
htmlSetCharSet(line + 8); |
1287 |
{ |
|
|
1288 |
if (strcmp(line + 8, "auto") == 0) |
1289 |
{ |
1290 |
autocharset = 1; |
1291 |
} |
1292 |
else htmlSetCharSet(line + 8); |
1293 |
} |
1273 |
else if (strncasecmp(line, "PAGEMODE=", 9) == 0) |
1294 |
else if (strncasecmp(line, "PAGEMODE=", 9) == 0) |
1274 |
PDFPageMode = atoi(line + 9); |
1295 |
PDFPageMode = atoi(line + 9); |
1275 |
else if (strncasecmp(line, "PAGELAYOUT=", 11) == 0) |
1296 |
else if (strncasecmp(line, "PAGELAYOUT=", 11) == 0) |
Lines 1994-2000
Link Here
|
1994 |
} |
2015 |
} |
1995 |
} |
2016 |
} |
1996 |
else if (strcmp(temp, "--charset") == 0) |
2017 |
else if (strcmp(temp, "--charset") == 0) |
1997 |
htmlSetCharSet(temp2); |
2018 |
{ |
|
|
2019 |
if (strcmp(temp2, "auto") == 0) |
2020 |
{ |
2021 |
autocharset = 1; |
2022 |
} |
2023 |
else htmlSetCharSet(temp2); |
2024 |
} |
1998 |
else if (strcmp(temp, "--pagemode") == 0) |
2025 |
else if (strcmp(temp, "--pagemode") == 0) |
1999 |
{ |
2026 |
{ |
2000 |
for (i = 0; i < (int)(sizeof(PDFModes) / sizeof(PDFModes[0])); i ++) |
2027 |
for (i = 0; i < (int)(sizeof(PDFModes) / sizeof(PDFModes[0])); i ++) |