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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [gdb-5.0/] [libiberty/] [mpw.c] - Diff between revs 579 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 579 Rev 1765
/* MPW-Unix compatibility library.
/* MPW-Unix compatibility library.
   Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
   Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
 
 
This file is part of the libiberty library.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
Libiberty is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
version 2 of the License, or (at your option) any later version.
 
 
Libiberty is distributed in the hope that it will be useful,
Libiberty is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.
Library General Public License for more details.
 
 
You should have received a copy of the GNU Library General Public
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB.  If
License along with libiberty; see the file COPYING.LIB.  If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */
Boston, MA 02111-1307, USA.  */
 
 
/* This should only be compiled and linked under MPW. */
/* This should only be compiled and linked under MPW. */
 
 
#include "mpw.h"
#include "mpw.h"
 
 
#include <stdlib.h>
#include <stdlib.h>
 
 
#ifndef USE_MW_HEADERS
#ifndef USE_MW_HEADERS
#include <sys/time.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/resource.h>
#endif
#endif
 
 
#include <Types.h>
#include <Types.h>
#include <Files.h>
#include <Files.h>
 
 
#include <Timer.h>
#include <Timer.h>
 
 
/* Initialize to 0 at first, then set to errno_max() later.  */
/* Initialize to 0 at first, then set to errno_max() later.  */
 
 
int sys_nerr = 0;
int sys_nerr = 0;
 
 
/* Debug flag for pathname hacking.  Set this to one and rebuild. */
/* Debug flag for pathname hacking.  Set this to one and rebuild. */
 
 
int DebugPI = -1;
int DebugPI = -1;
 
 
void
void
mpwify_filename(char *unixname, char *macname)
mpwify_filename(char *unixname, char *macname)
{
{
  int i, j;
  int i, j;
 
 
  /* (should truncate 255 chars from end of name, not beginning) */
  /* (should truncate 255 chars from end of name, not beginning) */
  if (strlen (unixname) > 255)
  if (strlen (unixname) > 255)
    {
    {
      fprintf (stderr, "Pathname \"%s\" is too long for Macs, truncating\n",
      fprintf (stderr, "Pathname \"%s\" is too long for Macs, truncating\n",
               unixname);
               unixname);
    }
    }
  j = 0;
  j = 0;
  /* If you're going to end up with one or more colons in the middle of a
  /* If you're going to end up with one or more colons in the middle of a
     path after an all-Unix relative path is translated, you must add a
     path after an all-Unix relative path is translated, you must add a
     colon on the front, so that the first component is not thought to be
     colon on the front, so that the first component is not thought to be
     a disk name.  */
     a disk name.  */
  if (unixname[0] != '/' && ! strchr (unixname, ':') && strchr (unixname, '/'))
  if (unixname[0] != '/' && ! strchr (unixname, ':') && strchr (unixname, '/'))
    {
    {
      macname[j++] = ':';
      macname[j++] = ':';
    }
    }
  for (i = 0; unixname[i] != '\0' && i < 255; ++i)
  for (i = 0; unixname[i] != '\0' && i < 255; ++i)
    {
    {
      if (i == 0 && unixname[i] == '/')
      if (i == 0 && unixname[i] == '/')
        {
        {
          if (strncmp (unixname, "/tmp/", 5) == 0)
          if (strncmp (unixname, "/tmp/", 5) == 0)
            {
            {
              /* A temporary name, make a more Mac-flavored tmpname. */
              /* A temporary name, make a more Mac-flavored tmpname. */
              /* A better choice would be {Boot}Trash:foo, but
              /* A better choice would be {Boot}Trash:foo, but
                 that would require being able to identify the
                 that would require being able to identify the
                 boot disk's and trashcan's name.  Another option
                 boot disk's and trashcan's name.  Another option
                 would be to have an env var, so user can point it
                 would be to have an env var, so user can point it
                 at a ramdisk. */
                 at a ramdisk. */
              macname[j++] = ':';
              macname[j++] = ':';
              macname[j++] = 't';
              macname[j++] = 't';
              macname[j++] = 'm';
              macname[j++] = 'm';
              macname[j++] = 'p';
              macname[j++] = 'p';
              macname[j++] = '_';
              macname[j++] = '_';
              i += 4;
              i += 4;
            }
            }
          else
          else
            {
            {
              /* Don't copy the leading slash. */
              /* Don't copy the leading slash. */
            }
            }
        }
        }
      else if (unixname[i] == ':' && unixname[i+1] == '/')
      else if (unixname[i] == ':' && unixname[i+1] == '/')
        {
        {
          macname[j++] = ':';
          macname[j++] = ':';
          i += 1;
          i += 1;
        }
        }
      else if (unixname[i] == '.' && unixname[i+1] == '/')
      else if (unixname[i] == '.' && unixname[i+1] == '/')
        {
        {
          macname[j++] = ':';
          macname[j++] = ':';
          i += 1;
          i += 1;
        }
        }
      else if (unixname[i] == '.' && unixname[i+1] == '.' && unixname[i+2] == '/')
      else if (unixname[i] == '.' && unixname[i+1] == '.' && unixname[i+2] == '/')
        {
        {
          macname[j++] = ':';
          macname[j++] = ':';
          macname[j++] = ':';
          macname[j++] = ':';
          i += 2;
          i += 2;
        }
        }
      else if (unixname[i] == '/')
      else if (unixname[i] == '/')
        {
        {
          macname[j++] = ':';
          macname[j++] = ':';
        }
        }
      else
      else
        {
        {
          macname[j++] = unixname[i];
          macname[j++] = unixname[i];
        }
        }
    }
    }
  macname[j] = '\0';
  macname[j] = '\0';
  /* Allow for getting the debug flag from an env var; quite useful. */
  /* Allow for getting the debug flag from an env var; quite useful. */
  if (DebugPI < 0)
  if (DebugPI < 0)
    DebugPI = (*(getenv ("DEBUG_PATHNAMES")) == '1' ? 1 : 0);
    DebugPI = (*(getenv ("DEBUG_PATHNAMES")) == '1' ? 1 : 0);
  if (DebugPI)
  if (DebugPI)
    {
    {
      fprintf (stderr, "# Made \"%s\"\n", unixname);
      fprintf (stderr, "# Made \"%s\"\n", unixname);
      fprintf (stderr, "# into \"%s\"\n", macname);
      fprintf (stderr, "# into \"%s\"\n", macname);
    }
    }
}
}
 
 
/* MPW-flavored basename finder. */
/* MPW-flavored basename finder. */
 
 
char *
char *
mpw_basename (name)
mpw_basename (name)
  char *name;
  char *name;
{
{
  char *base = name;
  char *base = name;
 
 
  while (*name)
  while (*name)
    {
    {
      if (*name++ == ':')
      if (*name++ == ':')
        {
        {
          base = name;
          base = name;
        }
        }
    }
    }
  return base;
  return base;
}
}
 
 
/* Mixed MPW/Unix basename finder.  This can be led astray by
/* Mixed MPW/Unix basename finder.  This can be led astray by
   filenames with slashes in them and come up with a basename that
   filenames with slashes in them and come up with a basename that
   either corresponds to no file or (worse) to some other file, so
   either corresponds to no file or (worse) to some other file, so
   should only be tried if other methods of finding a file via a
   should only be tried if other methods of finding a file via a
   basename have failed.  */
   basename have failed.  */
 
 
