1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <dos.h>
20 #include <ws.h>
21 #include <ws_dcls.h>
22 #include <ws_func.h>
23 #include <wsmincap.h>
24
25 #define LOW_BYTE 0x00FF
26
27 puttdata (p_min_cap, p_buffer_ptr, p_buffer_len)
28
29 int p_min_cap;
30 char *p_buffer_ptr;
31 int p_buffer_len;
32 {
33 struct putt_struc ps;
34 int error_code;
35 int length;
36 int i;
37 char *sp;
38
39
40
41
42 if (p_min_cap == FG_BREAK)
43 return (call_mowse_int (I$FOREBREAK, 0, 0));
44
45
46
47
48 if ((p_min_cap & LOW_BYTE) >= 125)
49 return (call_mowse_int (8, &p_min_cap, 2));
50
51
52
53 ps.minor_cap = p_min_cap;
54
55
56
57 while (p_buffer_len > 0)
58 { if (p_buffer_len > WSPAKSIZ)
59 length = WSPAKSIZ;
60 else
61 length = p_buffer_len;
62
63 sp = &ps.putstr[0];
64 for (i=0; i < length; i++)
65 { *sp++ = *p_buffer_ptr++;
66 }
67
68
69
70 ps.putstrl = length;
71 error_code = call_mowse_int (I$PUTTDATA,&ps ,sizeof(ps));
72 p_buffer_len -= length;
73 }
74
75 return(error_code);
76 }
77 ^Z