* alpha-tdep.c (heuristic_proc_desc): Increase search limit
[deliverable/binutils-gdb.git] / gdb / top.c
index 3afa8c9ad6627bb04f3e4b64dc49174963772e4e..736b966f2d6fc68b4031ffa2b7df94886e1182ce 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1,5 +1,5 @@
 /* Top level stuff for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
+   Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 1997
    Free Software Foundation, Inc.
 
 This file is part of GDB.
@@ -67,8 +67,6 @@ static void init_signals PARAMS ((void));
 static void stop_sig PARAMS ((int));
 #endif
 
-static void disconnect PARAMS ((int));
-
 static char * line_completion_function PARAMS ((char *, int, char *, int));
 
 static char * readline_line_completion_function PARAMS ((char *, int));
@@ -155,9 +153,11 @@ static void complete_command PARAMS ((char *, int));
 
 static void do_nothing PARAMS ((int));
 
+#ifdef SIGHUP
 static int quit_cover PARAMS ((char *));
 
 static void disconnect PARAMS ((int));
+#endif
 
 static void source_cleanup PARAMS ((FILE *));
 
@@ -571,6 +571,7 @@ catch_errors (func, args, errstring, mask)
 
 /* Handler for SIGHUP.  */
 
+#ifdef SIGHUP
 static void
 disconnect (signo)
 int signo;
@@ -592,6 +593,7 @@ char *s;
   quit_command((char *)0, 0);
   return 0;
 }
+#endif /* defined SIGHUP */
 \f
 /* Line number we are currently in in a file which is being sourced.  */
 static int source_line_number;
@@ -1025,6 +1027,9 @@ setup_user_args (p)
   while (*p)
     {
       char *start_arg;
+      int squote = 0;
+      int dquote = 0;
+      int bsquote = 0;
 
       if (arg_count >= MAXUSERARGS)
        {
@@ -1042,8 +1047,36 @@ setup_user_args (p)
       user_args->a[arg_count].arg = p;
 
       /* Get to the end of this argument.  */
-      while (*p && *p != ' ' && *p != '\t')
-       p++;
+      while (*p)
+       {
+         if (((*p == ' ' || *p == '\t')) && !squote && !dquote && !bsquote)
+           break;
+         else
+           {
+             if (bsquote)
+               bsquote = 0;
+             else if (*p == '\\')
+               bsquote = 1;
+             else if (squote)
+               {
+                 if (*p == '\'')
+                   squote = 0;
+               }
+             else if (dquote)
+               {
+                 if (*p == '"')
+                   dquote = 0;
+               }
+             else
+               {
+                 if (*p == '\'')
+                   squote = 1;
+                 else if (*p == '"')
+                   dquote = 1;
+               }
+             p++;
+           }
+       }
 
       user_args->a[arg_count].len = p - start_arg;
       arg_count++;
@@ -1898,8 +1931,10 @@ init_signals ()
      a handler for SIGQUIT, when we call exec it will set the signal
      to SIG_DFL for us.  */
   signal (SIGQUIT, do_nothing);
+#ifdef SIGHUP
   if (signal (SIGHUP, do_nothing) != SIG_IGN)
     signal (SIGHUP, disconnect);
+#endif
   signal (SIGFPE, float_handler);
 
 #if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
@@ -2763,7 +2798,7 @@ print_gdb_version (stream)
 
   /* Second line is a copyright notice. */
 
-  fprintf_filtered (stream, "Copyright 1996 Free Software Foundation, Inc.\n");
+  fprintf_filtered (stream, "Copyright 1997 Free Software Foundation, Inc.\n");
 
   /* Following the copyright is a brief statement that the program is
      free software, that users are free to copy and change it on
This page took 0.025347 seconds and 4 git commands to generate.