home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / source / TeX / gcclib / symdir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-12  |  1.9 KB  |  73 lines

  1. /*
  2.  * header file for functions dealing with symbolic link directories and
  3.  * other kinds of filename translations.
  4.  */
  5.  
  6. #ifndef _SYMDIR_H
  7. #define _SYMDIR_H
  8.  
  9. /* structure for special symbolic link directory entry */
  10.  
  11. typedef struct _SENTRY {
  12.     struct _SENTRY    *next;
  13.     unsigned short    flags;        /* see below */
  14.     char        *linkto;
  15.     char        *cflags;    /* pointer to flags character string */
  16.     char        linkname[0];
  17. } SYMENTRY;
  18.  
  19. #define SD_AUTO        0x0001        /* link was created automatically */
  20.  
  21. typedef struct _SDIR {
  22.     struct _SDIR *s_nxt;
  23.     SYMENTRY    *s_dir;
  24.     char        *s_pth;
  25. } SYMDIR;
  26.  
  27. /*
  28.  * various flags to control file name translation
  29.  */
  30.  
  31. extern char     *_lDIR;        /* name of symlink directories */
  32. extern char     _lOK,        /* OK to use symlinks */
  33.         _lAUTO,        /* make symbolic links for unwieldy filenames */
  34.         _lHIDE;        /* hide the symlink directory */
  35.  
  36. extern char    _tSLASH,    /* allow '/' as a directory seperator */
  37.         _tCASE,        /* don't translate upper <-> lower case */
  38.         _tDOTS,        /* translate '.' into this character, if set */
  39.         _tUNLIMITED,    /* OS doesn't mind long file names */
  40.         _tROOT,        /* root filesystem, for paths starting with / */
  41.         _tDEV;        /* allow /dev/specialfile names */
  42.  
  43. /*
  44.  * return codes from _unx2dos
  45.  */
  46. #define _NM_OK        0    /* file name can be recovered by _dos2unx */
  47. #define _NM_CHANGE    1    /* file name changed, _dos2unx won't work */
  48. #define _NM_LINK    2    /* file name was a symbolic link      */
  49. #define _NM_DEV        3    /* file name was a device (e.g. CON:)      */
  50.  
  51. extern char __link_name[], __link_path[], __link_to[];
  52. extern int __link_flags;
  53.  
  54. #if defined(__STDC__) && !defined(__NO_PROTO__)
  55.  
  56. int     _make_autolink(char *, char *);
  57. SYMDIR     *_read_symdir(char *);
  58. SYMENTRY *_symdir_lookup(SYMDIR *, const char *);
  59. int     _write_symdir(char *, SYMDIR *);
  60.  
  61. void     _set_unixmode(char *mode);
  62. int    _unx2dos(const char *, char *);
  63. int    _dos2unx(const char *, char *);
  64.  
  65. #else
  66.  
  67. extern SYMDIR *_read_symdir();
  68. extern SYMENTRY *_symdir_lookup();
  69.  
  70. #endif
  71.  
  72. #endif /* _SYMDIR_H */
  73.