home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / gcc / ixemulsrc.lha / ixemul / library / __amiga_ids.c < prev    next >
C/C++ Source or Header  |  1996-12-11  |  1KB  |  54 lines

  1. /*
  2.  *  This file is part of ixemul.library for the Amiga.
  3.  *  Copyright (C) 1991, 1992  Markus M. Wild
  4.  *  Portions Copyright (C) 1994 Rafael W. Luebbert
  5.  *  Portions Copyright (C) 1996 Jeff Shepherd
  6.  *
  7.  *  This library is free software; you can redistribute it and/or
  8.  *  modify it under the terms of the GNU Library General Public
  9.  *  License as published by the Free Software Foundation; either
  10.  *  version 2 of the License, or (at your option) any later version.
  11.  *
  12.  *  This library is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  *  Library General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU Library General Public
  18.  *  License along with this library; if not, write to the Free
  19.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  */
  21.  
  22. #define _KERNEL
  23. #include "ixemul.h"
  24. #include "kprintf.h"
  25. #include <stdlib.h>
  26.  
  27. UWORD __amiga2unixid(UWORD id)
  28. {
  29.   switch(id) {
  30.     case (UWORD)(-1):
  31.       return(0);
  32.     case (UWORD)(-2):
  33.       return((UWORD)(-1));
  34.     case 0:
  35.       return((UWORD)(-2));
  36.     default:
  37.       return(id);
  38.   }
  39. }
  40.  
  41. UWORD __unix2amigaid(UWORD id)
  42. {
  43.   switch(id) {
  44.     case (UWORD)(-1):
  45.       return((UWORD)(-2));
  46.     case (UWORD)(-2):
  47.       return(0);
  48.     case 0:
  49.       return((UWORD)(-1));
  50.     default:
  51.       return(id);
  52.   }
  53. }
  54.