Browse Source

eliminate tabs, repair indenting damage from tab-damaged editors

David Rose 24 years ago
parent
commit
ed9e517399

+ 3 - 3
ppremake/filename.cxx

@@ -26,7 +26,7 @@ is_fullpath(const string &pathname) {
 
   if (windows_platform) {
     if (pathname.length() > 2 && 
-	isalpha(pathname[0]) && pathname[1] == ':') {
+        isalpha(pathname[0]) && pathname[1] == ':') {
       // A drive-letter prefix.
       return (pathname[2] == '/' || pathname[2] == '\\');
     }
@@ -49,7 +49,7 @@ to_os_filename(string pathname) {
     string::iterator si;
     for (si = pathname.begin(); si != pathname.end(); ++si) {
       if ((*si) == '/') {
-	(*si) = '\\';
+        (*si) = '\\';
       }
     }
   }
@@ -69,7 +69,7 @@ to_unix_filename(string pathname) {
     string::iterator si;
     for (si = pathname.begin(); si != pathname.end(); ++si) {
       if ((*si) == '\\') {
-	(*si) = '/';
+        (*si) = '/';
       }
     }
   }

+ 1 - 1
ppremake/find_searchpath.h

@@ -14,7 +14,7 @@
 // directories, and returns the first place in which it is found, or
 // empty string if it is not found.
 string find_searchpath(const vector<string> &directories,
-		       const string &filename);
+                       const string &filename);
 
 #endif
 

+ 16 - 16
ppremake/gnu_getopt.h

@@ -25,7 +25,7 @@
 #define getopt_long gnu_getopt_long
 #define getopt_long_only gnu_getopt_long_only
 
-#ifdef	__cplusplus
+#ifdef  __cplusplus
 extern "C" {
 #endif
 
@@ -66,9 +66,9 @@ extern int optopt;
    zero.
 
    The field `has_arg' is:
-   no_argument		(or 0) if the option does not take an argument,
-   required_argument	(or 1) if the option requires an argument,
-   optional_argument 	(or 2) if the option takes an optional argument.
+   no_argument          (or 0) if the option does not take an argument,
+   required_argument    (or 1) if the option requires an argument,
+   optional_argument    (or 2) if the option takes an optional argument.
 
    If the field `flag' is not NULL, it points to a variable that is set
    to the value given in the field `val' when the option is found, but
@@ -83,7 +83,7 @@ extern int optopt;
 
 struct option
 {
-#if	__STDC__
+#if     __STDC__
   const char *name;
 #else
   char *name;
@@ -97,28 +97,28 @@ struct option
 
 /* Names for the values of the `has_arg' field of `struct option'.  */
 
-#define	no_argument		0
-#define required_argument	1
-#define optional_argument	2
+#define no_argument             0
+#define required_argument       1
+#define optional_argument       2
 
 extern EXPCL_DTOOL int
 getopt (int argc, char *const *argv, const char *shortopts);
 extern EXPCL_DTOOL int
 getopt_long (int argc, char *const *argv, const char *shortopts,
-	     const struct option *long_options, int *opt_index);
+             const struct option *long_options, int *opt_index);
 extern EXPCL_DTOOL int
 getopt_long_only (int argc, char *const *argv,
-		  const char *shortopts,
-		  const struct option *long_options, 
-		  int *opt_index);
+                  const char *shortopts,
+                  const struct option *long_options, 
+                  int *opt_index);
 
 /* Internal only.  Users should not call this directly.  */
 extern int _getopt_internal (int argc, char *const *argv,
-			     const char *shortopts,
-		             const struct option *longopts, int *longind,
-			     int long_only);
+                             const char *shortopts,
+                             const struct option *longopts, int *longind,
+                             int long_only);
 
-#ifdef	__cplusplus
+#ifdef  __cplusplus
 }
 #endif
 

+ 50 - 50
ppremake/gnu_regex.h

@@ -20,7 +20,7 @@
 #ifndef GNU_REGEX_H
 #define GNU_REGEX_H
 
