summaryrefslogtreecommitdiff
path: root/ansi.c
diff options
context:
space:
mode:
Diffstat (limited to 'ansi.c')
-rw-r--r--ansi.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/ansi.c b/ansi.c
index 925735d..76353ef 100644
--- a/ansi.c
+++ b/ansi.c
@@ -245,7 +245,7 @@ struct win *p;
{
p->w_gr = nwin_default.gr;
p->w_c1 = nwin_default.c1;
- SetCharsets(p, "BBBB02");
+ SetCharsets(p, "BBBBB02");
if (nwin_default.charset)
SetCharsets(p, nwin_default.charset);
#ifdef ENCODINGS
@@ -260,7 +260,7 @@ char *s;
{
int i;
- for (i = 0; i < 4 && *s; i++, s++)
+ for (i = 0; i < 5 && *s; i++, s++)
if (*s != '.')
p->w_charsets[i] = ((*s == 'B') ? ASCII : *s);
if (*s && *s++ != '.')
@@ -580,7 +580,7 @@ register int len;
{
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- if (curr->w_NumArgs < MAXARGS)
+ if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS)
{
if (curr->w_args[curr->w_NumArgs] < 100000000)
curr->w_args[curr->w_NumArgs] =
@@ -1277,7 +1277,8 @@ int c, intermediate;
break;
# endif
curr->w_charsets[0] = curr->w_charsets[1] =
- curr->w_charsets[2] = curr->w_charsets[2] =
+ curr->w_charsets[2] = curr->w_charsets[3] =
+ curr->w_charsets[4] =
curr->w_FontL = curr->w_FontR = ASCII;
curr->w_Charset = 0;
curr->w_CharsetR = 2;
@@ -1481,7 +1482,7 @@ StringEnd()
case AKA:
if (curr->w_title == curr->w_akabuf && !*curr->w_string)
break;
- ChangeAKA(curr, curr->w_string, 20);
+ ChangeAKA(curr, curr->w_string, strlen(curr->w_string));
if (!*curr->w_string)
curr->w_autoaka = curr->w_y + 1;
break;
@@ -1626,7 +1627,7 @@ MapCharsetR(n)
int n;
{
curr->w_ss = 0;
- if (curr->w_CharsetR != n)
+ if (curr->w_CharsetR != n && curr->w_CharsetR != 4)
{
curr->w_CharsetR = n;
curr->w_FontR = curr->w_charsets[n];
@@ -1647,7 +1648,7 @@ SaveCursor()
curr->w_SavedCharset = curr->w_Charset;
curr->w_SavedCharsetR = curr->w_CharsetR;
bcopy((char *) curr->w_charsets, (char *) curr->w_SavedCharsets,
- 4 * sizeof(int));
+ 5 * sizeof(int));
#endif
}
@@ -1662,7 +1663,7 @@ RestoreCursor()
curr->w_rend = curr->w_SavedRend;
#ifdef FONT
bcopy((char *) curr->w_SavedCharsets, (char *) curr->w_charsets,
- 4 * sizeof(int));
+ 5 * sizeof(int));
curr->w_Charset = curr->w_SavedCharset;
curr->w_CharsetR = curr->w_SavedCharsetR;
curr->w_ss = 0;
@@ -2097,8 +2098,8 @@ struct win *p;
char *s;
int l;
{
- if (l > 20)
- l = 20;
+ if (l > MAXAKA)
+ l = MAXAKA;
strncpy(p->w_akachange, s, l);
p->w_akachange[l] = 0;
p->w_title = p->w_akachange;