char *
char *
mpw_mixed_basename (name)
mpw_mixed_basename (name)
  char *name;
  char *name;
{
{
  char *base = name;
  char *base = name;
 
 
  while (*name)
  while (*name)
    {
    {
      if (*name == '/' || *name == ':')
      if (*name == '/' || *name == ':')
        {
        {
          base = name + 1;
          base = name + 1;
        }
        }
      ++name;
      ++name;
    }
    }
  return base;
  return base;
}
}
 
 
/* This function is fopen() modified to create files that are type TEXT
/* This function is fopen() modified to create files that are type TEXT
   or 'BIN ', and always of type 'MPS '.  */
   or 'BIN ', and always of type 'MPS '.  */
 
 
FILE *
FILE *
mpw_fopen (char *name, char *mode)
mpw_fopen (char *name, char *mode)
{
{
#undef fopen
#undef fopen
  int errnum;
  int errnum;
  FILE *fp;
  FILE *fp;
  char tmpname[256];
  char tmpname[256];
 
 
  mpwify_filename (name, tmpname);
  mpwify_filename (name, tmpname);
  PROGRESS (1);
  PROGRESS (1);
  fp = fopen (tmpname, mode);
  fp = fopen (tmpname, mode);
  errnum = errno;
  errnum = errno;
 
 
  /* If writing, need to set type and creator usefully. */
  /* If writing, need to set type and creator usefully. */
  if (strchr (mode, 'w'))
  if (strchr (mode, 'w'))
    {
    {
      char *pname = (char *) malloc (strlen (tmpname) + 2);
      char *pname = (char *) malloc (strlen (tmpname) + 2);
      OSErr e;
      OSErr e;
      struct FInfo fi;
      struct FInfo fi;
 
 
      pname[0] = strlen (tmpname);
      pname[0] = strlen (tmpname);
      strcpy (pname+1, tmpname);
      strcpy (pname+1, tmpname);
 
 
      e = GetFInfo ((ConstStr255Param) pname, 0, &fi);
      e = GetFInfo ((ConstStr255Param) pname, 0, &fi);
      /* should do spiffier error handling */
      /* should do spiffier error handling */
      if (e != 0)
      if (e != 0)
        fprintf(stderr, "GetFInfo returns %d\n", e);
        fprintf(stderr, "GetFInfo returns %d\n", e);
      if (strchr (mode, 'b'))
      if (strchr (mode, 'b'))
        {
        {
          fi.fdType = (OSType) 'BIN ';
          fi.fdType = (OSType) 'BIN ';
        }
        }
      else
      else
        {
        {
          fi.fdType = (OSType) 'TEXT';
          fi.fdType = (OSType) 'TEXT';
        }
        }
      fi.fdCreator = (OSType) 'MPS ';
      fi.fdCreator = (OSType) 'MPS ';
      e = SetFInfo ((ConstStr255Param) pname, 0, &fi);
      e = SetFInfo ((ConstStr255Param) pname, 0, &fi);
      if (e != 0)
      if (e != 0)
        fprintf(stderr, "SetFInfo returns %d\n", e);
        fprintf(stderr, "SetFInfo returns %d\n", e);
      free (pname);
      free (pname);
    }
    }
  if (fp == NULL)
  if (fp == NULL)
    errno = errnum;
    errno = errnum;
  return fp;
  return fp;
}
}
 
 
/* This is a version of fseek() modified to fill the file with zeros
/* This is a version of fseek() modified to fill the file with zeros
   if seeking past the end of it.  */
   if seeking past the end of it.  */
 
 
