Forward fit sky-branch updates to devo.
[deliverable/binutils-gdb.git] / gprof / cg_print.c
index 236e01b11fa0238f5d2a6389171deb0d27f11e49..c604e6c05e6c78af77a4b091d2b15c5b681faf6b 100644 (file)
@@ -36,23 +36,23 @@ DEFUN_VOID (print_header)
     {
       if (print_descriptions)
        {
-         printf ("\t\t     Call graph (explanation follows)\n\n");
+         printf (_("\t\t     Call graph (explanation follows)\n\n"));
        }
       else
        {
-         printf ("\t\t\tCall graph\n\n");
+         printf (_("\t\t\tCall graph\n\n"));
        }
     }
-  printf ("\ngranularity: each sample hit covers %ld byte(s)",
+  printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
          (long) hist_scale * sizeof (UNIT));
   if (print_time > 0.0)
     {
-      printf (" for %.2f%% of %.2f seconds\n\n",
+      printf (_(" for %.2f%% of %.2f seconds\n\n"),
              100.0 / print_time, print_time / hz);
     }
   else
     {
-      printf (" no time propagated\n\n");
+      printf (_(" no time propagated\n\n"));
       /*
        * This doesn't hurt, since all the numerators will be 0.0:
        */
@@ -61,17 +61,17 @@ DEFUN_VOID (print_header)
   if (bsd_style_output)
     {
       printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s     %-8.8s\n",
-             "", "", "", "", "called", "total", "parents");
+             "", "", "", "", _("called"), _("total"), _("parents"));
       printf ("%-6.6s %5.5s %7.7s %11.11s %7.7s+%-7.7s %-8.8s\t%5.5s\n",
-             "index", "%time", "self", "descendents",
-             "called", "self", "name", "index");
+             _("index"), _("%time"), _("self"), _("descendents"),
+             _("called"), _("self"), _("name"), _("index"));
       printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s     %-8.8s\n",
-             "", "", "", "", "called", "total", "children");
+             "", "", "", "", _("called"), _("total"), _("children"));
       printf ("\n");
     }
   else
     {
-      printf ("index %% time    self  children    called     name\n");
+      printf (_("index %% time    self  children    called     name\n"));
     }
 }
 
@@ -98,7 +98,7 @@ DEFUN (print_cycle, (cyc), Sym * cyc)
     {
       printf (" %7.7s", "");
     }
-  printf (" <cycle %d as a whole> [%d]\n", cyc->cg.cyc.num, cyc->cg.index);
+  printf (_(" <cycle %d as a whole> [%d]\n"), cyc->cg.cyc.num, cyc->cg.index);
 }
 
 
@@ -350,8 +350,8 @@ DEFUN (print_parents, (child), Sym * child)
   if (!child->cg.parents)
     {
       printf (bsd_style_output
-             ? "%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s     <spontaneous>\n"
-             : "%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s     <spontaneous>\n",
+             ? _("%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s     <spontaneous>\n")
+             : _("%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s     <spontaneous>\n"),
              "", "", "", "", "", "");
       return;
     }
@@ -497,7 +497,7 @@ DEFUN (print_line, (np), Sym * np)
 void
 DEFUN (cg_print, (timesortsym), Sym ** timesortsym)
 {
-  int index;
+  unsigned int index;
   Sym *parent;
 
   if (print_descriptions && bsd_style_output)
@@ -513,7 +513,8 @@ DEFUN (cg_print, (timesortsym), Sym ** timesortsym)
       if ((ignore_zeros && parent->ncalls == 0
           && parent->cg.self_calls == 0 && parent->cg.prop.self == 0
           && parent->cg.prop.child == 0)
-         || !parent->cg.print_flag)
+         || !parent->cg.print_flag
+         || (line_granularity && ! parent->is_func))
        {
          continue;
        }
@@ -556,7 +557,9 @@ DEFUN (cmp_name, (left, right), const PTR left AND const PTR right)
 void
 DEFUN_VOID (cg_print_index)
 {
-  int index, nnames, todo, i, j, col, starting_col;
+  unsigned int index;
+  unsigned int nnames, todo, i, j;
+  int col, starting_col;
   Sym **name_sorted_syms, *sym;
   const char *filename;
   char buf[20];
@@ -580,7 +583,8 @@ DEFUN_VOID (cg_print_index)
     {
       name_sorted_syms[todo++] = &cycle_header[index];
     }
-  printf ("\f\nIndex by function name\n\n");
+  printf ("\f\n");
+  printf (_("Index by function name\n\n"));
   index = (todo + 2) / 3;
   for (i = 0; i < index; i++)
     {
@@ -637,7 +641,7 @@ DEFUN_VOID (cg_print_index)
              if (bsd_style_output)
                {
                  printf ("%6.6s ", buf);
-                 sprintf (buf, "<cycle %d>", sym->cg.cyc.num);
+                 sprintf (buf, _("<cycle %d>"), sym->cg.cyc.num);
                  printf ("%-19.19s", buf);
                }
              else
@@ -646,7 +650,7 @@ DEFUN_VOID (cg_print_index)
                  for (; col < starting_col + 5; ++col)
                    putchar (' ');
                  printf (" %s ", buf);
-                 sprintf (buf, "<cycle %d>", sym->cg.cyc.num);
+                 sprintf (buf, _("<cycle %d>"), sym->cg.cyc.num);
                  printf ("%s", buf);
                  col += strlen (buf);
                }
@@ -844,7 +848,7 @@ DEFUN_VOID (cg_print_function_ordering)
 
   /* Now sort a temporary symbol table based on the number of
      times each function was used in the highest used arcs.  */
-  bcopy (used_syms, scratch_syms, used * sizeof (Sym *));
+  memcpy (scratch_syms, used_syms, used * sizeof (Sym *));
   qsort (scratch_syms, used, sizeof (Sym *), cmp_fun_nuses);
 
   /* Now pick out those symbols we're going to emit as
@@ -1219,7 +1223,7 @@ DEFUN_VOID (cg_print_file_ordering)
   unsigned long scratch_arc_count, index;
   Arc **scratch_arcs;
   extern struct function_map *symbol_map;
-  extern int symbol_map_count;
+  extern unsigned int symbol_map_count;
   char *last;
 
   scratch_arc_count = 0;
@@ -1247,7 +1251,7 @@ DEFUN_VOID (cg_print_file_ordering)
   last = NULL;
   for (index = 0; index < symbol_map_count; index++)
     {
-      int index2;
+      unsigned int index2;
 
       /* Don't bother searching if this symbol is the
         same as the previous one.  */
This page took 0.025352 seconds and 4 git commands to generate.