Annotation of coherent/g/usr/lib/ncurses/MKterm.h.awk, revision 1.1

1.1     ! root        1: #*********************************************************************
        !             2: #                         COPYRIGHT NOTICE                           *
        !             3: #*********************************************************************
        !             4: #        This software is copyright (C) 1982 by Pavel Curtis         *
        !             5: #                                                                    *
        !             6: #        Permission is granted to reproduce and distribute           *
        !             7: #        this file by any means so long as no fee is charged         *
        !             8: #        above a nominal handling fee and so long as this            *
        !             9: #        notice is always included in the copies.                    *
        !            10: #                                                                    *
        !            11: #        Other rights are reserved except as explicitly granted      *
        !            12: #        by written permission of the author.                        *
        !            13: #                Pavel Curtis                                        *
        !            14: #                Computer Science Dept.                              *
        !            15: #                405 Upson Hall                                      *
        !            16: #                Cornell University                                  *
        !            17: #                Ithaca, NY 14853                                    *
        !            18: #                                                                    *
        !            19: #                Ph- (607) 256-4934                                  *
        !            20: #                                                                    *
        !            21: #                Pavel.Cornell@Udel-Relay   (ARPAnet)                *
        !            22: #                decvax!cornell!pavel       (UUCPnet)                *
        !            23: #********************************************************************/
        !            24: 
        !            25: #
        !            26: # $Header: /src386/usr/lib/ncurses/RCS/MKterm.h.awk,v 1.2 92/06/10 13:40:14 bin Exp Locker: bin $
        !            27: #
        !            28: 
        !            29: BEGIN          {
        !            30:                    print "/*"
        !            31:                    print "**   term.h -- Definition of struct term"
        !            32:                    print "*/"
        !            33:                    print ""
        !            34:                    print "#ifndef SGTTY"
        !            35:                    print "#    include \"curses.h\""
        !            36:                    print "#endif"
        !            37:                    print ""
        !            38:                    print "#ifdef SINGLE"
        !            39:                    print "#    define CUR _first_term."
        !            40:                    print "#else"
        !            41:                    print "#    define CUR cur_term->"
        !            42:                    print "#endif"
        !            43:                    print ""
        !            44:                    print ""
        !            45:                }
        !            46: 
        !            47: 
        !            48: $4 == "bool"   {
        !            49:            printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
        !            50:                }
        !            51: 
        !            52: $4 == "number" {
        !            53:                    printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
        !            54:                }
        !            55: 
        !            56: $4 == "str"    {
        !            57:                    printf "#define %-30s CUR Strings[%d]\n", $1, StringCount++
        !            58:                }
        !            59: 
        !            60: 
        !            61: END            {
        !            62:                        print  ""
        !            63:                        print  ""
        !            64:                        print  "struct term"
        !            65:                        print  "{"
        !            66:                        print  "   char  *term_names;   /* offset in str_table of terminal names */"
        !            67:                        print  "   char  *str_table;    /* pointer to string table */"
        !            68:                        print  "   short Filedes;       /* file description being written to */"
        !            69:                        print  "#ifdef USE_TERMIO"
        !            70:                        print  "   struct termio Otermio,"
        !            71:                        print  "                 Ntermio;"
        !            72:                        print  "#else"
        !            73:                        print  "   SGTTY Ottyb,         /* original state of the terminal */"
        !            74:                        print  "         Nttyb;         /* current state of the terminal */"
        !            75:                        print  "#endif"
        !            76:                        print  ""
        !            77:                        printf "   char          Booleans[%d];\n", BoolCount
        !            78:                        printf "   short         Numbers[%d];\n", NumberCount
        !            79:                        printf "   char          *Strings[%d];\n", StringCount
        !            80:                        print  "};"
        !            81:                        print  ""
        !            82:                        print  "extern struct term _first_term;"
        !            83:                        print  "struct term     *cur_term;"
        !            84:                        print  ""
        !            85:                        printf "#define BOOLCOUNT %d\n", BoolCount
        !            86:                        printf "#define NUMCOUNT  %d\n", NumberCount
        !            87:                        printf "#define STRCOUNT  %d\n", StringCount
        !            88:                }

unix.superglobalmegacorp.com

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