-#ifdef	__cplusplus
+#ifdef  __cplusplus
 extern "C" {
 #endif
 
@@ -146,27 +146,27 @@ extern reg_syntax_t re_syntax_options;
 /* [[[begin syntaxes]]] */
 #define RE_SYNTAX_EMACS 0
 
-#define RE_SYNTAX_AWK							\
-  (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL			\
-   | RE_NO_BK_PARENS            | RE_NO_BK_REFS				\
-   | RE_NO_BK_VBAR               | RE_NO_EMPTY_RANGES			\
+#define RE_SYNTAX_AWK                                                   \
+  (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL                       \
+   | RE_NO_BK_PARENS            | RE_NO_BK_REFS                         \
+   | RE_NO_BK_VBAR               | RE_NO_EMPTY_RANGES                   \
    | RE_UNMATCHED_RIGHT_PAREN_ORD)
 
-#define RE_SYNTAX_POSIX_AWK 						\
+#define RE_SYNTAX_POSIX_AWK                                             \
   (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
 
-#define RE_SYNTAX_GREP							\
-  (RE_BK_PLUS_QM              | RE_CHAR_CLASSES				\
-   | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS				\
+#define RE_SYNTAX_GREP                                                  \
+  (RE_BK_PLUS_QM              | RE_CHAR_CLASSES                         \
+   | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS                            \
    | RE_NEWLINE_ALT)
 
-#define RE_SYNTAX_EGREP							\
-  (RE_CHAR_CLASSES        | RE_CONTEXT_INDEP_ANCHORS			\
-   | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE			\
-   | RE_NEWLINE_ALT       | RE_NO_BK_PARENS				\
+#define RE_SYNTAX_EGREP                                                 \
+  (RE_CHAR_CLASSES        | RE_CONTEXT_INDEP_ANCHORS                    \
+   | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE                    \
+   | RE_NEWLINE_ALT       | RE_NO_BK_PARENS                             \
    | RE_NO_BK_VBAR)
 
-#define RE_SYNTAX_POSIX_EGREP						\
+#define RE_SYNTAX_POSIX_EGREP                                           \
   (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
 
 /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff.  */
@@ -175,32 +175,32 @@ extern reg_syntax_t re_syntax_options;
 #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
 
 /* Syntax bits common to both basic and extended POSIX regex syntax.  */
-#define _RE_SYNTAX_POSIX_COMMON						\
-  (RE_CHAR_CLASSES | RE_DOT_NEWLINE      | RE_DOT_NOT_NULL		\
+#define _RE_SYNTAX_POSIX_COMMON                                         \
+  (RE_CHAR_CLASSES | RE_DOT_NEWLINE      | RE_DOT_NOT_NULL              \
    | RE_INTERVALS  | RE_NO_EMPTY_RANGES)
 
-#define RE_SYNTAX_POSIX_BASIC						\
+#define RE_SYNTAX_POSIX_BASIC                                           \
   (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
 
 /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
    RE_LIMITED_OPS, i.e., \? \+ \| are not recognized.  Actually, this
    isn't minimal, since other operators, such as \`, aren't disabled.  */
-#define RE_SYNTAX_POSIX_MINIMAL_BASIC					\
+#define RE_SYNTAX_POSIX_MINIMAL_BASIC                                   \
   (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
 
-#define RE_SYNTAX_POSIX_EXTENDED					\
-  (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS			\
-   | RE_CONTEXT_INDEP_OPS  | RE_NO_BK_BRACES				\
-   | RE_NO_BK_PARENS       | RE_NO_BK_VBAR				\
+#define RE_SYNTAX_POSIX_EXTENDED                                        \
+  (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS                   \
+   | RE_CONTEXT_INDEP_OPS  | RE_NO_BK_BRACES                            \
+   | RE_NO_BK_PARENS       | RE_NO_BK_VBAR                              \
    | RE_UNMATCHED_RIGHT_PAREN_ORD)
 
 /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
    replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added.  */
-#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED				\
-  (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS			\
-   | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES				\
-   | RE_NO_BK_PARENS        | RE_NO_BK_REFS				\
-   | RE_NO_BK_VBAR	    | RE_UNMATCHED_RIGHT_PAREN_ORD)
+#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED                                \
+  (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS                  \
+   | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES                           \
+   | RE_NO_BK_PARENS        | RE_NO_BK_REFS                             \
+   | RE_NO_BK_VBAR          | RE_UNMATCHED_RIGHT_PAREN_ORD)
 /* [[[end syntaxes]]] */
 
 /* Maximum number of duplicates an interval can allow.  Some systems
@@ -249,28 +249,28 @@ extern reg_syntax_t re_syntax_options;
    `re_error_msg' table in regex.c.  */
 typedef enum
 {
-  REG_NOERROR = 0,	/* Success.  */
-  REG_NOMATCH,		/* Didn't find a match (for regexec).  */
+  REG_NOERROR = 0,      /* Success.  */
+  REG_NOMATCH,          /* Didn't find a match (for regexec).  */
 
   /* POSIX regcomp return error codes.  (In the order listed in the
      standard.)  */
-  REG_BADPAT,		/* Invalid pattern.  */
-  REG_ECOLLATE,		/* Not implemented.  */
-  REG_ECTYPE,		/* Invalid character class name.  */
-  REG_EESCAPE,		/* Trailing backslash.  */
-  REG_ESUBREG,		/* Invalid back reference.  */
-  REG_EBRACK,		/* Unmatched left bracket.  */
-  REG_EPAREN,		/* Parenthesis imbalance.  */ 
-  REG_EBRACE,		/* Unmatched \{.  */
-  REG_BADBR,		/* Invalid contents of \{\}.  */
-  REG_ERANGE,		/* Invalid range end.  */
-  REG_ESPACE,		/* Ran out of memory.  */
-  REG_BADRPT,		/* No preceding re for repetition op.  */
+  REG_BADPAT,           /* Invalid pattern.  */
+  REG_ECOLLATE,         /* Not implemented.  */
+  REG_ECTYPE,           /* Invalid character class name.  */
+  REG_EESCAPE,          /* Trailing backslash.  */
+  REG_ESUBREG,          /* Invalid back reference.  */
+  REG_EBRACK,           /* Unmatched left bracket.  */
+  REG_EPAREN,           /* Parenthesis imbalance.  */ 
+  REG_EBRACE,           /* Unmatched \{.  */
+  REG_BADBR,            /* Invalid contents of \{\}.  */
+  REG_ERANGE,           /* Invalid range end.  */
+  REG_ESPACE,           /* Ran out of memory.  */
+  REG_BADRPT,           /* No preceding re for repetition op.  */
 
   /* Error codes we've added.  */
-  REG_EEND,		/* Premature end.  */
-  REG_ESIZE,		/* Compiled pattern bigger than 2^16 bytes.  */
-  REG_ERPAREN		/* Unmatched ) or \); not returned from regcomp.  */
+  REG_EEND,             /* Premature end.  */
+  REG_ESIZE,            /* Compiled pattern bigger than 2^16 bytes.  */
+  REG_ERPAREN           /* Unmatched ) or \); not returned from regcomp.  */
 } reg_errcode_t;
 
 /* This data structure represents a compiled pattern.  Before calling
@@ -282,16 +282,16 @@ typedef enum
 struct re_pattern_buffer
 {
 /* [[[begin pattern_buffer]]] */
-	/* Space that holds the compiled pattern.  It is declared as
+        /* Space that holds the compiled pattern.  It is declared as
           `unsigned char *' because its elements are
            sometimes used as array indexes.  */
   unsigned char *buffer;
 
-	/* Number of bytes to which `buffer' points.  */
+        /* Number of bytes to which `buffer' points.  */
   unsigned long allocated;
 
-	/* Number of bytes actually used in `buffer'.  */
-  unsigned long used;	
+        /* Number of bytes actually used in `buffer'.  */
+  unsigned long used;   
 
         /* Syntax setting with which the pattern was compiled.  */
   reg_syntax_t syntax;
@@ -307,7 +307,7 @@ struct re_pattern_buffer
            when it is matched.  */
   char *translate;
 
-	/* Number of subexpressions found by the compiler.  */
+        /* Number of subexpressions found by the compiler.  */
   size_t re_nsub;
 
         /* Zero if this pattern cannot match the empty string, one else.
@@ -484,7 +484,7 @@ extern size_t regerror
 extern void regfree _RE_ARGS ((regex_t *preg));
 
 
-#ifdef	__cplusplus
+#ifdef  __cplusplus
 }
 #endif
 

+ 35 - 35
ppremake/ppCommandFile.cxx

@@ -153,8 +153,8 @@ write_makefile_line(const string &line) {
     while (wi != words.end()) {
       col += (*wi).length() + 1;
       if (col > 72) {
-    (*_out) << " \\\n   ";
-    col = 4 + (*wi).length();
+        (*_out) << " \\\n   ";
+        col = 4 + (*wi).length();
       }
       (*_out) << " " << (*wi);
       ++wi;
@@ -389,7 +389,7 @@ read_line(string line) {
   // that start at the beginning of the line.
   size_t comment = line.find(begin_comment);
   while (comment != string::npos && 
-     !(comment == 0 || isspace(line[comment - 1]))) {
+         !(comment == 0 || isspace(line[comment - 1]))) {
     comment = line.find(begin_comment, comment + begin_comment.length());
   }
 
@@ -424,26 +424,26 @@ read_line(string line) {
       // Find the beginning of the line--skip initial whitespace.
       size_t p = 0;
       while (p < line.length() && isspace(line[p])) {
-          p++;
+        p++;
       }
       
       if (p == line.length()) {
         // The line is empty.  Make it truly empty.
-          line = "";
+        line = "";
       } else {
-          if (((p+1) < line.length()) && (line[p] == COMMAND_PREFIX) && 
-              isalpha(line[p + 1])) {
-              // This is a special command.
-              return handle_command(line.substr(p + 1));
-          }
+        if (((p+1) < line.length()) && (line[p] == COMMAND_PREFIX) && 
+            isalpha(line[p + 1])) {
+          // This is a special command.
+          return handle_command(line.substr(p + 1));
+        }
       }
 
       if (!_in_for && !failed_if()) {
-          if(line[p+1]==COMMAND_PREFIX) {
-              // double prefix at start of line indicates echo single prefix, like '\\' in C
-              line.erase(0,1);
-          }
-          return _write_state->write_line(_scope->expand_string(line));
+        if(line[p+1]==COMMAND_PREFIX) {
+          // double prefix at start of line indicates echo single prefix, like '\\' in C
+          line.erase(0,1);
+        }
+        return _write_state->write_line(_scope->expand_string(line));
       }
     }
   }
@@ -671,7 +671,7 @@ handle_if_command() {
       _params = _scope->expand_string(_params);
       string::const_iterator si;
       for (si = _params.begin(); si != _params.end() && is_empty; ++si) {
-    is_empty = isspace(*si);
+        is_empty = isspace(*si);
       }
     }
     
@@ -787,14 +787,14 @@ handle_begin_command() {
 
   if (contains_whitespace(name)) {
     cerr << "Attempt to define scope named \"" << name 
-     << "\".\nScope names may not contain whitespace.\n";
+         << "\".\nScope names may not contain whitespace.\n";
     return false;
   }
 
   if (name.find(SCOPE_DIRNAME_SEPARATOR) != string::npos) {
     cerr << "Attempt to define scope named \"" << name 
-     << "\".\nScope names may not contain the '"
-     << SCOPE_DIRNAME_SEPARATOR << "' character.\n";
+         << "\".\nScope names may not contain the '"
+         << SCOPE_DIRNAME_SEPARATOR << "' character.\n";
     return false;
   }
 
@@ -943,14 +943,14 @@ handle_defsub_command(bool is_defsub) {
   for (fi = formals.begin(); fi != formals.end(); ++fi) {
     if (!is_valid_formal(*fi)) {
       cerr << command << " " << subroutine_name
-       << ": invalid formal parameter name '" << (*fi) << "'\n";
+           << ": invalid formal parameter name '" << (*fi) << "'\n";
       return false;
     }
   }
 
   if (_in_for) {
     cerr << command << " may not appear within another block scoping command like\n"
-     << "#forscopes, #foreach, #formap, #defsub, or #defun.\n";
+         << "#forscopes, #foreach, #formap, #defsub, or #defun.\n";
     return false;
   }
 
@@ -1034,7 +1034,7 @@ handle_end_command() {
   string name = trim_blanks(_scope->expand_string(_params));
   if (name != _block_nesting->_name) {
     cerr << "end " << name << " encountered where end "
-     << _block_nesting->_name << " expected.\n";
+         << _block_nesting->_name << " expected.\n";
     return false;
   }
 
@@ -1089,8 +1089,8 @@ handle_end_command() {
   } else if (nest->_state == BS_output) {
     if (!_in_for) {
       if (!nest->_output) {
-    cerr << "Error while writing " << nest->_filename << "\n";
-    return false;
+        cerr << "Error while writing " << nest->_filename << "\n";
+        return false;
       }
 
       // Now compare the file we generated to the file that's already
@@ -1099,8 +1099,8 @@ handle_end_command() {
       nest->_output << ends;
       const char *generated_file = nest->_output.str();
       if (!compare_output(generated_file, nest->_filename,
-              (nest->_flags & OF_notouch) != 0)) {
-    return false;
+                          (nest->_flags & OF_notouch) != 0)) {
+        return false;
       }
     }
   }
@@ -1284,7 +1284,7 @@ handle_defer_command() {
 
   if (PPSubroutine::get_func(varname) != (const PPSubroutine *)NULL) {
     cerr << "Warning: variable " << varname
-     << " shadowed by function definition.\n";
+         << " shadowed by function definition.\n";
   }
   
   // Skip whitespace between the variable name and its definition.
@@ -1323,7 +1323,7 @@ handle_define_command() {
 
   if (PPSubroutine::get_func(varname) != (const PPSubroutine *)NULL) {
     cerr << "Warning: variable " << varname
-     << " shadowed by function definition.\n";
+         << " shadowed by function definition.\n";
   }
   
   // Skip whitespace between the variable name and its definition.
@@ -1362,7 +1362,7 @@ handle_set_command() {
 
   if (PPSubroutine::get_func(varname) != (const PPSubroutine *)NULL) {
     cerr << "Warning: variable " << varname
-     << " shadowed by function definition.\n";
+         << " shadowed by function definition.\n";
   }
   
   // Skip whitespace between the variable name and its definition.
@@ -1591,7 +1591,7 @@ replay_formap(const string &varname, const string &mapvar) {
   PPScope::MapVariableDefinition &def = _scope->find_map_variable(mapvar);
   if (&def == &PPScope::_null_map_def) {
     cerr << "Undefined map variable: #formap " << varname << " " 
-     << mapvar << "\n";
+         << mapvar << "\n";
     return false;
   }
 
@@ -1633,7 +1633,7 @@ replay_formap(const string &varname, const string &mapvar) {
 ////////////////////////////////////////////////////////////////////
 bool PPCommandFile::
 compare_output(const string &new_contents, const string &filename,
-           bool notouch) {
+               bool notouch) {
   bool exists = (access(filename.c_str(), F_OK) == 0);
   bool differ = false;
 
@@ -1659,8 +1659,8 @@ compare_output(const string &new_contents, const string &filename,
 
     if (exists) {
       if (unlink(filename.c_str()) < 0) {
-    cerr << "Unable to remove old " << filename << "\n";
-    return false;
+        cerr << "Unable to remove old " << filename << "\n";
+        return false;
       }
     }
 
@@ -1686,7 +1686,7 @@ compare_output(const string &new_contents, const string &filename,
     // makefiles know we did something.
     if (!notouch) {
       if (utime(filename.c_str(), (struct utimbuf *)NULL) < 0) {
-    cerr << "Warning: unable to touch " << filename << "\n";
+        cerr << "Warning: unable to touch " << filename << "\n";
       }
     }
   }
@@ -1704,7 +1704,7 @@ compare_output(const string &new_contents, const string &filename,
 bool PPCommandFile::
 failed_if() const {
   return (_if_nesting != (IfNesting *)NULL && 
-      (_if_nesting->_state == IS_off || _if_nesting->_state == IS_done));
+          (_if_nesting->_state == IS_off || _if_nesting->_state == IS_done));
 }
 
 ////////////////////////////////////////////////////////////////////

+ 2 - 2
ppremake/ppCommandFile.h

@@ -14,7 +14,7 @@
 class PPScope;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : PPCommandFile
+//       Class : PPCommandFile
 // Description : This encapsulates a file that contains #commands to
 //               execute (like #define, #if, #begin .. #end),
 //               $[variables] to expand, and plain text to output.
@@ -69,7 +69,7 @@ protected:
   bool replay_foreach(const string &varname, const vector<string> &words);
   bool replay_formap(const string &varname, const string &mapvar);
   bool compare_output(const string &new_contents, const string &filename,
-		      bool notouch);
+                      bool notouch);
   bool failed_if() const;
 
   bool is_valid_formal(const string &formal_parameter_name) const;

+ 44 - 44
ppremake/ppDependableFile.cxx

@@ -80,23 +80,23 @@ update_from_cache(const vector<string> &words) {
       dep._okcircular = false;
 
       if (dirpath.length() > 1 && dirpath[0] == '/') {
-    // If the first character is '/', it means that the file has
-    // been marked okcircular.
-    dep._okcircular = true;
-    dirpath = dirpath.substr(1);
+        // If the first character is '/', it means that the file has
+        // been marked okcircular.
+        dep._okcircular = true;
+        dirpath = dirpath.substr(1);
       }
 
       if (dirpath.length() > 2 && dirpath.substr(0, 2) == "*/") {
-    // This is an extra include file, not a file in this source
-    // tree.
-    _extra_includes.push_back(dirpath.substr(2));
+        // This is an extra include file, not a file in this source
+        // tree.
+        _extra_includes.push_back(dirpath.substr(2));
 
       } else {
-    dep._file = 
-      tree->get_dependable_file_by_dirpath(dirpath, false);
-    if (dep._file != (PPDependableFile *)NULL) {
-      _dependencies.push_back(dep);
-    }
+        dep._file = 
+          tree->get_dependable_file_by_dirpath(dirpath, false);
+        if (dep._file != (PPDependableFile *)NULL) {
+          _dependencies.push_back(dep);
+        }
       }
     }
 
@@ -351,11 +351,11 @@ compute_dependencies(string &circularity) {
     if (!in) {
       // Can't read the file, or the file doesn't exist.  Interesting.
       if (exists()) {
-          cerr << "Warning: dependent file " << get_pathname() 
-          << " exists but cannot be read.\n";
+        cerr << "Warning: dependent file " << get_pathname() 
+             << " exists but cannot be read.\n";
       } else {
-          cerr << "Warning: dependent file " << get_pathname() 
-          << " does not exist.\n";
+        cerr << "Warning: dependent file " << get_pathname() 
+             << " does not exist.\n";
       }
 
     } else {
@@ -365,30 +365,30 @@ compute_dependencies(string &circularity) {
       string line;
       getline(in, line);
       while (!in.fail() && !in.eof()) {
-    if (line.substr(0, 16) == "/* okcircular */") {
-      okcircular = true;
-    } else {
-      string filename = check_include(line);
-      if (!filename.empty() && filename.find('/') == string::npos) {
-        Dependency dep;
-        dep._okcircular = okcircular;
-        dep._file = tree->find_dependable_file(filename);
-        if (dep._file != (PPDependableFile *)NULL) {
-          // All right!  Here's a file we depend on.  Add it to the
-          // list.
-          _dependencies.push_back(dep);
-          
+        if (line.substr(0, 16) == "/* okcircular */") {
+          okcircular = true;
         } else {
-          // It's an include file from somewhere else, not from within
-          // our source tree.  We don't care about it, but we do need
-          // to record it so we can easily check later if the cache
-          // file has gone stale.
-          _extra_includes.push_back(filename);
+          string filename = check_include(line);
+          if (!filename.empty() && filename.find('/') == string::npos) {
+            Dependency dep;
+            dep._okcircular = okcircular;
+            dep._file = tree->find_dependable_file(filename);
+            if (dep._file != (PPDependableFile *)NULL) {
+              // All right!  Here's a file we depend on.  Add it to the
+              // list.
+              _dependencies.push_back(dep);
+          
+            } else {
+              // It's an include file from somewhere else, not from within
+              // our source tree.  We don't care about it, but we do need
+              // to record it so we can easily check later if the cache
+              // file has gone stale.
+              _extra_includes.push_back(filename);
+            }
+          }
+          okcircular = false;
         }
-      }
-      okcircular = false;
-    }
-    getline(in, line);
+        getline(in, line);
       }
     }
   }
@@ -406,13 +406,13 @@ compute_dependencies(string &circularity) {
     if (!(*di)._okcircular) {
       circ = (*di)._file->compute_dependencies(circularity);
       if (circ != (PPDependableFile *)NULL) {
-    // Oops, a circularity.  Silly user.
-    circularity = get_dirpath() + " => " + circularity;
+        // Oops, a circularity.  Silly user.
+        circularity = get_dirpath() + " => " + circularity;
     
-    if (circ == this) {
-      _flags |= F_circularity;
-      _circularity = circularity;
-    }
+        if (circ == this) {
+          _flags |= F_circularity;
+          _circularity = circularity;
+        }
       }
     }
   }

+ 1 - 1
ppremake/ppDependableFile.h

@@ -14,7 +14,7 @@
 class PPDirectory;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : PPDependableFile
+//       Class : PPDependableFile
 // Description : Corresponds to a single C/C++ source file, either a
 //               .c file or a .h file, that can be scanned for a
 //               number of #include statements.  This file may both

+ 22 - 22
ppremake/ppDirectory.cxx

@@ -73,7 +73,7 @@ PPDirectory(const string &dirname, PPDirectory *parent) :
     _tree->_dirnames.insert(PPDirectoryTree::Dirnames::value_type(_dirname, this)).second;
   if (!inserted) {
     cerr << "Warning: multiple directories encountered named "
-	 << _dirname << "\n";
+         << _dirname << "\n";
   }
 }
 
@@ -322,9 +322,9 @@ get_dependable_file(const string &filename, bool is_header) {
     
     if (!unique) {
       cerr << "Warning: source file " << dependable->get_pathname()
-	   << " may be confused with "
-	   << _tree->find_dependable_file(filename)->get_pathname()
-	   << ".\n";
+           << " may be confused with "
+           << _tree->find_dependable_file(filename)->get_pathname()
+           << ".\n";
     }
   }
 
@@ -422,11 +422,11 @@ r_scan(const string &prefix) {
       string source_filename = next_prefix + SOURCE_FILENAME;
       if (access(source_filename.c_str(), F_OK) == 0) {
 
-	PPDirectory *subtree = new PPDirectory(filename, this);
+        PPDirectory *subtree = new PPDirectory(filename, this);
 
-	if (!subtree->r_scan(next_prefix)) {
-	  return false;
-	}
+        if (!subtree->r_scan(next_prefix)) {
+          return false;
+        }
       }
     }
   }
@@ -469,7 +469,7 @@ read_source_file(const string &prefix, PPNamedScopes *named_scopes) {
   Children::iterator ci;
   for (ci = _children.begin(); ci != _children.end(); ++ci) {
     if (!(*ci)->read_source_file(prefix + (*ci)->get_dirname() + "/",
-				  named_scopes)) {
+                                  named_scopes)) {
       return false;
     }
   }
@@ -499,7 +499,7 @@ read_depends_file(PPNamedScopes *named_scopes) {
     PPCommandFile depends(_scope);
     if (!depends.read_file(depends_filename)) {
       cerr << "Error reading dependency definition file "
-	   << depends_filename << ".\n";
+           << depends_filename << ".\n";
       return false;
     }
     
@@ -514,12 +514,12 @@ read_depends_file(PPNamedScopes *named_scopes) {
       const string &dirname = (*ni);
       PPDirectory *dir = _tree->find_dirname(dirname);
       if (dir == (PPDirectory *)NULL) {
-	cerr << "Could not find dependent dirname " << dirname << "\n";
+        cerr << "Could not find dependent dirname " << dirname << "\n";
       } else {
-	if (dir != this) {
-	  _i_depend_on.insert(dir);
-	  dir->_depends_on_me.insert(this);
-	}
+        if (dir != this) {
+          _i_depend_on.insert(dir);
+          dir->_depends_on_me.insert(this);
+        }
       }
     }
 
@@ -604,7 +604,7 @@ compute_depends_index() {
     if ((*di)->_computing_depends_index) {
       // Oops, we have a cycle!
       cerr << "Cycle detected in inter-directory dependencies!\n"
-	   << _dirname << " depends on " << (*di)->_dirname << "\n";
+           << _dirname << " depends on " << (*di)->_dirname << "\n";
       return false;
     }
       
@@ -687,12 +687,12 @@ update_file_dependencies(const string &cache_filename) {
     for (di = _dependables.begin(); di != _dependables.end(); ++di) {
       PPDependableFile *file = (*di).second;
       if (file->was_examined()) {
-	if (file->is_circularity()) {
-	  cerr << "Warning: circular #include directives:\n"
-	       << "  " << file->get_circularity() << "\n";
-	}
-	file->write_cache(out);
-	wrote_anything = true;
+        if (file->is_circularity()) {
+          cerr << "Warning: circular #include directives:\n"
+               << "  " << file->get_circularity() << "\n";
+        }
+        file->write_cache(out);
+        wrote_anything = true;
       }
     }
 

+ 2 - 2
ppremake/ppDirectory.h

@@ -19,7 +19,7 @@ class PPDirectoryTree;
 class PPDependableFile;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : PPDirectory
+//       Class : PPDirectory
 // Description : Represents a single directory in the source
 //               hierarchy.  Each PPDirectory object is one-to-one
 //               associated with a PPCommandFile object, that
@@ -49,7 +49,7 @@ public:
   string get_complete_subtree() const;
 
   PPDependableFile *get_dependable_file(const string &filename, 
-					bool is_header);
+                                        bool is_header);
 
   void report_depends() const;
   void report_needs() const;

+ 2 - 2
ppremake/ppDirectoryTree.h

@@ -15,7 +15,7 @@ class PPDirectory;
 class PPDependableFile;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : PPDirectoryTree
+//       Class : PPDirectoryTree
 // Description : Stores the entire directory hierarchy relationship of the
 //               source tree.  This is the root of a tree of
 //               PPDirectory objects, each of which corresponds to a
@@ -38,7 +38,7 @@ public:
 
   PPDependableFile *find_dependable_file(const string &filename) const;
   PPDependableFile *get_dependable_file_by_dirpath(const string &dirpath,
-						   bool is_header);
+                                                   bool is_header);
 
   void read_file_dependencies(const string &cache_filename);
   void update_file_dependencies(const string &cache_filename);

+ 3 - 3
ppremake/ppFilenamePattern.cxx

@@ -136,8 +136,8 @@ extract_body(const string &filename) const {
   if (_has_wildcard) {
     size_t outside_length = _prefix.length() + _suffix.length();
     if ((filename.length() >= outside_length) &&
-	(filename.substr(0, _prefix.length()) == _prefix) &&
-	(filename.substr(filename.length() - _suffix.length()) == _suffix)) {
+        (filename.substr(0, _prefix.length()) == _prefix) &&
+        (filename.substr(filename.length() - _suffix.length()) == _suffix)) {
       return filename.substr(_prefix.length(), filename.length() - outside_length);
     }
   }
@@ -159,7 +159,7 @@ extract_body(const string &filename) const {
 ////////////////////////////////////////////////////////////////////
 string PPFilenamePattern::
 transform(const string &filename,
-	  const PPFilenamePattern &transform_from) const {
+          const PPFilenamePattern &transform_from) const {
   assert(transform_from._has_wildcard);
 
   if (transform_from.matches(filename)) {

+ 2 - 2
ppremake/ppFilenamePattern.h

@@ -9,7 +9,7 @@
 #include "ppremake.h"
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : PPFilenamePattern
+//       Class : PPFilenamePattern
 // Description : This is a string that represents a filename, or a
 //               family of filenames, using the make convention that a
 //               wildcard sign (PATTERN_WILDCARD, typically '%') in
@@ -29,7 +29,7 @@ public:
   bool matches(const string &filename) const;
   string extract_body(const string &filename) const;
   string transform(const string &filename,
-		   const PPFilenamePattern &transform_from) const;
+                   const PPFilenamePattern &transform_from) const;
 
 private:
   bool _has_wildcard;

+ 4 - 4
ppremake/ppNamedScopes.cxx

@@ -36,7 +36,7 @@ public:
       assert(da != (PPDirectory *)NULL);
       assert(db != (PPDirectory *)NULL);
       if (da->get_depends_index() != db->get_depends_index()) {
-	return da->get_depends_index() < db->get_depends_index();
+        return da->get_depends_index() < db->get_depends_index();
       }
       return da->get_dirname() < db->get_dirname();
     }
@@ -151,15 +151,15 @@ set_current(const string &dirname) {
 ////////////////////////////////////////////////////////////////////
 void PPNamedScopes::
 p_get_scopes(const PPNamedScopes::Named &named, const string &name,
-	     Scopes &scopes) const {
+             Scopes &scopes) const {
   Named::const_iterator ni;
   if (name == "*") {
     // Scope name "*" means all nested scopes in this directory,
     // except for the empty-name scope (which is the outer scope).
     for (ni = named.begin(); ni != named.end(); ++ni) {
       if (!(*ni).first.empty()) {
-	const Scopes &s = (*ni).second;
-	scopes.insert(scopes.end(), s.begin(), s.end());
+        const Scopes &s = (*ni).second;
+        scopes.insert(scopes.end(), s.begin(), s.end());
       }
     }
 

+ 2 - 2
ppremake/ppNamedScopes.h

@@ -14,7 +14,7 @@
 class PPScope;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : PPNamedScopes
+//       Class : PPNamedScopes
 // Description : A collection of named scopes, as defined by #begin
 //               .. #end sequences within a series of command files,
 //               each associated with the directory name of the
@@ -37,7 +37,7 @@ private:
   typedef map<string, Scopes> Named;
 
   void p_get_scopes(const Named &named, const string &name,
-		    Scopes &scopes) const;
+                    Scopes &scopes) const;
 
   typedef map<string, Named> Directories;
   Directories _directories;

+ 92 - 92
ppremake/ppScope.cxx

@@ -177,7 +177,7 @@ define_map_variable(const string &varname, const string &definition) {
 ////////////////////////////////////////////////////////////////////
 void PPScope::
 define_map_variable(const string &varname, const string &key_varname,
-            const string &scope_names) {
+                    const string &scope_names) {
   MapVariableDefinition &def = _map_variables[varname];
   def.clear();
   define_variable(varname, "");
@@ -220,7 +220,7 @@ define_map_variable(const string &varname, const string &key_varname,
       vector<string>::const_iterator ki;
       results.insert(results.end(), keys.begin(), keys.end());
       for (ki = keys.begin(); ki != keys.end(); ++ki) {
-    def[*ki] = scope;
+        def[*ki] = scope;
       }
     }
   }
@@ -238,7 +238,7 @@ define_map_variable(const string &varname, const string &key_varname,
 ////////////////////////////////////////////////////////////////////
 void PPScope::
 add_to_map_variable(const string &varname, const string &key,
-            PPScope *scope) {
+                    PPScope *scope) {
   MapVariableDefinition &def = find_map_variable(varname);
   if (&def == &_null_map_def) {
     cerr << "Warning:  undefined map variable: " << varname << "\n";
@@ -273,16 +273,16 @@ add_to_map_variable(const string &varname, const string &key,
 ////////////////////////////////////////////////////////////////////
 void PPScope::
 define_formals(const string &subroutine_name, 
-           const vector<string> &formals, const string &actuals) {
+               const vector<string> &formals, const string &actuals) {
   vector<string> actual_words;
   tokenize_params(actuals, actual_words, true);
 
   if (actual_words.size() < formals.size()) {
     cerr << "Warning: not all parameters defined for " << subroutine_name
-     << ": " << actuals << "\n";
+         << ": " << actuals << "\n";
   } else if (actual_words.size() > formals.size()) {
     cerr << "Warning: more parameters defined for " << subroutine_name
-     << " than actually exist: " << actuals << "\n";
+         << " than actually exist: " << actuals << "\n";
   }
 
   for (int i = 0; i < (int)formals.size(); i++) {
@@ -308,7 +308,7 @@ get_variable(const string &varname) {
     return expand_function(varname, sub, string());
   }      
 
-//  cerr << "getvar arg is: '" << varname << "'" << endl;
+  //  cerr << "getvar arg is: '" << varname << "'" << endl;
 
   string result;
   if (p_get_variable(varname, result)) {
@@ -362,7 +362,7 @@ expand_defined(const string &params) {
 
   if (sub != (const PPSubroutine *)NULL) {
     if(nullstr != expand_function(varname, sub, string())) {
-        return truestr;
+      return truestr;
     }
   }      
 
@@ -378,7 +378,7 @@ expand_defined(const string &params) {
   ScopeStack::reverse_iterator si;
   for (si = _scope_stack.rbegin(); si != _scope_stack.rend(); ++si) {
     if ((*si)->p_get_variable(varname, result)) {
-        return truestr;
+      return truestr;
     }
   }
 
@@ -578,7 +578,7 @@ get_bottom_scope() {
 ////////////////////////////////////////////////////////////////////
 void PPScope::
 tokenize_params(const string &str, vector<string> &tokens,
-        bool expand) {
+                bool expand) {
   size_t p = 0;
   while (p < str.length()) {
     // Skip initial whitespace.
@@ -589,16 +589,16 @@ tokenize_params(const string &str, vector<string> &tokens,
     string token;
     while (p < str.length() && str[p] != FUNCTION_PARAMETER_SEPARATOR) {
       if (p + 1 < str.length() && str[p] == VARIABLE_PREFIX &&
-      str[p + 1] == VARIABLE_OPEN_BRACE) {
-    // Skip a nested variable reference.
-    if (expand) {
-      token += r_expand_variable(str, p, (ExpandedVariable *)NULL);
-    } else {
-      token += r_scan_variable(str, p);
-    }
+          str[p + 1] == VARIABLE_OPEN_BRACE) {
+        // Skip a nested variable reference.
+        if (expand) {
+          token += r_expand_variable(str, p, (ExpandedVariable *)NULL);
+        } else {
+          token += r_scan_variable(str, p);
+        }
       } else {
-    token += str[p];
-    p++;
+        token += str[p];
+        p++;
       }
     }
 
@@ -635,7 +635,7 @@ tokenize_numeric_pair(const string &str, double &a, double &b) {
   tokenize_params(str, words, true);
   if (words.size() != 2) {
     cerr << words.size() << " parameters supplied when two were expected:\n"
-     << str << "\n";
+         << str << "\n";
     return false;
   }
 
@@ -742,7 +742,7 @@ r_expand_string(const string &str, PPScope::ExpandedVariable *expanded) {
   size_t p = 0;
   while (p < str.length()) {
     if (p + 1 < str.length() && str[p] == VARIABLE_PREFIX &&
-    str[p + 1] == VARIABLE_OPEN_BRACE) {
+        str[p + 1] == VARIABLE_OPEN_BRACE) {
       // Here's a nested variable!  Expand it fully.
       result += r_expand_variable(str, p, expanded);
 
@@ -778,7 +778,7 @@ r_scan_variable(const string &str, size_t &vp) {
   size_t p = vp + 2;
   while (p < str.length() && str[p] != VARIABLE_CLOSE_BRACE) {
     if (p + 1 < str.length() && str[p] == VARIABLE_PREFIX && 
-    str[p + 1] == VARIABLE_OPEN_BRACE) {
+        str[p + 1] == VARIABLE_OPEN_BRACE) {
       // Here's a nested variable!  Scan past it, matching braces
       // properly.
       r_scan_variable(str, p);
@@ -792,7 +792,7 @@ r_scan_variable(const string &str, size_t &vp) {
     p++;
   } else {
     cerr << "Warning!  Unclosed variable reference:\n"
-     << str.substr(vp) << "\n";
+         << str.substr(vp) << "\n";
   }
 
   vp = p;
@@ -815,7 +815,7 @@ r_scan_variable(const string &str, size_t &vp) {
 ////////////////////////////////////////////////////////////////////
 string PPScope::
 r_expand_variable(const string &str, size_t &vp,
-          PPScope::ExpandedVariable *expanded) {
+                  PPScope::ExpandedVariable *expanded) {
   string varname;
 
   size_t whitespace_at = 0;
@@ -826,23 +826,23 @@ r_expand_variable(const string &str, size_t &vp,
   size_t p = vp + 2;
   while (p < str.length() && str[p] != VARIABLE_CLOSE_BRACE) {
     if (p + 1 < str.length() && str[p] == VARIABLE_PREFIX && 
-    str[p + 1] == VARIABLE_OPEN_BRACE) {
+        str[p + 1] == VARIABLE_OPEN_BRACE) {
       if (whitespace_at != 0) {
-    // Once we have encountered whitespace, we don't expand
-    // variables inline anymore.  These are now function
-    // parameters, and might need to be expanded in some other
-    // scope.
-    varname += r_scan_variable(str, p);
+        // Once we have encountered whitespace, we don't expand
+        // variables inline anymore.  These are now function
+        // parameters, and might need to be expanded in some other
+        // scope.
+        varname += r_scan_variable(str, p);
       } else {
-    varname += r_expand_variable(str, p, expanded);
+        varname += r_expand_variable(str, p, expanded);
       }
 
     } else {
       if (open_nested_at == 0 && str[p] == VARIABLE_OPEN_NESTED) {
-    open_nested_at = p - (vp + 2);
+        open_nested_at = p - (vp + 2);
       }
       if (open_nested_at == 0 && whitespace_at == 0 && isspace(str[p])) {
-    whitespace_at = p - (vp + 2);
+        whitespace_at = p - (vp + 2);
       }
       varname += str[p];
       p++;
@@ -854,7 +854,7 @@ r_expand_variable(const string &str, size_t &vp,
     p++;
   } else {
     cerr << "Warning!  Unclosed variable reference:\n"
-     << str.substr(vp) << "\n";
+         << str.substr(vp) << "\n";
   }
 
   vp = p;
@@ -1039,18 +1039,18 @@ r_expand_variable(const string &str, size_t &vp,
     
     if (tokens.size() != 2) {
       cerr << "inline patsubst should be of the form "
-       << VARIABLE_PREFIX << VARIABLE_OPEN_BRACE << "varname"
-       << VARIABLE_PATSUBST << PATTERN_WILDCARD << ".c"
-       << VARIABLE_PATSUBST_DELIM << PATTERN_WILDCARD << ".o"
-       << VARIABLE_CLOSE_BRACE << ".\n";
+           << VARIABLE_PREFIX << VARIABLE_OPEN_BRACE << "varname"
+           << VARIABLE_PATSUBST << PATTERN_WILDCARD << ".c"
+           << VARIABLE_PATSUBST_DELIM << PATTERN_WILDCARD << ".o"
+           << VARIABLE_CLOSE_BRACE << ".\n";
     } else {
       PPFilenamePattern from(tokens[0]);
       PPFilenamePattern to(tokens[1]);
     
       if (!from.has_wildcard() || !to.has_wildcard()) {
-    cerr << "The two parameters of inline patsubst must both include "
-         << PATTERN_WILDCARD << ".\n";
-    return string();
+        cerr << "The two parameters of inline patsubst must both include "
+             << PATTERN_WILDCARD << ".\n";
+        return string();
       }
     
       // Split the expansion into tokens based on the spaces.
@@ -1059,7 +1059,7 @@ r_expand_variable(const string &str, size_t &vp,
       
       vector<string>::iterator wi;
       for (wi = words.begin(); wi != words.end(); ++wi) {
-    (*wi) = to.transform(*wi, from);
+        (*wi) = to.transform(*wi, from);
       }
     
       result = repaste(words, " ");
@@ -1079,7 +1079,7 @@ r_expand_variable(const string &str, size_t &vp,
 ////////////////////////////////////////////////////////////////////
 string PPScope::
 expand_variable_nested(const string &varname, 
-               const string &scope_names) {
+                       const string &scope_names) {
   if (_named_scopes == (PPNamedScopes *)NULL) {
     return string();
   }
@@ -1437,14 +1437,14 @@ expand_bintest(const string &params) {
 #ifdef PLATFORM_WIN32
   if ((binname.length() > 2 && binname[1] == ':') || binname[0] == '/')
 #else
-  if (binname[0] == '/')
+    if (binname[0] == '/')
 #endif
-    {
-    if (access(binname.c_str(), F_OK) == 0) {
-      return binname;
-    }
-    return string();
-  }
+      {
+        if (access(binname.c_str(), F_OK) == 0) {
+          return binname;
+        }
+        return string();
+      }
 
   const char *path = getenv("PATH");
   if (path == (const char *)NULL) {
@@ -1525,7 +1525,7 @@ expand_shell(const string &params) {
       // because we're doing the chdir() call only within the child
       // process.
       if (chdir(dirname.c_str()) < 0) {
-    perror("chdir");
+        perror("chdir");
       }
     }
 
@@ -1562,12 +1562,12 @@ expand_shell(const string &params) {
     if (!child_done) {
       int waitresult = waitpid(pid, &status, WNOHANG);
       if (waitresult < 0) {
-    if (errno != EINTR) {
-      perror("waitpid");
-      return string();
-    }
+        if (errno != EINTR) {
+          perror("waitpid");
+          return string();
+        }
       } else if (waitresult > 0) {
-    child_done = true;
+        child_done = true;
       }
     }
   }
@@ -1616,7 +1616,7 @@ expand_standardize(const string &params) {
     if (component == ".") {
       // Ignore /./.
     } else if (component == ".." && !components.empty() && 
-           !(components.back() == "..")) {
+               !(components.back() == "..")) {
       // Back up.
       components.pop_back();
     } else {
@@ -1779,9 +1779,9 @@ expand_suffix(const string &params) {
     if (dot != string::npos) {
       string ext = word.substr(dot);
       if (ext.find('/') == string::npos) {
-    word = ext;
+        word = ext;
       } else {
-    word = string();
+        word = string();
       }
     } else {
       word = string();
@@ -1813,7 +1813,7 @@ expand_basename(const string &params) {
     if (dot != string::npos) {
       string ext = word.substr(dot);
       if (ext.find('/') == string::npos) {
-    word = word.substr(0, dot);
+        word = word.substr(0, dot);
       }
     }
   }
@@ -1895,8 +1895,8 @@ expand_wordlist(const string &params) {
 
   vector<string> results;
   results.insert(results.end(), 
-         words.begin() + start - 1, 
-         words.begin() + end - 1);
+                 words.begin() + start - 1, 
+                 words.begin() + end - 1);
 
   string result = repaste(results, " ");
   return result;
@@ -1987,9 +1987,9 @@ expand_patsubst(const string &params, bool separate_words) {
     for (fi = froms.begin(); fi != froms.end(); ++fi) {
       PPFilenamePattern pattern(*fi);
       if (!pattern.has_wildcard()) {
-    cerr << "All the \"from\" parameters of patsubst must include "
-         << PATTERN_WILDCARD << ".\n";
-    return string();
+        cerr << "All the \"from\" parameters of patsubst must include "
+             << PATTERN_WILDCARD << ".\n";
+        return string();
       }
       from.back().push_back(pattern);
     }
@@ -2006,10 +2006,10 @@ expand_patsubst(const string &params, bool separate_words) {
     for (i = 0; i < num_patterns && !matched; i++) {
       Patterns::const_iterator pi;
       for (pi = from[i].begin(); pi != from[i].end() && !matched; ++pi) {
-    if ((*pi).matches(*wi)) {
-      matched = true;
-      (*wi) = to[i].transform(*wi, (*pi));
-    }
+        if ((*pi).matches(*wi)) {
+          matched = true;
+          (*wi) = to[i].transform(*wi, (*pi));
+        }
       }
     }
   }
@@ -2058,8 +2058,8 @@ expand_filter(const string &params) {
     bool matches_pattern = false;
     vector<PPFilenamePattern>::const_iterator pi;
     for (pi = patterns.begin(); 
-     pi != patterns.end() && !matches_pattern; 
-     ++pi) {
+         pi != patterns.end() && !matches_pattern; 
+         ++pi) {
       matches_pattern = (*pi).matches(word);
     }
 
@@ -2114,8 +2114,8 @@ expand_filter_out(const string &params) {
     bool matches_pattern = false;
     vector<PPFilenamePattern>::const_iterator pi;
     for (pi = patterns.begin(); 
-     pi != patterns.end() && !matches_pattern; 
-     ++pi) {
+         pi != patterns.end() && !matches_pattern; 
+         ++pi) {
       matches_pattern = (*pi).matches(word);
     }
 
@@ -2230,7 +2230,7 @@ expand_wordsubst(const string &params) {
     vector<string>::iterator wi;
     for (wi = words.begin(); wi != words.end(); ++wi) {
       if ((*wi) == subst) {
-    (*wi) = repl;
+        (*wi) = repl;
       }
     }
   }
@@ -2721,18 +2721,18 @@ expand_closure(const string &params) {
       const string &word = (*wi);
       bool inserted = closure.insert(word).second;
       if (inserted) {
-    // This is a new word, which presumably maps to a scope.
-    MapVariableDefinition::const_iterator di;
-    di = def.find(word);
-    if (di != def.end()) {
-      PPScope *scope = (*di).second;
-      // Evaluate the expression within this scope.
-      results.push_back(scope->expand_string(expression));
+        // This is a new word, which presumably maps to a scope.
+        MapVariableDefinition::const_iterator di;
+        di = def.find(word);
+        if (di != def.end()) {
+          PPScope *scope = (*di).second;
+          // Evaluate the expression within this scope.
+          results.push_back(scope->expand_string(expression));
       
-      // What does close_on evaluate to within this scope?  That
-      // points us to the next scope(s).
-      next_pass.push_back(scope->expand_string(close_on));
-    }
+          // What does close_on evaluate to within this scope?  That
+          // points us to the next scope(s).
+          next_pass.push_back(scope->expand_string(close_on));
+        }
       }
     }
   }
@@ -2818,8 +2818,8 @@ expand_dependencies(const string &params) {
     for (dfi = files.begin(); dfi != files.end(); ++dfi) {
       PPDependableFile *df = (*dfi);
       string rel_filename =
-    current_output_directory->get_rel_to(df->get_directory()) + "/" +
-    df->get_filename();
+        current_output_directory->get_rel_to(df->get_directory()) + "/" +
+        df->get_filename();
       results.push_back(rel_filename);
     }
   }
@@ -2925,7 +2925,7 @@ expand_forscopes(const string &params) {
 ////////////////////////////////////////////////////////////////////
 string PPScope::
 expand_function(const string &funcname, 
-        const PPSubroutine *sub, const string &params) {
+                const PPSubroutine *sub, const string &params) {
   PPScope::push_scope((PPScope *)this);
   PPScope nested_scope(_named_scopes);
   nested_scope.define_formals(funcname, sub->_formals, params);
@@ -2980,7 +2980,7 @@ expand_map_variable(const string &varname, const string &params) {
 
   if (tokens.size() != 2) {
     cerr << "map variable expansions require two parameters: $["
-     << varname << " " << params << "]\n";
+         << varname << " " << params << "]\n";
     return string();
   }
 
@@ -3001,7 +3001,7 @@ expand_map_variable(const string &varname, const string &params) {
 ////////////////////////////////////////////////////////////////////
 string PPScope::
 expand_map_variable(const string &varname, const string &expression,
-            const vector<string> &keys) {
+                    const vector<string> &keys) {
   const MapVariableDefinition &def = find_map_variable(varname);
   if (&def == &_null_map_def) {
     cerr << "Warning:  undefined map variable: " << varname << "\n";
@@ -3020,7 +3020,7 @@ expand_map_variable(const string &varname, const string &expression,
       PPScope *scope = (*di).second;
       string expansion = scope->expand_string(expression);
       if (!expansion.empty()) {
-    results.push_back(expansion);
+        results.push_back(expansion);
       }
     }
   }
@@ -3039,7 +3039,7 @@ expand_map_variable(const string &varname, const string &expression,
 ////////////////////////////////////////////////////////////////////
 void PPScope::
 r_expand_matrix(vector<string> &results, const vector<vector<string> > &words,
-        int index, const string &prefix) {
+                int index, const string &prefix) {
   if (index >= (int)words.size()) {
     // This is the terminal condition.
     results.push_back(prefix);

+ 1 - 1
ppremake/ppSubroutine.h

@@ -12,7 +12,7 @@
 #include <map>
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : PPSubroutine
+//       Class : PPSubroutine
 // Description : This represents a named subroutine defined via the
 //               #defsub .. #end sequence that may be invoked at any
 //               time via #call.  All subroutine definitions are

+ 9 - 9
ppremake/ppremake.cxx

@@ -230,7 +230,7 @@ main(int argc, char *argv[]) {
 
     case 'D':
       if (!check_dependencies(optarg)) {
-    dependencies_stale = true;
+        dependencies_stale = true;
       }
       any_d = true;
       break;
@@ -305,7 +305,7 @@ main(int argc, char *argv[]) {
 
   PPMain ppmain(&global_scope);
   if (!ppmain.read_source(".")) {
-      exit(1);
+    exit(1);
   }
 
   if (report_depends || report_needs) {
@@ -319,11 +319,11 @@ main(int argc, char *argv[]) {
     for (int i = 1; i < argc; i++) {
       cerr << "\n";
       if (report_depends) {
-          ppmain.report_depends(argv[i]);
+        ppmain.report_depends(argv[i]);
       }
       cerr << "\n";
       if (report_needs) {
-          ppmain.report_needs(argv[i]);
+        ppmain.report_needs(argv[i]);
       }
     }
 
@@ -332,14 +332,14 @@ main(int argc, char *argv[]) {
 
     if (argc < 2) {
       if (!ppmain.process_all()) {
-          exit(1);
+        exit(1);
       }
     } else {
       for (int i = 1; i < argc; i++) {
-          if (!ppmain.process(argv[i])) {
-              cerr << "Unable to process " << argv[i] << ".\n";
-              exit(1);
-          }
+        if (!ppmain.process(argv[i])) {
+          cerr << "Unable to process " << argv[i] << ".\n";
+          exit(1);
+        }
       }
     }
   }

+ 4 - 4
ppremake/sedAddress.cxx

@@ -70,15 +70,15 @@ parse_address(const string &line, size_t &p) {
     size_t begin = p;
     while (p < line.length() && line[p] != delimiter) {
       if (line[p] == '\\') {
-	p++;
-	// A backslash could escape the closing character.
+        p++;
+        // A backslash could escape the closing character.
       }
       p++;
     }
 
     if (p >= line.length()) {
       cerr << "Could not find terminating character '" << delimiter
-	   << "' in regular expression: " << line.substr(p0) << "\n";
+           << "' in regular expression: " << line.substr(p0) << "\n";
       return false;
     }
 
@@ -92,7 +92,7 @@ parse_address(const string &line, size_t &p) {
       regerror(error, &_re, errbuf, errbuf_size);
 
       cerr << "Invalid regular expression: " << re << "\n"
-	   << errbuf << "\n";
+           << errbuf << "\n";
       return false;
     }
 

+ 1 - 1
ppremake/sedAddress.h

@@ -19,7 +19,7 @@
 class SedContext;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : SedAddress
+//       Class : SedAddress
 // Description : This represents a single address in a sed command,
 //               something like a line number or a regular expression.
 ////////////////////////////////////////////////////////////////////

+ 35 - 35
ppremake/sedCommand.cxx

@@ -70,12 +70,12 @@ parse_command(const string &line, size_t &p) {
       // Skip the comma and more whitespace.
       p++;
       while (p < line.length() && isspace(line[p])) {
-	p++;
+        p++;
       }
 
       _addr2 = new SedAddress;
       if (!_addr2->parse_address(line, p)) {
-	return false;
+        return false;
       }
     }
   }
@@ -129,18 +129,18 @@ run(SedScript &script, SedContext &context) {
       // in, but are the rest of the lines following this one?
       matches = true;
       if (_addr2->matches(context)) {
-	// If this line matches addr2, that's the end of our range for
-	// next time.
-	_active = false;
+        // If this line matches addr2, that's the end of our range for
+        // next time.
+        _active = false;
       }
     } else {
       // We have not yet matched _addr1.  This line and subsequent
       // lines are in only if we match now.
       if (_addr1->matches(context)) {
-	matches = true;
-	if (!_addr2->precedes(context)) {
-	  _active = true;
-	}
+        matches = true;
+        if (!_addr2->precedes(context)) {
+          _active = true;
+        }
       }
     }
 
@@ -188,7 +188,7 @@ parse_s_params(const string &line, size_t &p) {
   
   if (p >= line.length()) {
     cerr << "Could not find terminating character '" << delimiter
-	 << "' in regular expression: " << line.substr(p0) << "\n";
+         << "' in regular expression: " << line.substr(p0) << "\n";
     return false;
   }
 
@@ -202,7 +202,7 @@ parse_s_params(const string &line, size_t &p) {
     regerror(error, &_re, errbuf, errbuf_size);
     
     cerr << "Invalid regular expression: " << re << "\n"
-	 << errbuf << "\n";
+         << errbuf << "\n";
     return false;
   }
   _flags |= F_have_re;
@@ -219,7 +219,7 @@ parse_s_params(const string &line, size_t &p) {
 
   if (p >= line.length()) {
     cerr << "Could not find terminating character '" << delimiter
-	 << "' in replacement string: " << line.substr(p0) << "\n";
+         << "' in replacement string: " << line.substr(p0) << "\n";
     return false;
   }
 
@@ -291,30 +291,30 @@ do_s_command(SedContext &context) {
     size_t p = 0;
     while (p < _string2.length()) {
       if (_string2[p] == '\\') {
-	p++;
-	if (p < _string2.length()) {
-	  if (isdigit(_string2[p])) {
-	    // Here's a subexpression reference.
-	    const char *numstr = _string2.c_str() + p;
-	    char *numend;
-	    int ref = strtol(numstr, &numend, 10);
-	    p += (numend - numstr);
-	    if (ref <= 0 || ref >= (int)nmatch) {
-	      cerr << "Invalid subexpression number: " << ref << "\n";
-	    } else {
-	      repl += string(str + pmatch[ref].rm_so,
-			     pmatch[ref].rm_eo - pmatch[ref].rm_so);
-	    }
-	  } else {
-	    // Here's an escaped character.
-	    repl += _string2[p];
-	    p++;
-	  }
-	}
+        p++;
+        if (p < _string2.length()) {
+          if (isdigit(_string2[p])) {
+            // Here's a subexpression reference.
+            const char *numstr = _string2.c_str() + p;
+            char *numend;
+            int ref = strtol(numstr, &numend, 10);
+            p += (numend - numstr);
+            if (ref <= 0 || ref >= (int)nmatch) {
+              cerr << "Invalid subexpression number: " << ref << "\n";
+            } else {
+              repl += string(str + pmatch[ref].rm_so,
+                             pmatch[ref].rm_eo - pmatch[ref].rm_so);
+            }
+          } else {
+            // Here's an escaped character.
+            repl += _string2[p];
+            p++;
+          }
+        }
       } else {
-	// Here's a normal character.
-	repl += _string2[p];
-	p++;
+        // Here's a normal character.
+        repl += _string2[p];
+        p++;
       }
     }
 

+ 1 - 1
ppremake/sedCommand.h

@@ -22,7 +22,7 @@ class SedContext;
 class SedAddress;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : SedCommand
+//       Class : SedCommand
 // Description : This represents a single command (of several
 //               possible, separated by semicolons) to a SedProgram.
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
ppremake/sedContext.h

@@ -9,7 +9,7 @@
 #include "ppremake.h"
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : SedContext
+//       Class : SedContext
 // Description : This contains the current context of the sed process
 //               as it is running: the pattern space, the hold space,
 //               and the current line numbers, etc.  It is updated as

+ 1 - 1
ppremake/sedProcess.h

@@ -10,7 +10,7 @@
 #include "sedScript.h"
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : SedProcess
+//       Class : SedProcess
 // Description : This supervises the whole sed process, from beginning
 //               to end.
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
ppremake/sedScript.h

@@ -14,7 +14,7 @@ class SedCommand;
 class SedContext;
 
 ///////////////////////////////////////////////////////////////////
-// 	 Class : SedScript
+//       Class : SedScript
 // Description : This is a complete sed script: a linear list of
 //               commands that are to be applied for each line read
 //               from input.

+ 1 - 1
ppremake/tokenize.cxx

@@ -21,7 +21,7 @@
 ////////////////////////////////////////////////////////////////////
 void
 tokenize(const string &source, vector<string> &tokens,
-	 const string &delimiters) {
+         const string &delimiters) {
   size_t p = 0;
   while (p < source.length()) {
     size_t q = source.find_first_of(delimiters, p);

+ 1 - 1
ppremake/tokenize.h

@@ -14,7 +14,7 @@
 // and repasting the tokens back into a string.
 
 void tokenize(const string &source, vector<string> &tokens,
-	      const string &delimiters);
+              const string &delimiters);
 
 void tokenize_whitespace(const string &source, vector<string> &tokens);