#indent-#unindent
One perhaps troublesome requirement for #include'ing program and other files is that you must indent them. You may use the #indent ... #unindent preprocessor directives to fake indentation. More precisely, enclosing entire files, or portions of files, with #indent-#unindent inserts an automatic single-tab indent at the beginning of every enclosed line.
For example, piktc interprets this
#indent #!/usr/local/bin/expect set timeout [lindex $argv 0] eval spawn -noecho [lrange $argv 1 end] expect #unindentin the same way that it sees this
#!/usr/local/bin/expect
set timeout [lindex $argv 0]
eval spawn -noecho [lrange $argv 1 end]
expect
You can do this
maxtime.exp #indent #include <maxtime.exp_programs.cfg> #unindentto achieve indentation without actually having to indent the maxtime.exp program file.
#indent-#unindent is also very useful when applied to any of the .obj files. For example
passwd #indent #include "/etc/passwd" #unindentwould allow you to use the system passwd file as a PIKT object set without your having to worry about actual indentation.
For greater clarity, you may indent your preprocessor lines--that is, put spaces (or tabs) between the '#' and the preprocessor keyword. Note that this has nothing to do with the indenting just discussed.
For example, you could render complex preprocessor code like
#ifdef paranoid
#if solaris
#ifdef doexec
[code...]
#elsedef
[code...]
#endifdef
#else
[code...]
#endif
#elsedef
[code...]
#endifdef
instead as
#ifdef paranoid
# if solaris
# ifdef doexec
[code...]
# elsedef
[code...]
# endifdef
# else
[code...]
# endif
#elsedef
[code...]
#endifdef
| | next page |