# 2.11BSD#431 - /usr/src/new/jove/mac.h

##### Variables

    MAXCOL            X
    MAXROW            X

##### Macros

    BACKSP            X
    CAPSLOCK          X
    CLEAR             X
    COMMAND           X
    DESCENT           X
    DOWNCURS          X
    ENTERL            X
    FONT              X
    HEIGHT            X
    LEFTCURS          X
    MCHARS            X
    NMASK             X
    NMENUITEMS        X
    NMENUS            X
    NOKEY             X
    OPTION            X
    PAD0              X
    PAD1              X
    PAD2              X
    PAD3              X
    PAD4              X
    PAD5              X
    PAD6              X
    PAD7              X
    PAD8              X
    PAD9              X
    PADDOT            X
    PADENTER          X
    PADMINUS          X
    RET               X
    RIGHTCURS         X
    SCREENSIZE        X
    SCROLLWIDTH       X
    SHIFT             X
    S_IFDIR           X
    TAB               X
    TEXTSIZE          X
    THEIGHT           X
    TWIDTH            X
    UPCURS            X
    WIDTH             X
    WINDHEIGHT        X
    WINDWIDTH         X
    va_arg            X
    va_dcl            X
    va_end            X
    va_start          X

##### struct's

    menu              X
    stat              X

