Annotation of 43BSDReno/contrib/isode-beta/others/quipu/photo/t4014.c, revision 1.1.1.1

1.1       root        1: /* t4014.c - display on tetronix 4014 terminals */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/others/quipu/photo/RCS/t4014.c,v 7.0 89/11/23 22:01:47 mrose Rel $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/others/quipu/photo/RCS/t4014.c,v 7.0 89/11/23 22:01:47 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       t4014.c,v $
                     12:  * Revision 7.0  89/11/23  22:01:47  mrose
                     13:  * Release 6.0
                     14:  * 
                     15:  */
                     16: 
                     17: /*
                     18:  *                               NOTICE
                     19:  *
                     20:  *    Acquisition, use, and distribution of this module and related
                     21:  *    materials are subject to the restrictions of a license agreement.
                     22:  *    Consult the Preface in the User's Manual for the full terms of
                     23:  *    this agreement.
                     24:  *
                     25:  */
                     26: 
                     27: 
                     28: 
                     29: #include "stdio.h"
                     30: #include "quipu/photo.h"
                     31: #include "signal.h"
                     32: extern int NUMLINES,PIC_LINESIZE;
                     33: extern unsigned position;
                     34: 
                     35: /* Any errors should be written to *stdout* */
                     36: /* if the process exits, with out giving an error message, quipu may hang */
                     37: 
                     38: #define SCALE 5
                     39: #define Y_OFFSET 2700
                     40: #define X_OFFSET 3000
                     41: #define X_SKIP 8
                     42: 
                     43: int y = Y_OFFSET;
                     44: 
                     45: photo_quit ()
                     46: {
                     47:        putch (030);    /* Return to non-graphic mode */
                     48:        exit (0);
                     49: }
                     50: 
                     51: photo_start (name)
                     52: char * name;
                     53: {
                     54:        putch (035);    /* Enter graphic mode */
                     55: 
                     56:        openpl ();
                     57:        erase ();
                     58:        linemod ("solid");
                     59: 
                     60:        signal (SIGTERM,photo_quit);
                     61:        /* return 0 if sucessful -1 if not */
                     62: 
                     63:        return (0);
                     64: }
                     65: 
                     66: 
                     67: photo_end (name)
                     68: char * name;
                     69: {
                     70:        /* Decoding has finished - display the photo */
                     71:        move (0,Y_OFFSET - 100);
                     72:        closepl();
                     73: 
                     74:        (void) printf ("\n");
                     75:        (void) fflush (stdout);
                     76:        (void) close (1);       /* this is needed for QUIPU */
                     77:        /* wait until signalled to Terminate */
                     78:        for (;;)
                     79:                ;
                     80: }
                     81: 
                     82: photo_black (length)
                     83: int length;
                     84: {
                     85: }
                     86: 
                     87: photo_white (length)
                     88: int length;
                     89: {
                     90:        line ((position*SCALE)+X_OFFSET,y,((length+position-1)*SCALE)+X_OFFSET,y);
                     91: }
                     92: 
                     93: 
                     94: photo_line_end (line)
                     95: bit_string * line;
                     96: {
                     97:        y -= SCALE;
                     98: }

unix.superglobalmegacorp.com

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