7 |
|
|
8 |
|
#include <signal.h> |
9 |
|
#include <ctype.h> |
10 |
– |
#include <stdio.h> |
10 |
|
|
12 |
– |
#include "platform.h" |
11 |
|
#include "mkillum.h" |
12 |
+ |
#include "platform.h" |
13 |
|
|
14 |
|
/* default parameters */ |
15 |
|
#define SAMPDENS 48 /* points per projected steradian */ |
136 |
|
{ |
137 |
|
int rtstat; |
138 |
|
|
139 |
< |
rtstat = close_process(rt.pd); |
140 |
< |
if (status == 0) |
139 |
> |
rtstat = close_process(&(rt.pd)); |
140 |
> |
if (status == 0) { |
141 |
|
if (rtstat < 0) |
142 |
|
error(WARNING, |
143 |
|
"unknown return status from rtrace process"); |
144 |
|
else |
145 |
|
status = rtstat; |
146 |
+ |
} |
147 |
|
exit(status); |
148 |
|
} |
149 |
|
|
157 |
|
ofun[OBJ_SPHERE].funp = o_sphere; |
158 |
|
ofun[OBJ_RING].funp = o_ring; |
159 |
|
/* set up signal handling */ |
160 |
< |
#ifndef _WIN32 /* XXX what do we use instead? */ |
160 |
> |
#ifdef SIGPIPE /* not present on Windows */ |
161 |
|
signal(SIGPIPE, quit); |
162 |
|
#endif |
163 |
|
/* start rtrace process */ |
164 |
|
errno = 0; |
165 |
< |
maxbytes = open_process(rt.pd, rtargv); |
165 |
> |
maxbytes = open_process(&(rt.pd), rtargv); |
166 |
|
if (maxbytes == 0) { |
167 |
|
eputs(rtargv[0]); |
168 |
|
eputs(": command not found\n"); |