Renamed program-specific profiles to ~/.mu.<program>rc.
Showing
1 changed file
with
6 additions
and
4 deletions
... | @@ -536,13 +536,15 @@ mu_create_argcv (const char *capa[], | ... | @@ -536,13 +536,15 @@ mu_create_argcv (const char *capa[], |
536 | 536 | ||
537 | /* Add per-program (and per-user) config file. */ | 537 | /* Add per-program (and per-user) config file. */ |
538 | { | 538 | { |
539 | char* progrc = malloc (strlen (progname) + 3 /* ~/ */ + 3 /* rc */ + 1); | 539 | char* progrc = malloc (strlen (progname) |
540 | + 6 /* ~/.mu. */ | ||
541 | + 3 /* rc */ + 1); | ||
540 | if (!progrc) | 542 | if (!progrc) |
541 | { | 543 | { |
542 | fprintf (stderr, "%s: not enough memory\n", progname); | 544 | fprintf (stderr, "%s: not enough memory\n", progname); |
543 | exit (1); | 545 | exit (1); |
544 | } | 546 | } |
545 | sprintf (progrc, "~/.%src", progname); | 547 | sprintf (progrc, "~/.mu.%src", progname); |
546 | read_rc (NULL, progrc, capa, &x_argc, &x_argv); | 548 | read_rc (NULL, progrc, capa, &x_argc, &x_argv); |
547 | free (progrc); | 549 | free (progrc); |
548 | } | 550 | } |
... | @@ -589,7 +591,7 @@ mu_build_argp (const struct argp *template, const char *capa[]) | ... | @@ -589,7 +591,7 @@ mu_build_argp (const struct argp *template, const char *capa[]) |
589 | /* Count the capabilities */ | 591 | /* Count the capabilities */ |
590 | for (n = 0; capa && capa[n]; n++) | 592 | for (n = 0; capa && capa[n]; n++) |
591 | ; | 593 | ; |
592 | if (template && template->children) | 594 | if (template->children) |
593 | for (; template->children[n].argp; n++) | 595 | for (; template->children[n].argp; n++) |
594 | ; | 596 | ; |
595 | 597 | ||
... | @@ -601,7 +603,7 @@ mu_build_argp (const struct argp *template, const char *capa[]) | ... | @@ -601,7 +603,7 @@ mu_build_argp (const struct argp *template, const char *capa[]) |
601 | } | 603 | } |
602 | 604 | ||
603 | n = 0; | 605 | n = 0; |
604 | if (template && template->children) | 606 | if (template->children) |
605 | for (; template->children[n].argp; n++) | 607 | for (; template->children[n].argp; n++) |
606 | ap[n] = template->children[n]; | 608 | ap[n] = template->children[n]; |
607 | 609 | ... | ... |
-
Please register or sign in to post a comment