1: /*	fed.h	4.1	83/03/09	*/
   2: /*
   3:  * fed.h: global definitions for font editor.
   4:  */
   5: 
   6: #include <stdio.h>
   7: #include <ctype.h>
   8: #include <vfont.h>
   9: #include <signal.h>
  10: #include <setjmp.h>
  11: 
  12: /* current windows - what's on the screen */
  13: 
  14: #define SCRHI   360     /* number of pixels on the screen */
  15: #define SCRWID  720     /* width in pixels of the screen */
  16: #define NROW    3       /* number of rows of glyphs on the screen */
  17: #define NCOL    7       /* number of cols of glyphs in a row */
  18: #define NWIND   (NROW*NCOL) /* number of windows */
  19: #define GLCOL   100     /* width of a glyph window */
  20: #define GLROW   100     /* height of a glyph window */
  21: #define GLPAD   3       /* number of pixels between windows */
  22: #define WINDSIZE (((GLCOL+7)>>3)*GLROW) /* size in bytes of a window */
  23: #define BASELINE 22     /* number of pixels below baseline in window */
  24: #define SLOPE   (3.5)       /* Amount to slant italic vertical line */
  25:                 /* equal to about 15.94 degrees */
  26:                 /* for 5 degree caligraphy slant use 11.43 */
  27: 
  28: #define ESC '\033'  /* The ASCII escape character */
  29: 
  30: #define abs(x)      ((x) <  0  ? (-(x)) : (x))
  31: #define max(x,y)    ((x) > (y) ?   (x)  : (y))
  32: #define min(x,y)    ((x) < (y) ?   (x)  : (y))
  33: 
  34: typedef char *bitmat;
  35: 
  36: int changes;    /* nonzero if changes since last write */
  37: char    curchar;    /* current character being edited */
  38: int curcurs;    /* 1 if cursor is on now */
  39: int currb;      /* 1 if rubber band lie is on now */
  40: int curs_r, curs_c; /* position in current window of graphics cursor */
  41: int curwind;    /* current open window number */
  42: int curzoom;    /* 1 to 9 - current zoom level of screen */
  43: int editing;    /* in file I/O command, true if editing font */
  44: jmp_buf env;
  45: long    fbase;      /* first loc in font file of bits */
  46: FILE *  fontdes;    /* open for reading, current font */
  47: char    fontfile[100];  /* name of the font file */
  48: int hpensize;   /* size of heavy pen in pixels diameter of dot */
  49: char    msgbuf[100];    /* scratch space to sprintf into for messages */
  50: int nextwind;   /* the next free window to grab */
  51: int oldzoom;    /* the value of curzoom before a message */
  52: int pen_r, pen_c;   /* row/col in current glyph of logical pen */
  53: int pencolor;   /* 0=erase, 1=draw */
  54: int penweight;  /* 0=fine, 1=heavy */
  55: int pointsize;  /* point size of current font */
  56: int QUIET;      /* true if -q flag */
  57: char    stoutbuf[BUFSIZ];   /* for speed */
  58: FILE    *trace;     /* for debugging output */
  59: char    tracebuf[BUFSIZ];   /* for speed */
  60: int und_p_r, und_p_c;   /* pen_r, pen_c for undo */
  61: int und_c_r, und_c_c;   /* curs_r, curs_c for undo */
  62: 
  63: struct  header      FontHeader;
  64: struct  dispatch    disptable[256];
  65: 
  66: struct  cwind   {
  67:     bitmat  val;        /* what we are making it into */
  68:     bitmat  onscreen;   /* what's currently on the screen */
  69:     bitmat  undval;     /* the previous version */
  70:     char    used;       /* the character using this window */
  71: } wind[NROW * NCOL];
  72: 
  73: struct cht {
  74:     int wherewind;  /* >=0: window # on screen, -1: in file, -2: use whereat */
  75:     bitmat  whereat;    /* where it can be found */
  76:     int nrow, ncol; /* size of char */
  77:     int rcent, ccent;   /* bit location of lower left corner of main part of char */
  78: } cht[256];
  79: 
  80: struct place {
  81:     int c, r;
  82: } base[NROW * NCOL];        /* lower left corner of each window */
  83: 
  84: char    penmat[10][10];     /* 0 or 1 as the pen is.  5,5 is center */
  85: float   sqrtmat[10][10];    /* table of sqrt(i**2+j**2) for speed */
  86: 
  87: char    *rdchar();
  88: char    esccmd();
  89: bitmat  newmat();
  90: bitmat  findbits();
  91: int onsig();
  92: int onintr();
  93: float   sqrt();
  94: 
  95: int matcnt[10];

Defined variables

FontHeader defined in line 63; used 12 times
QUIET defined in line 56; used 1 times
base defined in line 82; used 32 times
changes defined in line 36; used 12 times
cht defined in line 78; used 69 times
curchar defined in line 37; used 53 times
curcurs defined in line 38; used 3 times
currb defined in line 39; used 3 times
curs_c defined in line 40; used 21 times
curs_r defined in line 40; used 21 times
curwind defined in line 41; used 61 times
curzoom defined in line 42; used 12 times
disptable defined in line 64; used 88 times
editing defined in line 43; used 6 times
env defined in line 44; used 4 times
fbase defined in line 45; used 4 times
fontfile defined in line 47; used 8 times
hpensize defined in line 48; used 5 times
matcnt defined in line 95; never used
msgbuf defined in line 49; used 71 times
nextwind defined in line 50; used 10 times
oldzoom defined in line 51; used 3 times
pen_c defined in line 52; used 6 times
pen_r defined in line 52; used 6 times
pencolor defined in line 53; used 5 times
penmat defined in line 84; used 4 times
penweight defined in line 54; used 4 times
pointsize defined in line 55; used 5 times
sqrtmat defined in line 85; used 2 times
stoutbuf defined in line 57; used 1 times
tracebuf defined in line 59; used 1 times
und_c_c defined in line 61; used 2 times
und_c_r defined in line 61; used 2 times
und_p_c defined in line 60; used 2 times
und_p_r defined in line 60; used 2 times
wind defined in line 71; used 65 times

Defined struct's

cht defined in line 73; never used
cwind defined in line 66; never used
place defined in line 80; never used

Defined typedef's

bitmat defined in line 34; used 19 times

Defined macros

BASELINE defined in line 23; used 5 times
ESC defined in line 28; used 1 times
GLCOL defined in line 19; used 103 times
GLPAD defined in line 21; used 2 times
GLROW defined in line 20; used 112 times
NCOL defined in line 17; used 6 times
NROW defined in line 16; used 4 times
NWIND defined in line 18; used 3 times
SCRHI defined in line 14; used 3 times
SCRWID defined in line 15; used 2 times
SLOPE defined in line 24; used 1 times
WINDSIZE defined in line 22; used 5 times
abs defined in line 30; used 4 times
max defined in line 31; used 3 times
min defined in line 32; used 4 times

Usage of this include

Last modified: 1983-03-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1776
Valid CSS Valid XHTML 1.0 Strict