home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / util / mbq319 / cmdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-28  |  1.6 KB  |  71 lines

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