1 | /*
|
---|
2 | =============================================================================
|
---|
3 | vmput.c -- video menu put functions
|
---|
4 | Version 3 -- 1987-03-30 -- D.N. Lynx Crowe
|
---|
5 | (c) Copyright 1987 -- D.N. Lynx Crowe
|
---|
6 |
|
---|
7 | vmput(sbase, row, col, ms, ma)
|
---|
8 | uint *sbase, rwo, col, ma;
|
---|
9 | char *ms[];
|
---|
10 |
|
---|
11 | Copies lines from ms, with attribute ma, to sbase at (row,col).
|
---|
12 |
|
---|
13 | vmputa(sbase, row, col, ms, ma)
|
---|
14 | uint *sbase, row, col, *ma;
|
---|
15 | char *ms[];
|
---|
16 |
|
---|
17 | Copies lines from ms, with attributes from ma, to sbase at (row,col).
|
---|
18 | =============================================================================
|
---|
19 | */
|
---|
20 |
|
---|
21 | typedef unsigned int uint;
|
---|
22 |
|
---|
23 | extern int vputc();
|
---|
24 |
|
---|
25 | /*
|
---|
26 | =============================================================================
|
---|
27 | vmput(sbase, row, col, ms, ma) -- put a menu item in a screen image.
|
---|
28 | Copies lines from ms, with attribute ma, to sbase at (row,col).
|
---|
29 | =============================================================================
|
---|
30 | */
|
---|
31 |
|
---|
32 | vmput(sbase, row, col, ms, ma)
|
---|
33 | uint *sbase, row, col, ma;
|
---|
34 | char *ms[];
|
---|
35 | {
|
---|
36 | register uint c, tc, tr;
|
---|
37 | char *cp;
|
---|
38 |
|
---|
39 | tr = row;
|
---|
40 |
|
---|
41 | while (cp = *ms++) {
|
---|
42 |
|
---|
43 | tc = col;
|
---|
44 |
|
---|
45 | while (c = *cp++)
|
---|
46 | vputc(sbase, tr, tc++, c, ma);
|
---|
47 |
|
---|
48 | tr++;
|
---|
49 | }
|
---|
50 | }
|
---|
51 |
|
---|
52 | /* |
---|
53 | */
|
---|
54 |
|
---|
55 | /*
|
---|
56 | =============================================================================
|
---|
57 | vmputa(sbase, row, col, ms, ma) -- put a menu item in a screen image.
|
---|
58 | Copies lines from ms, with attributes from ma, to sbase at (row,col).
|
---|
59 | =============================================================================
|
---|
60 | */
|
---|
61 |
|
---|
62 | vmputa(sbase, row, col, ms, ma)
|
---|
63 | uint *sbase, row, col, *ma[];
|
---|
64 | char *ms[];
|
---|
65 | {
|
---|
66 | register uint c, tc, tr;
|
---|
67 | uint *tm;
|
---|
68 | char *cp;
|
---|
69 |
|
---|
70 | tr = row;
|
---|
71 |
|
---|
72 | while (cp = *ms++) {
|
---|
73 |
|
---|
74 | tc = col;
|
---|
75 | tm = *ma++;
|
---|
76 |
|
---|
77 | while (c = *cp++)
|
---|
78 | vputc(sbase, tr, tc++, c, *tm++);
|
---|
79 |
|
---|
80 | tr++;
|
---|
81 | }
|
---|
82 | }
|
---|