This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Enhance localedef to accept file argument for --list-archive.


> 	* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]