/* ebrowse.c --- parsing files for the ebrowse C++ browser
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+Copyright (C) 1992-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <string.h>
#include <ctype.h>
#include <assert.h>
-#include "getopt.h"
+#include <getopt.h>
/* The SunOS compiler doesn't have SEEK_END. */
#ifndef SEEK_END
case '/':
while (GET (c) && c != '\n')
;
+ /* Don't try to read past the end of the input buffer if
+ the file ends in a C++ comment without a newline. */
+ if (c == 0)
+ return YYEOF;
+
INCREMENT_LINENO;
break;
/* Display version and copyright info. The VERSION macro is set
- from the Makefile and contains the Emacs version. */
+ from config.h and contains the Emacs version. */
#ifndef VERSION
# define VERSION "21"
version (void)
{
/* Makes it easier to update automatically. */
- char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
+ char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc.";
printf ("ebrowse %s\n", VERSION);
puts (emacs_copyright);
yyerror ("error getting size of file `%s'", out_filename);
exit (EXIT_FAILURE);
}
-
+
else if (rc == 0)
{
yyerror ("file `%s' is empty", out_filename);
return EXIT_SUCCESS;
}
-/* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8
- (do not change this comment) */
-
/* ebrowse.c ends here */