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.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr25311.c] - Diff between revs 297 and 338

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

Rev 297 Rev 338
 
 
struct w
struct w
{
{
  int top;
  int top;
  int left;
  int left;
  int height;
  int height;
  int width;
  int width;
  struct w *next;
  struct w *next;
  struct w *parent;
  struct w *parent;
  struct w *child;
  struct w *child;
};
};
 
 
extern struct w *Qnil;
extern struct w *Qnil;
 
 
void
void
set_size (struct w *w, int new_size, int nodelete, int set_height)
set_size (struct w *w, int new_size, int nodelete, int set_height)
{
{
  int old_size = set_height? w->height : w->width;
  int old_size = set_height? w->height : w->width;
 
 
  if (nodelete || w->parent == Qnil)
  if (nodelete || w->parent == Qnil)
    {
    {
      int last_pos, last_old_pos, pos, old_pos, first;
      int last_pos, last_old_pos, pos, old_pos, first;
      int div_val = old_size << 1;
      int div_val = old_size << 1;
      struct w *c;
      struct w *c;
 
 
      last_pos = first = set_height? w->top : w->left;
      last_pos = first = set_height? w->top : w->left;
      last_old_pos = 0;
      last_old_pos = 0;
 
 
      for (c = w->child; c != Qnil; c = c->next)
      for (c = w->child; c != Qnil; c = c->next)
        {
        {
          if (set_height)
          if (set_height)
            old_pos = last_old_pos + c->height;
            old_pos = last_old_pos + c->height;
          else
          else
            old_pos = last_old_pos + c->width;
            old_pos = last_old_pos + c->width;
 
 
          pos = (((old_pos * new_size) << 1) + old_size) / div_val;
          pos = (((old_pos * new_size) << 1) + old_size) / div_val;
          set_size (c, pos + first - last_pos, 1, set_height);
          set_size (c, pos + first - last_pos, 1, set_height);
          last_pos = pos + first;
          last_pos = pos + first;
          last_old_pos = old_pos;
          last_old_pos = old_pos;
        }
        }
 
 
      if (!nodelete)
      if (!nodelete)
        for (c = w->child; c != Qnil; c = c->next)
        for (c = w->child; c != Qnil; c = c->next)
          use (c);
          use (c);
    }
    }
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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