comparison sidinfo.c @ 273:2437436b6129

Inform user of the character set conversion in use (or not in use) with verbosity level of 2.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 06 Jan 2020 01:37:21 +0200
parents 763623493f59
children 158f4f613787
comparison
equal deleted inserted replaced
272:763623493f59 273:2437436b6129
1325 setUseChConv = setChConv != (iconv_t) -1; 1325 setUseChConv = setChConv != (iconv_t) -1;
1326 #else 1326 #else
1327 setUseChConv = setLang != NULL && strcmp(setLang, SET_DEF_CHARSET) == 0; 1327 setUseChConv = setLang != NULL && strcmp(setLang, SET_DEF_CHARSET) == 0;
1328 #endif 1328 #endif
1329 1329
1330 th_free(setLang);
1331
1332 // Parse command line arguments 1330 // Parse command line arguments
1333 if (!th_args_process(argc, argv, optList, optListN, 1331 if (!th_args_process(argc, argv, optList, optListN,
1334 argHandleOpt, NULL, OPTH_ONLY_OPTS)) 1332 argHandleOpt, NULL, OPTH_ONLY_OPTS))
1335 goto out; 1333 goto out;
1336 1334
1335 THMSG(2, "Requested output LANG='%s', use charset conversion=%s\n",
1336 setLang, setUseChConv ? "yes" : "no");
1337
1337 if (optOneLineFieldSep != NULL) 1338 if (optOneLineFieldSep != NULL)
1338 { 1339 {
1339 // For one-line format, disable parsing and prefixes 1340 // For one-line format, disable parsing and prefixes
1340 optParsable = FALSE; 1341 optParsable = FALSE;
1341 optNoNamePrefix = TRUE; 1342 optNoNamePrefix = TRUE;
1483 #ifdef HAVE_ICONV 1484 #ifdef HAVE_ICONV
1484 if (setUseChConv) 1485 if (setUseChConv)
1485 iconv_close(setChConv); 1486 iconv_close(setChConv);
1486 #endif 1487 #endif
1487 1488
1489 th_free(setLang);
1490
1488 siClearStack(&optFormat); 1491 siClearStack(&optFormat);
1489 th_free(setHVSCPath); 1492 th_free(setHVSCPath);
1490 th_free(setSLDBPath); 1493 th_free(setSLDBPath);
1491 th_free(setSTILDBPath); 1494 th_free(setSTILDBPath);
1492 1495