projects
/
platform
/
upstream
/
bash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported from ../bash-2.05a.tar.gz.
[platform/upstream/bash.git]
/
error.c
diff --git
a/error.c
b/error.c
index
0652efe
..
68ea548
100644
(file)
--- a/
error.c
+++ b/
error.c
@@
-15,7
+15,7
@@
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
- Foundation,
675 Mass Ave, Cambridge, MA 02139,
USA. */
+ Foundation,
59 Temple Place, Suite 330, Boston, MA 02111
USA. */
#include "config.h"
#include "config.h"
@@
-58,13
+58,13
@@
extern char *dollar_vars[];
extern char *shell_name;
#if defined (JOB_CONTROL)
extern pid_t shell_pgrp;
extern char *shell_name;
#if defined (JOB_CONTROL)
extern pid_t shell_pgrp;
-extern int give_terminal_to
(
);
+extern int give_terminal_to
__P((pid_t, int)
);
#endif /* JOB_CONTROL */
/* The current maintainer of the shell. You change this in the
Makefile. */
#if !defined (MAINTAINER)
#endif /* JOB_CONTROL */
/* The current maintainer of the shell. You change this in the
Makefile. */
#if !defined (MAINTAINER)
-#define MAINTAINER "bash-maintainers@
prep.ai.mit.edu
"
+#define MAINTAINER "bash-maintainers@
gnu.org
"
#endif
char *the_current_maintainer = MAINTAINER;
#endif
char *the_current_maintainer = MAINTAINER;
@@
-95,7
+95,7
@@
get_name_for_error ()
format string. */
void
file_error (filename)
format string. */
void
file_error (filename)
- char *filename;
+ c
onst c
har *filename;
{
report_error ("%s: %s", filename, strerror (errno));
}
{
report_error ("%s: %s", filename, strerror (errno));
}
@@
-121,7
+121,10
@@
programming_error (reason, arg1, arg2, arg3, arg4, arg5)
}
#endif
}
#endif
+#if 0
fprintf (stderr, "Report this to %s\n", the_current_maintainer);
fprintf (stderr, "Report this to %s\n", the_current_maintainer);
+#endif
+
fprintf (stderr, "Stopping myself...");
fflush (stderr);
fprintf (stderr, "Stopping myself...");
fflush (stderr);
@@
-224,7
+227,7
@@
programming_error (format, va_alist)
char *h;
#if defined (JOB_CONTROL)
char *h;
#if defined (JOB_CONTROL)
- give_terminal_to (shell_pgrp);
+ give_terminal_to (shell_pgrp
, 0
);
#endif /* JOB_CONTROL */
#if defined (PREFER_STDARG)
#endif /* JOB_CONTROL */
#if defined (PREFER_STDARG)
@@
-245,7
+248,10
@@
programming_error (format, va_alist)
}
#endif
}
#endif
+#if 0
fprintf (stderr, "Report this to %s\n", the_current_maintainer);
fprintf (stderr, "Report this to %s\n", the_current_maintainer);
+#endif
+
fprintf (stderr, "Stopping myself...");
fflush (stderr);
fprintf (stderr, "Stopping myself...");
fflush (stderr);
@@
-428,6
+434,7
@@
parser_error (lineno, format, va_alist)
exit (2);
}
exit (2);
}
+#ifdef DEBUG
void
#if defined (PREFER_STDARG)
itrace (const char *format, ...)
void
#if defined (PREFER_STDARG)
itrace (const char *format, ...)
@@
-439,7
+446,7
@@
itrace (format, va_alist)
{
va_list args;
{
va_list args;
- fprintf(stderr, "TRACE: pid %
d: ", (int
)getpid());
+ fprintf(stderr, "TRACE: pid %
ld: ", (long
)getpid());
#if defined (PREFER_STDARG)
va_start (args, format);
#if defined (PREFER_STDARG)
va_start (args, format);
@@
-455,7
+462,6
@@
itrace (format, va_alist)
fflush(stderr);
}
fflush(stderr);
}
-#if 0
/* A trace function for silent debugging -- doesn't require a control
terminal. */
void
/* A trace function for silent debugging -- doesn't require a control
terminal. */
void
@@
-471,14
+477,14
@@
trace (format, va_alist)
static FILE *tracefp = (FILE *)NULL;
if (tracefp == NULL)
static FILE *tracefp = (FILE *)NULL;
if (tracefp == NULL)
- tracefp = fopen("/
usr/
tmp/bash-trace.log", "a+");
+ tracefp = fopen("/tmp/bash-trace.log", "a+");
if (tracefp == NULL)
tracefp = stderr;
else
fcntl (fileno (tracefp), F_SETFD, 1); /* close-on-exec */
if (tracefp == NULL)
tracefp = stderr;
else
fcntl (fileno (tracefp), F_SETFD, 1); /* close-on-exec */
- fprintf(tracefp, "TRACE: pid %
d: ",
getpid());
+ fprintf(tracefp, "TRACE: pid %
ld: ", (long)
getpid());
#if defined (PREFER_STDARG)
va_start (args, format);
#if defined (PREFER_STDARG)
va_start (args, format);
@@
-493,9
+499,9
@@
trace (format, va_alist)
fflush(tracefp);
}
fflush(tracefp);
}
-#endif /* 0 */
#endif /* USE_VARARGS */
#endif /* USE_VARARGS */
+#endif /* DEBUG */
static char *cmd_error_table[] = {
"unknown command error", /* CMDERR_DEFAULT */
static char *cmd_error_table[] = {
"unknown command error", /* CMDERR_DEFAULT */