From 873b95deffb430226e6d6ff17c0bd5c606d41ab5 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 29 Dec 2002 15:08:27 +0000 Subject: [PATCH] Put prototypes for the functions exported by wcwidth.c in putty.h, and remove one from terminal.c. Have wcwidth.c include putty.h to get its prototypes. [originally from svn r2377] --- putty.h | 6 ++++++ terminal.c | 1 - wcwidth.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/putty.h b/putty.h index 4b85aa90..0f2911c5 100644 --- a/putty.h +++ b/putty.h @@ -599,6 +599,12 @@ char *cp_enumerate (int index); char *cp_name(int codepage); void get_unitab(int codepage, wchar_t * unitab, int ftype); +/* + * Exports from wcwidth.c + */ +int wcwidth(wchar_t ucs); +int wcswidth(const wchar_t *pwcs, size_t n); + /* * Exports from mscrypto.c */ diff --git a/terminal.c b/terminal.c index c7d05c50..3fcff47f 100644 --- a/terminal.c +++ b/terminal.c @@ -1542,7 +1542,6 @@ void term_out(Terminal *term) term->logctx) logtraffic(term->logctx, (unsigned char) c, LGTYP_ASCII); { - extern int wcwidth(wchar_t ucs); int width = 0; if (DIRECT_CHAR(c)) width = 1; diff --git a/wcwidth.c b/wcwidth.c index 2d7a0935..ed7529ba 100644 --- a/wcwidth.c +++ b/wcwidth.c @@ -8,6 +8,8 @@ #include +#include "putty.h" + struct interval { unsigned short first; unsigned short last;