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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20090331-1.c] - Diff between revs 297 and 384

Only display areas with differences | Details | Blame | View Log

Rev 297 Rev 384
struct re_pattern_buffer {
struct re_pattern_buffer {
    unsigned char *buffer;
    unsigned char *buffer;
    unsigned long int allocated;
    unsigned long int allocated;
};
};
void byte_regex_compile (struct re_pattern_buffer *bufp,
void byte_regex_compile (struct re_pattern_buffer *bufp,
                         unsigned char *begalt, unsigned char *b)
                         unsigned char *begalt, unsigned char *b)
{
{
  unsigned char *pfrom;
  unsigned char *pfrom;
  unsigned char *pto;
  unsigned char *pto;
 
 
  while ((unsigned long) (b - bufp->buffer + 3) > bufp->allocated)
  while ((unsigned long) (b - bufp->buffer + 3) > bufp->allocated)
    {
    {
      unsigned char *old_buffer = bufp->buffer;
      unsigned char *old_buffer = bufp->buffer;
      bufp->allocated <<= 1;
      bufp->allocated <<= 1;
      if (old_buffer != bufp->buffer)
      if (old_buffer != bufp->buffer)
        {
        {
          int incr = bufp->buffer - old_buffer;
          int incr = bufp->buffer - old_buffer;
          b += incr;
          b += incr;
        }
        }
    }
    }
  pfrom = b;
  pfrom = b;
  pto = b + 3;
  pto = b + 3;
  while (pfrom != begalt)
  while (pfrom != begalt)
    *--pto = *--pfrom;
    *--pto = *--pfrom;
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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