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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20090331-1.c] - Blame information for rev 859

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

Line No. Rev Author Line
1 297 jeremybenn
struct re_pattern_buffer {
2
    unsigned char *buffer;
3
    unsigned long int allocated;
4
};
5
void byte_regex_compile (struct re_pattern_buffer *bufp,
6
                         unsigned char *begalt, unsigned char *b)
7
{
8
  unsigned char *pfrom;
9
  unsigned char *pto;
10
 
11
  while ((unsigned long) (b - bufp->buffer + 3) > bufp->allocated)
12
    {
13
      unsigned char *old_buffer = bufp->buffer;
14
      bufp->allocated <<= 1;
15
      if (old_buffer != bufp->buffer)
16
        {
17
          int incr = bufp->buffer - old_buffer;
18
          b += incr;
19
        }
20
    }
21
  pfrom = b;
22
  pto = b + 3;
23
  while (pfrom != begalt)
24
    *--pto = *--pfrom;
25
}
26
 

powered by: WebSVN 2.1.0

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