forked from Imagelibrary/binutils-gdb
* defs.h: Include ansidecl.h and PARAMS macro. Use PARAMS
to make prototypes for all functions declared here. * cplus-dem.c: Avoid declaring xmalloc and xrealloc. * c-exp.y: Rename SIGNED, OR, and AND to avoid conflict. * environ.c: Include <stdio.h> before defs.h. Minor cleanup. * ieee-float.h: Use PARAMS for prototypes; make some params const. * ieee-float.c, valarith.c: Include <stdio.h>. Lint. b*=>mem*. * m2-exp.y: Remove unused CONST; Rename OR and AND. * utils.c: Avoid declaring malloc and realloc. Lint. (request_quit): Accept signal-number parameter.
This commit is contained in:
33
gdb/utils.c
33
gdb/utils.c
@@ -36,8 +36,6 @@ extern volatile void return_to_top_level ();
|
||||
extern volatile void exit ();
|
||||
extern char *gdb_readline ();
|
||||
extern char *getenv();
|
||||
extern char *malloc();
|
||||
extern char *realloc();
|
||||
|
||||
/* If this definition isn't overridden by the header files, assume
|
||||
that isatty and fileno exist on this system. */
|
||||
@@ -166,6 +164,21 @@ free_current_contents (location)
|
||||
{
|
||||
free (*location);
|
||||
}
|
||||
|
||||
/* Provide a known function that does nothing, to use as a base for
|
||||
for a possibly long chain of cleanups. This is useful where we
|
||||
use the cleanup chain for handling normal cleanups as well as dealing
|
||||
with cleanups that need to be done as a result of a call to error().
|
||||
In such cases, we may not be certain where the first cleanup is, unless
|
||||
we have a do-nothing one to always use as the base. */
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
null_cleanup (arg)
|
||||
char **arg;
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* Provide a hook for modules wishing to print their own warning messages
|
||||
to set up the terminal state in a compatible way, without them having
|
||||
@@ -417,13 +430,14 @@ quit ()
|
||||
/* Control C comes here */
|
||||
|
||||
void
|
||||
request_quit ()
|
||||
request_quit (signo)
|
||||
int signo;
|
||||
{
|
||||
quit_flag = 1;
|
||||
|
||||
#ifdef USG
|
||||
/* Restore the signal handler. */
|
||||
signal (SIGINT, request_quit);
|
||||
signal (signo, request_quit);
|
||||
#endif
|
||||
|
||||
if (immediate_quit)
|
||||
@@ -461,7 +475,7 @@ myread (desc, addr, len)
|
||||
|
||||
char *
|
||||
savestring (ptr, size)
|
||||
char *ptr;
|
||||
const char *ptr;
|
||||
int size;
|
||||
{
|
||||
register char *p = (char *) xmalloc (size + 1);
|
||||
@@ -619,16 +633,15 @@ parse_escape (string_ptr)
|
||||
}
|
||||
}
|
||||
|
||||
/* Print the character CH on STREAM as part of the contents
|
||||
/* Print the character C on STREAM as part of the contents
|
||||
of a literal string whose delimiter is QUOTER. */
|
||||
|
||||
void
|
||||
printchar (ch, stream, quoter)
|
||||
unsigned char ch;
|
||||
printchar (c, stream, quoter)
|
||||
register int c;
|
||||
FILE *stream;
|
||||
int quoter;
|
||||
{
|
||||
register int c = ch;
|
||||
|
||||
if (c < 040 || (sevenbit_strings && c >= 0177)) {
|
||||
switch (c)
|
||||
@@ -788,7 +801,7 @@ wrap_here(indent)
|
||||
|
||||
void
|
||||
fputs_filtered (linebuffer, stream)
|
||||
char *linebuffer;
|
||||
const char *linebuffer;
|
||||
FILE *stream;
|
||||
{
|
||||
char *lineptr;
|
||||
|
||||
Reference in New Issue
Block a user