]> code.delx.au - gnu-emacs/blobdiff - lib-src/ebrowse.c
*** empty log message ***
[gnu-emacs] / lib-src / ebrowse.c
index eeeb0eb3efdcf36ef2b1984438087d8c8efa6f95..94fa9114d2317a99124e97fbc329253c9c37905a 100644 (file)
@@ -1,7 +1,7 @@
 /* ebrowse.c --- parsing files for the ebrowse C++ browser
 
-   Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99,
-                 2000, 2001, 2002   Free Software Foundation Inc.
+   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+                 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
    This file is part of GNU Emacs.
 
@@ -17,8 +17,8 @@
 
    You should have received a copy of the GNU General Public License
    along with GNU Emacs; see the file COPYING.  If not, write to the
-   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -564,7 +564,7 @@ xmalloc (nbytes)
   if (p == NULL)
     {
       yyerror ("out of memory", NULL);
-      exit (1);
+      exit (EXIT_FAILURE);
     }
   return p;
 }
@@ -581,7 +581,7 @@ xrealloc (p, sz)
   if (p == NULL)
     {
       yyerror ("out of memory", NULL);
-      exit (1);
+      exit (EXIT_FAILURE);
     }
   return p;
 }
@@ -648,7 +648,10 @@ add_sym (name, nested_in_class)
   h %= TABLE_SIZE;
 
   for (sym = class_table[h]; sym; sym = sym->next)
-    if (streq (name, sym->name) && sym->namesp == scope)
+    if (streq (name, sym->name)
+       && ((!sym->namesp && !scope)
+           || (sym->namesp && scope
+               && streq (sym->namesp->name, scope->name))))
       break;
 
   if (sym == NULL)
@@ -3671,7 +3674,7 @@ usage (error)
      int error;
 {
   puts (USAGE);
-  exit (error ? 1 : 0);
+  exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
 }
 
 
@@ -3686,9 +3689,9 @@ void
 version ()
 {
   printf ("ebrowse %s\n", VERSION);
-  puts ("Copyright (C) 1992-1999, 2000, 2001 Free Software Foundation, Inc.");
+  puts ("Copyright (C) 1992-2006 Free Software Foundation, Inc.");
   puts ("This program is distributed under the same terms as Emacs.");
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
 
 
@@ -3925,7 +3928,7 @@ main (argc, argv)
       if (yyout == NULL)
        {
          yyerror ("cannot open output file `%s'", out_filename);
-         exit (1);
+         exit (EXIT_FAILURE);
        }
     }
 
@@ -3970,11 +3973,10 @@ main (argc, argv)
   if (yyout != stdout)
     fclose (yyout);
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
-
-/* ebrowse.c ends here.  */
-
 /* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8
    (do not change this comment) */
+
+/* ebrowse.c ends here */