#define ZEROBLKSIZE 4096
#define ZEROBLKSIZE 4096
 
 
char zeros[ZEROBLKSIZE];
char zeros[ZEROBLKSIZE];
 
 
int
int
mpw_fseek (FILE *fp, int offset, int whence)
mpw_fseek (FILE *fp, int offset, int whence)
{
{
#undef fseek
#undef fseek
  int cursize, numleft;
  int cursize, numleft;
 
 
  PROGRESS (1);
  PROGRESS (1);
  if (whence == SEEK_SET)
  if (whence == SEEK_SET)
    {
    {
      fseek (fp, 0, SEEK_END);
      fseek (fp, 0, SEEK_END);
      cursize = ftell (fp);
      cursize = ftell (fp);
      if (offset > cursize)
      if (offset > cursize)
        {
        {
          numleft = offset - cursize;
          numleft = offset - cursize;
          while (numleft > ZEROBLKSIZE)
          while (numleft > ZEROBLKSIZE)
            {
            {
              /* This might fail, should check for that. */
              /* This might fail, should check for that. */
              PROGRESS (1);
              PROGRESS (1);
              fwrite (zeros, 1, ZEROBLKSIZE, fp);
              fwrite (zeros, 1, ZEROBLKSIZE, fp);
              numleft -= ZEROBLKSIZE;
              numleft -= ZEROBLKSIZE;
            }
            }
          PROGRESS (1);
          PROGRESS (1);
          fwrite (zeros, 1, numleft, fp);
          fwrite (zeros, 1, numleft, fp);
          fflush (fp);
          fflush (fp);
        }
        }
    }
    }
  return fseek (fp, offset, whence);
  return fseek (fp, offset, whence);
}
}
 
 
int
int
mpw_fread (char *ptr, int size, int nitems, FILE *stream)
mpw_fread (char *ptr, int size, int nitems, FILE *stream)
{
{
#undef fread
#undef fread
  int rslt;
  int rslt;
 
 
  PROGRESS (1);
  PROGRESS (1);
  rslt = fread (ptr, size, nitems, stream);
  rslt = fread (ptr, size, nitems, stream);
  PROGRESS (1);
  PROGRESS (1);
  return rslt;
  return rslt;
}
}
 
 
int
int
mpw_fwrite (char *ptr, int size, int nitems, FILE *stream)
mpw_fwrite (char *ptr, int size, int nitems, FILE *stream)
{
{
#undef fwrite
#undef fwrite
  int rslt;
  int rslt;
 
 
  PROGRESS (1);
  PROGRESS (1);
  rslt = fwrite (ptr, size, nitems, stream);
  rslt = fwrite (ptr, size, nitems, stream);
  PROGRESS (1);
  PROGRESS (1);
  return rslt;
  return rslt;
}
}
 
 
int
int
link ()
link ()
{
{
  fprintf (stderr, "link not available!\n");
  fprintf (stderr, "link not available!\n");
  mpw_abort ();
  mpw_abort ();
}
}
 
 
int
int
fork ()
fork ()
{
{
  fprintf (stderr, "fork not available!\n");
  fprintf (stderr, "fork not available!\n");
  mpw_abort ();
  mpw_abort ();
}
}
 
 
int
int
vfork ()
vfork ()
{
{
  fprintf (stderr, "vfork not available!\n");
  fprintf (stderr, "vfork not available!\n");
  mpw_abort ();
  mpw_abort ();
  return (-1);
  return (-1);
}
}
 
 
int
int
pipe (int *fd)
pipe (int *fd)
{
{
  fprintf (stderr, "pipe not available!\n");
  fprintf (stderr, "pipe not available!\n");
  mpw_abort ();
  mpw_abort ();
  return (-1);
  return (-1);
}
}
 
 
#ifndef USE_MW_HEADERS
#ifndef USE_MW_HEADERS
int
int
execvp (char *file, char **argv)
execvp (char *file, char **argv)
{
{
  fprintf (stderr, "execvp not available!\n");
  fprintf (stderr, "execvp not available!\n");
  mpw_abort ();
  mpw_abort ();
  return (-1);
  return (-1);
}
}
 
 
int
int
execv (char *path, char **argv)
execv (char *path, char **argv)
{
{
  fprintf (stderr, "execv not available!\n");
  fprintf (stderr, "execv not available!\n");
  mpw_abort ();
  mpw_abort ();
  return (-1);
  return (-1);
}
}
#endif
#endif
 
 
int
int
kill (int pid, int sig)
kill (int pid, int sig)
{
{
  fprintf (stderr, "kill not available!\n");
  fprintf (stderr, "kill not available!\n");
  mpw_abort ();
  mpw_abort ();
  return (-1);
  return (-1);
}
}
 
 
int
int
wait (int *status)
wait (int *status)
{
{
  *status = 0;
  *status = 0;
  return 0;
  return 0;
}
}
 
 
#ifndef USE_MW_HEADERS
#ifndef USE_MW_HEADERS
int
int
sleep (int seconds)
sleep (int seconds)
{
{
  unsigned long start_time, now;
  unsigned long start_time, now;
 
 
  time (&start_time);
  time (&start_time);
 
 
  while (1)
  while (1)
    {
    {
      PROGRESS (1);
      PROGRESS (1);
      time (&now);
      time (&now);
      if (now > start_time + seconds)
      if (now > start_time + seconds)
        return 0;
        return 0;
    }
    }
}
}
#endif
#endif
 
 
void
void
putenv (char *str)
putenv (char *str)
{
{
  /* The GCC driver calls this to do things for collect2, but we
  /* The GCC driver calls this to do things for collect2, but we
     don't care about collect2. */
     don't care about collect2. */
}
}
 
 
int
int
chmod (char *path, int mode)
chmod (char *path, int mode)
{
{
  /* Pretend it was all OK. */
  /* Pretend it was all OK. */
  return 0;
  return 0;
}
}
 
 
#ifndef USE_MW_HEADERS
#ifndef USE_MW_HEADERS
int
int
getuid ()
getuid ()
{
{
  /* One value is as good as another... */
  /* One value is as good as another... */
  return 0;
  return 0;
}
}
 
 
int
int
getgid ()
getgid ()
{
{
  /* One value is as good as another... */
  /* One value is as good as another... */
  return 0;
  return 0;
}
}
#endif
#endif
 
 
/* Instead of coredumping, which is not a normal Mac facility, we
/* Instead of coredumping, which is not a normal Mac facility, we
   drop into Macsbug.  If we then "g" from Macsbug, the program will
   drop into Macsbug.  If we then "g" from Macsbug, the program will
   exit cleanly. */
   exit cleanly. */
 
 
