home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / source / cmdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  1.4 KB  |  63 lines

  1. // cmdlib.h
  2.  
  3. #ifndef __CMDLIB__
  4. #define __CMDLIB__
  5.  
  6. #include <libc.h>
  7. #include <errno.h>
  8. #include <ctype.h>
  9.  
  10. #define strcmpi strcasecmp
  11. #define stricmp strcasecmp
  12. char *strupr (char *in);
  13. char *strlower (char *in);
  14. int filelength (int handle);
  15. int tell (int handle);
  16.  
  17. #ifndef __BYTEBOOL__
  18. #define __BYTEBOOL__
  19. typedef enum {false, true} boolean;
  20. typedef unsigned char byte;
  21. #endif
  22.  
  23. double I_FloatTime (void);
  24.  
  25. int        GetKey (void);
  26.  
  27. void    Error (char *error, ...);
  28. int        CheckParm (char *check);
  29.  
  30. int     SafeOpenWrite (char *filename);
  31. int     SafeOpenRead (char *filename);
  32. void     SafeRead (int handle, void *buffer, long count);
  33. void     SafeWrite (int handle, void *buffer, long count);
  34. void     *SafeMalloc (long size);
  35.  
  36. long    LoadFile (char *filename, void **bufferptr);
  37. void    SaveFile (char *filename, void *buffer, long count);
  38.  
  39. void     DefaultExtension (char *path, char *extension);
  40. void     DefaultPath (char *path, char *basepath);
  41. void     StripFilename (char *path);
  42. void     StripExtension (char *path);
  43.  
  44. void     ExtractFilePath (char *path, char *dest);
  45. void     ExtractFileBase (char *path, char *dest);
  46. void    ExtractFileExtension (char *path, char *dest);
  47.  
  48. long     ParseNum (char *str);
  49.  
  50. short    BigShort (short l);
  51. short    LittleShort (short l);
  52. long    BigLong (long l);
  53. long    LittleLong (long l);
  54. float    BigFloat (float l);
  55. float    LittleFloat (float l);
  56.  
  57. extern    char        com_token[1024];
  58. extern    boolean        com_eof;
  59.  
  60. char *COM_Parse (char *data);
  61.  
  62. #endif
  63.