Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread Dimitris Papastamos
On Wed, Jun 04, 2014 at 06:52:11PM +0200, FRIGN wrote: > On Wed, 4 Jun 2014 17:44:14 +0100 > Dimitris Papastamos wrote: > > > declaring variables in the middle of the block is not my practice. > > I am not embracing all features of C99, I use a mix of C90 and C99 > > without sacrificing portabili

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread FRIGN
On Wed, 4 Jun 2014 17:44:14 +0100 Dimitris Papastamos wrote: > declaring variables in the middle of the block is not my practice. > I am not embracing all features of C99, I use a mix of C90 and C99 > without sacrificing portability (as far as I can). Same here, that's why I changed it to _not_

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread Dimitris Papastamos
On Wed, Jun 04, 2014 at 06:32:50PM +0200, FRIGN wrote: > On Wed, 4 Jun 2014 16:31:47 +0100 > Dimitris Papastamos wrote: > > > uint_least64_t is C99. > > Well, it's your choice to take it or not. If you don't like it, you can > implement the changes to the inherent variable-declarations in the >

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread FRIGN
On Wed, 4 Jun 2014 16:31:47 +0100 Dimitris Papastamos wrote: > uint_least64_t is C99. Well, it's your choice to take it or not. If you don't like it, you can implement the changes to the inherent variable-declarations in the middle of blocks only to at least get the separation right. Cheers FR

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread Dimitris Papastamos
On Wed, Jun 04, 2014 at 12:00:41PM -0400, Lee Fallat wrote: > Just a quick question that is somewhat related: will ubase compile on > the BSDs, and possibly Plan 9 (using APE) ?... not ubase. ubase specifically exists for all programs that are inherently not portable. All tools in ubase depend o

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread Martti Kühne
On Wed, Jun 4, 2014 at 5:51 PM, FRIGN wrote: > Code is written wronce and read many times. I don't know about you, but "wronce"... interesting idea. You could get it right the first time, but popular ongoing debate seems to have established well enough that the programmer tries to converge to bei

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread FRIGN
On Wed, 4 Jun 2014 12:00:41 -0400 Lee Fallat wrote: > Just a quick question that is somewhat related: will ubase compile on > the BSDs, and possibly Plan 9 (using APE) ?... Good question. Well, this doesn't make much sense, as ubase is the set of linux base utils. sbase is the way to go for uni

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread Lee Fallat
Just a quick question that is somewhat related: will ubase compile on the BSDs, and possibly Plan 9 (using APE) ?... On Wed, Jun 4, 2014 at 11:51 AM, FRIGN wrote: > On Wed, 4 Jun 2014 11:46:18 -0400 > Nick wrote: > >> Umm. In what way is the trailing comma an error? Leaving trailing >> commas in

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread FRIGN
On Wed, 4 Jun 2014 11:46:18 -0400 Nick wrote: > Umm. In what way is the trailing comma an error? Leaving trailing > commas in structs is always reasonable (as far as I know), so you > can move things around / add things without messing with the last > line. Is there some reason you wouldn't wa

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread FRIGN
On Wed, 4 Jun 2014 16:31:47 +0100 Dimitris Papastamos wrote: > uint_least64_t is C99. Check stdint.h, where it actually calls the extension for 64bit-types. For full C90-compatibility we would of course need to take care of this in a deeper way, but this way, no functionality is lost. -- FRIGN

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread Nick
Quoth FRIGN: > Add -pedantic to CFLAGS to spot errors like the one in eject.c. > > [snip] > > diff --git a/eject.c b/eject.c > index 7d458e8..62f42fa 100644 > --- a/eject.c > +++ b/eject.c > @@ -10,7 +10,7 @@ > > enum { > CDROM_EJECT = 0x5309, > - CDROM_CLOSE_TRAY = 0x5319, > + CDR

Re: [dev] [ubase] [PATCH] Bring back C89/C90

2014-06-04 Thread Dimitris Papastamos
On Wed, Jun 04, 2014 at 05:28:50PM +0200, FRIGN wrote: > Given ubase was already very close to compile with c90-mode enabled, > why not do it then? > Basically, it involved switching to uint_least64_t instead of unsigned long > long > and improving some dynamic-array magic. uint_least64_t is C99.