indent settings

Richard Hughes hughsient at gmail.com
Wed Feb 28 15:56:32 PST 2007


HAL is currently a real mess of indent styles. Some files use spaces
and some use tabs, and there are lots of subtle differences between
files.

I'm suggesting using settings such as:

indent --k-and-r-style -i8 --procnames-start-lines
--space-after-procedure-calls --blank-lines-after-procedures
--continue-at-parentheses --line-length100 create_cache.c

As these seem to reflect the majority of hal, and I think this is what
David likes. It's certainly very similar to the way I do all my GNOME
software.

This gives output such as this:

header.fdi_rules_preprobe = lseek (fd, 0, SEEK_END);
if (hal_fdi_source_preprobe != NULL)
	rules_search_and_add_fdi_files (hal_fdi_source_preprobe, fd);
else {
	rules_search_and_add_fdi_files (PACKAGE_DATA_DIR "/hal/fdi/preprobe", fd);
	rules_search_and_add_fdi_files (PACKAGE_SYSCONF_DIR "/hal/fdi/preprobe", fd);
}

which is very easy on the eye in my opinion. Can developers test these
settings and provide comments please (especially David!)

Thanks,

Richard.


More information about the hal mailing list