Date: Sat, 8 Jun 2002 23:13:53 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: "J. Mallett" <jmallett@FreeBSD.ORG> Cc: Bruce Evans <bde@FreeBSD.ORG>, <cvs-committers@FreeBSD.ORG>, <cvs-all@FreeBSD.ORG> Subject: Re: cvs commit: src/bin/ps extern.h Message-ID: <20020608225458.Q19691-100000@gamplex.bde.org> In-Reply-To: <20020608000108.A42463@FreeBSD.ORG>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 8 Jun 2002, J. Mallett wrote: > * From Bruce Evans <bde@FreeBSD.org> > > bde 2002/06/07 23:49:15 PDT > > > > Modified files: > > bin/ps extern.h > > Log: > > Fixed unsorting. > > Now, I understand this project has a hard time deciding what exactly it means > "to sort" something, but nonetheless I would have to say that this appears to > replace one possibly acceptable sorting method (sorting by type) with a wrong > sort order of another sorting method (sorting by variable name). In my mind, I think sorting by type makes no sense for extern declarations. (style.9 only says how to sort structs and local variables. It says to sort by size [largest first] (not type), then by name. Sorting struct members by size gives better packing, and sorting local variables by size (perhaps smallest instead of largest first) may give gives better packing for primitive compilers, but extern declarations don't allocate space so size considerations don't apply.) > we should be sorting as per LANG=C, and in that case, 'ra' definitely comes a > bit after 'no', however 'no' comes happily after 'nl', therefore the lines in > this locate could be written as: > > %%% > extern int cflag, eval, fscale, mempages, nlistread; > extern time_t now; > extern int rawcpu, sumrusage, termwidth, totwidth; > %%% > > But I don't think revision 1.24 fixes unsorting. I didn't want to restructure the declarations to have only one variable per line, so I followed my usual rule for insertion "sorting" in unsorted list: insert before the first line whose first item is after the item being inserted. Since this gave a very trivial change, I should have restructured the declarations. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020608225458.Q19691-100000>