[BACK]Return to aed.trm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot / term

Annotation of OpenXM_contrib/gnuplot/term/aed.trm, Revision 1.1

1.1     ! maekawa     1: /*
        !             2:  * $Id: aed.trm,v 1.13 1998/04/14 00:17:27 drd Exp $
        !             3:  *
        !             4:  */
        !             5:
        !             6: /* GNUPLOT - aed.trm */
        !             7:
        !             8: /*[
        !             9:  * Copyright 1990 - 1993, 1998
        !            10:  *
        !            11:  * Permission to use, copy, and distribute this software and its
        !            12:  * documentation for any purpose with or without fee is hereby granted,
        !            13:  * provided that the above copyright notice appear in all copies and
        !            14:  * that both that copyright notice and this permission notice appear
        !            15:  * in supporting documentation.
        !            16:  *
        !            17:  * Permission to modify the software is granted, but not the right to
        !            18:  * distribute the complete modified source code.  Modifications are to
        !            19:  * be distributed as patches to the released version.  Permission to
        !            20:  * distribute binaries produced by compiling modified sources is granted,
        !            21:  * provided you
        !            22:  *   1. distribute the corresponding source modifications from the
        !            23:  *    released version in the form of a patch file along with the binaries,
        !            24:  *   2. add special version identification to distinguish your version
        !            25:  *    in addition to the base release version number,
        !            26:  *   3. provide your name and address as the primary contact for the
        !            27:  *    support of your modified version, and
        !            28:  *   4. retain our contact information in regard to use of the base
        !            29:  *    software.
        !            30:  * Permission to distribute the released version of the source code along
        !            31:  * with corresponding source modifications in the form of a patch file is
        !            32:  * granted with same provisions 2 through 4 for binary distributions.
        !            33:  *
        !            34:  * This software is provided "as is" without express or implied warranty
        !            35:  * to the extent permitted by applicable law.
        !            36: ]*/
        !            37:
        !            38: /*
        !            39:  * This file is included by ../term.c.
        !            40:  *
        !            41:  * This terminal driver supports:
        !            42:  *   AED terminals
        !            43:  *
        !            44:  * AUTHORS
        !            45:  *     Colin Kelley, Thomas Williams, Russell Lang
        !            46:  *
        !            47:  * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
        !            48:  *
        !            49:  */
        !            50:
        !            51: /*
        !            52:  * adapted to the new terminal layout by Stefan Bodewig (Dez. 1995)
        !            53:  */
        !            54:
        !            55: #include "driver.h"
        !            56:
        !            57: #ifdef TERM_REGISTER
        !            58: register_term(aed512)
        !            59: register_term(aed767)
        !            60: #endif
        !            61:
        !            62: #ifdef TERM_PROTO
        !            63: TERM_PUBLIC void AED_init __PROTO((void));
        !            64: TERM_PUBLIC void AED_graphics __PROTO((void));
        !            65: TERM_PUBLIC void AED_text __PROTO((void));
        !            66: TERM_PUBLIC void AED_linetype __PROTO((int linetype));
        !            67: TERM_PUBLIC void AED_move __PROTO((unsigned int x, unsigned int y));
        !            68: TERM_PUBLIC void AED_vector __PROTO((unsigned int x, unsigned int y));
        !            69: TERM_PUBLIC void AED_put_text __PROTO((unsigned int x, unsigned int y, char str[]));
        !            70: TERM_PUBLIC void AED_reset __PROTO((void));
        !            71:
        !            72: #define AED_XMAX 768
        !            73: #define AED_YMAX 575
        !            74:
        !            75: #define AED_VCHAR      13
        !            76: #define AED_HCHAR      8
        !            77: #define AED_VTIC       8
        !            78: #define AED_HTIC       7
        !            79:
        !            80: /* slightly different for AED 512 */
        !            81: #define AED5_XMAX 512
        !            82: #endif
        !            83:
        !            84: #ifndef TERM_PROTO_ONLY
        !            85: #ifdef TERM_BODY
        !            86:
        !            87: #define AED_XLAST (AED_XMAX - 1)
        !            88: #define AED_YLAST (AED_YMAX - 1)
        !            89:
        !            90: #define AED5_XLAST (AED5_XMAX - 1)
        !            91:
        !            92: TERM_PUBLIC void AED_init()
        !            93: {
        !            94:     fputs("\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD", gpoutfile);
        !            95: /*         2            3     4                5     7    6       1
        !            96:        1. Clear Screen
        !            97:        2. Set Encoding
        !            98:        3. Set Default Color
        !            99:        4. Set Backround Color Table Entry
        !           100:        5. Set Backround Color
        !           101:        6. Move to Bottom Lefthand Corner
        !           102:        7. Anti-Alias Vectors
        !           103: */
        !           104: }
        !           105:
        !           106:
        !           107: TERM_PUBLIC void AED_graphics()
        !           108: {
        !           109:     fputs("\033FFD\033", gpoutfile);
        !           110: }
        !           111:
        !           112:
        !           113: TERM_PUBLIC void AED_text()
        !           114: {
        !           115:     fputs("\033MOV.0.9.SEC.7.XXX", gpoutfile);
        !           116: }
        !           117:
        !           118:
        !           119:
        !           120: TERM_PUBLIC void AED_linetype(linetype)
        !           121: int linetype;
        !           122: {
        !           123:     static int color[2 + 9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 };
        !           124:     static int type[2 + 9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 };
        !           125:
        !           126:     if (linetype >= 10)
        !           127:        linetype %= 10;
        !           128:
        !           129:     fprintf(gpoutfile, "\
        !           130: \033SLS%d.255.\
        !           131: \033SEC%d.",
        !           132:            type[linetype + 2],
        !           133:            color[linetype + 2]);
        !           134: }
        !           135:
        !           136:
        !           137:
        !           138: TERM_PUBLIC void AED_move(x, y)
        !           139: unsigned int x, y;
        !           140: {
        !           141:     fprintf(gpoutfile, "\033MOV%d.%d.", x, y);
        !           142: }
        !           143:
        !           144:
        !           145: TERM_PUBLIC void AED_vector(x, y)
        !           146: unsigned int x, y;
        !           147: {
        !           148:     fprintf(gpoutfile, "\033DVA%d.%d.", x, y);
        !           149: }
        !           150:
        !           151:
        !           152: TERM_PUBLIC void AED_put_text(x, y, str)
        !           153: unsigned int x, y;
        !           154: char str[];
        !           155: {
        !           156:     AED_move(x, y - AED_VCHAR / 2 + 2);
        !           157:     fprintf(gpoutfile, "\033XXX%s\033", str);
        !           158: }
        !           159:
        !           160:
        !           161: #define hxt (AED_HTIC/2)
        !           162: #define hyt (AED_VTIC/2)
        !           163:
        !           164: TERM_PUBLIC void AED_reset()
        !           165: {
        !           166:     fputs("\033SCT0.1.0.0.0.SBC.0.FFD", gpoutfile);
        !           167: }
        !           168:
        !           169: #endif /* TERM_BODY */
        !           170:
        !           171: #ifdef TERM_TABLE
        !           172: TERM_TABLE_START(aed512_driver)
        !           173:     "aed512", "AED 512 Terminal",
        !           174:     AED5_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
        !           175:     AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset,
        !           176:     AED_text, null_scale, AED_graphics, AED_move, AED_vector,
        !           177:     AED_linetype, AED_put_text, null_text_angle,
        !           178:     null_justify_text, do_point, do_arrow, set_font_null
        !           179: TERM_TABLE_END(aed512_driver)
        !           180:
        !           181: #undef LAST_TERM
        !           182: #define LAST_TERM aed512_driver
        !           183:
        !           184: TERM_TABLE_START(aed767_driver)
        !           185:     "aed767", "AED 767 Terminal",
        !           186:     AED_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
        !           187:     AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset,
        !           188:     AED_text, null_scale, AED_graphics, AED_move, AED_vector,
        !           189:     AED_linetype, AED_put_text, null_text_angle,
        !           190:     null_justify_text, do_point, do_arrow, set_font_null
        !           191: TERM_TABLE_END(aed767_driver)
        !           192:
        !           193: #undef LAST_TERM
        !           194: #define LAST_TERM aed767_driver
        !           195:
        !           196: #endif /* TERM_TABLE */
        !           197: #endif /* TERM_PROTO_ONLY */
        !           198:
        !           199: #ifdef TERM_HELP
        !           200: START_HELP(aed767)
        !           201: "1 aed767",
        !           202: "?commands set terminal aed767",
        !           203: "?set terminal aed767",
        !           204: "?set term aed767",
        !           205: "?terminal aed767",
        !           206: "?term aed767",
        !           207: "?aed767",
        !           208: "?commands set terminal aed512",
        !           209: "?set terminal aed512",
        !           210: "?set term aed512",
        !           211: "?terminal aed512",
        !           212: "?term aed512",
        !           213: "?aed512",
        !           214: " The `aed512` and `aed767` terminal drivers support AED graphics terminals.",
        !           215: " The two drivers differ only in their horizontal ranges, which are 512 and",
        !           216: " 768 pixels, respectively.  Their vertical range is 575 pixels.  There are",
        !           217: " no options for these drivers."
        !           218: END_HELP(aed767)
        !           219: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>