* gas/mips/macro-warn-[1234].[sdl]: New tests.
[deliverable/binutils-gdb.git] / gdb / source.c
index ae94addb6135f99e240cb197d12be94582f567eb..6c0e213a3451cc640d01c70ba16a78a8f2c11076 100644 (file)
@@ -219,7 +219,7 @@ clear_current_source_symtab_and_line (void)
    before we need to would make things slower than necessary.  */
 
 void
-select_source_symtab (register struct symtab *s)
+select_source_symtab (struct symtab *s)
 {
   struct symtabs_and_lines sals;
   struct symtab_and_line sal;
@@ -260,7 +260,7 @@ select_source_symtab (register struct symtab *s)
        {
          char *name = s->filename;
          int len = strlen (name);
-         if (!(len > 2 && (STREQ (&name[len - 2], ".h"))))
+         if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
            {
              current_source_symtab = s;
            }
@@ -277,7 +277,7 @@ select_source_symtab (register struct symtab *s)
        {
          char *name = ps->filename;
          int len = strlen (name);
-         if (!(len > 2 && (STREQ (&name[len - 2], ".h"))))
+         if (!(len > 2 && (DEPRECATED_STREQ (&name[len - 2], ".h"))))
            {
              cs_pst = ps;
            }
@@ -317,8 +317,8 @@ show_directories (char *ignore, int from_tty)
 void
 forget_cached_source_info (void)
 {
-  register struct symtab *s;
-  register struct objfile *objfile;
+  struct symtab *s;
+  struct objfile *objfile;
   struct partial_symtab *pst;
 
   for (objfile = object_files; objfile != NULL; objfile = objfile->next)
@@ -418,7 +418,7 @@ add_path (char *dirname, char **which_path, int parse_separators)
   do
     {
       char *name = dirname;
-      register char *p;
+      char *p;
       struct stat st;
 
       {
@@ -526,7 +526,7 @@ add_path (char *dirname, char **which_path, int parse_separators)
 
     append:
       {
-       register unsigned int len = strlen (name);
+       unsigned int len = strlen (name);
 
        p = *which_path;
        while (1)
@@ -594,7 +594,7 @@ add_path (char *dirname, char **which_path, int parse_separators)
 static void
 source_info (char *ignore, int from_tty)
 {
-  register struct symtab *s = current_source_symtab;
+  struct symtab *s = current_source_symtab;
 
   if (!s)
     {
@@ -660,11 +660,11 @@ openp (const char *path, int try_cwd_first, const char *string,
        int mode, int prot,
        char **filename_opened)
 {
-  register int fd;
-  register char *filename;
+  int fd;
+  char *filename;
   const char *p;
   const char *p1;
-  register int len;
+  int len;
   int alloclen;
 
   if (!path)
@@ -907,7 +907,7 @@ void
 find_source_lines (struct symtab *s, int desc)
 {
   struct stat st;
-  register char *data, *p, *end;
+  char *data, *p, *end;
   int nlines = 0;
   int lines_allocated = 1000;
   int *line_charpos;
@@ -1019,10 +1019,10 @@ source_line_charpos (struct symtab *s, int line)
 /* Return the line number of character position POS in symtab S.  */
 
 int
-source_charpos_line (register struct symtab *s, register int chr)
+source_charpos_line (struct symtab *s, int chr)
 {
-  register int line = 0;
-  register int *lnp;
+  int line = 0;
+  int *lnp;
 
   if (s == 0 || s->line_charpos == 0)
     return 0;
@@ -1049,7 +1049,7 @@ source_charpos_line (register struct symtab *s, register int chr)
 static int
 get_filename_and_charpos (struct symtab *s, char **fullname)
 {
-  register int desc, linenums_changed = 0;
+  int desc, linenums_changed = 0;
 
   desc = open_source_file (s);
   if (desc < 0)
@@ -1107,9 +1107,9 @@ static void print_source_lines_base (struct symtab *s, int line, int stopline,
 static void
 print_source_lines_base (struct symtab *s, int line, int stopline, int noerror)
 {
-  register int c;
-  register int desc;
-  register FILE *stream;
+  int c;
+  int desc;
+  FILE *stream;
   int nlines = stopline - line;
 
   /* Regardless of whether we can open the file, set current_source_symtab. */
@@ -1232,22 +1232,6 @@ print_source_lines (struct symtab *s, int line, int stopline, int noerror)
   print_source_lines_base (s, line, stopline, noerror);
 }
 \f
-/* Print a list of files and line numbers which a user may choose from
-   in order to list a function which was specified ambiguously (as with
-   `list classname::overloadedfuncname', or 'list objectiveCSelector:).
-   The vector in SALS provides the filenames and line numbers.
-   NOTE: some of the SALS may have no filename or line information! */
-
-static void
-ambiguous_line_spec (struct symtabs_and_lines *sals)
-{
-  int i;
-
-  for (i = 0; i < sals->nelts; ++i)
-    printf_filtered ("file: \"%s\", line number: %d\n",
-                    sals->sals[i].symtab->filename, sals->sals[i].line);
-}
-\f
 /* Print info on range of pc's in a specified line.  */
 
 static void
@@ -1347,13 +1331,12 @@ line_info (char *arg, int from_tty)
 \f
 /* Commands to search the source file for a regexp.  */
 
-/* ARGSUSED */
 static void
 forward_search_command (char *regex, int from_tty)
 {
-  register int c;
-  register int desc;
-  register FILE *stream;
+  int c;
+  int desc;
+  FILE *stream;
   int line;
   char *msg;
 
@@ -1361,7 +1344,7 @@ forward_search_command (char *regex, int from_tty)
 
   msg = (char *) re_comp (regex);
   if (msg)
-    error (msg);
+    error ("%s", msg);
 
   if (current_source_symtab == 0)
     select_source_symtab (0);
@@ -1390,7 +1373,7 @@ forward_search_command (char *regex, int from_tty)
   while (1)
     {
       static char *buf = NULL;
-      register char *p;
+      char *p;
       int cursize, newsize;
 
       cursize = 256;
@@ -1443,13 +1426,12 @@ forward_search_command (char *regex, int from_tty)
   fclose (stream);
 }
 
-/* ARGSUSED */
 static void
 reverse_search_command (char *regex, int from_tty)
 {
-  register int c;
-  register int desc;
-  register FILE *stream;
+  int c;
+  int desc;
+  FILE *stream;
   int line;
   char *msg;
 
@@ -1457,7 +1439,7 @@ reverse_search_command (char *regex, int from_tty)
 
   msg = (char *) re_comp (regex);
   if (msg)
-    error (msg);
+    error ("%s", msg);
 
   if (current_source_symtab == 0)
     select_source_symtab (0);
@@ -1487,7 +1469,7 @@ reverse_search_command (char *regex, int from_tty)
     {
 /* FIXME!!!  We walk right off the end of buf if we get a long line!!! */
       char buf[4096];          /* Should be reasonable??? */
-      register char *p = buf;
+      char *p = buf;
 
       c = getc (stream);
       if (c == EOF)
This page took 0.0295 seconds and 4 git commands to generate.