79 #define NKEYS (sizeof(keys) / sizeof(keys[0]))
99 while(*arg ==
' ' || *arg ==
'\t')
106 for(name = ++ptr; *ptr && *ptr !=
'"'; ptr++);
108 for(name = ptr; *ptr && *ptr !=
' ' && *ptr !=
'\t'; ptr++);
115 for(i = 0; i <
NKEYS; i++) {
116 value[i] = atof(keys[i].value);
121 buff_add(&buffer,
"@beginspecial ", 0);
128 while(*ptr ==
' ' || *ptr ==
'\t')
133 for(; *ptr && *ptr !=
' ' && *ptr !=
'\t'; ptr++);
147 while(*p && *p !=
'"')
151 _(
"%s: malformed value for key `%s'\n"),
158 for(i = 0; i < NKEYS; i++)
159 if(
STRCEQ(keys[i].name, keyname))
166 if(keys[i].has_arg && val == NULL) {
167 mdvi_warning(
_(
"%s: no argument for key `%s', using defaults\n"),
170 }
else if(!keys[i].has_arg && val) {
172 filename, val, keyname);
176 value[i] = atof(val);
187 buff_add(&buffer,
" @setspecial", 0);
198 hsize = value[
HSIZE];
200 vsize = value[
VSIZE];
202 originx = value[
HOFF];
204 originy = value[
VOFF];
206 hscale = value[
HSCALE] / 100.0;
208 vscale = value[
VSCALE] / 100.0;
209 if(present[
URX] && present[
LLX])
210 hsize = value[
URX] - value[
LLX];
211 if(present[
URY] && present[
LLY])
212 vsize = value[
URY] - value[
LLY];
213 if(present[
RWI] || present[
RHI]) {
214 if(present[
RWI] && !present[RHI])
215 hscale = vscale = value[
RWI] / (10.0 * hsize);
216 else if(present[RHI] && !present[
RWI])
217 hscale = vscale = value[
RHI] / (10.0 * vsize);
219 hscale = value[
RWI] / (10.0 * hsize);
220 vscale = value[
RHI] / (10.0 * vsize);
226 box->
bw = hsize * hscale;
227 box->
bh = vsize * vscale;
263 if (file[0] ==
'/') {
264 if (stat (file, &buf) == 0)
273 int path_len = strlen (dvi->
filename) - strlen (tmp + 1);
274 int file_len = strlen (file);
278 strncat (psfile, dvi->
filename, path_len);
279 strncat (psfile, file, file_len);
281 if (stat (psfile, &buf) == 0) {
292 if (stat (psfile, &buf) == 0) {
301 psfile = kpse_find_pict (file);