OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [libiberty/] [testsuite/] [test-demangle.c] - Diff between revs 157 and 225

Show entire file | Details | Blame | View Log

Rev 157 Rev 225
Line 44... Line 44...
/* Safely read a single line of arbitrary length from standard input.  */
/* Safely read a single line of arbitrary length from standard input.  */
 
 
#define LINELEN 80
#define LINELEN 80
 
 
static void
static void
getline(buf)
get_line(buf)
     struct line *buf;
     struct line *buf;
{
{
  char *data = buf->data;
  char *data = buf->data;
  size_t alloc = buf->alloced;
  size_t alloc = buf->alloced;
  size_t count = 0;
  size_t count = 0;
Line 194... Line 194...
 
 
  for (;;)
  for (;;)
    {
    {
      const char *inp;
      const char *inp;
 
 
      getline (&format);
      get_line (&format);
      if (feof (stdin))
      if (feof (stdin))
        break;
        break;
 
 
      getline (&input);
      get_line (&input);
      getline (&expect);
      get_line (&expect);
 
 
      inp = protect_end (input.data);
      inp = protect_end (input.data);
 
 
      tests++;
      tests++;
 
 
Line 320... Line 320...
        }
        }
      free (result);
      free (result);
 
 
      if (no_params)
      if (no_params)
        {
        {
          getline (&expect);
          get_line (&expect);
          result = cplus_demangle (inp, DMGL_ANSI|DMGL_TYPES);
          result = cplus_demangle (inp, DMGL_ANSI|DMGL_TYPES);
 
 
          if (result
          if (result
              ? strcmp (result, expect.data)
              ? strcmp (result, expect.data)
              : strcmp (input.data, expect.data))
              : strcmp (input.data, expect.data))

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.