On Wednesday 17 January 2007 8:02 am, Alan Stern wrote: > On Tue, 16 Jan 2007, David Brownell wrote: > > > On Tuesday 16 January 2007 8:52 am, Alan Stern wrote: > > > > > + /* if this was a write or a read returning no data then we > > > + * don't need to copy anything to userspace, so we can > > > + * complete the aio request immediately. */ > > > > I forwarded this to Greg after refreshing it to go on top of the > > other patches I've sent recently, and fixing that comment style. > > > > /* comments in code > > * line up > > * like this > > * the left margin > > * you shall not miss > > * Burma-Shave > > */ > > :-) > > Okay, thanks. (But weren't those Burma-Shave ads before your time? I > don't remember ever seeing any of them.)
They featured in the MAD magazine parts of a misspent youth, and I liked that bit of Americana. Plus, I was too lazy to come up with a sonnet, and the darn limericks kept coming out NSFW. ;) > You know, it's hard to keep track of all the different comment styles used > throughout the kernel source. Yes, but not within one source file!! And having the "*/" on the same line as the comment is pretty uniformly OK only with one-line comments, despite what injuries some text editors seem to want to commit. > Apart from the standard one-liner > > /* this is a comment */ > > there are (at least) the following variations (note that only the first > one below is blessed by Documentation/CodingStyle): Implicitly blessed is also /** * kerneldoc - the book * @param1: description here put * ... */ > /* > * This is > * a multiline comment. > */ > > /* This is another > * multiline comment. */ > > /* This is yet another > multiline comment. */ > > Not to mention questions about whether there should be a blank line > preceding or following the comment block. Or whether the text should be > in full English sentences, and whether the first letter of each sentence > should be capitalized. > > Admittedly, I'm not consistent even in the style of my own comments. I try to stick to the format I showed. If forced, the start'o'comment can go on a line by itself. And then there's a little point about using comments like "/*--------------------------------*/" to group logically reated chunks of code... - Dave > > Alan Stern > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel