28 |
|
disp_open(dname) /* open the named display driver */ |
29 |
|
char *dname; |
30 |
|
{ |
31 |
< |
char buf[128], fd0[8], fd1[8], *cmd[5], *ofn; |
32 |
< |
int i, n; |
31 |
> |
char buf[128], fd0[8], fd1[8], *cmd[5], *sfn; |
32 |
> |
int i, n, len; |
33 |
|
/* get full display program name */ |
34 |
|
#ifdef DEVPATH |
35 |
|
sprintf(buf, "%s/%s%s", DEVPATH, dname, HDSUF); |
68 |
|
/* write out hologram grids & octrees */ |
69 |
|
for (i = 0; hdlist[i] != NULL; i++) { |
70 |
|
bcopy((char *)hdlist[i], buf, sizeof(HDGRID)); |
71 |
< |
n = vdef(OSECTION); |
72 |
< |
ofn = i<n ? nvalue(OSECTION,i) : |
73 |
< |
n ? nvalue(OSECTION,n-1) : vval(OCTREE); |
74 |
< |
strcpy(buf+sizeof(HDGRID), ofn); |
75 |
< |
disp_result(DS_ADDHOLO, sizeof(HDGRID)+1+strlen(ofn), buf); |
71 |
> |
len = sizeof(HDGRID); |
72 |
> |
n = vdef(GEOMETRY); |
73 |
> |
sfn = i<n ? nvalue(GEOMETRY,i) : |
74 |
> |
n ? nvalue(GEOMETRY,n-1) : vval(OCTREE); |
75 |
> |
strcpy(buf+len, sfn); |
76 |
> |
len += strlen(sfn) + 1; |
77 |
> |
n = vdef(PORTS); |
78 |
> |
sfn = i<n ? nvalue(PORTS,i) : n ? nvalue(PORTS,n-1) : ""; |
79 |
> |
strcpy(buf+len, sfn); |
80 |
> |
len += strlen(sfn) + 1; |
81 |
> |
disp_result(DS_ADDHOLO, len, buf); |
82 |
|
} |
83 |
|
disp_flush(); |
84 |
|
} |