Back to index

radiance  4R0+20100331
Functions | Variables
syscalls.c File Reference
#include "rtprocess.h"
#include "rterror.h"
#include "meta.h"

Go to the source code of this file.

Functions

FILE * efopen (char *fname, char *mode)
FILE * mfopen (char *fname, char *mode)

Variables

static const char RCSid [] = "$Id: syscalls.c,v 1.4 2003/08/01 14:14:24 schorsch Exp $"

Function Documentation

FILE* efopen ( char *  fname,
char *  mode 
)

Definition at line 14 of file syscalls.c.

{
 register FILE  *fp;
 FILE  *fopen();

 if ((fp = fopen(fname, mode)) == NULL)  {
    sprintf(errmsg, "cannot open file \"%s\", mode \"%s\"", fname, mode);
    error(USER, errmsg);
    }

 return(fp);
 }

Here is the call graph for this function:

FILE* mfopen ( char *  fname,
char *  mode 
)

Definition at line 33 of file syscalls.c.

{
    char  *mdir, stemp[MAXFNAME];
    char  *getenv();

    if ((mdir = getenv("MDIR")) == NULL)
       mdir = MDIR;
    sprintf(stemp, "%s%s", mdir, fname);

    return(efopen(stemp, mode));
}

Here is the call graph for this function:


Variable Documentation

const char RCSid[] = "$Id: syscalls.c,v 1.4 2003/08/01 14:14:24 schorsch Exp $" [static]

Definition at line 2 of file syscalls.c.