ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/paths.h
Revision: 2.12
Committed: Fri Jun 6 16:38:47 2003 UTC (20 years, 11 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 2.11: +13 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 schorsch 2.12 /* RCSid $Id: paths.h,v 2.11 2003/06/05 19:29:34 schorsch Exp $ */
2 greg 2.1 /*
3     * Definitions for paths on different machines
4 greg 2.9 */
5 schorsch 2.12 #ifndef _RAD_PATHS_H_
6     #define _RAD_PATHS_H_
7     #ifdef __cplusplus
8     extern "C" {
9     #endif
10 greg 2.9
11 greg 2.10 #include "copyright.h"
12 greg 2.1
13 schorsch 2.11 #ifdef _WIN32
14 greg 2.1
15 greg 2.2 #define DIRSEP '/'
16     #define ISDIRSEP(c) ((c)=='/' || (c)=='\\')
17     #define CASEDIRSEP case '/': case '\\'
18 greg 2.1 #define PATHSEP ';'
19 greg 2.2 #define MAXPATH 128
20 greg 2.7 #define TEMPLATE "rtXXXXXX"
21     #define TEMPLEN 8
22 greg 2.1 #define ULIBVAR "RAYPATH"
23 greg 2.3 #ifndef DEFPATH
24     #define DEFPATH ";c:/ray/lib"
25 greg 2.1 #endif
26 greg 2.4 extern char *fixargv0();
27 greg 2.1
28 greg 2.3 #else
29 greg 2.1 #ifdef AMIGA
30    
31     #define DIRSEP '/'
32     #define PATHSEP ';'
33 greg 2.2 #define MAXPATH 128
34 greg 2.1 #define TEMPLATE "/tmp/rtXXXXXX"
35     #define TEMPLEN 13
36     #define ULIBVAR "RAYPATH"
37 greg 2.3 #ifndef DEFPATH
38     #define DEFPATH ";/ray/lib"
39 greg 2.1 #endif
40 greg 2.4 #define fixargv0(a0) (a0)
41 greg 2.1
42     #else
43    
44     #define DIRSEP '/'
45     #define PATHSEP ':'
46 greg 2.2 #define MAXPATH 256
47 greg 2.5 #define TEMPLATE "/usr/tmp/rtXXXXXX"
48 greg 2.6 #define TEMPLEN 17
49 greg 2.1 #define ULIBVAR "RAYPATH"
50 greg 2.3 #ifndef DEFPATH
51     #define DEFPATH ":/usr/local/lib/ray"
52 greg 2.1 #endif
53 greg 2.4 #define fixargv0(a0) (a0)
54 greg 2.1
55 greg 2.3 #endif
56 greg 2.2 #endif
57    
58     #ifndef ISDIRSEP
59     #define ISDIRSEP(c) ((c)==DIRSEP)
60     #endif
61     #ifndef CASEDIRSEP
62     #define CASEDIRSEP case DIRSEP
63 greg 2.1 #endif
64    
65     extern char *mktemp(), *getenv();
66 greg 2.8
67     #ifdef BSD
68     extern char *getwd();
69     #else
70     extern char *getcwd();
71     #define getwd(p) getcwd(p, sizeof(p))
72     #endif
73 schorsch 2.12
74    
75     #ifdef __cplusplus
76     }
77     #endif
78     #endif /* _RAD_PATHS_H_ */
79