home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / tex / pastex / source / dvips / amiga / include / evpaths.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-15  |  1.7 KB  |  53 lines

  1. #ifndef EVPATHS_H
  2. #define EVPATHS_H
  3. /*
  4. ** $VER:  EVPaths.h 1.36 (14.12.94)
  5. **
  6. ** Header for EVPaths Routines.
  7. **
  8. ** Written by Giuseppe Ghibò
  9. **
  10. ** Copyright © 1994 by Giuseppe Ghibò
  11. **
  12. */
  13. #include <exec/types.h>
  14. #include <dos/dos.h>
  15.  
  16. struct EnvVarPath
  17. {
  18.     STRPTR name;
  19.  
  20.     union {
  21.         STRPTR *strings;
  22.         UBYTE *buffer;
  23.     } storage;
  24.  
  25.         STRPTR defpath;
  26.     LONG size;
  27.     LONG status;
  28.     LONG pos;
  29. };
  30.  
  31. /* Prototypes */
  32. GLOBAL LONG    __stdargs SNPrintf(STRPTR String, LONG Size, STRPTR FmtString, ...);
  33. GLOBAL LONG    __regargs GetVarLength(STRPTR envname);
  34.  
  35. GLOBAL struct EnvVarPath __regargs *Alloc_EnvVarPath(STRPTR varname, LONG size);
  36. GLOBAL VOID        __regargs Free_EnvVarPath(struct EnvVarPath *p);
  37. GLOBAL VOID        __regargs Init_EnvVarPath(struct EnvVarPath *p, APTR deflt_str, LONG mode);
  38. GLOBAL STRPTR        __regargs EVP_FileSearch(STRPTR filename, struct EnvVarPath *evp, UBYTE *buffer, LONG size);
  39. BPTR            __regargs EVP_Open(STRPTR filename, struct EnvVarPath *evp, UBYTE *buffer, LONG size, LONG mode);
  40.  
  41. #define ENVPATH_DEFSTR         (1L << 0)    /* default path provided as string */
  42. #define ENVPATH_DEFARR         (1L << 1)    /* default path provided as array of strings */
  43. #define ENVPATH_PREPEND_PATH    (1L << 31)    /* Prepend the default path */
  44. #define ENVPATH_APPEND_PATH    (1L << 30)    /* Append the default path */
  45.  
  46. #define ENVPATH_BUFFER_EMPTY        0L /* buffer is empty */
  47. #define ENVPATH_BUFFER_COMPLETE        1L /* buffer is complete, i.e. no more entries */
  48. #define ENVPATH_BUFFER_FULL        2L /* buffer is full, i.e. not enough room for other entries */
  49. #define ENVPATH_BUFFER_TRUNC        3L /* buffer is truncated because a not enough memory was encountered during processing */
  50. #define ENVPATH_BUFFER_INCOMPLETE    4L /* there could be other entries, but actually aren't into the buffer */
  51.  
  52. #endif    /* EVPATHS_H */
  53.