IMDENT manual page
Table of Contents
imdent -indent cpp directives to show nesting level
imdent [ -n ] [ file ] ...
imdent reads the named input file(s), or the standard input
if no files are named, and adds indentation to cpp directives
based on the nesting level of conditional directives. This visually
shows the nesting as an aid to finding malformed conditional constructs
and can be helpful when debugging imake configuration
files.
imdent understands the following option:
-
-n
-
Specify indentation increment per nesting level. n is
a number. The default is 2 spaces. -0 removes all indentation.
Given the following input:
#ifndef ManDirectoryRoot
#ifdef ProjectRoot
#define ManDirectoryRoot Concat(ProjectRoot,/man)
#ifndef XmanLocalSearchPath
#define XmanLocalSearchPath ManDirectoryRoot
#endif
#else
#if SystemV4
#define ManDirectoryRoot /usr/share/man
#else
#define ManDirectoryRoot /usr/man
#endif
#endif
#endif
imdent produces the following output:
#ifndef ManDirectoryRoot
# ifdef ProjectRoot
# define ManDirectoryRoot Concat(ProjectRoot,/man)
# ifndef XmanLocalSearchPath
# define XmanLocalSearchPath ManDirectoryRoot
# endif
# else
# if SystemV4
# define ManDirectoryRoot /usr/share/man
# else
# define ManDirectoryRoot /usr/man
# endif
# endif
#endif
Paul DuBois, dubois@primate.wisc.edu