89 |
|
|
90 |
|
|
91 |
|
void |
92 |
– |
xt_puts(s, t) /* output a string */ |
93 |
– |
register char *s; |
94 |
– |
TEXTWIND *t; |
95 |
– |
{ |
96 |
– |
int oldcurs; |
97 |
– |
|
98 |
– |
oldcurs = xt_cursor(t, TNOCURS); /* for efficiency */ |
99 |
– |
while (*s) |
100 |
– |
xt_putc(*s++, t); |
101 |
– |
xt_cursor(t, oldcurs); |
102 |
– |
} |
103 |
– |
|
104 |
– |
|
105 |
– |
void |
92 |
|
xt_putc(c, t) /* output a character */ |
93 |
< |
char c; |
93 |
> |
int c; |
94 |
|
register TEXTWIND *t; |
95 |
|
{ |
96 |
+ |
char ch[2]; |
97 |
+ |
|
98 |
|
checkcurs(t); |
99 |
|
switch (c) { |
100 |
|
case '\n': |
115 |
|
default: |
116 |
|
if (t->c >= t->nc) |
117 |
|
xt_putc('\n', t); |
118 |
+ |
ch[0] = c; ch[1] = '\0'; |
119 |
|
XDrawImageString(t->dpy, t->w, t->gc, LEFTMAR+t->c*Width(t->f), |
120 |
< |
YStart(t->f)+t->r*Height(t->f), &c, 1); |
120 |
> |
YStart(t->f)+t->r*Height(t->f), ch, 1); |
121 |
|
t->lp[t->r][t->c++] = c; |
122 |
|
break; |
123 |
|
} |
124 |
|
restorecurs(t); |
125 |
+ |
} |
126 |
+ |
|
127 |
+ |
|
128 |
+ |
void |
129 |
+ |
xt_puts(s, t) /* output a string */ |
130 |
+ |
register char *s; |
131 |
+ |
TEXTWIND *t; |
132 |
+ |
{ |
133 |
+ |
int oldcurs; |
134 |
+ |
|
135 |
+ |
oldcurs = xt_cursor(t, TNOCURS); /* for efficiency */ |
136 |
+ |
while (*s) |
137 |
+ |
xt_putc(*s++, t); |
138 |
+ |
xt_cursor(t, oldcurs); |
139 |
|
} |
140 |
|
|
141 |
|
|