1 |
|
#ifndef lint |
2 |
< |
static const char RCSid[] = "$Id$"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
4 |
|
/* |
5 |
|
* Make illum sources for optimizing rendering process |
6 |
|
*/ |
7 |
|
|
8 |
– |
#include "mkillum.h" |
9 |
– |
|
8 |
|
#include <signal.h> |
11 |
– |
|
9 |
|
#include <ctype.h> |
10 |
+ |
#include <stdio.h> |
11 |
|
|
12 |
+ |
#include "standard.h" |
13 |
+ |
#include "platform.h" |
14 |
+ |
#include "mkillum.h" |
15 |
+ |
|
16 |
|
/* default parameters */ |
17 |
|
#define SAMPDENS 48 /* points per projected steradian */ |
18 |
|
#define NSAMPS 32 /* samples per point */ |
138 |
|
{ |
139 |
|
int rtstat; |
140 |
|
|
141 |
< |
rtstat = close_process(rt.pd); |
141 |
> |
rtstat = close_process(&(rt.pd)); |
142 |
|
if (status == 0) |
143 |
|
if (rtstat < 0) |
144 |
|
error(WARNING, |
158 |
|
ofun[OBJ_SPHERE].funp = o_sphere; |
159 |
|
ofun[OBJ_RING].funp = o_ring; |
160 |
|
/* set up signal handling */ |
161 |
+ |
#ifdef SIGPIPE /* not present on Windows */ |
162 |
|
signal(SIGPIPE, quit); |
163 |
+ |
#endif |
164 |
|
/* start rtrace process */ |
165 |
|
errno = 0; |
166 |
< |
maxbytes = open_process(rt.pd, rtargv); |
166 |
> |
maxbytes = open_process(&(rt.pd), rtargv); |
167 |
|
if (maxbytes == 0) { |
168 |
|
eputs(rtargv[0]); |
169 |
|
eputs(": command not found\n"); |
448 |
|
if (fgetword(str, MAXSTR, fp) == NULL) |
449 |
|
goto readerr; |
450 |
|
/* is it an alias? */ |
451 |
< |
if (!strcmp(str, ALIASID)) { |
451 |
> |
if (!strcmp(str, ALIASKEY)) { |
452 |
|
if (fgetword(str, MAXSTR, fp) == NULL) |
453 |
|
goto readerr; |
454 |
< |
printf("\n%s %s %s", thisillum.altmat, ALIASID, str); |
454 |
> |
printf("\n%s %s %s", thisillum.altmat, ALIASKEY, str); |
455 |
|
if (fgetword(str, MAXSTR, fp) == NULL) |
456 |
|
goto readerr; |
457 |
|
printf("\t%s\n", str); |