From 50938595880fd87c7dcd39a607cba1b0a7598baf Mon Sep 17 00:00:00 2001
From: Paul Eggert
Date: Tue, 8 Mar 2011 10:26:34 -0800
Subject: * tparam.h: New file.
* term.c, tparam.h: Include it.
* deps.mk (term.o, tparam.o): Depend on tparam.h.
* term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
Move these decls to tparam.h, and make them agree with what
is actually in tparam.c. The previous trick of using incompatible
decls in different modules does not conform to the C standard.
All callers of tparam changed to use tparam's actual API.
* tparam.c (tparam1, tparam, tgoto):
Use const pointers where appropriate.
---
src/tparam.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 src/tparam.h
(limited to 'src/tparam.h')
diff --git a/src/tparam.h b/src/tparam.h
new file mode 100644
index 00000000000..11c9ae68aad
--- /dev/null
+++ b/src/tparam.h
@@ -0,0 +1,31 @@
+/* Interface definitions for termcap entries.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs. If not, see . */
+
+
+/* Don't try to include termcap.h. On some systems, configure finds a
+ non-standard termcap.h that the main build won't find. */
+
+void tputs (const char *, int, int (*) (int));
+int tgetent (char *, const char *);
+int tgetflag (char *id);
+int tgetnum (char *id);
+char *tgetstr (char *, char **);
+char *tgoto (const char *, int, int);
+
+char *tparam (const char *, char *, int, int, int, int, int);
--
cgit v1.2.1
From b024a9466a0e238e053d0464f4a4f9b19d04648b Mon Sep 17 00:00:00 2001
From: Paul Eggert
Date: Tue, 8 Mar 2011 21:46:35 -0800
Subject: * term.c, tparam.h (tgetflag, tgetnum, tgetstr): Move the const to
the .h file
---
src/tparam.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'src/tparam.h')
diff --git a/src/tparam.h b/src/tparam.h
index 11c9ae68aad..3cd3e6053cc 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -23,9 +23,9 @@ along with GNU Emacs. If not, see . */
void tputs (const char *, int, int (*) (int));
int tgetent (char *, const char *);
-int tgetflag (char *id);
-int tgetnum (char *id);
-char *tgetstr (char *, char **);
+int tgetflag (const char *);
+int tgetnum (const char *);
+char *tgetstr (const char *, char **);
char *tgoto (const char *, int, int);
char *tparam (const char *, char *, int, int, int, int, int);
--
cgit v1.2.1