| 1 | From: Michael Hudson-Doyle <[email protected]>
|
| 2 | Date: Thu, 11 Apr 2024 11:18:39 +0200
|
| 3 | Subject: Add function prototypes to fix implicit function declaration errors
|
| 4 |
|
| 5 | Reviewed-By: Tobias Heider <[email protected]>
|
| 6 | Bug-Debian: https://bugs.debian.org/1066285
|
| 7 | ---
|
| 8 | cl/cl.h | 5 +++++
|
| 9 | cl/cl_funcs.c | 6 ++++++
|
| 10 | common/conv.h | 3 +++
|
| 11 | common/multibyte.h | 6 ++++++
|
| 12 | dist/configure | 1 +
|
| 13 | 5 files changed, 21 insertions(+)
|
| 14 |
|
| 15 | diff --git a/cl/cl.h b/cl/cl.h
|
| 16 | index 3d71410..4ff232d 100644
|
| 17 | |
| 18 | |
| 19 | @@ -26,6 +26,11 @@
|
| 20 | #endif
|
| 21 | #endif
|
| 22 |
|
| 23 | +/*
|
| 24 | + * for setupterm()
|
| 25 | + */
|
| 26 | +#include <term.h>
|
| 27 | +
|
| 28 | typedef struct _cl_private {
|
| 29 | char ibuf[256]; /* Input keys. */
|
| 30 |
|
| 31 | diff --git a/cl/cl_funcs.c b/cl/cl_funcs.c
|
| 32 | index c5fc597..b6174ef 100644
|
| 33 | |
| 34 | |
| 35 | @@ -31,6 +31,12 @@ static const char sccsid[] = "$Id: cl_funcs.c,v 10.72 2002/03/02 23:18:33 skimo
|
| 36 | #include "../vi/vi.h"
|
| 37 | #include "cl.h"
|
| 38 |
|
| 39 | +/*
|
| 40 | + * This is declared by ncurses.h, but only if _XOPEN_SOURCE is set and lots of
|
| 41 | + * other things break if we define that.
|
| 42 | + */
|
| 43 | +extern int waddnwstr (WINDOW *,const wchar_t *,int);
|
| 44 | +
|
| 45 | static void cl_rdiv __P((SCR *));
|
| 46 |
|
| 47 | static int
|
| 48 | diff --git a/common/conv.h b/common/conv.h
|
| 49 | index 76b06c1..a7675c4 100644
|
| 50 | |
| 51 | |
| 52 | @@ -21,3 +21,6 @@ struct _conv {
|
| 53 | char2wchar_t input2int;
|
| 54 | wchar2char_t int2disp;
|
| 55 | };
|
| 56 | +
|
| 57 | +extern int conv_enc (SCR *sp, int option, char *enc);
|
| 58 | +extern void conv_init (SCR *orig, SCR *sp);
|
| 59 | diff --git a/common/multibyte.h b/common/multibyte.h
|
| 60 | index 820f4ec..2484521 100644
|
| 61 | |
| 62 | |
| 63 | @@ -5,6 +5,12 @@
|
| 64 | #include <wchar.h>
|
| 65 | #include <wctype.h>
|
| 66 |
|
| 67 | +/*
|
| 68 | + * This is declared by wchar.h, but only if _XOPEN_SOURCE is set and lots of
|
| 69 | + * other things break if we define that.
|
| 70 | + */
|
| 71 | +extern int wcwidth (wchar_t c);
|
| 72 | +
|
| 73 | typedef wchar_t RCHAR_T;
|
| 74 | #define RCHAR_T_MAX ((1 << 24)-1)
|
| 75 | typedef wchar_t CHAR_T;
|
| 76 | diff --git a/dist/configure b/dist/configure
|
| 77 | index b23e167..d7fb54f 100755
|
| 78 | |
| 79 | |
| 80 | @@ -27385,6 +27385,7 @@ cat confdefs.h >>conftest.$ac_ext
|
| 81 | cat >>conftest.$ac_ext <<_ACEOF
|
| 82 | /* end confdefs.h. */
|
| 83 | #include <$CURSHEADER>
|
| 84 | +#include <term.h>
|
| 85 | int
|
| 86 | main ()
|
| 87 | {
|