[go: up one dir, main page]

File: pcompat.h

package info (click to toggle)
archie 1.4.1-8.1
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 500 kB
  • ctags: 1,025
  • sloc: ansic: 5,898; lisp: 454; makefile: 99
file content (46 lines) | stat: -rw-r--r-- 1,512 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * Copyright (c) 1989, 1990 by the University of Washington
 *
 * For copying and distribution information, please see the file
 * <copyright.h>.
 */

#include <copyright.h>

/* 
 * pcompat.h - Definitions for compatability library
 *
 * This file contains the defintions used by the compatability
 * library.  Among the definitions are the possible values for
 * pfs_disable_flag.  This file also contains the external 
 * declaration of that variable.  Note, however that the 
 * the module pfs_disable_flag.o is included in libpfs.a
 * because some of the routines in that library set it.
 * The only place it is checked, however, is in pfs_access, 
 * found in libpcompat.a
 *
 */

extern	int		pfs_default;
extern	int		pfs_enable;

/* Definitions for values of pfs_enable */
#define PMAP_DISABLE      0
#define PMAP_ENABLE       1
#define PMAP_COLON	  2
#define PMAP_ATSIGN_NF	  3
#define PMAP_ATSIGN	  4

#define DISABLE_PFS(stmt) do {int DpfStmp; DpfStmp = pfs_enable;\
			   pfs_enable = PMAP_DISABLE; \
			   stmt; \
			   pfs_enable = DpfStmp;} while (0)

/* Definitions for PFS_ACCESS */
#define PFA_MAP           0  /* Map the file name only                       */
#define PFA_CREATE        1  /* Create file if not found                     */
#define PFA_CRMAP         2  /* Map file name.  Map to new name if not found */
#define PFA_RO            4  /* Access to file is read only                  */

#define check_pfs_default() \
	do { if (pfs_default == -1) get_pfs_default(); } while (0)