summaryrefslogtreecommitdiff
path: root/src/termcap.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-01-09 23:44:41 +0000
committerKarl Heuer <kwzh@gnu.org>1996-01-09 23:44:41 +0000
commit2fe377d1f2140a4ebf54e22204626a1adc8db119 (patch)
tree4b9ec51a91b30147f2c18278bc56cd241e86bf05 /src/termcap.c
parent41d5da4318f93e05aa86d633d4ab1dc2dba0293a (diff)
downloademacs-2fe377d1f2140a4ebf54e22204626a1adc8db119.tar.gz
(tgetent): Find all the tc caps that there are.
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/termcap.c b/src/termcap.c
index 26a12290778..2b0277874ba 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -423,7 +423,7 @@ tgetent (bp, name)
register int fd;
struct buffer buf;
register char *bp1;
- char *bp2;
+ char *tc_search_point;
char *term;
int malloc_size = 0;
register int c;
@@ -511,7 +511,7 @@ tgetent (bp, name)
malloc_size = indirect ? strlen (tcenv) + 1 : buf.size;
bp = (char *) xmalloc (malloc_size);
}
- bp1 = bp;
+ tc_search_point = bp1 = bp;
if (indirect)
/* Copy the data from the environment variable. */
@@ -542,11 +542,10 @@ tgetent (bp, name)
malloc_size = bp1 - bp + buf.size;
termcap_name = (char *) xrealloc (bp, malloc_size);
bp1 += termcap_name - bp;
+ tc_search_point += termcap_name - bp;
bp = termcap_name;
}
- bp2 = bp1;
-
/* Copy the line of the entry from buf into bp. */
termcap_name = buf.ptr;
while ((*bp1++ = c = *termcap_name++) && c != '\n')
@@ -560,7 +559,8 @@ tgetent (bp, name)
/* Does this entry refer to another terminal type's entry?
If something is found, copy it into heap and null-terminate it. */
- term = tgetst1 (find_capability (bp2, "tc"), (char **) 0);
+ tc_search_point = find_capability (tc_search_point, "tc");
+ term = tgetst1 (tc_search_point, (char **) 0);
}
close (fd);