changeset 10162:9f9eb9d2eefd

doc/interpreter/munge-texi.cc: untabify and delete emacs local variable settings
author John W. Eaton <jwe@octave.org>
date Wed, 20 Jan 2010 20:51:40 -0500
parents 6a88b00c5ad6
children a822560a3ce3
files doc/ChangeLog doc/interpreter/munge-texi.cc
diffstat 2 files changed, 111 insertions(+), 112 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-20  John W. Eaton  <jwe@octave.org>
+
+	* interpreter/munge-texi.cc: Delete Emacs local-variable settings.
+	Untabify.
+
 2010-01-17  Thorsten Meyer  <thorsten.meyier@gmx.de>
 
 	* interpreter/container.txi (Creating Cell Arrays): Add
--- a/doc/interpreter/munge-texi.cc
+++ b/doc/interpreter/munge-texi.cc
@@ -113,7 +113,7 @@
                     break;
                   
                   // get function name
-	          std::string function_name;
+                  std::string function_name;
                   do 
                     function_name += static_cast<char> (c);
                   while ((c = is.get ()) != EOF
@@ -129,11 +129,11 @@
                   else
                     doc += ", ";
 
-		  if (function_name[0] == '@')
-		    function_name = "@" + function_name;
+                  if (function_name[0] == '@')
+                    function_name = "@" + function_name;
 
                   doc += "@ref{doc-" + function_name + ",,"
-		    + function_name + "}";
+                    + function_name + "}";
 
                   // test for end of @seealso
                   if (c == '}') 
@@ -164,14 +164,14 @@
   while ((c = is.get ()) != EOF)
     {
       if (c == '#')
-	in_comment = true;
+        in_comment = true;
       else if (c == '\n')
-	in_comment = false;
+        in_comment = false;
       else if (! (in_comment || ::isspace (c)))
-	{
-	  is.putback (c);
-	  break;
-	}
+        {
+          is.putback (c);
+          break;
+        }
     }
 }
 
@@ -185,25 +185,25 @@
       skip_comments (infile);
 
       if (infile.get () != doc_delim)
-	fatal ("invalid doc file format");
+        fatal ("invalid doc file format");
 
       std::string symbol_name;
 
       do
-	{
-	  symbol_name = extract_symbol_name (infile);
+        {
+          symbol_name = extract_symbol_name (infile);
 
-	  if (! symbol_name.empty ())
-	    {
-	      std::string doc_string = extract_docstring (infile);
+          if (! symbol_name.empty ())
+            {
+              std::string doc_string = extract_docstring (infile);
 
-	      if (help_text.find (symbol_name) != help_text.end ())
-		std::cerr << "ignoring duplicate entry for "
-			  << symbol_name << "\n";
-	      else
-		help_text[symbol_name] = doc_string;
-	    }
-	}
+              if (help_text.find (symbol_name) != help_text.end ())
+                std::cerr << "ignoring duplicate entry for "
+                          << symbol_name << "\n";
+              else
+                help_text[symbol_name] = doc_string;
+            }
+        }
       while (! symbol_name.empty ());
     }
   else
@@ -237,13 +237,13 @@
       int clast = 0;
 
       while ((c = infile.get ()) != EOF)
-	{
-	  os << static_cast<char> (c);
-	  clast = c;
-	}
+        {
+          os << static_cast<char> (c);
+          clast = c;
+        }
 
       if (clast != '\n')
-	os << "\n";
+        os << "\n";
 
       os << "@end verbatim\n";
     }
