1 /* ***********************************************************
 2    *                                                         *
 3    * Copyright, (C) Honeywell Bull Inc., 1987                *
 4    *                                                         *
 5    * Copyright, (C) Honeywell Information Systems Inc., 1986 *
 6    *                                                         *
 7    *********************************************************** */
 8 
 9 /* HISTORY COMMENTS:
10   1) change(86-05-05,Westcott), approve(87-07-13,MCR7580),
11      audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072):
12      Created.
13                                                    END HISTORY COMMENTS */
14 
15 /* : PROCEDURE FUNCTION (sdbgnum)
16 
17 Display a number directly to the screen (bypassing DOS print functions).
18 */
19 
20 #define LF 10
21 #define CR 13
22 
23 static int  row = 0,
24             col = 0;
25 static char temp[2] = " ";
26 
27 sdbgnum (p_num)
28 
29 int p_num;
30 {
31 char temp[32];
32 
33    sprintf(temp,"\nNUM = %x\n",p_num);
34    sdbgmsg(temp);
35 }
36 
37 /* : PROCEDURE FUNCTION (sstmsg)
38 
39 Send a status message to the screen (for /g MOWSE command option)
40 */
41 
42 sstmsg (p_msg)
43 
44 char p_msg[];
45 {
46 int  i;
47 char chr;
48 
49 /* : Send CR/LF and a reverse video '('. */
50 
51    sdbgchr(CR);
52    sdbgchr(LF);
53 
54 /* : Send the message, if character is not printable convert it to octal */
55 
56    for (i = 0; p_msg[i] != '\000'; i += 1) {
57       chr = p_msg[i];
58       if (chr >= ' ' && chr <= '~')
59          sdbgchr(chr);
60       else {
61          sdbgchr('\\');                     /* Escape character */
62          sdbgchr(((chr>>6) & 3) + '0');     /* High order octal */
63          sdbgchr(((chr>>3) & 7) + '0');     /* Med. order octal */
64          sdbgchr((chr & 7) + '0');          /* Low  order octal */
65       }
66    }
67 
68    sdbgchr(CR);
69    sdbgchr(LF);
70 }