GNOME Bugzilla – Bug 338002
code cleanup, gif.c
Last modified: 2006-05-03 14:59:50 UTC
neater code in plug-ins/common/gif.c Other information: (attachment to follow)
Created attachment 63188 [details] replacement plug-ins/common/gif.c This replacement gif.c is functionally identical to the original. I have gone through and tried to update it to follow the Hackordnung, as well as correcting for internal consistency where possible. In a few places with wildly varying style I settled for local consistency between nearby lines of the same type. This cleanup was suggested as a first step before submitting more feature patches to this file.
Created attachment 63196 [details] [review] diff -u1 -bp This is the diff from the old version to the new one. I used -b because without ignoring whitespace changes diff spits almost the whole file back out due to my tab->space conversion.
This change is based on the gimp-2-2 branch. For this reason we cannot accept it. We need a patch against CVS HEAD.
Created attachment 63247 [details] [review] replacement plug-ins/common/gif.c Updated replacement for gif.c from cvs HEAD Once again, local inconsitencies remain. I have applied all of the solid written rules that I can find, and some unwritten ones gleaned from other more authoritative source files, but a lot is still subjective. I especially disliked the rule changing this: foo || bar to this: foo || bar
Created attachment 63248 [details] [review] diff -u1 -bp diff of the above patch, -u1 -bp to make for easy reading.
Where's the rule saying that foo || bar should be changed to this: foo || bar ?? We usually use the first style in the GIMP code.
There is more cleanup needed before the file fully conforms to our coding standards, but this is a nice step into that direction. I have replaced the file in the HEAD branch with the attached version. Closing as FIXED. 2006-04-13 Sven Neumann <sven@gimp.org> * plug-ins/common/gif.c: code cleanup by Clarence Risher (bug #338002).
Looks like this change introduced a regression, see bug #339865. We might have to revert it.
Or maybe not because bug #339865 deals with a problem to load a GIF file while this change only affected the save plug-in...