version 1.3, 2009/02/23 07:09:13 |
version 1.4, 2009/02/23 09:33:34 |
Line 45 static void pword(struct termp *, const char *, siz |
|
Line 45 static void pword(struct termp *, const char *, siz |
|
static void pescape(struct termp *, |
static void pescape(struct termp *, |
const char *, size_t *, size_t); |
const char *, size_t *, size_t); |
static void chara(struct termp *, char); |
static void chara(struct termp *, char); |
|
static void stringa(struct termp *, const char *); |
static void style(struct termp *, enum termstyle); |
static void style(struct termp *, enum termstyle); |
|
|
#ifdef __linux__ |
#ifdef __linux__ |
Line 231 vspace(struct termp *p) |
|
Line 232 vspace(struct termp *p) |
|
|
|
|
|
static void |
static void |
|
stringa(struct termp *p, const char *s) |
|
{ |
|
|
|
/* XXX - speed up if not passing to chara. */ |
|
for ( ; *s; s++) |
|
chara(p, *s); |
|
} |
|
|
|
|
|
static void |
chara(struct termp *p, char c) |
chara(struct termp *p, char c) |
{ |
{ |
|
|
Line 284 pescape(struct termp *p, const char *word, size_t *i, |
|
Line 295 pescape(struct termp *p, const char *word, size_t *i, |
|
chara(p, ']'); |
chara(p, ']'); |
else if ('l' == word[*i] && 'B' == word[*i + 1]) |
else if ('l' == word[*i] && 'B' == word[*i + 1]) |
chara(p, '['); |
chara(p, '['); |
|
else if ('<' == word[*i] && '-' == word[*i + 1]) |
|
stringa(p, "<-"); |
|
else if ('-' == word[*i] && '>' == word[*i + 1]) |
|
stringa(p, "->"); |
|
|
(*i)++; |
(*i)++; |
return; |
return; |