void
void
mpw_abort ()
mpw_abort ()
{
{
  /* Make sure no output still buffered up, then zap into MacsBug. */
  /* Make sure no output still buffered up, then zap into MacsBug. */
  fflush(stdout);
  fflush(stdout);
  fflush(stderr);
  fflush(stderr);
  printf("## Abort! ##\n");
  printf("## Abort! ##\n");
#ifdef MPW_SADE
#ifdef MPW_SADE
  SysError(8005);
  SysError(8005);
#else 
#else 
  Debugger();
  Debugger();
#endif
#endif
  /* "g" in MacsBug will then cause a regular error exit. */
  /* "g" in MacsBug will then cause a regular error exit. */
  exit (1);
  exit (1);
}
}
 
 
/* Imitation getrusage based on the ANSI clock() function. */
/* Imitation getrusage based on the ANSI clock() function. */
 
 
int
int
getrusage (int who, struct rusage *rusage)
getrusage (int who, struct rusage *rusage)
{
{
  int clk = clock ();
  int clk = clock ();
 
 
#if 0
#if 0
  rusage->ru_utime.tv_sec = clk / CLOCKS_PER_SEC;
  rusage->ru_utime.tv_sec = clk / CLOCKS_PER_SEC;
  rusage->ru_utime.tv_usec = ((clk * 1000) / CLOCKS_PER_SEC) * 1000;
  rusage->ru_utime.tv_usec = ((clk * 1000) / CLOCKS_PER_SEC) * 1000;
  rusage->ru_stime.tv_sec = 0;
  rusage->ru_stime.tv_sec = 0;
  rusage->ru_stime.tv_usec = 0;
  rusage->ru_stime.tv_usec = 0;
#endif
#endif
}
}
 
 
int
int
sbrk ()
sbrk ()
{
{
  return 0;
  return 0;
}
}
 
 
#ifndef USE_MW_HEADERS
#ifndef USE_MW_HEADERS
int
int
isatty (int fd)
isatty (int fd)
{
{
  return 0;
  return 0;
}
}
 
 
/* This is inherited from Timothy Murray's Posix library. */
/* This is inherited from Timothy Murray's Posix library. */
 
 
#include "utime.h"
#include "utime.h"
 
 
int
int
utime (char *filename, struct utimbuf *times)
utime (char *filename, struct utimbuf *times)
{
{
  CInfoPBRec cipbr;
  CInfoPBRec cipbr;
  HFileInfo *fpb = (HFileInfo *) &cipbr;
  HFileInfo *fpb = (HFileInfo *) &cipbr;
  DirInfo *dpb = (DirInfo *) &cipbr;
  DirInfo *dpb = (DirInfo *) &cipbr;
  unsigned char pname[256];
  unsigned char pname[256];
  short err;
  short err;
 
 
  strcpy ((char *) pname, filename);
  strcpy ((char *) pname, filename);
  c2pstr (pname);
  c2pstr (pname);
 
 
  dpb->ioDrDirID = 0L;
  dpb->ioDrDirID = 0L;
  fpb->ioNamePtr = pname;
  fpb->ioNamePtr = pname;
  fpb->ioVRefNum = 0;
  fpb->ioVRefNum = 0;
  fpb->ioFDirIndex = 0;
  fpb->ioFDirIndex = 0;
  fpb->ioFVersNum = 0;
  fpb->ioFVersNum = 0;
  err = PBGetCatInfo (&cipbr, 0);
  err = PBGetCatInfo (&cipbr, 0);
  if (err != noErr) {
  if (err != noErr) {
    errno = ENOENT;
    errno = ENOENT;
    return -1;
    return -1;
  }
  }
  dpb->ioDrDirID = 0L;
  dpb->ioDrDirID = 0L;
  fpb->ioFlMdDat = times->modtime;
  fpb->ioFlMdDat = times->modtime;
  fpb->ioFlCrDat = times->actime;
  fpb->ioFlCrDat = times->actime;
  err = PBSetCatInfo (&cipbr, 0);
  err = PBSetCatInfo (&cipbr, 0);
  if (err != noErr) {
  if (err != noErr) {
    errno = EACCES;
    errno = EACCES;
    return -1;
    return -1;
  }
  }
  return 0;
  return 0;
}
}
 
 
int
int
mkdir (char *path, int mode)
mkdir (char *path, int mode)
{
{
  errno = ENOSYS;
  errno = ENOSYS;
  return -1;
  return -1;
}
}
 
 
int
int
rmdir ()
rmdir ()
{
{
  errno = ENOSYS;
  errno = ENOSYS;
  return -1;
  return -1;
}
}
#endif
#endif
 
 
chown ()
chown ()
{
{
  errno = ENOSYS;
  errno = ENOSYS;
  return -1;
  return -1;
}
}
 
 
char *myenviron[] = {NULL};
char *myenviron[] = {NULL};
 
 
char **environ = myenviron;
char **environ = myenviron;
 
 
#ifndef USE_MW_HEADERS
#ifndef USE_MW_HEADERS
 
 
/* Minimal 'stat' emulation: tells directories from files and
/* Minimal 'stat' emulation: tells directories from files and
   gives length and mtime.
   gives length and mtime.
 
 
   Derived from code written by Guido van Rossum, CWI, Amsterdam
   Derived from code written by Guido van Rossum, CWI, Amsterdam
   and placed by him in the public domain.  */
   and placed by him in the public domain.  */
 
 
extern int __uid, __gid;
extern int __uid, __gid;
 
 
int __uid = 0;
int __uid = 0;
int __gid = 0;
int __gid = 0;
 
 
/* Bits in ioFlAttrib: */
/* Bits in ioFlAttrib: */
#define LOCKBIT (1<<0)          /* File locked */
#define LOCKBIT (1<<0)          /* File locked */
#define DIRBIT  (1<<4)          /* It's a directory */
#define DIRBIT  (1<<4)          /* It's a directory */
 
 
/* Macified "stat" in which filename is given relative to a directory,
/* Macified "stat" in which filename is given relative to a directory,
   specified by long DirID.  */
   specified by long DirID.  */
 
 
