w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

sldtoppm.c
Go to the documentation of this file.
1 /*
2 
3  Convert an AutoCAD slide (.sld) file to PPM format
4 
5  An AutoCAD slide is a compressed sequence of vectors and filled
6  polygons. The ppmdraw package is used to scan convert these
7  geometrical objects into a portable pixmap.
8 
9  Author:
10  John Walker
11  Autodesk SA
12  Avenue des Champs-Montants 14b
13  CH-2074 MARIN
14  Switzerland
15  Usenet: kelvin@Autodesk.com
16  Fax: 038/33 88 15
17  Voice: 038/33 76 33
18 
19  Permission to use, copy, modify, and distribute this software and
20  its documentation for any purpose and without fee is hereby
21  granted, without any conditions or restrictions. This software is
22  provided "as is" without express or implied warranty.
23 
24 */
25 
26 #include "ppm.h"
27 #include "ppmdraw.h"
28 #ifdef DEBUG
29 #include <assert.h>
30 #else
31 #define assert(x)
32 #endif
33 
34 /* Define a variable type accepting numbers -127 <= n <= 127. But note
35  that we still expect it to act UNSIGNED. */
36 
37 #define smallint unsigned char /* Small integers */
38 
39 #define TRUE 1
40 #define FALSE 0
41 
42 #define EOS '\0'
43 
44 /* Screen point */
45 
46 struct spoint {
47  int x, y;
48 };
49 
50 /* Screen polygon */
51 
52 struct spolygon {
53  int npoints, /* Number of points in polygon */
54  fill; /* Fill type */
55  struct spoint pt[11]; /* Actual points */
56 };
57 
58 /* Screen vector */
59 
60 struct svector {
61  struct spoint f; /* From point */
62  struct spoint t; /* To point */
63 };
64 
65 static int extend ARGS((smallint ch));
66 static int sli ARGS((void));
67 static int slib ARGS((void));
68 static void vscale ARGS((int *px, int *py));
69 static void slider ARGS((void (*slvec) ARGS((struct svector *vec, int colour)),
70  void (*slflood) ARGS((struct spolygon *poly, int colour)) ));
71 static void slidefind ARGS((char *sname, int dironly, int ucasen));
72 static void draw ARGS((struct svector *vec, int colour));
73 static void flood ARGS((struct spolygon *poly, int colour));
74 
75 static int ixdots, iydots; /* Screen size in dots */
76 static FILE *slfile; /* Slide file descriptor */
77 static int blither = FALSE; /* Dump slide file information ? */
78 static int info = FALSE; /* Print header information */
79 static pixel **pixels; /* Pixel map */
80 static int pixcols, pixrows; /* Pixel map size */
81 #define pixmaxval 255 /* Largest pixel value */
82 static double uscale = -1; /* Uniform scale factor */
83 static int sxsize = -1, sysize = -1; /* Scale to X, Y size ? */
84 
85 #include "autocad.h" /* AutoCAD standard colour assignments */
86 
87 /* Local variables */
88 
89 struct slhead {
90  char slh[17]; /* Primate-readable header */
91  char sntype; /* Machine type (for number compat) */
92  char slevel; /* Format type */
93  short sxdots, sydots; /* Display X, Y dots */
94  double sdsar; /* Display aspect ratio */
95  short shwfill; /* Display hardware fill type */
96  char spad; /* Pad to even byte length */
97 };
98 
99 static int adjust = FALSE; /* Adjust to correct aspect ratio ? */
100 static struct slhead slfrof; /* Slide file header */
101 static long xfac, yfac; /* Aspect ratio scale factors */
102 
103 static int sdrawkcab; /* Slide drawing kinematic conversion of
104  ass-backwards data flag */
105 
106 /* EXTEND -- Turn a smallint into an int with sign extension, whether
107  or not that happens automatically. */
108 
109 static int extend(smallint ch)
110 {
111  return ((int) ((ch & 0x80) ? (ch | ~0xFF) : ch));
112 }
113 
114 /* SLI -- Input word from slide file */
115 
116 static int sli()
117 {
118  short wd;
119 
120  if (fread(&wd, sizeof wd, 1, slfile) != 1) {
121  pm_error("error reading slide file");
122  } else {
123  if (sdrawkcab) {
124  wd = ((wd >> 8) & 0xFF) | (wd << 8);
125  }
126  }
127  return wd;
128 }
129 
130 /* SLIB -- Input byte from slide file */
131 
132 static int slib()
133 {
134  smallint ch = 0;
135 
136  if (fread(&ch, sizeof ch, 1, slfile) != 1) {
137  pm_error("error reading slide file");
138  }
139  return extend(ch);
140 }
141 
142 /* VSCALE -- scale screen coordinates for mismatched display. */
143 
144 static void vscale(px, py)
145  int *px, *py;
146 {
147  *px = (((unsigned) *px) * xfac) >> 16;
148  *py = (((unsigned) *py) * yfac) >> 16;
149 }
150 
151 /* SLIDER -- Read slide file. This is called with the name of the
152  file to be read and function pointers to the routines
153  which process vectors and polygon fill requests
154  respectively.
155 */
156 
157 static void slider(slvec, slflood)
158  void (*slvec) ARGS((struct svector *vec, int colour));
159  void (*slflood) ARGS((struct spolygon *poly, int colour));
160 {
161  int i, rescale;
162  unsigned char ubfr[4]; /* Utility character buffer */
163  int lx, ly; /* Last x and y point */
164  int slx, sly; /* Last x and y scaled screen point */
165  struct svector vec; /* Screen vector */
166  struct spolygon poly; /* Screen polygon */
167  unsigned short cw; /* Control word */
168  double dsar; /* Screen aspect ratio */
169  long ldsar; /* Scaled long DSAR */
170  short rtest; /* Value to test byte reversal */
171  short btest = 0x1234; /* Value to test byte-reversal */
172  static struct slhead slhi = /* Master slide header sample */
173  {"AutoCAD Slide\r\n\32", 86,2, 0,0, 0.0, 0};
174  int curcolour = 7; /* Current vector colour */
175  pixel rgbcolour; /* Pixel used to clear pixmap */
176 
177  lx = ly = 32000;
178 
179  /* Process the header of the slide file. */
180 
181  sdrawkcab = FALSE; /* Initially guess byte order is OK */
182  fread(slfrof.slh, 17, 1, slfile);
183  fread(&slfrof.sntype, sizeof(char), 1, slfile);
184  fread(&slfrof.slevel, sizeof(char), 1, slfile);
185  fread(&slfrof.sxdots, sizeof(short), 1, slfile);
186  fread(&slfrof.sydots, sizeof(short), 1, slfile);
187  fread(ubfr, 4, 1, slfile);
188  fread(&slfrof.shwfill, sizeof(short), 1, slfile);
189  fread(&rtest, sizeof rtest, 1, slfile);
190 
191  /* Verify that slide format is compatible with this program. */
192 
193  if (strcmp(slfrof.slh, slhi.slh) != 0) {
194  pm_error("this is not an AutoCAD slide file.");
195  }
196 
197  /* Verify that the number format and file level in the header are
198  compatible. All slides written by versions of AutoCAD released
199  since September of 1987 are compatible with this format. */
200 
201  if ((slfrof.sntype != slhi.sntype) || (slfrof.slevel != slhi.slevel)) {
202  pm_error("incompatible slide file format");
203  }
204 
205  /* Build SDSAR value from long scaled version. */
206 
207  ldsar = 0L;
208  for (i = 3; i >= 0; i--) {
209  ldsar = (ldsar << 8) | ubfr[i];
210  }
211  slfrof.sdsar = ((double) ldsar) / 1E7;
212 
213  /* Examine the byte order test value. If it's backwards, set the
214  byte-reversal flag and correct all of the values we've read in
215  so far. */
216 
217  if (btest != rtest) {
218  sdrawkcab = TRUE;
219 #define rshort(x) x = ((x >> 8) & 0xFF) | (x << 8)
223 #undef rshort
224  }
225 
226  /* Dump the header if we're blithering. */
227 
228  if (blither || info) {
229  pm_message("Slide file type %d, level %d, hwfill type %d.",
231  pm_message("Original screen size %dx%d, aspect ratio %.3f.",
232  slfrof.sxdots + 1, slfrof.sydots + 1, slfrof.sdsar);
233  pm_message("Byte order is %s.",
234  sdrawkcab ? "being reversed" : "the same");
235  }
236 
237  /* If the display aspect ratio indicates that the pixels on the
238  sending screen were not square, adjust the size of the
239  generated bitmap to correct the aspect ratio to square the
240  pixels.
241 
242  We always correct the aspect ratio by adjusting the width of
243  the image. This guarantees that output from the SHADE command,
244  which is essentially scan-line data written in vector form,
245  will not be corrupted. */
246 
247  dsar = ((double) slfrof.sxdots) / slfrof.sydots;
248  if (abs(slfrof.sdsar - dsar) > 0.0001) {
249  if (adjust) {
250  ixdots = slfrof.sxdots * (slfrof.sdsar / dsar) + 0.5;
251  iydots = slfrof.sydots;
252  dsar = ((double) ixdots) / iydots;
253  } else {
254  pm_message("Warning - pixels on source screen were non-square.");
255  pm_message(" Specifying -adjust will correct image width to compensate.");
256  ixdots = slfrof.sxdots;
257  iydots = slfrof.sydots;
258  dsar = slfrof.sdsar;
259  }
260  } else {
261  /* Source pixels were square. */
262  ixdots = slfrof.sxdots;
263  iydots = slfrof.sydots;
264  dsar = slfrof.sdsar;
265  adjust = FALSE; /* Mark no adjustment needed */
266  }
267 
268  /* If there's a uniform scale factor specified, apply it. */
269 
270  if (uscale > 0) {
271  ixdots = (ixdots * uscale) + 0.5;
272  iydots = (iydots * uscale) + 0.5;
273  }
274 
275  /* If the image is to be stretched to a given width, set the
276  output image sizes accordingly. If only a height or width is
277  given, scale the other direction proportionally to preserve the
278  aspect ratio. */
279 
280  if (sxsize > 0) {
281  if (sysize > 0) {
282  iydots = sysize - 1;
283  } else {
284  iydots = ((((long) iydots) * (sxsize - 1)) +
285  (iydots / 2)) / ixdots;
286  }
287  ixdots = sxsize - 1;
288  } else if (sysize > 0) {
289  if (sxsize > 0) {
290  ixdots = sxsize - 1;
291  } else {
292  ixdots = ((((long) ixdots) * (sysize - 1)) +
293  (ixdots / 2)) / iydots;
294  }
295  iydots = sysize - 1;
296  }
297 
298  if (adjust) {
299  pm_message(
300  "Resized from %dx%d to %dx%d to correct pixel aspect ratio.",
301  slfrof.sxdots + 1, slfrof.sydots + 1, ixdots + 1, iydots + 1);
302  }
303 
304  /* Allocate image buffer and clear it to black. */
305 
307  PPM_ASSIGN(rgbcolour, 0, 0, 0);
310  (char *) &rgbcolour);
311 
312  if ((rescale = slfrof.sxdots != ixdots ||
313  slfrof.sydots != iydots ||
314  slfrof.sdsar != dsar) != 0) {
315 
316  /* Rescale all coords. so they'll look (more or less)
317  right on this display. */
318 
319  xfac = (ixdots + 1) * 0x10000L;
320  xfac /= (long) (slfrof.sxdots + 1);
321  yfac = (iydots + 1) * 0x10000L;
322  yfac /= (long) (slfrof.sydots + 1);
323  if (dsar < slfrof.sdsar) {
324  yfac = yfac * dsar / slfrof.sdsar;
325  } else {
326  xfac = xfac * slfrof.sdsar / dsar;
327  }
328  }
329 
330  poly.npoints = 0; /* No flood in progress. */
331 
332  while ((cw = sli()) != 0xFC00) {
333  switch (cw & 0xFF00) {
334  case 0xFB00: /* Short vector compressed */
335  vec.f.x = lx + extend(cw & 0xFF);
336  vec.f.y = ly + slib();
337  vec.t.x = lx + slib();
338  vec.t.y = ly + slib();
339  lx = vec.f.x;
340  ly = vec.f.y;
341  if (rescale) {
342  vscale(&vec.f.x, &vec.f.y);
343  vscale(&vec.t.x, &vec.t.y);
344  }
345  (*slvec)(&vec, curcolour);/* Draw vector on screen */
346  slx = vec.f.x; /* Save scaled point */
347  sly = vec.f.y;
348  break;
349 
350  case 0xFC00: /* End of file */
351  break;
352 
353  case 0xFD00: /* Flood command */
354  vec.f.x = sli();
355  vec.f.y = sli();
356  if ((int) vec.f.y < 0) { /* start or end */
357  if (poly.npoints != 0) { /* end? */
358  if (poly.npoints > 2 && poly.npoints < 11) {
359  (*slflood)(&poly, curcolour);
360  } else {
361  pm_error("Bad polygon vertex count (%d)",
362  poly.npoints);
363  }
364  poly.npoints = 0;
365  } else {
366  poly.fill = -vec.f.y; /* Start */
367  }
368  } else { /* Polygon vertex */
369  if (poly.npoints < 10) {
370  if (rescale) {
371  vscale(&vec.f.x, &vec.f.y);
372  }
373  poly.pt[poly.npoints].x = vec.f.x;
374  poly.pt[poly.npoints].y = vec.f.y;
375  }
376  poly.npoints++;
377  }
378  break;
379 
380  case 0xFE00: /* Common endpoint compressed */
381  vec.f.x = lx + extend(cw & 0xFF);
382  vec.f.y = ly + slib();
383  lx = vec.f.x;
384  ly = vec.f.y;
385  vec.t.x = slx;
386  vec.t.y = sly;
387  if (rescale) {
388  vscale(&vec.f.x, &vec.f.y);
389  }
390  (*slvec)(&vec, curcolour);/* Draw vector */
391  slx = vec.f.x; /* Save scaled point */
392  sly = vec.f.y;
393  break;
394 
395  case 0xFF00: /* Change colour */
396  curcolour = cw & 0xFF;
397  break;
398 
399  default: /* Co-ordinates */
400  lx = vec.f.x = cw;
401  ly = vec.f.y = sli();
402  vec.t.x = sli();
403  vec.t.y = sli();
404  if (rescale) {
405  vscale(&vec.f.x, &vec.f.y);
406  vscale(&vec.t.x, &vec.t.y);
407  }
408  (*slvec)(&vec, curcolour);
409  slx = vec.f.x; /* Save scaled point */
410  sly = vec.f.y;
411  break;
412  }
413  }
414 }
415 
416 /* SLIDEFIND -- Find a slide in a library or, if DIRONLY is
417  nonzero, print a directory listing of the library.
418  If UCASEN is nonzero, the requested slide name is
419  converted to upper case. */
420 
421 static void slidefind(sname, dironly, ucasen)
422  char *sname;
423  int dironly, ucasen;
424 {
425  char uname[32];
426  unsigned char libent[36];
427  long pos;
428 
429  if (dironly) {
430  pm_message("Slides in library:");
431  } else {
432  int i;
433  char *ip = sname;
434 
435  for (i = 0; i < 31; i++) {
436  char ch = *ip++;
437  if (ch == EOS) {
438  break;
439  }
440  if (ucasen && islower(ch)) {
441  ch = toupper(ch);
442  }
443  uname[i] = ch;
444  }
445  uname[i] = EOS;
446  }
447 
448  /* Read slide library header and verify. */
449 
450  if ((fread(libent, 32, 1, slfile) != 1) ||
451  (strcmp((char *)libent, "AutoCAD Slide Library 1.0\015\012\32") != 0)) {
452  pm_error("not an AutoCAD slide library file.");
453  }
454  pos = 32;
455 
456  /* Search for a slide with the requested name. */
457 
458  while (TRUE) {
459  if ((fread(libent, 36, 1, slfile) != 1) ||
460  (strlen((char *)libent) == 0)) {
461  if (dironly) {
462  return;
463  }
464  pm_error("slide %s not in library.", sname);
465  }
466  pos += 36;
467  if (dironly) {
468  pm_message(" %s", libent);
469  } else if (strcmp((char *)libent, uname) == 0) {
470  long dpos = (((((libent[35] << 8) | libent[34]) << 8) |
471  libent[33]) << 8) | libent[32];
472  if ((slfile == stdin) || (fseek(slfile, dpos, 0) == -1)) {
473  dpos -= pos;
474 
475  while (dpos-- > 0) {
476  (void) getc(slfile);
477  }
478  }
479  break;
480  }
481  }
482 }
483 
484 /* DRAW -- Draw a vector in the given AutoCAD colour. */
485 
486 static void draw(vec, colour)
487  struct svector *vec;
488  int colour;
489 {
491 
492  if (blither) {
493  pm_message("Vector (%d, %d) - (%d, %d) Colour %d",
494  vec->f.x, vec->f.y, vec->t.x, vec->t.y, colour);
495  }
496  assert(vec->f.x >= 0 && vec->f.x < pixcols);
497  assert(vec->f.y >= 0 && vec->f.y < pixrows);
498  assert(vec->t.x >= 0 && vec->t.x < pixcols);
499  assert(vec->t.y >= 0 && vec->t.y < pixrows);
501  acadcol[colour][0], acadcol[colour][1], acadcol[colour][2]);
503  vec->f.x, iydots - vec->f.y, vec->t.x, iydots - vec->t.y,
505  (char *) &rgbcolour);
506 }
507 
508 /* FLOOD -- Draw a filled polygon. */
509 
510 static void flood(poly, colour)
511  struct spolygon *poly;
512  int colour;
513 {
514  int i;
515  char *handle = ppmd_fill_init();
517 
518  if (blither) {
519  pm_message("Polygon: %d points, fill type %d, colour %d",
520  poly->npoints, poly->fill, colour);
521  for (i = 0; i < poly->npoints; i++) {
522  pm_message(" Point %d: (%d, %d)", i + 1,
523  poly->pt[i].x, poly->pt[i].y);
524  }
525  }
526 
528  acadcol[colour][0], acadcol[colour][1], acadcol[colour][2]);
529  for (i = 0; i < poly->npoints; i++) {
530  assert(poly->pt[i].x >= 0 && poly->pt[i].x < pixcols);
531  assert(poly->pt[i].y >= 0 && poly->pt[i].y < pixrows);
533  poly->pt[i].x, iydots - poly->pt[i].y,
534  poly->pt[(i + 1) % poly->npoints].x,
535  iydots - poly->pt[(i + 1) % poly->npoints].y,
536  ppmd_fill_drawproc, handle);
537  }
539  handle, PPMD_NULLDRAWPROC, (char *) &rgbcolour);
540 }
541 
542 /* Main program. */
543 
545  int argc;
546  char *argv[];
547 {
548  int argn;
549  char *usage = "[-verbose] [-info] [-adjust] [-scale <s>]\n\
550  [-dir] [-lib|-Lib <name>]\n\
551  [-xsize|-width <x>] [-ysize|-height <y>] [sldfile]";
552  int scalespec = FALSE, widspec = FALSE, hgtspec = FALSE, dironly = FALSE,
553  ucasen;
554  char *slobber = (char *) 0; /* Slide library item */
555 
556 
557  ppm_init(&argc, argv);
558  argn = 1;
559 
560  while (argn < argc && argv[argn][0] == '-' && argv[argn][1] != '\0') {
561  if (pm_keymatch(argv[argn], "-verbose", 2)) {
562  blither = TRUE;
563  } else if (pm_keymatch(argv[argn], "-adjust", 2)) {
564  adjust = TRUE;
565  } else if (pm_keymatch(argv[argn], "-dir", 2)) {
566  dironly = TRUE;
567  } else if (pm_keymatch(argv[argn], "-info", 2)) {
568  info = TRUE;
569  } else if (pm_keymatch(argv[argn], "-lib", 2)) {
570  if (slobber != (char *) 0) {
571  pm_error("already specified a library item");
572  }
573  ucasen = argv[argn][1] != 'L';
574  argn++;
575  if (argn == argc) {
576  pm_usage(usage);
577  }
578  slobber = argv[argn];
579  } else if (pm_keymatch(argv[argn], "-scale", 2)) {
580  if (scalespec) {
581  pm_error("already specified a scale factor");
582  }
583  argn++;
584  if ((argn == argc) || (sscanf(argv[argn], "%lf", &uscale) != 1))
585  pm_usage(usage);
586  if (uscale <= 0.0) {
587  pm_error("scale factor must be greater than 0");
588  }
589  scalespec = TRUE;
590  } else if (pm_keymatch(argv[argn], "-xsize", 2) ||
591  pm_keymatch(argv[argn], "-width", 2)) {
592  if (widspec) {
593  pm_error("already specified a width/xsize");
594  }
595  argn++;
596  if ((argn == argc) || (sscanf(argv[argn], "%d", &sxsize) != 1))
597  pm_usage(usage);
598  widspec = TRUE;
599  } else if (pm_keymatch(argv[argn], "-ysize", 2) ||
600  pm_keymatch(argv[argn], "-height", 2)) {
601  if (hgtspec) {
602  pm_error("already specified a height/ysize");
603  }
604  argn++;
605  if ((argn == argc) || (sscanf(argv[argn], "%d", &sysize) != 1))
606  pm_usage(usage);
607  hgtspec = TRUE;
608  } else {
609  pm_usage(usage);
610  }
611  argn++;
612  }
613 
614  /* If a file name is specified, open it. Otherwise read from
615  standard input. */
616 
617  if (argn < argc) {
618  slfile = pm_openr(argv[argn]);
619  argn++;
620  } else {
621  slfile = stdin;
622  }
623 
624  if (argn != argc) { /* Extra bogus arguments ? */
625  pm_usage(usage);
626  }
627 
628  /* If we're extracting an item from a slide library, position the
629  input stream to the start of the chosen slide. */
630 
631  if (dironly || (slobber != (char *) 0)) {
632  slidefind(slobber, dironly, ucasen);
633  }
634 
635  if (!dironly) {
636  slider(draw, flood);
638  }
639  pm_close(slfile);
640  pm_close(stdout);
641  exit(0);
642 }
static unsigned char acadcol[256][3]
Definition: autocad.h:8
#define fread
Definition: xxstdio.h:25
#define fseek
Definition: xxstdio.h:30
int strcmp()
Definition: coll.cpp:143
int sscanf()
int pixels
Definition: dvipng.h:106
static void
Definition: fpif.c:118
static char usage[]
Definition: giftopnm.c:59
small capitals from c petite p scientific i
Definition: afcover.h:80
FT_Vector * vec
Definition: ftbbox.c:469
void exit()
#define getc
Definition: line.c:39
const int * pos
Definition: combiners.h:905
void pm_usage(char *usage)
Definition: libpbm1.c:343
FILE * pm_openr(char *name)
Definition: libpbm1.c:600
#define abs(a)
Definition: pbmplus.h:225
#define ARGS(alist)
Definition: pbmplus.h:235
#define pm_error
Definition: png22pnm.c:118
#define pm_keymatch(stra, strb, _x)
Definition: png22pnm.c:121
#define pm_close(file)
Definition: png22pnm.c:120
#define pm_message
Definition: png22pnm.c:116
void ppm_init(int *argcP, argv)
Definition: libppm1.c:21
void ppm_writeppm(FILE *file, pixel **pixels, int cols, int rows, pixval maxval, int forceplain)
Definition: libppm2.c:148
void ppmd_line(pixel **pixels, int cols, int rows, pixval maxval, int x0, int y0, int x1, int y1, void *drawprocP, char *clientdata)
Definition: libppm5.c:121
char * ppmd_fill_init()
Definition: libppm5.c:435
void ppmd_filledrectangle(pixel **pixels, int cols, int rows, pixval maxval, int x, int y, int width, int height, void *drawprocP, char *clientdata)
Definition: libppm5.c:47
void ppmd_fill(pixel **pixels, int cols, int rows, pixval maxval, char *fillhandle, void *drawprocP, char *clientdata)
Definition: libppm5.c:573
void ppmd_fill_drawproc(pixel **pixels, int cols, int rows, pixval maxval, int x, int y, char *clientdata)
Definition: libppm5.c:460
#define PPM_ASSIGN(p, red, grn, blu)
Definition: ppm.h:46
#define ppm_allocarray(cols, rows)
Definition: ppm.h:71
#define PPMD_NULLDRAWPROC
Definition: ppmdraw.h:26
static pixel rgbcolour
Definition: ppmlabel.c:27
type_C toupper(type_C)
#define islower(ch)
Definition: utype.h:79
#define pixmaxval
Definition: sldtoppm.c:81
static pixel ** pixels
Definition: sldtoppm.c:79
static int info
Definition: sldtoppm.c:78
static long yfac
Definition: sldtoppm.c:101
static int slib()
Definition: sldtoppm.c:132
static void slidefind()
static FILE * slfile
Definition: sldtoppm.c:76
static void draw()
static void flood()
static long xfac
Definition: sldtoppm.c:101
static struct slhead slfrof
Definition: sldtoppm.c:100
static int sxsize
Definition: sldtoppm.c:83
static int pixrows
Definition: sldtoppm.c:80
static int iydots
Definition: sldtoppm.c:75
static int extend()
#define TRUE
Definition: sldtoppm.c:39
#define FALSE
Definition: sldtoppm.c:40
static double uscale
Definition: sldtoppm.c:82
#define EOS
Definition: sldtoppm.c:42
static int blither
Definition: sldtoppm.c:77
static void slider()
static void vscale()
static int sdrawkcab
Definition: sldtoppm.c:103
static int sysize
Definition: sldtoppm.c:83
static int sli()
Definition: sldtoppm.c:116
#define rshort(x)
#define smallint
Definition: sldtoppm.c:37
static int adjust
Definition: sldtoppm.c:99
static int ixdots
Definition: sldtoppm.c:75
#define assert(x)
Definition: sldtoppm.c:31
int main(int argc, argv)
Definition: sldtoppm.c:544
static int pixcols
Definition: sldtoppm.c:80
FT_Pos x
Definition: ftimage.h:77
FT_Pos y
Definition: ftimage.h:78
Definition: ppm.h:33
double sdsar
Definition: sldtoppm.c:94
char sntype
Definition: sldtoppm.c:91
char spad
Definition: sldtoppm.c:96
short sydots
Definition: sldtoppm.c:93
char slh[17]
Definition: sldtoppm.c:90
short sxdots
Definition: sldtoppm.c:93
char slevel
Definition: sldtoppm.c:92
short shwfill
Definition: sldtoppm.c:95
int y
Definition: sldtoppm.c:47
int x
Definition: sldtoppm.c:47
struct spoint pt[11]
Definition: sldtoppm.c:55
int npoints
Definition: sldtoppm.c:53
int fill
Definition: sldtoppm.c:54
struct spoint f
Definition: sldtoppm.c:61
Definition: dvips.h:235
#define FILE
Definition: t1stdio.h:34
ch
Definition: t4ht.c:1443
*job_name strlen((char *) job_name) - 4)
#define ip
Definition: stack.c:14
@ L
Definition: ubidiimp.h:45
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269
#define argn