##### typedef's

    MenuHandle        X
    va_list           X

       1: /***************************************************************************
       2:  * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne.  JOVE *
       3:  * is provided to you without charge, and with no warranty.  You may give  *
       4:  * away copies of JOVE, including sources, provided that this notice is    *
       5:  * included in all the files.                                              *
       6:  ***************************************************************************/
       7:
       8: /* Macintosh related things. K. Mitchum 2/88 */
       9:
      10:
      11: #define NMENUS 6
      12: #define NMENUITEMS 40   /* This has GOT to be enough! */
      13:
      14: typedef data_obj *menumap[NMENUITEMS];
      15: #ifndef _mac
      16:     typedef char **MenuHandle;
      17: #endif
      18: struct menu {
      19:     char *Name;
      20:     int menu_id;
      21:     MenuHandle Mn;
      22:     menumap m;
      23: };
      24:
      25: struct stat {
      26:     int st_dev;     /* volume number */
      27:     long st_ino;        /* file number on volume */
      28:     dev_t st_rdev;
      29:     off_t st_size;      /* logical end of file */
      30:     int st_mode;
      31:     time_t st_mtime;    /* last modified */
      32: };
      33:
      34: #define S_IFDIR 2
      35:
      36: typedef char *va_list;
      37: #define va_dcl va_list va_alist;
      38: #define va_start(l) l = (va_list)&va_alist
      39: #define va_arg(l,m) ((m*)(l += sizeof(m)))[-1]
      40: #define va_end(l) l = NULL
      41:
      42: #ifdef _mac
      43: extern struct menu Menus[NMENUS];
      44:
      45: static  EventRecord the_Event;
      46:
      47: /* keycodes (from Inside MacIntosh I-251). because of changes with
      48: the MacPlus, there are some duplicate codes between cursor keys and
      49: keypad keys. these can be deciphered by the corresponding character
      50: codes, which are different. this table simply translates a keycode
      51: into a character code that is appropriate. */
      52:
      53: #define NOKEY -1
      54: #define RET 0x0D
      55: #define TAB 0x09
      56: #define BACKSP 0x08
      57: #define ENTERL NOKEY    /* left enter key absent on MacPlus */
      58: #define COMMAND NOKEY   /* will be no translation anyway for these */
      59: #define SHIFT NOKEY
      60: #define CAPSLOCK NOKEY
      61: #define OPTION NOKEY
      62: #define PADDOT '.'      /* PAD period */
      63: #define PAD0 '0'
      64: #define PAD1 '1'
      65: #define PAD2 '2'
      66: #define PAD3 '3'
      67: #define PAD4 '4'
      68: #define PAD5 '5'
      69: #define PAD6 '6'
      70: #define PAD7 '7'
      71: #define PAD8 '8'
      72: #define PAD9 '9'
      73: #define LEFTCURS 'B'        /* jove only, make like commands */
      74: #define RIGHTCURS 'F'
      75: #define UPCURS 'P'
      76: #define DOWNCURS 'N'
      77: #define PADENTER RET
      78: #define PADMINUS '-'
      79: #define CLEAR 0
      80:
      81: static char nsh_keycodes[] = {
      82:     'a','s','d','f','h',                        /* 0 - 4 */
      83:     'g','z','x','c','v',                        /* 5 - 9 */
      84:     NOKEY,'b','q','w','e',                  /* 10 - 14 */
      85:     'r','y','t','1','2',                    /* 15 - 19 */
      86:     '3','4','6','5','=',                    /* 20 - 24 */
      87:     '9','7','-','8','0',                    /* 25 - 29 */
      88:     ']','O','u','[','i',                    /* 30 - 34 */
      89:     'p',RET,'l','j','\'',                   /* 35 - 39 */
      90:     'k',';','\\',',','/',                   /* 40 - 44 */
      91:     'n','m','.',TAB,NOKEY,                  /* 45 - 49 */
      92:     '`',BACKSP,ENTERL,NOKEY,NOKEY,          /* 50 - 54 */
      93:     COMMAND,SHIFT,CAPSLOCK,OPTION, NOKEY,   /* 55 - 59 */
      94:     NOKEY,NOKEY,NOKEY,NOKEY,NOKEY,          /* 60 - 64 */
      95:     PADDOT,RIGHTCURS,NOKEY,NOKEY,NOKEY,     /* 65 - 69 */
      96:     LEFTCURS,CLEAR,DOWNCURS,NOKEY,NOKEY,    /* 70 - 74 */
      97:     NOKEY,PADENTER,UPCURS,PADMINUS,NOKEY,   /* 75 - 79 */
      98:     NOKEY,NOKEY,PAD0,PAD1,PAD2,             /* 80 - 84 */
      99:     PAD3,PAD4,PAD5,PAD6,PAD7,               /* 85 - 89 */
     100:     NOKEY,PAD8,PAD9
     101: };
     102:
     103: static char sh_keycodes[] = {
     104:     'A','S','D','F','H',                        /* 0 - 4 */
     105:     'G','Z','X','C','V',                        /* 5 - 9 */
     106:     NOKEY,'B','Q','W','E',                  /* 10 - 14 */
     107:     'R','Y','T','!','@',                    /* 15 - 19 */
     108:     '#','$','^','%','+',                    /* 20 - 24 */
     109:     '(','&','_','*',')',                    /* 25 - 29 */
     110:     '}','O','U','{','I',                    /* 30 - 34 */
     111:     'P',RET,'L','J','\'',                   /* 35 - 39 */
     112:     'K',';','|','<','?',                    /* 40 - 44 */
     113:     'N','M','>',TAB,NOKEY,                  /* 45 - 49 */
     114:     '~',BACKSP,ENTERL,NOKEY,NOKEY,          /* 50 - 54 */
     115:     COMMAND,SHIFT,CAPSLOCK,OPTION, NOKEY,   /* 55 - 59 */
     116:     NOKEY,NOKEY,NOKEY,NOKEY,NOKEY,          /* 60 - 64 */
     117:     PADDOT,RIGHTCURS,NOKEY,NOKEY,NOKEY,     /* 65 - 69 */
     118:     LEFTCURS,CLEAR,DOWNCURS,NOKEY,NOKEY,    /* 70 - 74 */
     119:     NOKEY,PADENTER,UPCURS,PADMINUS,NOKEY,   /* 75 - 79 */
     120:     NOKEY,NOKEY,PAD0,PAD1,PAD2,             /* 80 - 84 */
     121:     PAD3,PAD4,PAD5,PAD6,PAD7,               /* 85 - 89 */
     122:     NOKEY,PAD8,PAD9
     123: };
     124:
     125:
     126:
     127: /* tn.h Modified for variable screen size 11/21/87. K. Mitchum */
     128:
     129: static int tn_rows, tn_cols, tn_top, tn_left, tn_bottom, tn_right;
     130: int MAXROW, MAXCOL;
     131:
     132: #define SCREENSIZE (tn_rows * ROWSIZE)
     133: #define FONT monaco
     134: #define TEXTSIZE 9
     135:
     136: #define HEIGHT 11
     137: #define WIDTH 6
     138: #define DESCENT 2
     139: #define TWIDTH tn_cols * WIDTH
     140: #define THEIGHT tn_rows * HEIGHT
     141:
     142: /* window specs */
     143:
     144: #define SCROLLWIDTH 16 /* width of scroll bar control in pixels */
     145: #define WINDWIDTH tn_right - tn_left - SCROLLWIDTH - 1/* local coordinates */
     146: #define WINDHEIGHT tn_bottom - tn_top   /* local coordinates */
     147:
     148: /* for keyboard routines */
     149: #define MCHARS 32   /* must be power of two */
     150: #define NMASK MCHARS -1 /* circular buffer */
     151:
     152: #endif /* _mac */

#### Defined variables

MAXCOL defined in line 130; used 6 times

- in /usr/src/new/jove/mac.c line 1289, 2221(2), 2317(2), 2355

MAXROW defined in line 130; used 10 times

- in /usr/src/new/jove/mac.c line 1098-1100(2), 1289, 2183, 2197, 2215, 2232, 2246, 2311, 2354

nsh_keycodes defined in line 81; never used
sh_keycodes defined in line 103; never used
tn_bottom defined in line 129; used 1 times

- in line 146

tn_cols defined in line 129; used 1 times

- in line 139

tn_left defined in line 129; used 1 times

- in line 145

tn_right defined in line 129; used 1 times

- in line 145

tn_rows defined in line 129; used 2 times

- in line 132, 140

tn_top defined in line 129; used 1 times

- in line 146

#### Defined struct's

menu defined in line 18; used 6 times

- in line 43(2)
- in /usr/src/new/jove/mac.c line 1786(2), 1921(2)

stat defined in line 25; used 2 times

- in /usr/src/new/jove/mac.c line 552(2)

