1 |
< |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ LBL" */ |
4 |
< |
|
1 |
> |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
* Definitions for paths on different machines |
4 |
|
*/ |
5 |
|
|
6 |
< |
#ifdef NIX |
6 |
> |
#include "copyright.h" |
7 |
|
|
8 |
< |
#ifdef MSDOS |
8 |
> |
#ifdef _WIN32 |
9 |
|
|
10 |
< |
#define DIRSEP '\\' |
10 |
> |
#define DIRSEP '/' |
11 |
> |
#define ISDIRSEP(c) ((c)=='/' || (c)=='\\') |
12 |
> |
#define CASEDIRSEP case '/': case '\\' |
13 |
|
#define PATHSEP ';' |
14 |
< |
#define TEMPLATE "c:\\tmp\\rtXXXXXX" |
15 |
< |
#define TEMPLEN 15 |
14 |
> |
#define MAXPATH 128 |
15 |
> |
#define TEMPLATE "rtXXXXXX" |
16 |
> |
#define TEMPLEN 8 |
17 |
|
#define ULIBVAR "RAYPATH" |
18 |
< |
#ifndef DEFPATH |
19 |
< |
#define DEFPATH ";\\ray\\lib" |
18 |
> |
#ifndef DEFPATH |
19 |
> |
#define DEFPATH ";c:/ray/lib" |
20 |
|
#endif |
21 |
+ |
extern char *fixargv0(); |
22 |
|
|
23 |
< |
#endif |
23 |
> |
#else |
24 |
|
#ifdef AMIGA |
25 |
|
|
26 |
|
#define DIRSEP '/' |
27 |
|
#define PATHSEP ';' |
28 |
+ |
#define MAXPATH 128 |
29 |
|
#define TEMPLATE "/tmp/rtXXXXXX" |
30 |
|
#define TEMPLEN 13 |
31 |
|
#define ULIBVAR "RAYPATH" |
32 |
< |
#ifndef DEFPATH |
33 |
< |
#define DEFPATH ";/ray/lib" |
32 |
> |
#ifndef DEFPATH |
33 |
> |
#define DEFPATH ";/ray/lib" |
34 |
|
#endif |
35 |
+ |
#define fixargv0(a0) (a0) |
36 |
|
|
34 |
– |
#endif |
35 |
– |
|
37 |
|
#else |
38 |
|
|
39 |
|
#define DIRSEP '/' |
40 |
|
#define PATHSEP ':' |
41 |
< |
#define TEMPLATE "/tmp/rtXXXXXX" |
42 |
< |
#define TEMPLEN 13 |
41 |
> |
#define MAXPATH 256 |
42 |
> |
#define TEMPLATE "/usr/tmp/rtXXXXXX" |
43 |
> |
#define TEMPLEN 17 |
44 |
|
#define ULIBVAR "RAYPATH" |
45 |
< |
#ifndef DEFPATH |
46 |
< |
#define DEFPATH ":/usr/local/lib/ray" |
45 |
> |
#ifndef DEFPATH |
46 |
> |
#define DEFPATH ":/usr/local/lib/ray" |
47 |
|
#endif |
48 |
+ |
#define fixargv0(a0) (a0) |
49 |
|
|
50 |
|
#endif |
51 |
+ |
#endif |
52 |
|
|
53 |
+ |
#ifndef ISDIRSEP |
54 |
+ |
#define ISDIRSEP(c) ((c)==DIRSEP) |
55 |
+ |
#endif |
56 |
+ |
#ifndef CASEDIRSEP |
57 |
+ |
#define CASEDIRSEP case DIRSEP |
58 |
+ |
#endif |
59 |
+ |
|
60 |
|
extern char *mktemp(), *getenv(); |
61 |
+ |
|
62 |
+ |
#ifdef BSD |
63 |
+ |
extern char *getwd(); |
64 |
+ |
#else |
65 |
+ |
extern char *getcwd(); |
66 |
+ |
#define getwd(p) getcwd(p, sizeof(p)) |
67 |
+ |
#endif |