C Indentation Survey Results (long...)
Ken Warner
warner at orca.UUCP
Mon May 6 05:51:50 AEST 1985
[BUGS]
Below is an actual example of real C code. It's in K&R orthodox bracing
style. Is it easier to read because of it? Should I change my style of
bracing to K&R? Can we stop prattling on about this religious issue?
switch (key) {
case BACK:
fprintf(stoout,"BACK\n");
if (device->s.stroke.current_editpos > 1) {
device->s.stroke.current_editpos--;
for (device->s.stroke.editptr =
&(device->s.stroke.header),
i = 1;
device->s.stroke.editptr->next->next,
i < device->s.stroke.current_editpos;
device->s.stroke.editptr =
device->s.stroke.editptr->next,
i++ ) {
;
}
} else {
#ifdef DEBUG
More information about the Comp.lang.c
mailing list