X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/653d4f43a7280d8fb84173be37b0c4c518cf7a88..5fbd17e369ca30a47ab8a2eda0b2f2ea9b690bb4:/src/termcap.c diff --git a/src/termcap.c b/src/termcap.c index 5f73107746..394b4056eb 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -1,5 +1,5 @@ /* Work-alike for termcap, plus extra features. - Copyright (C) 1985-1986, 1993-1995, 2000-2008, 2011, 2013 Free + Copyright (C) 1985-1986, 1993-1995, 2000-2008, 2011, 2013-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -393,7 +393,7 @@ tgetent (char *bp, const char *name) if (termcap_name && (*termcap_name == '\\' || *termcap_name == '/' || termcap_name[1] == ':')) - dostounix_filename (termcap_name, 0); + dostounix_filename (termcap_name); #endif filep = termcap_name && valid_filename_p (termcap_name); @@ -406,7 +406,7 @@ tgetent (char *bp, const char *name) if (termcap_name && !filep && !strcmp (name, getenv ("TERM"))) { - indirect = tgetst1 (find_capability (termcap_name, "tc"), (char **) 0); + indirect = tgetst1 (find_capability (termcap_name, "tc"), 0); if (!indirect) { if (!bp) @@ -455,7 +455,7 @@ tgetent (char *bp, const char *name) /* Scan the file, reading it via buf, till find start of main entry. */ if (scan_file (term, fd, &buf) == 0) { - close (fd); + emacs_close (fd); xfree (buf.beg); if (malloc_size) xfree (bp); @@ -490,10 +490,10 @@ tgetent (char *bp, const char *name) /* Does this entry refer to another terminal type's entry? If something is found, copy it into heap and null-terminate it. */ tc_search_point = find_capability (tc_search_point, "tc"); - term = tgetst1 (tc_search_point, (char **) 0); + term = tgetst1 (tc_search_point, 0); } - close (fd); + emacs_close (fd); xfree (buf.beg); if (malloc_size) @@ -520,7 +520,7 @@ scan_file (char *str, int fd, struct termcap_buffer *bufp) bufp->ateof = 0; *bufp->ptr = '\0'; - lseek (fd, 0L, 0); + lseek (fd, 0, 0); while (!bufp->ateof) {