Formatting of bootscripts

that weasel weasel at
Tue Jan 4 17:08:21 PST 2005

On Wed, 2005-01-05 at 00:47 +0000, Ian Molton wrote:
> However I feel this looks ugly and prefer to align the parameters such 
> that they are under the parameters of the first line. a tab is not 
> appropriate for this since the two lines are at the same conceptual 
> level of indentation - they are both within the for{} loop, within the 
> function some_fn().
> The correct way to align the string is to use two tab characters (the 
> same elvel of indentation as the preceeding line), and then use spaces 
> to align the parameters - this causes the text to format correctly in 
> all (reasonable) circumstances.
> eg.
> 		printf("A %s of %d Characters in length",
> 		       "string", length);

I do too, but i prefer to put one parameter per line when ever the line
gets too long.

		printf("A %s of %d Characters in length",

I actually think that all function calls that take more than one
parameter should be formatted like that.  To me its much more clear
where each param starts and stops.


More information about the lfs-dev mailing list