static int
static int
_stat (char *name, long dirid, struct stat *buf)
_stat (char *name, long dirid, struct stat *buf)
{
{
  CInfoPBRec cipbr;
  CInfoPBRec cipbr;
  HFileInfo *fpb = (HFileInfo*) &cipbr;
  HFileInfo *fpb = (HFileInfo*) &cipbr;
  DirInfo *dpb = (DirInfo*) &cipbr;
  DirInfo *dpb = (DirInfo*) &cipbr;
  Str255 pname;
  Str255 pname;
  short err;
  short err;
 
 
  /* Make a temp copy of the name and pascalize. */
  /* Make a temp copy of the name and pascalize. */
  strcpy ((char *) pname, name);
  strcpy ((char *) pname, name);
  c2pstr (pname);
  c2pstr (pname);
 
 
  cipbr.dirInfo.ioDrDirID = dirid;
  cipbr.dirInfo.ioDrDirID = dirid;
  cipbr.hFileInfo.ioNamePtr = pname;
  cipbr.hFileInfo.ioNamePtr = pname;
  cipbr.hFileInfo.ioVRefNum = 0;
  cipbr.hFileInfo.ioVRefNum = 0;
  cipbr.hFileInfo.ioFDirIndex = 0;
  cipbr.hFileInfo.ioFDirIndex = 0;
  cipbr.hFileInfo.ioFVersNum = 0;
  cipbr.hFileInfo.ioFVersNum = 0;
  err = PBGetCatInfo (&cipbr, 0);
  err = PBGetCatInfo (&cipbr, 0);
  if (err != noErr)
  if (err != noErr)
    {
    {
      errno = ENOENT;
      errno = ENOENT;
      return -1;
      return -1;
    }
    }
  /* Mac files are readable if they can be accessed at all. */
  /* Mac files are readable if they can be accessed at all. */
  buf->st_mode = 0444;
  buf->st_mode = 0444;
  /* Mark unlocked files as writeable. */
  /* Mark unlocked files as writeable. */
  if (!(fpb->ioFlAttrib & LOCKBIT))
  if (!(fpb->ioFlAttrib & LOCKBIT))
    buf->st_mode |= 0222;
    buf->st_mode |= 0222;
  if (fpb->ioFlAttrib & DIRBIT)
  if (fpb->ioFlAttrib & DIRBIT)
    {
    {
      /* Mark directories as "executable". */
      /* Mark directories as "executable". */
      buf->st_mode |= 0111 | S_IFDIR;
      buf->st_mode |= 0111 | S_IFDIR;
      buf->st_size = dpb->ioDrNmFls;
      buf->st_size = dpb->ioDrNmFls;
      buf->st_rsize = 0;
      buf->st_rsize = 0;
    }
    }
  else
  else
    {
    {
      buf->st_mode |= S_IFREG;
      buf->st_mode |= S_IFREG;
      /* Mark apps as "executable". */
      /* Mark apps as "executable". */
      if (fpb->ioFlFndrInfo.fdType == 'APPL')
      if (fpb->ioFlFndrInfo.fdType == 'APPL')
        buf->st_mode |= 0111;
        buf->st_mode |= 0111;
      /* Fill in the sizes of data and resource forks. */
      /* Fill in the sizes of data and resource forks. */
      buf->st_size = fpb->ioFlLgLen;
      buf->st_size = fpb->ioFlLgLen;
      buf->st_rsize = fpb->ioFlRLgLen;
      buf->st_rsize = fpb->ioFlRLgLen;
    }
    }
  /* Fill in various times. */
  /* Fill in various times. */
  buf->st_atime = fpb->ioFlCrDat;
  buf->st_atime = fpb->ioFlCrDat;
  buf->st_mtime = fpb->ioFlMdDat;
  buf->st_mtime = fpb->ioFlMdDat;
  buf->st_ctime = fpb->ioFlCrDat;
  buf->st_ctime = fpb->ioFlCrDat;
  /* Set up an imitation inode number. */
  /* Set up an imitation inode number. */
  buf->st_ino = (unsigned short) fpb->ioDirID;
  buf->st_ino = (unsigned short) fpb->ioDirID;
  /* Set up an imitation device. */
  /* Set up an imitation device. */
  GetVRefNum (buf->st_ino, &buf->st_dev);
  GetVRefNum (buf->st_ino, &buf->st_dev);
  buf->st_uid = __uid;
  buf->st_uid = __uid;
  buf->st_gid = __gid;
  buf->st_gid = __gid;
/*  buf->st_FlFndrInfo = fpb->ioFlFndrInfo;  */
/*  buf->st_FlFndrInfo = fpb->ioFlFndrInfo;  */
  return 0;
  return 0;
}
}
 
 
/* stat() sets up an empty dirid. */
/* stat() sets up an empty dirid. */
 
 
int
int
stat (char *path, struct stat *buf)
stat (char *path, struct stat *buf)
{
{
  long rslt, errnum;
  long rslt, errnum;
  char tmpname[256];
  char tmpname[256];
 
 
  mpwify_filename (path, tmpname);
  mpwify_filename (path, tmpname);
  if (DebugPI)
  if (DebugPI)
    fprintf (stderr, "# stat (%s, %x)", tmpname, buf);
    fprintf (stderr, "# stat (%s, %x)", tmpname, buf);
  PROGRESS (1);
  PROGRESS (1);
  rslt = _stat (tmpname, 0L, buf);
  rslt = _stat (tmpname, 0L, buf);
  errnum = errno;
  errnum = errno;
  if (DebugPI)
  if (DebugPI)
    {
    {
      fprintf (stderr, " -> %d", rslt);
      fprintf (stderr, " -> %d", rslt);
      if (rslt != 0)
      if (rslt != 0)
        fprintf (stderr, " (errno is %d)", errnum);
        fprintf (stderr, " (errno is %d)", errnum);
      fprintf (stderr, "\n");
      fprintf (stderr, "\n");
      fflush (stderr);
      fflush (stderr);
    }
    }
  if (rslt != 0)
  if (rslt != 0)
    errno = errnum;
    errno = errnum;
  return rslt;
  return rslt;
}
}
 
 
int
int
fstat (int fd, struct stat *buf)
fstat (int fd, struct stat *buf)
{
{
  FCBPBRec fcb;
  FCBPBRec fcb;
  FILE *fp;
  FILE *fp;
  Str255 pathname;
  Str255 pathname;
  long dirid = 0L, temp;
  long dirid = 0L, temp;
  long rslt, errnum;
  long rslt, errnum;
  short err;
  short err;
 
 
  if (DebugPI < 0)
  if (DebugPI < 0)
    DebugPI = (*(getenv ("DEBUG_PATHNAMES")) == '1' ? 1 : 0);
    DebugPI = (*(getenv ("DEBUG_PATHNAMES")) == '1' ? 1 : 0);
  if (DebugPI)
  if (DebugPI)
    fprintf (stderr, "# fstat (%d, %x)", fd, buf);
    fprintf (stderr, "# fstat (%d, %x)", fd, buf);
  PROGRESS (1);
  PROGRESS (1);
  pathname[0] = 0;
  pathname[0] = 0;
#ifdef FIOFNAME
#ifdef FIOFNAME
  /* Use an MPW-specific ioctl to get the pathname associated with
  /* Use an MPW-specific ioctl to get the pathname associated with
     the file descriptor.  */
     the file descriptor.  */
  ioctl (fd, FIOFNAME, (long *) pathname);
  ioctl (fd, FIOFNAME, (long *) pathname);
#else
#else
  you lose
  you lose
#endif
#endif
  if (DebugPI)
  if (DebugPI)
    fprintf (stderr, " (name is %s)", pathname);
    fprintf (stderr, " (name is %s)", pathname);
  dirid = 0L /* fcb.ioFCBParID */ ;
  dirid = 0L /* fcb.ioFCBParID */ ;
  rslt = _stat ((char *) pathname, dirid, buf);
  rslt = _stat ((char *) pathname, dirid, buf);
  errnum = errno;
  errnum = errno;
  if (DebugPI)
  if (DebugPI)
    {
    {
      fprintf (stderr, " -> %d", rslt);
      fprintf (stderr, " -> %d", rslt);
      if (rslt != 0)
      if (rslt != 0)
        fprintf (stderr, " (errno is %d)", errnum);
        fprintf (stderr, " (errno is %d)", errnum);
      fprintf (stderr, "\n");
      fprintf (stderr, "\n");
      fflush (stderr);
      fflush (stderr);
    }
    }
  if (rslt != 0)
  if (rslt != 0)
    errno = errnum;
    errno = errnum;
  return rslt;
  return rslt;
}
}
 
 
#endif /* n USE_MW_HEADERS */
#endif /* n USE_MW_HEADERS */
 
 
chdir ()
chdir ()
{
{
  errno = ENOSYS;
  errno = ENOSYS;
  return (-1);
  return (-1);
}
}
 
 
char *
char *
getcwd (char *buf, int size)
getcwd (char *buf, int size)
{
{
  if (buf == NULL)
  if (buf == NULL)
    buf = (char *) malloc (size);
    buf = (char *) malloc (size);
  strcpy(buf, ":");
  strcpy(buf, ":");
  return buf;
  return buf;
}
}
 
 
/* This should probably be more elaborate for MPW. */
/* This should probably be more elaborate for MPW. */
 
 
char *
char *
getpwd ()
getpwd ()
{
{
  return ":";
  return ":";
}
}
 
 
int
int
mpw_open (char *filename, int arg2, int arg3)
mpw_open (char *filename, int arg2, int arg3)
{
{
#undef open
#undef open
  int fd, errnum = 0;
  int fd, errnum = 0;
  char tmpname[256];
  char tmpname[256];
 
 
  mpwify_filename (filename, tmpname);
  mpwify_filename (filename, tmpname);
  fd = open (tmpname, arg2);
  fd = open (tmpname, arg2);
  errnum = errno;
  errnum = errno;
 
 
  if (DebugPI)
  if (DebugPI)
    {
    {
      fprintf (stderr, "# open (%s, %d, %d)", tmpname, arg2, arg3);
      fprintf (stderr, "# open (%s, %d, %d)", tmpname, arg2, arg3);
      fprintf (stderr, " -> %d", fd);
      fprintf (stderr, " -> %d", fd);
      if (fd == -1)
      if (fd == -1)
        fprintf (stderr, " (errno is %d)", errnum);
        fprintf (stderr, " (errno is %d)", errnum);
      fprintf (stderr, "\n");
      fprintf (stderr, "\n");
    }
    }
  if (fd == -1)
  if (fd == -1)
    errno = errnum;
    errno = errnum;
  return fd;
  return fd;
}
}
 
 
int
int
mpw_access (char *filename, unsigned int cmd)
mpw_access (char *filename, unsigned int cmd)
{
{
#undef access
#undef access
 
 
  int rslt, errnum = 0;
  int rslt, errnum = 0;
  struct stat st;
  struct stat st;
  char tmpname[256];
  char tmpname[256];
 
 
  mpwify_filename (filename, tmpname);
  mpwify_filename (filename, tmpname);
  if (cmd & R_OK || cmd & X_OK)
  if (cmd & R_OK || cmd & X_OK)
    {
    {
      rslt = stat (tmpname, &st);
      rslt = stat (tmpname, &st);
      errnum = errno;
      errnum = errno;
      if (rslt >= 0)
      if (rslt >= 0)
        {
        {
          if ((((st.st_mode & 004) == 0) && (cmd & R_OK))
          if ((((st.st_mode & 004) == 0) && (cmd & R_OK))
              || (((st.st_mode & 002) == 0) && (cmd & W_OK))
              || (((st.st_mode & 002) == 0) && (cmd & W_OK))
              || (((st.st_mode & 001) == 0) && (cmd & X_OK)))
              || (((st.st_mode & 001) == 0) && (cmd & X_OK)))
            {
            {
              rslt = -1;
              rslt = -1;
              errnum = EACCES;
              errnum = EACCES;
            }
            }
        }
        }
    }
    }
  if (DebugPI)
  if (DebugPI)
    {
    {
      fprintf (stderr, "# mpw_access (%s, %d)", tmpname, cmd);
      fprintf (stderr, "# mpw_access (%s, %d)", tmpname, cmd);
      fprintf (stderr, " -> %d", rslt);
      fprintf (stderr, " -> %d", rslt);
      if (rslt != 0)
      if (rslt != 0)
        fprintf (stderr, " (errno is %d)", errnum);
        fprintf (stderr, " (errno is %d)", errnum);
      fprintf (stderr, "\n");
      fprintf (stderr, "\n");
    }
    }
  if (rslt != 0)
  if (rslt != 0)
    errno = errnum;
    errno = errnum;
  return rslt;
  return rslt;
}
}
 
 
/* The MPW library creat() has no mode argument. */
/* The MPW library creat() has no mode argument. */
 
 
int
int
mpw_creat (char *path, /* mode_t */ int mode)
mpw_creat (char *path, /* mode_t */ int mode)
{
{
#undef creat
#undef creat
 
 
#ifdef USE_MW_HEADERS
#ifdef USE_MW_HEADERS
  return creat (path, mode);
  return creat (path, mode);
#else
#else
  return creat (path);
  return creat (path);
#endif
#endif
}
}
 
 
/* This is a hack to get control in an MPW tool before it crashes the
/* This is a hack to get control in an MPW tool before it crashes the
   machine.  */
   machine.  */
 
 