@@ -262,20 +262,20 @@
   while ((c = is.get ()) != EOF)
     {
       if (bol)
-	{
-	  if (c == '@')
-	    {
-	      char buf[16];
-	      int i = 0;
-	      buf[i++] = static_cast<char> (c);
+        {
+          if (c == '@')
+            {
+              char buf[16];
+              int i = 0;
+              buf[i++] = static_cast<char> (c);
 
-	      buf[i++] = c = static_cast<char> (is.get ());
+              buf[i++] = c = static_cast<char> (is.get ());
 
-	      if (c == 'D')
-		{
-		  std::string symbol_name;
+              if (c == 'D')
+                {
+                  std::string symbol_name;
 
-		  if (   (buf[i++] = static_cast<char> (is.get ())) == 'O'
+                  if (   (buf[i++] = static_cast<char> (is.get ())) == 'O'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'C'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'S'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'T'
@@ -284,66 +284,66 @@
                       && (buf[i++] = static_cast<char> (is.get ())) == 'N'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'G'
                       && (buf[i++] = static_cast<char> (is.get ())) == '(')
-		    {
-		      while ((c = is.get ()) != EOF && c != ')')
-			symbol_name += static_cast<char> (c);
+                    {
+                      while ((c = is.get ()) != EOF && c != ')')
+                        symbol_name += static_cast<char> (c);
 
-		      if (is.eof ())
-			fatal ("end of file while reading @DOCSTRING command");
-		      else
-			{
-			  std::string doc_string = help_text[symbol_name];
+                      if (is.eof ())
+                        fatal ("end of file while reading @DOCSTRING command");
+                      else
+                        {
+                          std::string doc_string = help_text[symbol_name];
 
-			  size_t len = doc_string.length ();
+                          size_t len = doc_string.length ();
 
-			  int j = 0;
+                          int j = 0;
 
-			  // If there is a leading comment with the file
-			  // name, copy it to the output.
-			  if (len > 1
-			      && doc_string[j] == '@'
-			      && doc_string[j+1] == 'c')
-			    {
-			      j = 2;
-			      while (doc_string[j++] != '\n')
-				/* find eol */;
+                          // If there is a leading comment with the file
+                          // name, copy it to the output.
+                          if (len > 1
+                              && doc_string[j] == '@'
+                              && doc_string[j+1] == 'c')
+                            {
+                              j = 2;
+                              while (doc_string[j++] != '\n')
+                                /* find eol */;
 
-			      os << doc_string.substr (0, j);
-			    }
+                              os << doc_string.substr (0, j);
+                            }
 
-			  while (doc_string[j] == ' ')
-			    j++;
+                          while (doc_string[j] == ' ')
+                            j++;
 
-			  if (doc_string.substr (j, 15) == "-*- texinfo -*-")
-			    {
-			      j += 15;
+                          if (doc_string.substr (j, 15) == "-*- texinfo -*-")
+                            {
+                              j += 15;
 
-			      while (isspace (doc_string[j]))
-				j++;
+                              while (isspace (doc_string[j]))
+                                j++;
 
-			      // Make `see also' references in functions
-			      // possible using @anchor{TAG} (new with
-			      // Texinfo 4.0).
+                              // Make `see also' references in functions
+                              // possible using @anchor{TAG} (new with
+                              // Texinfo 4.0).
 
-			      if (symbol_name[0] == '@')
-				symbol_name = "@" + symbol_name;
+                              if (symbol_name[0] == '@')
+                                symbol_name = "@" + symbol_name;
 
-			      os << "@anchor{doc-" << symbol_name << "}\n";
+                              os << "@anchor{doc-" << symbol_name << "}\n";
 
-			      os << doc_string.substr (j);
-			    }
-			  else
-			    os << doc_string;
-			}
-		    }
-		  else
-		    bol = recover_from_macro (os, buf, i);
-		}
-	      else if (c == 'E')
-		{
-		  std::string file_name;
+                              os << doc_string.substr (j);
+                            }
+                          else
+                            os << doc_string;
+                        }
+                    }
+                  else
+                    bol = recover_from_macro (os, buf, i);
+                }
+              else if (c == 'E')
+                {
+                  std::string file_name;
 
-		  if (   (buf[i++] = static_cast<char> (is.get ())) == 'X'
+                  if (   (buf[i++] = static_cast<char> (is.get ())) == 'X'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'A'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'M'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'P'
@@ -354,30 +354,30 @@
                       && (buf[i++] = static_cast<char> (is.get ())) == 'L'
                       && (buf[i++] = static_cast<char> (is.get ())) == 'E'
                       && (buf[i++] = static_cast<char> (is.get ())) == '(')
-		    {
-		      while ((c = is.get ()) != EOF && c != ')')
-			file_name += static_cast<char> (c);
+                    {
+                      while ((c = is.get ()) != EOF && c != ')')
+                        file_name += static_cast<char> (c);
 
-		      file_name = top_srcdir + "/examples/" + file_name;
+                      file_name = top_srcdir + "/examples/" + file_name;
 
-		      process_example_file (file_name, os);
-		    }
-		  else
-		    bol = recover_from_macro (os, buf, i);
-		}
-	      else
-		bol = recover_from_macro (os, buf, i);
-	    }
-	  else
-	    os.put (static_cast<char> (c));
-	}
+                      process_example_file (file_name, os);
+                    }
+                  else
+                    bol = recover_from_macro (os, buf, i);
+                }
+              else
+                bol = recover_from_macro (os, buf, i);
+            }
+          else
+            os.put (static_cast<char> (c));
+        }
       else
-	{
-	  if (c == '\n')
-	    bol = true;
+        {
+          if (c == '\n')
+            bol = true;
 
-	  os.put (static_cast<char> (c));
-	}
+          os.put (static_cast<char> (c));
+        }
     }
 }
 
@@ -405,9 +405,3 @@
   return retval;
 
 }
-
-/*
-;;; Local Variables: ***
-;;; mode: C++ ***
-;;; End: ***
-*/