home *** CD-ROM | disk | FTP | other *** search
- /*
- * lcat.h -- common definitions for the [lv]cat programs
- * Copyright (C) 1990 Vassilis Prevelakis
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation and included with this distribution in the
- * file named LICENSE.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Bugs fixes, comments etc. to:
- * Vasilis Prevelakis
- * Centre Universitaire d'Informatique (CUI)
- * 12 Rue du Lac, Geneva, Switzerland CH-1207
- * email: vp@cui.unige.ch
- * uucp: ...!mcsun!cui!vp
- */
-
- typedef unsigned char u_char;
-
- #define BASELINE 150
- #define RASTWIDTH 400
- #define NLINES 200
- #ifdef LCAT
- extern u_char raster[NLINES][RASTWIDTH];
- #endif
-
- #define MIN(X, Y) ((X < Y) ? X : Y)
- #define MAX(X, Y) ((X > Y) ? X : Y)
-
- #ifdef UNIX
- #define huge /**/
- #define O_BINARY 0
- char *calloc();
- #endif
-
- static char asctab[128] = {
- /* '\0', /*blank*/
- 'h', /*h*/
- 't', /*t*/
- 'n', /*n*/
- 'm', /*m*/
- 'l', /*l*/
- 'i', /*i*/
- 'z', /*z*/
- 's', /*s*/
- 'd', /*d*/
- 'b', /*b*/
- 'x', /*x*/
- 'f', /*f*/
- 'j', /*j*/
- 'u', /*u*/
- 'k', /*k*/
- '\0', /*blank*/
- 'p', /*p*/
- '\06', /*_ 3/4 em dash*/
- ';', /*;*/
- '\0', /*blank*/
- 'a', /*a*/
- '\05', /*rule*/
- 'c', /*c*/
- '`', /*` open*/
- 'e', /*e*/
- '\'', /*' close*/
- 'o', /*o*/
- '\021', /*1/4*/
- 'r', /*r*/
- '\022', /*1/2*/
- 'v', /*v*/
- '-', /*- hyphen*/
- 'w', /*w*/
- 'q', /*q*/
- '/', /*/*/
- '.', /*.*/
- 'g', /*g*/
- '\023', /*3/4*/
- ',', /*,*/
- '&', /*&*/
- 'y', /*y*/
- '\0', /*blank*/
- '%', /*%*/
- '\0', /*blank*/
- 'Q', /*Q*/
- 'T', /*T*/
- 'O', /*O*/
- 'H', /*H*/
- 'N', /*N*/
- 'M', /*M*/
- 'L', /*L*/
- 'R', /*R*/
- 'G', /*G*/
- 'I', /*I*/
- 'P', /*P*/
- 'C', /*C*/
- 'V', /*V*/
- 'E', /*E*/
- 'Z', /*Z*/
- 'D', /*D*/
- 'B', /*B*/
- 'S', /*S*/
- 'Y', /*Y*/
- /* '\0', /*blank*/
- 'F', /*F*/
- 'X', /*X*/
- 'A', /*A*/
- 'W', /*W*/
- 'J', /*J*/
- 'U', /*U*/
- 'K', /*K*/
- '0', /*0*/
- '1', /*1*/
- '2', /*2*/
- '3', /*3*/
- '4', /*4*/
- '5', /*5*/
- '6', /*6*/
- '7', /*7*/
- '8', /*8*/
- '9', /*9*/
- '*', /***/
- '\04', /*minus*/
- '\01', /*fi*/
- '\02', /*fl*/
- '\03', /*ff*/
- '\020', /* cent sign */
- '\012', /*ffl*/
- '\011', /*ffi*/
- '(', /*(*/
- ')', /*)*/
- '[', /*[*/
- ']', /*]*/
- '\013', /* degree */
- '\014', /* dagger */
- '=', /*=*/
- '\017', /* registered */
- ':', /*:*/
- '+', /*+*/
- '\0', /*blank*/
- '!', /*!*/
- '\07', /* bullet */
- '?', /*?*/
- '\015', /*foot mark*/
- '|', /*|*/
- '\0', /*blank*/
- '\016', /* copyright */
- '\010', /* square */
- '$', /*$*/
- '\0',
- '\0',
- '"', /*"*/
- '#', /*#*/
- '<', /*<*/
- '>', /*>*/
- '@', /*@*/
- '\\', /*\\*/
- '^', /*^*/
- '{', /*{*/
- '}', /*}*/
- '~' /*~*/
- };
-
- static char spectab[128] = {
- /* '\0', /*blank*/
- 'w', /*psi*/
- 'h', /*theta*/
- 'm', /*nu*/
- 'l', /*mu*/
- 'k', /*lambda*/
- 'i', /*iota*/
- 'f', /*zeta*/
- 'r', /*sigma*/
- 'd', /*delta*/
- 'b', /*beta*/
- 'n', /*xi*/
- 'g', /*eta*/
- 'u', /*phi*/
- 't', /*upsilon*/
- 'j', /*kappa*/
- '\0', /*blank*/
- 'p', /*pi*/
- '@', /*at-sign*/
- '7', /*down arrow*/
- '\0', /*blank*/
- 'a', /*alpha*/
- '|', /*or*/
- 'v', /*chi*/
- '"', /*"*/
- 'e', /*epsilon*/
- '=', /*=*/
- 'o', /*omicron*/
- '4', /*left arrow*/
- 'q', /*rho*/
- '6', /*up arrow*/
- 's', /*tau*/
- '_', /*underrule*/
- '\\', /*\*/
- 'W', /*Psi*/
- '\07', /*bell system sign*/
- '\001', /*infinity*/
- 'c', /*gamma*/
- '\002', /*improper superset*/
- '\003', /*proportional to*/
- '\004', /*right hand*/
- 'x', /*omega*/
- '\0', /*blank*/
- '(', /*gradient*/
- '\0', /*blank*/
- 'U', /*Phi*/
- 'H', /*Theta*/
- 'X', /*Omega*/
- '\005', /*cup (union)*/
- '\006', /*root en*/
- '\014', /*terminal sigma*/
- 'K', /*Lambda*/
- '-', /*minus*/
- 'C', /*Gamma*/
- '\015', /*integral sign*/
- 'P', /*Pi*/
- '\032', /*subset of*/
- '\033', /*superset of*/
- '2', /*approximates*/
- 'y', /*partial derivative*/
- 'D', /*Delta*/
- '\013', /*square root*/
- 'R', /*Sigma*/
- '1', /*approx =*/
- /* '\0', /*blank*/
- '>', /*>*/
- 'N', /*Xi*/
- '<', /*<*/
- '\016', /*slash (longer)*/
- '\034', /*cap (intersection)*/
- 'T', /*Upsilon*/
- '\035', /*not*/
- '\023', /*right ceiling (rt of ")*/
- '\024', /*left top (of big curly)*/
- '\017', /*bold vertical*/
- '\030', /*left center of big curly bracket*/
- '\025', /*left bottom*/
- '\026', /*right top*/
- '\031', /*right center of big curly bracket*/
- '\027', /*right bot*/
- '\021', /*right floor (rb of ")*/
- '\020', /*left floor (left bot of big sq bract)*/
- '\022', /*left ceiling (lt of ")*/
- '*', /*multiply*/
- '/', /*divide*/
- '\010', /*plus-minus*/
- '\011', /*<=*/
- '\012', /*>=*/
- '0', /*identically equal*/
- '3', /*not equal*/
- '{', /*{*/
- '}', /*}*/
- '\'', /*' acute accent*/
- '\`', /*` grave accent*/
- '^', /*^*/
- '#', /*sharp*/
- '\036', /*left hand*/
- '\037', /*member of*/
- '~', /*~*/
- 'z', /*empty set*/
- '\0', /*blank*/
- 'Y', /*dbl dagger*/
- 'Z', /*box rule*/
- '9', /*asterisk*/
- '[', /*improper subset*/
- ']', /*circle*/
- '\0', /*blank*/
- '+', /*eqn plus*/
- '5', /*right arrow*/
- '8' /*section mark*/
- };
-