This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Enhance localedef to accept file argument for --list-archive.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Thu, 3 Oct 2013 13:02:08 -0700 (PDT)
- Subject: Re: [PATCH] Enhance localedef to accept file argument for --list-archive.
- Authentication-results: sourceware.org; auth=none
- References: <524D09E0 dot 4030106 at redhat dot com> <524D243D dot 2080507 at redhat dot com>
> * locale/programs/localedef.c (main): Pass argv[remaining]
caps
> if an optional argument was specified to --list-archive
> otherwise NULL.
run-on sentence: try a comma before "otherwise".
> * locale/programs/localedef.h: Pass fname as first argument
> for show_archive_content.
Usually you put this after the entry for the change to the funciton
definition and just say, "Update decl."
> * locale/programs/locarchive.c (show_archive_content): Pass fname
> via ah.fname to open_archive.
"Take new argument, pass it ..."
> (open_archive): Use ah->fname as the locale archive otherwise
> open the default locale archive. It's an error for a user specified
> locale archive not to exist.
Two spaces; caps; punctuation: "If AH->fname is non-null, open that file
rather than the default file name, and don't ignore ENOENT."
> -/* List content of locale archive. */
> -extern void show_archive_content (int verbose) __attribute__ ((noreturn));
> +/* List content of locale archive. If FNAME is non-null use that as
> + the locale archive to list, otherwise the default. */
> +extern void show_archive_content (char *fname, int verbose) __attribute__ ((noreturn));
Line too long.
> + bool defaultfname = false;
Why not just test archivefname == fname?
It would be clearer to change the names to "fname" and "default_fname", too.
> +show_archive_content (char *fname, int verbose)
Might as well be const.