| 10 |
|
#include "standard.h" |
| 11 |
|
|
| 12 |
|
#include "octree.h" |
| 13 |
– |
|
| 13 |
|
#include "object.h" |
| 14 |
+ |
#include "oconv.h" |
| 15 |
|
|
| 16 |
– |
static int oputint(), oputstr(), puttree(); |
| 16 |
|
|
| 17 |
+ |
static void oputstr(char *s); |
| 18 |
+ |
static void putfullnode(OCTREE fn); |
| 19 |
+ |
static void oputint(long i, int siz); |
| 20 |
+ |
static void oputflt(double f); |
| 21 |
+ |
static void puttree(OCTREE ot); |
| 22 |
|
|
| 23 |
< |
writeoct(store, scene, ofn) /* write octree structures to stdout */ |
| 24 |
< |
int store; |
| 25 |
< |
CUBE *scene; |
| 26 |
< |
char *ofn[]; |
| 23 |
> |
|
| 24 |
> |
void |
| 25 |
> |
writeoct( /* write octree structures to stdout */ |
| 26 |
> |
int store, |
| 27 |
> |
CUBE *scene, |
| 28 |
> |
char *ofn[] |
| 29 |
> |
) |
| 30 |
|
{ |
| 31 |
|
char sbuf[64]; |
| 32 |
|
int i; |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
|
| 65 |
< |
static |
| 66 |
< |
oputstr(s) /* write null-terminated string to stdout */ |
| 67 |
< |
register char *s; |
| 65 |
> |
static void |
| 66 |
> |
oputstr( /* write null-terminated string to stdout */ |
| 67 |
> |
register char *s |
| 68 |
> |
) |
| 69 |
|
{ |
| 70 |
|
putstr(s, stdout); |
| 71 |
|
if (ferror(stdout)) |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
|
| 76 |
< |
static |
| 77 |
< |
putfullnode(fn) /* write out a full node */ |
| 78 |
< |
OCTREE fn; |
| 76 |
> |
static void |
| 77 |
> |
putfullnode( /* write out a full node */ |
| 78 |
> |
OCTREE fn |
| 79 |
> |
) |
| 80 |
|
{ |
| 81 |
|
OBJECT oset[MAXSET+1]; |
| 82 |
|
register int i; |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
|
| 90 |
< |
static |
| 91 |
< |
oputint(i, siz) /* write a siz-byte integer to stdout */ |
| 92 |
< |
register long i; |
| 93 |
< |
register int siz; |
| 90 |
> |
static void |
| 91 |
> |
oputint( /* write a siz-byte integer to stdout */ |
| 92 |
> |
register long i, |
| 93 |
> |
register int siz |
| 94 |
> |
) |
| 95 |
|
{ |
| 96 |
|
putint(i, siz, stdout); |
| 97 |
|
if (ferror(stdout)) |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
|
| 102 |
< |
static |
| 103 |
< |
oputflt(f) /* put out floating point number */ |
| 104 |
< |
double f; |
| 102 |
> |
static void |
| 103 |
> |
oputflt( /* put out floating point number */ |
| 104 |
> |
double f |
| 105 |
> |
) |
| 106 |
|
{ |
| 107 |
|
putflt(f, stdout); |
| 108 |
|
if (ferror(stdout)) |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
|
| 113 |
< |
static |
| 114 |
< |
puttree(ot) /* write octree to stdout in pre-order form */ |
| 115 |
< |
register OCTREE ot; |
| 113 |
> |
static void |
| 114 |
> |
puttree( /* write octree to stdout in pre-order form */ |
| 115 |
> |
register OCTREE ot |
| 116 |
> |
) |
| 117 |
|
{ |
| 118 |
|
register int i; |
| 119 |
|
|