--- ray/src/common/paths.h 1992/09/08 10:04:36 2.2 +++ ray/src/common/paths.h 2003/06/05 19:29:34 2.11 @@ -1,28 +1,26 @@ -/* Copyright (c) 1992 Regents of the University of California */ - -/* SCCSid "$SunId$ LBL" */ - +/* RCSid $Id: paths.h,v 2.11 2003/06/05 19:29:34 schorsch Exp $ */ /* * Definitions for paths on different machines */ -#ifdef NIX +#include "copyright.h" -#ifdef MSDOS +#ifdef _WIN32 #define DIRSEP '/' #define ISDIRSEP(c) ((c)=='/' || (c)=='\\') #define CASEDIRSEP case '/': case '\\' #define PATHSEP ';' #define MAXPATH 128 -#define TEMPLATE "c:/tmp/rtXXXXXX" -#define TEMPLEN 15 +#define TEMPLATE "rtXXXXXX" +#define TEMPLEN 8 #define ULIBVAR "RAYPATH" -#ifndef DEFPATH -#define DEFPATH ";c:/ray/lib" +#ifndef DEFPATH +#define DEFPATH ";c:/ray/lib" #endif +extern char *fixargv0(); -#endif +#else #ifdef AMIGA #define DIRSEP '/' @@ -31,25 +29,26 @@ #define TEMPLATE "/tmp/rtXXXXXX" #define TEMPLEN 13 #define ULIBVAR "RAYPATH" -#ifndef DEFPATH -#define DEFPATH ";/ray/lib" +#ifndef DEFPATH +#define DEFPATH ";/ray/lib" #endif +#define fixargv0(a0) (a0) -#endif - #else #define DIRSEP '/' #define PATHSEP ':' #define MAXPATH 256 -#define TEMPLATE "/tmp/rtXXXXXX" -#define TEMPLEN 13 +#define TEMPLATE "/usr/tmp/rtXXXXXX" +#define TEMPLEN 17 #define ULIBVAR "RAYPATH" -#ifndef DEFPATH -#define DEFPATH ":/usr/local/lib/ray" +#ifndef DEFPATH +#define DEFPATH ":/usr/local/lib/ray" #endif +#define fixargv0(a0) (a0) #endif +#endif #ifndef ISDIRSEP #define ISDIRSEP(c) ((c)==DIRSEP) @@ -59,3 +58,10 @@ #endif extern char *mktemp(), *getenv(); + +#ifdef BSD +extern char *getwd(); +#else +extern char *getcwd(); +#define getwd(p) getcwd(p, sizeof(p)) +#endif