I don't understand your debug printf() comment at all. You can always break a printf() line, even in the format string, with string literal concatenation.
Posted Nov 1, 2012 9:41 UTC (Thu) by ncm (subscriber, #165)
[Link]
Me, I've never understood why people insist that printf format strings should be indented at all. I push them to the left margin, and it brings no confusion, but much clarity.
Eight character tabs
Posted Nov 1, 2012 12:06 UTC (Thu) by etienne (subscriber, #25256)
[Link]
But most of the time you want to understand the structure of the function you are about to modify, even if you have (probably commented) printf's showing that you entered the function with those parameters, that you are calling that other function with those parameters, what is the value of each of the fields of that structure...
Having 3/4 lines of code with no algorithm meaning does not help to see the structure of the code and is difficult to comment/uncomment at once; it is easier to tell your editor not to wrap lines and so not display the end of those (probably commented) lines.
Obviously you can write the functions print_mystruct_and_cpt(), print_mystruct_and_idx(), ... that you call only once in a commented out block.
Linux source do not have much "logging" lines, so it is not a real problem there.