OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [961125-1.c] - Blame information for rev 199

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
static char *
2
begfield (int tab, char *ptr, char *lim, int sword, int schar)
3
{
4
  if (tab)
5
    {
6
      while (ptr < lim && sword--)
7
        {
8
          while (ptr < lim && *ptr != tab)
9
            ++ptr;
10
          if (ptr < lim)
11
            ++ptr;
12
        }
13
    }
14
  else
15
    {
16
      while (1)
17
        ;
18
    }
19
 
20
  if (ptr + schar <= lim)
21
    ptr += schar;
22
 
23
  return ptr;
24
}
25
 
26
main ()
27
{
28
  char *s = ":ab";
29
  char *lim = s + 3;
30
  if (begfield (':', s, lim, 1, 1) != s + 2)
31
    abort ();
32
  exit (0);
33
}

powered by: WebSVN 2.1.0

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