13 |
|
#include "standard.h" |
14 |
|
#include "view.h" |
15 |
|
#include "resolu.h" |
16 |
+ |
#include "vfork.h" |
17 |
|
#include <signal.h> |
18 |
|
#include <X11/Xlib.h> |
19 |
|
#include <X11/Xutil.h> |
20 |
|
|
20 |
– |
#ifndef BSD |
21 |
– |
#define vfork fork |
22 |
– |
#endif |
23 |
– |
|
21 |
|
#define XIM "ximage" |
22 |
|
|
23 |
|
#define NSEG 30 /* number of segments per circle */ |
44 |
|
int argc; |
45 |
|
char *argv[]; |
46 |
|
{ |
50 |
– |
extern double atof(); |
47 |
|
char *windowname = NULL; |
48 |
|
FILE *fp; |
49 |
|
|
105 |
|
/* find our window */ |
106 |
|
if (wname == NULL) |
107 |
|
wname = pname; |
108 |
< |
gwind = xfindwind(theDisplay, rwind, wname, 2); |
108 |
> |
gwind = xfindwind(theDisplay, rwind, wname, 4); |
109 |
|
if (gwind == None) { |
110 |
|
if (wname != pname) { |
111 |
|
fprintf(stderr, "%s: cannot find \"%s\" window\n", |
114 |
|
} |
115 |
|
/* start ximage */ |
116 |
|
if (vfork() == 0) { |
117 |
< |
execlp(XIM, XIM, pname, 0); |
117 |
> |
execlp(XIM, XIM, "-c", "256", pname, 0); |
118 |
|
perror(XIM); |
119 |
|
fprintf(stderr, "%s: cannot start %s\n", |
120 |
|
progname, XIM); |
123 |
|
} |
124 |
|
do |
125 |
|
sleep(8); |
126 |
< |
while ((gwind=xfindwind(theDisplay,rwind,pname,2)) == None); |
126 |
> |
while ((gwind=xfindwind(theDisplay,rwind,pname,4)) == None); |
127 |
|
} else |
128 |
|
XMapRaised(theDisplay, gwind); |
129 |
|
do { |