mpw_special_init (name)
mpw_special_init (name)
     char *name;
     char *name;
{
{
  if (strstr (name, "DEBUG"))
  if (strstr (name, "DEBUG"))
    DebugStr("\pat beginning of program");
    DebugStr("\pat beginning of program");
}
}
 
 
static int current_umask;
static int current_umask;
 
 
int
int
umask(int mask)
umask(int mask)
{
{
  int oldmask = current_umask;
  int oldmask = current_umask;
 
 
  current_umask = mask;
  current_umask = mask;
  return oldmask;
  return oldmask;
}
}
 
 
/* Cursor-spinning stuff that includes metering of spin rate and delays.  */
/* Cursor-spinning stuff that includes metering of spin rate and delays.  */
 
 
/* Nonzero when cursor spinning has been set up properly.  */
/* Nonzero when cursor spinning has been set up properly.  */
 
 
int cursor_inited;
int cursor_inited;
 
 
/* Nonzero if spin should be measured and excessive delays reported.  */
/* Nonzero if spin should be measured and excessive delays reported.  */
 
 
int measure_spin;
int measure_spin;
 
 
/* Nonzero if spin histogram and rate data should be written out.  */
/* Nonzero if spin histogram and rate data should be written out.  */
 
 
int dump_spin_data;
int dump_spin_data;
 
 
long warning_threshold = 400000;
long warning_threshold = 400000;
 
 
long bucket_size = 1024;
long bucket_size = 1024;
 
 
long bucket_power = 10;
long bucket_power = 10;
 
 
long numbuckets = 300;
long numbuckets = 300;
 
 
int *delay_counts;
int *delay_counts;
 
 
int overflow_count;
int overflow_count;
 
 
char *current_progress;
char *current_progress;
 
 
static UnsignedWide last_microseconds;
static UnsignedWide last_microseconds;
 
 
static char *last_spin_file = "";
static char *last_spin_file = "";
 
 
static int last_spin_line;
static int last_spin_line;
 
 
void
void
warn_if_spin_delay (char *file, int line)
warn_if_spin_delay (char *file, int line)
{
{
  long diff, ix;
  long diff, ix;
  UnsignedWide now;
  UnsignedWide now;
 
 
  Microseconds(&now);
  Microseconds(&now);
 
 
  diff = now.lo - last_microseconds.lo;
  diff = now.lo - last_microseconds.lo;
 
 
  if (diff > warning_threshold)
  if (diff > warning_threshold)
    fprintf (stderr, "# %s: %ld.%06ld sec delay getting from %s:%d to %s:%d\n",
    fprintf (stderr, "# %s: %ld.%06ld sec delay getting from %s:%d to %s:%d\n",
             (current_progress ? current_progress : ""),
             (current_progress ? current_progress : ""),
             diff / 1000000, diff % 1000000,
             diff / 1000000, diff % 1000000,
             last_spin_file, last_spin_line, file, line);
             last_spin_file, last_spin_line, file, line);
  if (dump_spin_data)
  if (dump_spin_data)
    {
    {
      if (diff >= 0)
      if (diff >= 0)
        {
        {
          ix = diff >> bucket_power;
          ix = diff >> bucket_power;
          if (ix >= 0 && ix < numbuckets && delay_counts != NULL)
          if (ix >= 0 && ix < numbuckets && delay_counts != NULL)
            ++delay_counts[ix];
            ++delay_counts[ix];
          else
          else
            ++overflow_count;
            ++overflow_count;
        }
        }
      else
      else
        fprintf (stderr, "raw diff is %ld (?)\n", diff);
        fprintf (stderr, "raw diff is %ld (?)\n", diff);
    }
    }
}
}
 
 
void
void
record_for_spin_delay (char *file, int line)
record_for_spin_delay (char *file, int line)
{
{
  Microseconds (&last_microseconds);
  Microseconds (&last_microseconds);
  last_spin_file = file;
  last_spin_file = file;
  last_spin_line = line;
  last_spin_line = line;
}
}
 
 
void
void
mpw_start_progress (char *str, int n, char *file, int line)
mpw_start_progress (char *str, int n, char *file, int line)
{
{
  int i;
  int i;
  char *measure, *threshold;
  char *measure, *threshold;
 
 
  if (!cursor_inited)
  if (!cursor_inited)
    {
    {
      InitCursorCtl (nil);
      InitCursorCtl (nil);
      cursor_inited = 1;
      cursor_inited = 1;
      record_for_spin_delay (file, line);
      record_for_spin_delay (file, line);
      measure = getenv ("MEASURE_SPIN");
      measure = getenv ("MEASURE_SPIN");
      if (measure != NULL && measure[0] != '\0')
      if (measure != NULL && measure[0] != '\0')
        {
        {
          measure_spin = 1;
          measure_spin = 1;
          if (strcmp (measure, "all") == 0)
          if (strcmp (measure, "all") == 0)
            dump_spin_data = 1;
            dump_spin_data = 1;
        }
        }
      threshold = getenv ("SPIN_WARN_THRESHOLD");
      threshold = getenv ("SPIN_WARN_THRESHOLD");
      if (threshold != NULL && threshold[0] != '\0')
      if (threshold != NULL && threshold[0] != '\0')
        warning_threshold = atol (threshold);
        warning_threshold = atol (threshold);
      if (dump_spin_data)
      if (dump_spin_data)
        {
        {
          if (delay_counts == NULL)
          if (delay_counts == NULL)
            delay_counts = (int *) malloc (numbuckets * sizeof (int));
            delay_counts = (int *) malloc (numbuckets * sizeof (int));
          for (i = 0; i < numbuckets; ++i)
          for (i = 0; i < numbuckets; ++i)
            delay_counts[i] = 0;
            delay_counts[i] = 0;
          overflow_count = 0;
          overflow_count = 0;
        }
        }
    }
    }
  current_progress = str;
  current_progress = str;
 
 
  sys_nerr = errno_max ();
  sys_nerr = errno_max ();
 
 
  mpw_special_init (str);
  mpw_special_init (str);
}
}
 
 
void
void
mpw_progress (int n)
mpw_progress (int n)
{
{
  SpinCursor (32);
  SpinCursor (32);
}
}
 
 
void
void
mpw_progress_measured (int n, char *file, int line)
mpw_progress_measured (int n, char *file, int line)
{
{
  if (measure_spin)
  if (measure_spin)
    warn_if_spin_delay (file, line);
    warn_if_spin_delay (file, line);
  SpinCursor (32);
  SpinCursor (32);
  if (measure_spin)
  if (measure_spin)
    record_for_spin_delay (file, line);
    record_for_spin_delay (file, line);
}
}
 
 
void
void
mpw_end_progress (char *str, char *file, int line)
mpw_end_progress (char *str, char *file, int line)
{
{
  long i, delay, count = 0, sum = 0, avgdelay, spinrate;
  long i, delay, count = 0, sum = 0, avgdelay, spinrate;
  long curpower = 0, curgroup = 0;
  long curpower = 0, curgroup = 0;
 
 
  /* Warn if it's been a while since the last spin.  */
  /* Warn if it's been a while since the last spin.  */
  if (measure_spin)
  if (measure_spin)
    warn_if_spin_delay (file, line);
    warn_if_spin_delay (file, line);
 
 
  /* Dump all the nonzero delay counts and an approximation of the delay.  */
  /* Dump all the nonzero delay counts and an approximation of the delay.  */
  if (dump_spin_data && delay_counts != NULL)
  if (dump_spin_data && delay_counts != NULL)
    {
    {
      for (i = 0; i < numbuckets; ++i)
      for (i = 0; i < numbuckets; ++i)
        {
        {
          delay = (i + 1) * bucket_size;
          delay = (i + 1) * bucket_size;
          sum += delay_counts[i] * (i + 1);
          sum += delay_counts[i] * (i + 1);
          count += delay_counts[i];
          count += delay_counts[i];
          if (delay <= (1 << curpower))
          if (delay <= (1 << curpower))
            {
            {
              curgroup += delay_counts[i];
              curgroup += delay_counts[i];
            }
            }
          else
          else
            {
            {
              if (curgroup > 0)
              if (curgroup > 0)
                fprintf (stderr,
                fprintf (stderr,
                         "# %s: %d delays between %ld.%06ld and %ld.%06ld sec\n",
                         "# %s: %d delays between %ld.%06ld and %ld.%06ld sec\n",
                         (str ? str : ""),
                         (str ? str : ""),
                         curgroup,
                         curgroup,
                         (1 << curpower) / 1000000,
                         (1 << curpower) / 1000000,
                         (1 << curpower) % 1000000,
                         (1 << curpower) % 1000000,
                         (1 << (curpower + 1)) / 1000000,
                         (1 << (curpower + 1)) / 1000000,
                         (1 << (curpower + 1)) % 1000000);
                         (1 << (curpower + 1)) % 1000000);
              ++curpower;
              ++curpower;
              curgroup = 0;
              curgroup = 0;
            }
            }
        }
        }
      if (count > 0)
      if (count > 0)
        {
        {
          avgdelay = (sum * bucket_size) / count;
          avgdelay = (sum * bucket_size) / count;
          spinrate = 1000000 / avgdelay;
          spinrate = 1000000 / avgdelay;
          fprintf (stderr, "# %s: Average spin rate is %d times/sec\n",
          fprintf (stderr, "# %s: Average spin rate is %d times/sec\n",
                   (str ? str : ""), spinrate);
                   (str ? str : ""), spinrate);
        }
        }
    }
    }
}
}
 
 
#ifdef PROGRESS_TEST
#ifdef PROGRESS_TEST
 
 
/* Test program.  */
/* Test program.  */
 
 
main ()
main ()
{
{
  int i, j;
  int i, j;
  double x = 1.0, y = 2.4;
  double x = 1.0, y = 2.4;
  long start = Microseconds (), tm;  FIXME
  long start = Microseconds (), tm;  FIXME
 
 
  START_PROGRESS ("hi", 0);
  START_PROGRESS ("hi", 0);
 
 
  for (i = 0; i < 1000; ++i)
  for (i = 0; i < 1000; ++i)
    {
    {
      PROGRESS (1);
      PROGRESS (1);
 
 
      for (j = 0; j < (i * 100); ++j)
      for (j = 0; j < (i * 100); ++j)
        {
        {
          x += (x * y) / j;
          x += (x * y) / j;
        }
        }
    }
    }
 
 
  END_PROGRESS ("hi");
  END_PROGRESS ("hi");
 
 
  tm = Microseconds () - start;
  tm = Microseconds () - start;
 
 
  printf ("Total time is %d.%d secs\n", tm / 1000000, tm % 1000000);
  printf ("Total time is %d.%d secs\n", tm / 1000000, tm % 1000000);
}
}
 
 
#endif
#endif
 
 
#ifdef USE_MW_HEADERS
#ifdef USE_MW_HEADERS
/* Empty definitions for Metrowerks' SIOUX console library. */
/* Empty definitions for Metrowerks' SIOUX console library. */
 
 
#ifndef __CONSOLE__
#ifndef __CONSOLE__
#include <console.h>
#include <console.h>
#endif
#endif
 
 
short
short
InstallConsole(short fd)
InstallConsole(short fd)
{
{
#pragma unused (fd)
#pragma unused (fd)
        return 0;
        return 0;
}
}
 
 
void
void
RemoveConsole(void)
RemoveConsole(void)
{
{
}
}
 
 
long
long
WriteCharsToConsole(char *buf, long n)
WriteCharsToConsole(char *buf, long n)
{
{
#pragma unused (buf, n)
#pragma unused (buf, n)
        return 0;
        return 0;
}
}
 
 
long ReadCharsFromConsole(char *buf, long n)
long ReadCharsFromConsole(char *buf, long n)
{
{
#pragma unused (buf, n)
#pragma unused (buf, n)
        return 0;
        return 0;
}
}
 
 
extern char *
extern char *
__ttyname(long fd)
__ttyname(long fd)
{
{
        static char *__devicename = "null device";
        static char *__devicename = "null device";
 
 
        if (fd >= 0 && fd <= 2)
        if (fd >= 0 && fd <= 2)
          return (__devicename);
          return (__devicename);
        return NULL;
        return NULL;
}
}
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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