Mercurial > hg > xemacs-beta
diff src/termcap.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | abe6d1db359e |
children | 804517e16990 |
line wrap: on
line diff
--- a/src/termcap.c Fri Mar 08 13:33:14 2002 +0000 +++ b/src/termcap.c Wed Mar 13 08:54:06 2002 +0000 @@ -1,5 +1,6 @@ /* Work-alike for termcap, plus extra features. Copyright (C) 1985, 1986, 1993 Free Software Foundation, Inc. + Copyright (C) 2001 Ben Wing. This file is part of XEmacs. @@ -60,7 +61,7 @@ static void memory_out () { - write (2, "virtual memory exhausted\n", 25); + retry_write (2, "virtual memory exhausted\n", 25); exit (1); } @@ -344,7 +345,7 @@ char *tcenv; /* TERMCAP value, if it contains :tc=. */ const char *indirect = 0; /* Terminal type in :tc= in TERMCAP value. */ - tem = getenv ("TERMCAP"); + tem = egetenv ("TERMCAP"); if (tem && *tem == 0) tem = 0; @@ -354,7 +355,7 @@ it is the entry itself, but only if the name the caller requested matches the TERM variable. */ - if (tem && !IS_DIRECTORY_SEP (*tem) && !strcmp (name, getenv ("TERM"))) + if (tem && !IS_DIRECTORY_SEP (*tem) && !strcmp (name, egetenv ("TERM"))) { indirect = tgetst1 (find_capability (tem, "tc"), 0); if (!indirect) @@ -379,7 +380,7 @@ /* Here we know we must search a file and tem has its name. */ - fd = open (tem, 0, 0); + fd = qxe_open ((Intbyte *) tem, 0, 0); if (fd < 0) return -1; @@ -439,7 +440,7 @@ term = tgetst1 (find_capability (bp2, "tc"), 0); } - close (fd); + retry_close (fd); xfree (buf.beg); if (malloc_size) @@ -598,7 +599,7 @@ memcpy (buf, bufp->ptr, bufp->full -= bufp->ptr - buf); bufp->ptr = buf; } - if (!(nread = read (fd, buf + bufp->full, bufp->size - bufp->full))) + if (!(nread = retry_read (fd, buf + bufp->full, bufp->size - bufp->full))) bufp->ateof = 1; bufp->full += nread; buf[bufp->full] = 0;