| 20 |
|
|
| 21 |
|
#define access _access |
| 22 |
|
#define mkdir(dirname,perms) _mkdir(dirname) |
| 23 |
< |
#ifdef _MSC_VER |
| 23 |
> |
/* The windows _popen with the native shell breaks '\\\n' escapes. |
| 24 |
> |
* RT_WINPROC (used by SCons) enables our replacement functions to fix that. |
| 25 |
> |
* XXX This should really not depend on the compiler used! */ |
| 26 |
> |
#if 1 /* defined(_MSC_VER) && !defined(RT_WINPROC) */ |
| 27 |
|
#define popen(cmd,mode) _popen(cmd,mode) |
| 28 |
|
#define pclose(p) _pclose(p) |
| 29 |
|
#else |
| 92 |
|
#ifndef DEFPATH |
| 93 |
|
#define DEFPATH ";/ray/lib" |
| 94 |
|
#endif |
| 92 |
– |
#define fixargv0(a0) (a0) |
| 95 |
|
|
| 96 |
|
#else |
| 97 |
|
|
| 105 |
|
#define CURDIR '.' |
| 106 |
|
#define DEFAULT_TEMPDIRS {"/var/tmp", "/usr/tmp", "/tmp", ".", NULL} |
| 107 |
|
#define TEMPLATE "/tmp/rtXXXXXX" |
| 108 |
< |
#define TEMPLEN 17 |
| 108 |
> |
#define TEMPLEN 13 |
| 109 |
|
#define ULIBVAR "RAYPATH" |
| 110 |
|
#ifndef DEFPATH |
| 111 |
|
#define DEFPATH ":/usr/local/lib/ray" |
| 113 |
|
#define SPECIALS " \t\n'\"()${}*?[];|&" |
| 114 |
|
#define QUOTCHAR '\'' |
| 115 |
|
#define ALTQUOT '"' |
| 114 |
– |
#define fixargv0(a0) (a0) |
| 116 |
|
|
| 117 |
|
#endif |
| 118 |
|
#endif |
| 131 |
|
#if defined(_WIN32) || defined(_WIN64) |
| 132 |
|
extern FILE *win_popen(char *command, char *type); |
| 133 |
|
extern int win_pclose(FILE *p); |
| 133 |
– |
extern char *fixargv0(); |
| 134 |
|
#endif |
| 135 |
|
|
| 136 |
+ |
/* Set global progname and return path-free version of argv[0] */ |
| 137 |
+ |
extern char *fixargv0(char *arg0); |
| 138 |
+ |
extern char *progname; |
| 139 |
+ |
|
| 140 |
+ |
/* Print program arguments to file; side effect is to set progname */ |
| 141 |
+ |
extern void printargs(int ac, char **av, FILE *fp); |
| 142 |
+ |
|
| 143 |
|
/* Check if any of the characters in str2 are found in str1 */ |
| 144 |
|
extern int matchany(const char *str1, const char *str2); |
| 145 |
|
|
| 167 |
|
|
| 168 |
|
/* Concatenate two strings, leaving exactly one DIRSEP in between */ |
| 169 |
|
extern char *append_filepath(char *s1, char *s2, size_t len); |
| 170 |
< |
|
| 170 |
> |
/* defined in fropen.c */ |
| 171 |
> |
extern FILE *frlibopen(char *fname); |
| 172 |
> |
/* defined in getlibpath.c */ |
| 173 |
> |
extern char *getrlibpath(void); |
| 174 |
> |
/* defined in gethomedir.c */ |
| 175 |
> |
extern char *gethomedir(char *uname, char *path, int plen); |
| 176 |
> |
/* defined in getpath.c */ |
| 177 |
> |
extern char *getpath(char *fname, char *searchpath, int mode); |
| 178 |
|
|
| 179 |
|
#ifdef __cplusplus |
| 180 |
|
} |