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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20010408-1.c] - Diff between revs 297 and 338

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

Rev 297 Rev 338
extern struct win *windows, *wtab[];
extern struct win *windows, *wtab[];
struct win
struct win
{
{
  struct win *w_next;
  struct win *w_next;
};
};
 
 
struct auser;
struct auser;
 
 
struct comm
struct comm
{
{
  char *name;
  char *name;
  int flags;
  int flags;
};
};
 
 
extern struct comm comms[];
extern struct comm comms[];
 
 
extern int WindowByNoN (char *);
extern int WindowByNoN (char *);
extern int FindCommnr (char *);
extern int FindCommnr (char *);
extern int AclSetPermCmd (struct auser *, char *, struct comm *);
extern int AclSetPermCmd (struct auser *, char *, struct comm *);
extern int AclSetPermWin (struct auser *, struct auser *, char *, struct win *);
extern int AclSetPermWin (struct auser *, struct auser *, char *, struct win *);
 
 
 
 
int
int
  AclSetPerm(uu, u, mode, s)
  AclSetPerm(uu, u, mode, s)
    struct auser *uu, *u;
    struct auser *uu, *u;
char *mode, *s;
char *mode, *s;
{
{
  struct win *w;
  struct win *w;
  int i;
  int i;
  char *p, ch;
  char *p, ch;
 
 
  do
  do
    {
    {
    }
    }
  while (0);
  while (0);
 
 
  while (*s)
  while (*s)
    {
    {
      switch (*s)
      switch (*s)
        {
        {
        case '*':
        case '*':
          return AclSetPerm(uu, u, mode, "#?");
          return AclSetPerm(uu, u, mode, "#?");
        case '#':
        case '#':
          if (uu)
          if (uu)
            AclSetPermWin(uu, u, mode, (struct win *)1);
            AclSetPermWin(uu, u, mode, (struct win *)1);
          else
          else
            for (w = windows; w; w = w->w_next)
            for (w = windows; w; w = w->w_next)
              AclSetPermWin((struct auser *)0, u, mode, w);
              AclSetPermWin((struct auser *)0, u, mode, w);
          s++;
          s++;
          break;
          break;
        case '?':
        case '?':
          if (uu)
          if (uu)
            AclSetPermWin(uu, u, mode, (struct win *)0);
            AclSetPermWin(uu, u, mode, (struct win *)0);
          else
          else
            for (i = 0; i <= 174; i++)
            for (i = 0; i <= 174; i++)
              AclSetPermCmd(u, mode, &comms[i]);
              AclSetPermCmd(u, mode, &comms[i]);
          s++;
          s++;
          break;
          break;
        default:
        default:
          for (p = s; *p && *p != ' ' && *p != '\t' && *p != ','; p++)
          for (p = s; *p && *p != ' ' && *p != '\t' && *p != ','; p++)
            ;
            ;
          if ((ch = *p))
          if ((ch = *p))
            *p++ = '\0';
            *p++ = '\0';
          if ((i = FindCommnr(s)) != -1)
          if ((i = FindCommnr(s)) != -1)
            AclSetPermCmd(u, mode, &comms[i]);
            AclSetPermCmd(u, mode, &comms[i]);
          else if (((i = WindowByNoN(s)) >= 0) && wtab[i])
          else if (((i = WindowByNoN(s)) >= 0) && wtab[i])
            AclSetPermWin((struct auser *)0, u, mode, wtab[i]);
            AclSetPermWin((struct auser *)0, u, mode, wtab[i]);
          else
          else
            return -1;
            return -1;
          if (ch)
          if (ch)
            p[-1] = ch;
            p[-1] = ch;
          s = p;
          s = p;
        }
        }
    }
    }
 
 
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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