File: icm.h

package info (click to toggle)
icmake 6.22-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,120 kB
  • ctags: 1,045
  • sloc: ansic: 9,241; makefile: 1,138; asm: 126; sh: 124
file content (135 lines) | stat: -rw-r--r-- 3,411 bytes parent folder | download | duplicates (3)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/*
                                     I C M . H

    Generic definitions of the target operating systems.
*/

/*************************************************************************
    define _PROTOTYPES unconditionally
    define MAXCMDLEN:  the max command line length

    VOIDP, MARG, ARG macros: now superfluous, but kept for economy reasons
    (it's better to be lazy than tired)

    Undefine any unwanted _NO_PROTOTYPES or _NOPROTOTYPES
*/

#define _PROTOTYPES
#ifdef MSDOS
#    define MAXCMDLEN   100
#else
#    define MAXCMDLEN   500
#endif
#define ARG(x)      x
#define MARG        , ...
#define VOIDP       void*

#ifdef _NO_PROTOTYPES
#   undef _NO_PROTOTYPES
#endif

#ifdef _NOPROTOTYPES
#   undef _NOPROTOTYPES
#endif

/*************************************************************************
    P_CHECK value for implied function argument of system, chdir, etc
    P_NOCHECK when not checking
    P_CHECKMODE(int mode) is true when mode indicates checking
*/
#ifndef P_CHECK
#    define P_CHECK                 0
#endif
#ifndef P_NOCHECK
#    define P_NOCHECK               2
#endif
#ifndef P_CHECKMODE
#    define P_CHECKMODE(x)          (! ((x) & P_NOCHECK) )
#endif

/*************************************************************************
     directory objects
*/

#define O_FILE                      1
#define O_DIR                       2
#define O_SUBDIR                    4
#define O_ALL                       8

/*************************************************************************
     IS_ attributes
*/

#define IS_IFDIR                    1
#define IS_IFCHR                    2
#define IS_IFREG                    4
#define IS_IREAD                    8
#define IS_IWRITE                   16
#define IS_IEXEC                    32

/*************************************************************************
     file attributes
*/

#ifndef A_NORMAL
#    define A_NORMAL                0x00
#endif

#ifndef A_RDONLY
#    define A_RDONLY                0x01
#endif

#ifndef A_HIDDEN
#    define A_HIDDEN                0x02
#endif

#ifndef A_SYSTEM
#    define A_SYSTEM                0x04
#endif

#ifndef A_VOLID
#    define A_VOLID                 0x08
#endif

#ifndef A_SUBDIR
#    define A_SUBDIR                0x10
#endif

#ifndef A_ARCH
#    define A_ARCH                  0x20
#endif

/**************************************************************************
    MSDOS/UNIX specific macros
*/

#ifndef P_WAIT
#define P_WAIT                      0
#endif

#ifdef MSDOS
#    define DIRSEP                  '\\'
#    define DRIVESEP                ':'
#    define INT32                   signed long
#    define UNS32                   unsigned long
#    define READBINARY              "rb"
#    define WRITEBINARY             "wb"
#else
#    define near
#    define _MAX_PATH               260
#    define _MAX_DRIVE              2
#    define _MAX_DIR                _MAX_PATH
#    define _MAX_FNAME              _MAX_PATH
#    define _MAX_EXT                _MAX_PATH
#    define DIRSEP                  '/'
#    define DRIVESEP                0
#    define INT32                   signed int
#    define UNS32                   unsigned int
#    define READBINARY              "r"
#    define WRITEBINARY             "w"
#    define _execvp                 execvp
#endif

#define INT8  signed char
#define INT16 signed short
#define UNS16 unsigned short