#### Defined typedef's

MenuHandle defined in line 16; used 3 times

- in line 21
- in /usr/src/new/jove/mac.c line 1308, 1854

va_list defined in line 36; used 2 times

- in line 37-38(2)

#### Defined macros

BACKSP defined in line 56; used 2 times

- in line 92, 114

CAPSLOCK defined in line 60; used 2 times

- in line 93, 115

CLEAR defined in line 79; used 2 times

- in line 96, 118

COMMAND defined in line 58; used 2 times

- in line 93, 115

DESCENT defined in line 138; used 1 times

- in /usr/src/new/jove/mac.c line 2138

DOWNCURS defined in line 76; used 2 times

- in line 96, 118

ENTERL defined in line 57; used 2 times

- in line 92, 114

FONT defined in line 133; used 2 times

- in /usr/src/new/jove/mac.c line 863, 2368

HEIGHT defined in line 136; used 11 times

- in line 140
- in /usr/src/new/jove/mac.c line 1054-1056(2), 1075-1078(2), 1098-1100(2), 1287, 2134, 2346-2349(2)

LEFTCURS defined in line 73; used 2 times

- in line 96, 118

MCHARS defined in line 149; used 3 times

- in line 150
- in /usr/src/new/jove/mac.c line 1526, 1540

NMASK defined in line 150; used 3 times

- in /usr/src/new/jove/mac.c line 1561, 1572, 1589

NMENUITEMS defined in line 12; used 9 times

- in line 14
- in /usr/src/new/jove/mac.c line 1796, 1927-1929(3), 1939, 2005, 2028, 2046

NMENUS defined in line 11; used 11 times

- in line 43
- in /usr/src/new/jove/mac.c line 1779, 1823-1824(2), 1870, 1882, 1924-1925(2), 2004, 2027, 2045

NOKEY defined in line 53; used 45 times

- in line 57-61(5), 84, 91-100(19), 106, 113-122(19)

OPTION defined in line 61; used 2 times

- in line 93, 115

PAD0 defined in line 63; used 2 times

- in line 98, 120

PAD1 defined in line 64; used 2 times

- in line 98, 120

PAD2 defined in line 65; used 2 times

- in line 98, 120

PAD3 defined in line 66; used 2 times

- in line 99, 121

PAD4 defined in line 67; used 2 times

- in line 99, 121

PAD5 defined in line 68; used 2 times

- in line 99, 121

PAD6 defined in line 69; used 2 times

- in line 99, 121

PAD7 defined in line 70; used 2 times

- in line 99, 121

PAD8 defined in line 71; used 2 times

- in line 100, 122

PAD9 defined in line 72; used 2 times

- in line 100, 122

PADDOT defined in line 62; used 2 times

- in line 95, 117

PADENTER defined in line 77; used 2 times

- in line 97, 119

PADMINUS defined in line 78; used 2 times

- in line 97, 119

RET defined in line 54; used 3 times

- in line 77, 89, 111

RIGHTCURS defined in line 74; used 2 times

- in line 95, 117

SCREENSIZE defined in line 132; never used
SCROLLWIDTH defined in line 144; used 8 times

- in line 145
- in /usr/src/new/jove/mac.c line 106-107(2), 1053, 1075-1077(2), 2347-2348(2)

SHIFT defined in line 59; used 2 times

- in line 93, 115

S_IFDIR defined in line 34; used 1 times

- in /usr/src/new/jove/mac.c line 585

TAB defined in line 55; used 2 times

- in line 91, 113

TEXTSIZE defined in line 134; used 2 times

- in /usr/src/new/jove/mac.c line 864, 2369

THEIGHT defined in line 140; used 1 times

- in /usr/src/new/jove/mac.c line 2136

TWIDTH defined in line 139; used 1 times

- in /usr/src/new/jove/mac.c line 2137

UPCURS defined in line 75; used 2 times

- in line 97, 119

WIDTH defined in line 137; used 5 times

- in line 139
- in /usr/src/new/jove/mac.c line 1288, 2135, 2347-2348(2)

WINDHEIGHT defined in line 146; used 1 times

- in /usr/src/new/jove/mac.c line 2169

WINDWIDTH defined in line 145; used 5 times

- in /usr/src/new/jove/mac.c line 2169, 2214, 2231, 2261, 2277

va_arg defined in line 39; never used
va_dcl defined in line 37; never used
va_end defined in line 40; never used
va_start defined in line 38; never used

#### Usage of this include

mac.h used 11 times

- in /usr/src/new/jove/ask.c line 14
- in /usr/src/new/jove/buf.c line 14
- in /usr/src/new/jove/disp.c line 14
- in /usr/src/new/jove/extend.c line 17
- in /usr/src/new/jove/fmt.c line 13
- in /usr/src/new/jove/fp.c line 14
- in /usr/src/new/jove/io.c line 17
- in /usr/src/new/jove/jove.c line 16
- in /usr/src/new/jove/mac.c line 31
- in /usr/src/new/jove/re1.c line 14
- in /usr/src/new/jove/util.c line 19

Last modified: 1988-03-15 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1050 |