[TxMt] Folding in C

Daniel Vollmer maven at maven.de
Thu Jan 5 08:53:03 UTC 2006


Hi all!

I've been using doxygen to write documentation for a wavelet image  
compression codec of mine, which is written in C. There I noticed two  
things on folding, which are the following:

/** This is the basic "pixel" type.
* \Warning This should not be less than 15 bits + sign!
**/
typedef short int wv_pel;

Here, the end-comment marker has to have two *s, it doesn't fold with  
one, but if I add a third * to the open comment bit, then it still  
works?

Another thing which I couldn't figure out is the following:

if (foo > (bar >> 3))
{ /* this does something nice */
	foo++;
}
else
{ /* not nice */
	bar++;
}

Here, the folding does not activate with the comment on the same  
line, which I actually use quite often.

I am really bad with regular expressions, so I couldn't figure out  
what they're trying to (referring to the folding patterns). I am  
aware though, that I can change them myself if I were so inclined,  
but I just wanted to ask whether TM expects me to do the above things  
in different way which may be equally nice.

Oh, and Allan, nice website overhaul. :)

Thanks,
	Daniel.



More information about the textmate mailing list