ODSwap.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* OpenDoors Online Software Programming Toolkit
  2. * (C) Copyright 1991 - 1999 by Brian Pirie.
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. *
  19. * File: ODSwap.h
  20. *
  21. * Description: Provides memory swapping, spawning and certain other low-
  22. * level assembly routines needed by OpenDoors. This file is only
  23. * applicable when building the MS-DOS version of OpenDoors.
  24. *
  25. * Revisions: Date Ver Who Change
  26. * ---------------------------------------------------------------
  27. * Nov 25, 1995 6.00 BP Created.
  28. * Feb 19, 1996 6.00 BP Changed version number to 6.00.
  29. * Mar 03, 1996 6.10 BP Begin version 6.10.
  30. */
  31. #ifndef _INC_ODSWAP
  32. #define _INC_ODSWAP
  33. #ifdef ODPLAT_DOS
  34. /* Data types. */
  35. typedef struct _vector
  36. {
  37. char number; /* vector number */
  38. char flag; /* 0-CURRENT, 1-IRET, 2-free, 3-end */
  39. unsigned int vseg; /* vector segment */
  40. unsigned int voff; /* vector offset */
  41. } VECTOR;
  42. /* Global variables. */
  43. extern char **environ;
  44. /* Public functions. */
  45. int _chkems(char *, int *);
  46. int _create(char *, int *);
  47. int _dskspace(int, unsigned int *, unsigned int *);
  48. int _getcd(int, char *);
  49. int _getdrv(void);
  50. int _getems(int, int *);
  51. int _getrc(void);
  52. void _getvect(int, unsigned int *, unsigned int *);
  53. int _restmap(char *);
  54. int _savemap(char *);
  55. void _setdrvcd(int, char * );
  56. void _setvect(VECTOR *);
  57. int _xsize(unsigned int, long *, long *);
  58. int _xspawn(char *, char *, char *, VECTOR *, int, int, char *, int);
  59. #endif /* ODPLAT_DOS */
  60. #endif /* _INC_ODSWAP */