svn commit: r202993 - head/lib/libc/nls
Bruce Evans
brde at optusnet.com.au
Tue Jan 26 11:33:40 UTC 2010
On Mon, 25 Jan 2010, Gabor Kovesdan wrote:
> Log:
> - style(9)
It still barely resembles KNF, and regressed in several places.
> Modified: head/lib/libc/nls/msgcat.c
> ==============================================================================
> --- head/lib/libc/nls/msgcat.c Mon Jan 25 23:37:49 2010 (r202992)
> +++ head/lib/libc/nls/msgcat.c Mon Jan 25 23:44:00 2010 (r202993)
> @@ -107,11 +107,11 @@ SLIST_HEAD(listhead, catentry) cache =
> nl_catd
> catopen(const char *name, int type)
> {
> - int spcleft, saverr;
> - char path[PATH_MAX];
> - char *nlspath, *lang, *base, *cptr, *pathP, *tmpptr;
> - char *cptr1, *plang, *pter, *pcode;
> - struct stat sbuf;
> + int spcleft, saverr;
> + char path[PATH_MAX];
> + char *nlspath, *lang, *base, *cptr, *pathP, *tmpptr;
> + char *cptr1, *plang, *pter, *pcode;
> + struct stat sbuf;
> struct catentry *np;
Declarations of local variable are not indented in KNF. This change is
sort of backwards since it increases the fanciness of their indentation.
Declarations of local variable are sorted in KNF. These are still totally
unsorted.
> @@ -247,10 +247,10 @@ catopen(const char *name, int type)
> char *
> catgets(nl_catd catd, int set_id, int msg_id, const char *s)
> {
> - struct _nls_cat_hdr *cat_hdr;
> - struct _nls_set_hdr *set_hdr;
> - struct _nls_msg_hdr *msg_hdr;
> - int l, u, i, r;
> + struct _nls_cat_hdr *cat_hdr;
> + struct _nls_set_hdr *set_hdr;
> + struct _nls_msg_hdr *msg_hdr;
> + int l, u, i, r;
This changes the indentation from normal to abnormal.
There are only 4 order errors here (s before m, l before i, u before i and r).
> @@ -348,11 +348,11 @@ catclose(nl_catd catd)
> static nl_catd
> load_msgcat(const char *path, const char *name, const char *lang)
> {
> - struct stat st;
> - nl_catd catd;
> + struct stat st;
> + nl_catd catd;
> struct catentry *np;
> - void *data;
> - int fd;
> + void *data;
> + int fd;
The indentation regressed, as above.
Bruce
More information about the svn-src-all
mailing list