Universal escaping in KConfigINI: Summary and patch
ossi at kde.org
Fri May 25 08:02:26 BST 2007
On Fri, May 25, 2007 at 01:46:00AM +0200, Andreas Hartmetz wrote:
> You will find attached the patch that I consider *final*.
On Fri, May 25, 2007 at 01:51:10AM +0200, Andreas Hartmetz wrote:
> Of course "TODO: warning" is not final :)
> I like the control flow in in stringToPrintable exactly the way it is,
yes, my idea wouldn't work anyway (reading patches is hard, you know :).
buuut ... having the default last is *still* the right thing to do. ;)
> we cannot discuss minor stuff forever
oh, c'mon ... are you in a hurry? :-D
your patches are made with -b, right?
> + escape:
> + *r++ = '\\';
i unindent goto labels only half an indent step. maybe you find it more
appealing, too. ;)
> + *r++ = nibbleLookup[((unsigned char)s[i]) >> 4];
> + *r = nibbleLookup[((unsigned char)s[i]) & 0x0f];
you overdid the casting, but readability-wise it is better your way.
it might get even better if you line up the equal sign and change to 15
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
Chaos, panic, and disorder - my work here is done.
More information about the kde-core-devel