⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mfb.h

📁 支持数字元件仿真的SPICE插件
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * mfb.h * * Copyright -C- 1982 Giles C. Billingsley, Kenneth H. Keller * sccsid "@(#)mfb.h    1.9  9/3/83" * *     MFB is a graphics package that was developed by the integrated * circuits group of the Electronics Research Laboratory and the * Department of Electrical Engineering and Computer Sciences at * the University of California, Berkeley, California.  The programs * in MFB are available free of charge to any interested party. * The sale, resale, or use of these program for profit without the * express written consent of the Department of Electrical Engineering * and Computer Sciences, University of California, Berkeley, California, * is forbidden. */ #ifdef vms#include <types.h>#include <timeb.h>#include <ttdef.h>#else#include <sys/types.h>#include <sys/timeb.h>#include <sys/stat.h>#include <sgtty.h>#endif#include <signal.h>#include <stdio.h>/* * By define DEBUG we enable the MFBCounters routine for measuring bandwidth */#define DEBUG#ifndef DEFAULTMFBCAP#ifdef vms#define DEFAULTMFBCAP "UMA0:[CAD.LIB]MFBCAP."   /* default VMS mfbcap file */#else#define DEFAULTMFBCAP "~cad/lib/mfbcap"     /* default UNIX mfbcap file */#endif#endif /* DEFAULTMFBCAP */#define BUFSIZE 4096#define UNINITIALIZED -1#define MFBPOLYGONBUFSIZE 600#define MFBMAXPOLYGONVERTICES 300#define MFBmax(a,b) (a > b ? a : b)#define MFBmin(a,b) (a < b ? a : b)#define MFBSwapInt(f1,f2) {int f3; f3 = f1; f1 = f2; f2 = f3;}#define TTY 't'#define HCOPY   'r'#ifdef vms#define TTYBUFSIZE 800#else#define TTYBUFSIZE 4096#endif#ifdef vms#define void int#endifchar gEntBuf[BUFSIZE];/************************************************************************//*                                  *//*           MFB structure definition.          *//*                                  *//************************************************************************/#ifndef BOOL_ALREADY_TYPEDEFED  /* X has a typedef Bool also... */typedef enum {false, true} Bool;#endif /*not BOOL_ALREADY_TYPEDEFED*/struct mfb_window {    int left;    int right;    int top;    int bottom;    double length,width;    };typedef struct mfb_window WINDOW;typedef struct mfb_window VIEWPORT;struct mfbpath {    int nvertices;    int *xy;    };typedef struct mfbpath MFBPOLYGON;typedef struct mfbpath MFBPATH;#ifndef vmsstruct mfbremttyb {    struct sgttyb oldttyb;    struct sgttyb newttyb;    };struct mfbremstat {    int graphttyw;      /* old mode bits of graphics device */    int kybrdttyw;      /* old mode bits of standard input/output */    struct stat graphstat;  /* old fstats of graphics device */    struct stat kybrdstat;  /* old fstats of standard input/output */    };typedef struct mfbremttyb MFBSAVETTYB;typedef struct mfbremstat MFBSAVESTAT;#endifstruct mfbformatstrs {    char *startSequence;        /* first transmitted sequence */    char *endSequence;          /* last transmitted sequence */    char *initLineStyles;       /* initialize line styles */    char *initFillPatterns;     /* initialize fill styles */    char *initColorStyles;      /* initialize color styles */    char *vltEntry;         /* define color in VLT */    char *setForegroundColor;       /* set current foreground color */    char *screenFlood;          /* flood screen to current color */    char *channelMaskSet;       /* set write mask */    char *readMaskSet;          /* set read mask */    char *enablePointingDevice;     /* initialize pointing device */    char *enableRubberBanding;      /* turn on rubber banding */    char *disablePointingDevice;    /* disable pointing device and cursor */    char *disableRubberBanding;     /* turn off rubber banding */    char *readPointingDevice;       /* wait and read pointing device */    char *formatPointingDevice;     /* decode format for pointing device */    char *keyboardStart;        /* initailize keyboard */    char *keyboardEnd;          /* terminate keyboard input */    char *keyboardBackspace;        /* keyboard backspace sequence */    char *audio;            /* ring the terminals bell */    char *lineDefineStart;      /* begin defining a line pattern */    char *lineDefineFormat;     /* define bit array of line pattern */    char *lineDefineEnd;        /* terminate line pattern definition */    char *setLineStyle;         /* set current line style */    char *setSolidLineStyle;        /* set current line style to solid */    char *movePenSequence;      /* move current graphics position */    char *drawLineSequence;     /* draw a line in current style */    char *drawSolidLineSequence;    /* draw a solid line */    char *drawLineToSequence;       /* move and draw current position */    char *drawSolidLineToSequence;  /* move and draw solid line */    char *drawBoxSequence;      /* draw box in current style */    char *drawSolidBoxSequence;     /* draw a solid box */    char *beginPlygnSequence;       /* begin polygon in cur. fill style */    char *beginSolidPlygnSequence;  /* begin solid polygon */    char *sendPlygnVertex;      /* define one point in polygon */    char *endPlygnSequence;     /* terminate polygon sequence */    char *drawCircleSequence;       /* draw a circle in solid line style */    char *rotateTextSequence;       /* rotate graphic text */    char *graphicsTextStart;        /* begin graphic text */    char *graphicsTextEnd;      /* terminate graphic text */    char *replaceON;            /* turn on destructive text mode */    char *overstrikeON;         /* turn on overstriking text mode */    char *writePixel;           /* write one pixel in current color */    char *setALUEOR;            /* set ALU mode to EOR */    char *setALUNOR;            /* set ALU mode to NOR */    char *setALUOR;         /* set ALU mode to OR */    char *setALUJAM;            /* set ALU mode to JAM or REPLACE */    char *blinkerON;            /* make a color blink */    char *blinkerOFF;           /* turn off a blinking layer */    char *rastCopyStart;        /* begin raster copy sequence */    char *rastCopyEnd;          /* terminate raster copy sequence */    char *rastCopyDest;         /* define raster copy destionation */    char *rastCopySource;       /* define raster copy source area */    char *fillDefineStart;      /* begin defining a fill style */    char *fillDefineFormat;     /* define bit array of row/column */    char *fillDefineEnd;        /* terminate fill style definition */    char *setFillPattern;       /* set current fill pattern */    char *setSolidFillPattern;      /* set current fill pattern to solid */    };struct mfb {            /*             * INTEGERS FIELDS             *//* used by mfbgncode */ int lastX,lastY;    /* for Tektronix encoding */            int X,Y,Z,T;        /* parameter list *//* Resolution */    int maxX;       /* horizontal resolution */            int maxY;       /* vertical resolution */            int maxColors;      /* maximum number of colors */            int minOffScreenX;  /* left of off screen memory */            int minOffScreenY;  /* bottom of off screen mem. */            int offScreenDX;    /* length of off screen mem. */            int offScreenDY;    /* width of off screen mem. *//* Video Layer Table */ int maxIntensity;   /* max RGB or LS intensity */            int lengthOfVLT;    /* number of bit planes *//* Pointing Device */   int buttonMask[12]; /* returned button masks */            int numberOfButtons;    /* 12 maximum *//* Keyboard Control */  int keyboardYOffset;            int keyboardXOffset;/* Line Drawing */  int lineDefineLength;   /* number of bytes in array */            int maxLineStyles;  /* number of line styles *//* Text font */     int fontHeight;     /* font height in pixels */            int fontWidth;      /* font width in pixels */            int fontXOffset;            int fontYOffset;/* Blinkers */      int maxBlinkers;    /* number of blinkers *//* Fill Patterns */ int fillDefineHeight;   /* number of byte rows */            int fillDefineWidth;    /* number of byte columns */            int maxFillPatterns;    /* number of fill patterns *//* Current variables */ int cursorColor1Id; /* blinked cursor color ID */            int cursorColor2Id; /* unblinked cursor color ID */                int fgColorId;      /* cur. foreground color ID */            int fillPattern;    /* cur. fill pattern ID */            int lineStyle;      /* cur. line style ID */            int channelMask;    /* cur. write mask */            int readMask;       /* cur. read mask */            int textMode;       /* text mode (1=dest, 0=rep) */            int numBlinkers;    /* cur. number of blinkers */            int stipplePattern[8];  /* cur. stipple pattern */            int fileDesc;       /* desc. for graphics device */            int numTtyBuffer;   /* cur. chars in output queue */#ifdef DEBUG/* bandwidth test */    int nChars;            int nBoxes,sumBoxArea;            int nLines,sumLineLength;#endif                /*             * POINTERS             *//* for tty's only */    char *name;     /* device name */            char *terminalName; /* name of MFBCAP entry *//* I/O routines */  int (*dsply_getchar)();            int (*kybrd_getchar)();            int (*dsply_ungetchar)();            int (*kybrd_ungetchar)();            int (*outchar)();            int (*outstr)();            /*             * BOOLEANS             */                Bool initializedBool;/* Video Layer Table */ Bool vltBool;            Bool vltUseHLSBool;/* Channel Mask */  Bool channelMaskBool;            Bool readMaskBool;/* Pointing Device */   Bool PointingDeviceBool;            Bool buttonsBool;            Bool readImmediateBool;/* Keyboard Control */  Bool keyboardBool;/* Line Drawing */  Bool linePatternDefineBool;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -