1 |
– |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Read and write portable ambient values |
6 |
+ |
* |
7 |
+ |
* Declarations of external symbols in ambient.h |
8 |
|
*/ |
9 |
|
|
10 |
< |
#include <stdio.h> |
10 |
> |
#include "copyright.h" |
11 |
|
|
12 |
< |
#include "color.h" |
12 |
> |
#include "ray.h" |
13 |
|
|
15 |
– |
#include "fvect.h" |
16 |
– |
|
14 |
|
#include "ambient.h" |
15 |
|
|
16 |
|
|
23 |
|
#define badvec(v) (badflt((v)[0]) || badflt((v)[1]) || badflt((v)[2])) |
24 |
|
|
25 |
|
|
29 |
– |
extern double getflt(); |
30 |
– |
extern long getint(); |
26 |
|
|
27 |
< |
|
27 |
> |
void |
28 |
|
putambmagic(fp) /* write out ambient value magic number */ |
29 |
|
FILE *fp; |
30 |
|
{ |
32 |
|
} |
33 |
|
|
34 |
|
|
35 |
+ |
int |
36 |
|
hasambmagic(fp) /* read in and check validity of magic # */ |
37 |
|
FILE *fp; |
38 |
|
{ |
45 |
|
} |
46 |
|
|
47 |
|
|
48 |
+ |
int |
49 |
|
writambval(av, fp) /* write ambient value to stream */ |
50 |
|
register AMBVAL *av; |
51 |
|
FILE *fp; |
91 |
|
} |
92 |
|
|
93 |
|
|
94 |
+ |
int |
95 |
|
readambval(av, fp) /* read ambient value from stream */ |
96 |
|
register AMBVAL *av; |
97 |
|
FILE *fp; |