18 |
|
|
19 |
|
#include "paths.h" |
20 |
|
|
21 |
< |
#ifndef SSS |
22 |
< |
#define SSS 3 /* super-sample size */ |
21 |
> |
#ifndef SSS |
22 |
> |
#define SSS 3 /* super-sample size */ |
23 |
|
#endif |
24 |
|
|
25 |
< |
#define MAXLINE 512 /* longest allowable line */ |
25 |
> |
#define MAXLINE 512 /* longest allowable line */ |
26 |
|
|
27 |
|
char *fontfile = "helvet.fnt"; /* our font file */ |
28 |
|
|
32 |
|
int direct = 'r'; /* direction (right, up, left, down) */ |
33 |
|
|
34 |
|
int cheight = 32*SSS; /* character height */ |
35 |
< |
double aspect = 1.67; /* height/width character aspect */ |
36 |
< |
double spacing = 0.0; /* character spacing */ |
35 |
> |
double aspect = 1.67; /* height/width character aspect */ |
36 |
> |
double spacing = 0.0; /* character spacing */ |
37 |
|
int cwidth; /* computed character width */ |
38 |
|
|
39 |
|
unsigned char *ourbitmap; /* our output bitmap */ |
40 |
|
int xsiz, ysiz; /* bitmap dimensions */ |
41 |
|
int xdim; /* size of horizontal scan (bytes) */ |
42 |
|
|
43 |
< |
#define bitop(x,y,op) (ourbitmap[(y)*xdim+((x)>>3)] op (1<<((x)&7))) |
44 |
< |
#define tstbit(x,y) bitop(x,y,&) |
45 |
< |
#define setbit(x,y) bitop(x,y,|=) |
46 |
< |
#define clrbit(x,y) bitop(x,y,&=~) |
47 |
< |
#define tglbit(x,y) bitop(x,y,^=) |
43 |
> |
#define bitop(x,y,op) (ourbitmap[(y)*xdim+((x)>>3)] op (1<<((x)&7))) |
44 |
> |
#define tstbit(x,y) bitop(x,y,&) |
45 |
> |
#define setbit(x,y) bitop(x,y,|=) |
46 |
> |
#define clrbit(x,y) bitop(x,y,&=~) |
47 |
> |
#define tglbit(x,y) bitop(x,y,^=) |
48 |
|
|
49 |
|
FONT *ourfont; /* our font */ |
50 |
|
|
66 |
|
char *argv[]; |
67 |
|
{ |
68 |
|
int an; |
69 |
< |
|
69 |
> |
#ifdef MSDOS |
70 |
> |
setmode(fileno(stdout), O_BINARY); |
71 |
> |
#endif |
72 |
|
for (an = 1; an < argc && argv[an][0] == '-'; an++) |
73 |
|
switch (argv[an][1]) { |
74 |
|
case 'c': /* color */ |
152 |
|
|
153 |
|
makemap() /* create the bit map */ |
154 |
|
{ |
155 |
< |
double pictaspect; |
155 |
> |
double pictaspect; |
156 |
|
|
157 |
|
if (direct == 'r' || direct == 'l') { |
158 |
|
if (xsiz <= 0) { |
403 |
|
{ |
404 |
|
COLR pixval[SSS*SSS+1]; /* possible pixel values */ |
405 |
|
COLOR ctmp0, ctmp1; |
406 |
< |
double d; |
406 |
> |
double d; |
407 |
|
COLR *scanout; |
408 |
|
int x, y; |
409 |
|
register int i, j; |