Subversion Repositories tendra.SVN

Rev

Rev 5 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 6
Line -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
-
 
3
 * All rights reserved.
-
 
4
 *
-
 
5
 * Redistribution and use in source and binary forms, with or without
-
 
6
 * modification, are permitted provided that the following conditions are met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
Line 31... Line 61...
31
#ifndef CONFIG_INCLUDED
61
#ifndef CONFIG_INCLUDED
32
#define CONFIG_INCLUDED
62
#define CONFIG_INCLUDED
33
 
63
 
34
 
64
 
35
/*
65
/*
36
    BASIC API SPECIFICATION
66
 * BASIC API SPECIFICATION
37
 
67
 *
38
    The API for this program is ANSI plus a few extensions from POSIX
68
 * The API for this program is ANSI plus a few extensions from POSIX and XPG3.
39
    and XPG3.  The ANSI headers are included here, with the FS_* macros
69
 * The ANSI headers are included here, with the FS_* macros being used to
40
    being used to control inclusion of the additional features.
70
 * control inclusion of the additional features.
41
*/
71
 */
42
 
72
 
43
#include <stdio.h>
73
#include <stdio.h>
44
#include <stdlib.h>
74
#include <stdlib.h>
45
#include <string.h>
75
#include <string.h>
46
#include <signal.h>
76
#include <signal.h>
Line 76... Line 106...
76
#define FS_GETCWD		FS_POSIX
106
#define FS_GETCWD		FS_POSIX
77
#endif
107
#endif
78
 
108
 
79
#ifndef FS_STAT
109
#ifndef FS_STAT
80
#define FS_STAT			FS_POSIX
110
#define FS_STAT			FS_POSIX
81
#endif
111
#endif
82
 
112
 
83
#ifndef FS_SYS_TYPES
113
#ifndef FS_SYS_TYPES
84
#define FS_SYS_TYPES		FS_POSIX
114
#define FS_SYS_TYPES		FS_POSIX
85
#endif
115
#endif
86
 
116
 
87
#ifndef FS_TEMPNAM
117
#ifndef FS_TEMPNAM
88
#define FS_TEMPNAM		FS_XPG3
118
#define FS_TEMPNAM		FS_XPG3
89
#endif
119
#endif
90
 
120
 
91
#ifndef FS_WAIT
121
#ifndef FS_WAIT
92
#define FS_WAIT			FS_POSIX
122
#define FS_WAIT			FS_POSIX
93
#endif
123
#endif
94
 
124
 
95
 
125
 
96
/*
126
/*
97
    CODING STANDARD MACROS
127
 * CODING STANDARD MACROS
98
 
128
 *
99
    The program is written to conform to the local OSSG coding standard.
129
 * The program is written to conform to the local OSSG coding standard. This
100
    This header defines the standard macros used in the program.
130
 * header defines the standard macros used in the program.
101
*/
-
 
102
 
-
 
103
 
-
 
104
#include "ossg.h"
-
 
105
 
-
 
106
 
-
 
107
/*
-
 
108
    BASIC TYPES
-
 
109
 
-
 
110
    These types are so ubiquitous that this is the only suitable place
-
 
111
    for them.
-
 
112
*/
131
 */
113
 
-
 
114
typedef int boolean ;
-
 
115
#if FS_PTR_VOID
-
 
116
typedef void *pointer ;
-
 
117
#else
-
 
118
typedef char *pointer ;
-
 
119
#endif
-
 
120
 
-
 
121
 
-
 
122
/*
-
 
123
    UTILITY MACROS
-
 
124
 
132
 
125
    These macros are just a matter of programming style.
-
 
126
*/
-
 
127
 
133
 
-
 
134
#include "tendra.h"
-
 
135
 
-
 
136
 
-
 
137
/*
-
 
138
 * BASIC TYPES
-
 
139
 *
-
 
140
 * These types are so ubiquitous that this is the only suitable place for them.
-
 
141
 */
-
 
142
 
-
 
143
typedef int boolean;
-
 
144
typedef void *pointer;
-
 
145
 
-
 
146
 
-
 
147
/*
-
 
148
 * UTILITY MACROS
-
 
149
 *
-
 
150
 * These macros are just a matter of programming style.
-
 
151
 */
-
 
152
 
128
#define null			NULL
153
#define null		NULL
129
#define streq( X, Y )		( strcmp ( ( X ), ( Y ) ) == 0 )
154
#define streq(X, Y)	(strcmp((X), (Y)) == 0)
130
#define strneq( X, Y, Z )	( strncmp ( ( X ), ( Y ), ( size_t ) ( Z ) ) == 0 )
155
#define strneq(X, Y, Z)	(strncmp((X), (Y), (size_t)(Z)) == 0)
-
 
156
#define MAX_LINE	1024
131
 
157
 
132
 
158
 
133
#endif
159
#endif