-/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* "script.c" argv tricks for `#!' scripts.
scm_find_executable (const char *name)
{
char tbuf[MAXPATHLEN];
- int i = 0;
+ int i = 0, c;
FILE *f;
/* fprintf(stderr, "s_f_e checking access %s ->%d\n", name, access(name, X_OK)); fflush(stderr); */
if ((fgetc (f) == '#') && (fgetc (f) == '!'))
{
while (1)
- switch (tbuf[i++] = fgetc (f))
+ switch (c = fgetc (f))
{
case /*WHITE_SPACES */ ' ':
case '\t':
case '\r':
case '\f':
case EOF:
- tbuf[--i] = 0;
+ tbuf[i] = 0;
fclose (f);
return scm_cat_path (0L, tbuf, 0L);
+ default:
+ tbuf[i++] = c;
+ break;
}
}
fclose (f);
" -v, --version display version information and exit\n"
" \\ read arguments from following script lines\n"
"\n"
- "Please report bugs to bug-guile@gnu.org\n",
+ "Please report bugs to bug-guile@gnu.org. (Note that you must\n"
+ "be subscribed to this list first, in order to successfully send\n"
+ "a report to it).\n",
scm_usage_name);
if (fatal)
{
/* Print version number. */
printf ("Guile %s\n"
- "Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation\n"
+ "Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation\n"
"Guile may be distributed under the terms of the GNU General Public Licence;\n"
"certain other uses are permitted as well. For details, see the file\n"
"`COPYING', which is included in the Guile distribution.\n"