Annotation of 41BSD/cmd/cifplot/gen/genmasks.c, revision 1.1.1.1

1.1       root        1: 
                      2: /*******************************************************************
                      3: *                                                                  *
                      4: *    File: CIFPLOT/fill.c                                          *
                      5: *    Written by Dan Fitzpatrick & Dennis Wellborne                 *
                      6: *    copyright 1980 -- Regents of the University of California     *
                      7: *                                                                  *
                      8: ********************************************************************/
                      9: 
                     10: #include "defs.h"
                     11: #include "globals.h"
                     12: #include "structs.h"
                     13: #include "out_structs.h"
                     14: #include <stdio.h>
                     15: #include <sys/types.h>
                     16: #include <sys/stat.h>
                     17: #include <sys/vcmd.h>
                     18: #include <signal.h>
                     19: #include <errno.h>
                     20: 
                     21: extern int errno;
                     22: 
                     23: int plotmd [] = { VPLOT, 0, 0 };
                     24: int prtmd  [] = { VPRINT, 0, 0 };
                     25: struct stat stbuf;
                     26: int offline;
                     27: int Lock = 0;
                     28: char *tail = "a";      /* letter appended to temp file name for uniqueness */
                     29: int NormalSize;
                     30: double StartNextPlot;
                     31: 
                     32: IMPORT char *Concat();
                     33: IMPORT char *getlogin();
                     34: IMPORT char *ctime();
                     35: IMPORT time();
                     36: 
                     37: #define NOLINES        32
                     38: 
                     39: #define VLIMIT  2112
                     40: #define VMAX   2000
                     41: #define VEXTRA 2100
                     42: #define VMIN   0
                     43: #define VRESOL 200.0
                     44: 
                     45: #define WLIMIT 7040
                     46: #define        WMAX    7000
                     47: #define        WEXTRA  7030
                     48: #define WMIN   0
                     49: #define WRESOL 200.0
                     50: 
                     51: #define HLIMIT  704
                     52: #define HMAX   700
                     53: #define HMIN   0
                     54: #define HRESOL  10.0
                     55: 
                     56: #define LOCK   "/usr/spool/vpd/lock"
                     57: #define DEVICE "/dev/vp0"
                     58: #define NAME   "Versatec"
                     59: #define DAEMON "/usr/lib/vpd"
                     60: #define VDUMP  "/vb/grad/fitz/cif/newprogs/vdump"
                     61: 
                     62: int xmax,xlimit,xmin;
                     63: real resolution;
                     64: char *heading;
                     65: 
                     66: #define FromMask       ( 0xffffff00 | (0xff >> (from & 0x07))) << (from & 0x18)
                     67: 
                     68: #define ToMask         (~((0xffffff00 | (0xff >> (to & 0x07))) << (to & 0x18)))
                     69: 
                     70: char *outfile;
                     71: int filedesc;
                     72: int *OutBuf,*ScanLine;
                     73: int NoLine;
                     74: 
                     75: 
                     76: main() {
                     77:     int from,to;
                     78: 
                     79:     printf("int fromMask[32] = {\n");
                     80:     for(from=0; from<32;from++)
                     81:        printf("\t0x%x,\n",FromMask);
                     82:     printf("\t};\n\n");
                     83: 
                     84: 
                     85:     printf("int toMask[32] = {\n");
                     86:     for(to=0; to<32;to++)
                     87:        printf("\t0x%x,\n",ToMask);
                     88:     printf("\t};\n\n");
                     89:     }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.