1 |
– |
/* Copyright (c) 1991 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 |
|
* Display an image and watch the rays get traced. |
6 |
|
* |
9 |
|
|
10 |
|
#include "standard.h" |
11 |
|
#include "view.h" |
15 |
– |
#include "resolu.h" |
12 |
|
#include <X11/Xlib.h> |
13 |
|
|
14 |
|
#define MAXDEPTH 32 /* ridiculous ray tree depth */ |
136 |
|
freetree(tp) /* free a trace tree */ |
137 |
|
struct node *tp; |
138 |
|
{ |
139 |
< |
register struct node *kid; |
139 |
> |
register struct node *kid, *k2; |
140 |
|
|
141 |
< |
for (kid = tp->daughter; kid != NULL; kid = kid->sister) |
141 |
> |
for (kid = tp->daughter; kid != NULL; kid = k2) { |
142 |
> |
k2 = kid->sister; |
143 |
|
freetree(kid); |
144 |
< |
free((char *)tp); |
144 |
> |
} |
145 |
> |
free((void *)tp); |
146 |
|
} |
147 |
|
|
148 |
|
|