Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!philapd!ssp11!caren
From: caren@idca.tds.PHILIPS.nl (Caren Alink)
Newsgroups: comp.unix.questions
Subject: C-Beautifier 'cb'
Keywords: cb usage
Message-ID: <329@ssp11.idca.tds.philips.nl>
Date: 3 Oct 89 13:31:29 GMT
Organization: Philips Telecommunication and Data Systems, The Netherlands
Lines: 48



Hi!

I've got a question concerning the C-beautifier 'cb'. According to the
manual, the option '-l len' causes cb to split lines that are longer
than len. What do they mean by that?? Is it that the original source is
split in lines with lenght 'len', or is every source line which would
become longer than 'len' split, or.....
And what does the comment "/* code folded from here */" mean??

To illustrate, an example:

original source file x.c:

main(){int i;for(i=1;i<10;1++){printf("hello1");printf("hello2");}/*comment*/}

'cb x.c' gives:

main(){
	int i;
	for(i=1;i<10;1++){
		printf("hello1");
		printf("hello2");
	}/*comment*/
}

and

'cb -l 30 x.c' gives:

main(){
	int i;
	for(i=1;i<10;1++){
/* code folded from here */
	printf("hello1");
	printf("hello2");
/* unfolding */
	}/*comment*/
}


thanks,

 _  _   __  _  _     _   / o_  /
(__(_(_/ (_(-_/ )   (_(_/_// )/(		"uit gouden korenaren..."

phone: 055-43 2803				...hp4nl!philapd!caren