68 |
|
devopen(dname) /* open device driver */ |
69 |
|
char *dname; |
70 |
|
{ |
71 |
< |
extern char *progname; |
72 |
< |
char *devargv[3]; |
71 |
> |
extern char *progname, *octname; |
72 |
> |
char *id; |
73 |
|
register int i; |
74 |
+ |
|
75 |
+ |
id = octname!=NULL ? octname : progname; |
76 |
|
/* check device table */ |
77 |
|
for (i = 0; devtable[i].name; i++) |
78 |
|
if (!strcmp(dname, devtable[i].name)) |
79 |
< |
if ((dev = (*devtable[i].init)(progname)) == NULL) { |
79 |
> |
if ((dev = (*devtable[i].init)(dname, id)) == NULL) { |
80 |
|
sprintf(errmsg, "cannot initialize %s", dname); |
81 |
|
error(USER, errmsg); |
82 |
|
} else |
83 |
|
return; |
84 |
|
/* not there, try exec */ |
85 |
< |
devargv[0] = dname; |
84 |
< |
devargv[1] = progname; |
85 |
< |
devargv[2] = NULL; |
86 |
< |
if ((dev = comm_init(devargv)) == NULL) { |
85 |
> |
if ((dev = comm_init(dname, id)) == NULL) { |
86 |
|
sprintf(errmsg, "cannot start device \"%s\"", dname); |
87 |
|
error(USER, errmsg); |
88 |
|
} |
198 |
|
goto commerr; |
199 |
|
getmove(args); |
200 |
|
break; |
201 |
< |
case 'r': /* rotate camera */ |
202 |
< |
if (badcom("rotate")) |
203 |
< |
goto commerr; |
201 |
> |
case 'r': /* rotate/repaint */ |
202 |
> |
if (badcom("rotate")) { |
203 |
> |
if (badcom("repaint")) |
204 |
> |
goto commerr; |
205 |
> |
getrepaint(args); |
206 |
> |
break; |
207 |
> |
} |
208 |
|
getrotate(args); |
209 |
|
break; |
210 |
|
case 'p': /* pivot view */ |