Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 2010 22:33:36 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Gabor Kovesdan <gabor@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r202993 - head/lib/libc/nls
Message-ID:  <20100126222412.L74262@delplex.bde.org>
In-Reply-To: <201001252344.o0PNi0Gh013661@svn.freebsd.org>
References:  <201001252344.o0PNi0Gh013661@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100126222412.L74262>