Re: jot: small cleanup for conversion switch

2018-01-11 Thread Alexander Hall
On January 12, 2018 7:26:58 AM GMT+01:00, Theo Buehler wrote: >> >+ case 'd': >> >+ case 'i': >> >intdata = true; >> >break; >> >+ case 'o': >> >+ case 'u': >> >+ case 'x': >> >+ case 'X': >> >>

Re: jot: small cleanup for conversion switch

2018-01-11 Thread Theo Buehler
> >+case 'd': > >+case 'i': > > intdata = true; > > break; > >+case 'o': > >+case 'u': > >+case 'x': > >+case 'X': > > Convention is X before x in usage() and friends, so I guess that'd

Re: jot: small cleanup for conversion switch

2018-01-11 Thread Alexander Hall
Didn't test, but reads ok to me, with minor nit below. On January 11, 2018 9:25:10 PM GMT+01:00, Theo Buehler wrote: >This aligns all cases vertically which makes them easier to find. > >Normalize all cases: if the long form is illegal or unsupported, >'goto fmt_broken;', then set the flags for

jot: small cleanup for conversion switch

2018-01-11 Thread Theo Buehler
This aligns all cases vertically which makes them easier to find. Normalize all cases: if the long form is illegal or unsupported, 'goto fmt_broken;', then set the flags for the casts in putdata() on a single line. This is all straightforward, but I think the resulting code is easier to follow. O