args = strtok (args, ",");
while (args)
{
- int no = strncmp (args, "no-", 3) == 0 ? 3 : 0;
+ int no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
int value = XARGMATCH (option, args + no, keys, values);
if (value == 0)
{
case 'F': /* -FNAME[=VALUE]. */
{
char* name = optarg;
- char* value = mbschr (optarg, '=');
+ char* value = strchr (optarg, '=');
if (value)
*value++ = 0;
muscle_percent_define_insert (name, command_line_location (),
/* Here, the -d and --defines options are differentiated. */
defines_flag = true;
if (optarg)
- spec_defines_file = xstrdup (AS_FILE_NAME (optarg));
+ {
+ free (spec_defines_file);
+ spec_defines_file = xstrdup (AS_FILE_NAME (optarg));
+ }
break;
case 'g':
graph_flag = true;
if (optarg)
- spec_graph_file = xstrdup (AS_FILE_NAME (optarg));
+ {
+ free (spec_graph_file);
+ spec_graph_file = xstrdup (AS_FILE_NAME (optarg));
+ }
break;
case 'h':
case 'x':
xml_flag = true;
if (optarg)
- spec_xml_file = xstrdup (AS_FILE_NAME (optarg));
+ {
+ free (spec_xml_file);
+ spec_xml_file = xstrdup (AS_FILE_NAME (optarg));
+ }
break;
case 'y':
exit (EXIT_SUCCESS);
case PRINT_DATADIR_OPTION:
- printf ("%s\n", compute_pkgdatadir ());
+ printf ("%s\n", pkgdatadir ());
exit (EXIT_SUCCESS);
case REPORT_FILE_OPTION:
+ free (spec_verbose_file);
spec_verbose_file = xstrdup (AS_FILE_NAME (optarg));
break;