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 void vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib);
|
---|
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 | void vmput(uint *sbase, uint row, uint col, uint ma, char *ms[])
|
---|
33 | {
|
---|
34 | register uint c, tc, tr;
|
---|
35 | char *cp;
|
---|
36 |
|
---|
37 | tr = row;
|
---|
38 |
|
---|
39 | while (cp = *ms++) {
|
---|
40 |
|
---|
41 | tc = col;
|
---|
42 |
|
---|
43 | while (c = *cp++)
|
---|
44 | vputc(sbase, tr, tc++, c, ma);
|
---|
45 |
|
---|
46 | tr++;
|
---|
47 | }
|
---|
48 | }
|
---|
49 |
|
---|
50 | /* |
---|
51 | */
|
---|
52 |
|
---|
53 | /*
|
---|
54 | =============================================================================
|
---|
55 | vmputa(sbase, row, col, ms, ma) -- put a menu item in a screen image.
|
---|
56 | Copies lines from ms, with attributes from ma, to sbase at (row,col).
|
---|
57 | =============================================================================
|
---|
58 | */
|
---|
59 |
|
---|
60 | void vmputa(uint *sbase, uint row, uint col, uint *ma[], char *ms[])
|
---|
61 | {
|
---|
62 | register uint c, tc, tr;
|
---|
63 | uint *tm;
|
---|
64 | char *cp;
|
---|
65 |
|
---|
66 | tr = row;
|
---|
67 |
|
---|
68 | while (cp = *ms++) {
|
---|
69 |
|
---|
70 | tc = col;
|
---|
71 | tm = *ma++;
|
---|
72 |
|
---|
73 | while (c = *cp++)
|
---|
74 | vputc(sbase, tr, tc++, c, *tm++);
|
---|
75 |
|
---|
76 | tr++;
|
---|
77 | }
|
---|
78 | }
|
---|