ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/rtio.h
Revision: 3.3
Committed: Mon Jul 14 22:23:59 2003 UTC (20 years, 9 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 3.2: +5 -4 lines
Log Message:
Instrumented headers against multiple inclusion and for use from C++.
Moved includes in headers out of "C" scope.

File Contents

# Content
1 /* RCSid $Id: rtio.h,v 3.2 2003/06/30 14:59:11 schorsch Exp $ */
2 /*
3 * Radiance i/o and string routines
4 */
5
6 #ifndef _RAD_RTIO_H_
7 #define _RAD_RTIO_H_
8
9 #include <stdio.h>
10 #include <sys/types.h>
11 #include <fcntl.h>
12 #include <string.h>
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 /* XXX include paths.h instead */
19 #ifndef F_OK /* mode bits for access(2) call */
20 #define R_OK 4 /* readable */
21 #define W_OK 2 /* writable */
22 #define X_OK 1 /* executable */
23 #define F_OK 0 /* exists */
24 #endif
25
26 /* <unistd.h> is missing on some systems */
27 extern off_t lseek(int, off_t, int);
28
29 /* defined in badarg.c */
30 extern int badarg(int ac, char **av, char *fl);
31 /* defined in expandarg.c */
32 extern int expandarg(int *acp, char ***avp, int n);
33 /* defined in fdate.c */
34 extern time_t fdate(char *fname);
35 extern int setfdate(char *fname, long ftim);
36 /* defined in fgetline.c */
37 extern char *fgetline(char *s, int n, FILE *fp);
38 /* defined in fgetval.c */
39 extern int fgetval(FILE *fp, int ty, char *vp);
40 /* defined in fgetword.c */
41 extern char *fgetword(char *s, int n, FILE *fp);
42 /* defined in fputword.c */
43 extern void fputword(char *s, FILE *fp);
44 /* defined in fixargv0.c */
45 /*extern char *fixargv0(char *av0);*/ /* XXX include paths.h instead */
46 /* defined in fropen.c */
47 extern FILE *frlibopen(char *fname);
48 /* defined in getlibpath.c */
49 extern char *getrlibpath(void);
50 /* defined in getpath.c */
51 extern char *getpath(char *fname, char *searchpath, int mode);
52 /* defined in portio.c */
53 extern void putstr(char *s, FILE *fp);
54 extern void putint(long i, int siz, FILE *fp);
55 extern void putflt(double f, FILE *fp);
56 extern char *getstr(char *s, FILE *fp);
57 extern long getint(int siz, FILE *fp);
58 extern double getflt(FILE *fp);
59 /* defined in rexpr.c */
60 extern int ecompile(char *sp, int iflg, int wflag);
61 extern char *expsave(void);
62 extern void expset(char *ep);
63 extern char *eindex(char *sp);
64 /* defined in savestr.c */
65 extern char *savestr(char *str);
66 extern void freestr(char *s);
67 extern int shash(char *s);
68 /* defined in savqstr.c */
69 extern char *savqstr(char *s);
70 extern void freeqstr(char *s);
71 /* defined in wordfile.c */
72 extern int wordfile(char **words, char *fname);
73 extern int wordstring(char **avl, char *str);
74 /* defined in words.c */
75 extern char *atos(char *rs, int nb, char *s);
76 extern char *nextword(char *cp, int nb, char *s);
77 extern char *sskip(char *s);
78 extern char *sskip2(char *s, int n);
79 extern char *iskip(char *s);
80 extern char *fskip(char *s);
81 extern int isint(char *s);
82 extern int isintd(char *s, char *ds);
83 extern int isflt(char *s);
84 extern int isfltd(char *s, char *ds);
85 /* defined in lamp.c */
86 extern float * matchlamp(char *s);
87 extern int loadlamps(char *file);
88 extern void freelamps(void);
89
90 #ifdef __cplusplus
91 }
92 #endif
93 #endif /* _RAD_RTIO_H_ */
94