Put prototypes for the functions exported by wcwidth.c in putty.h, and remove
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sun, 29 Dec 2002 15:08:27 +0000 (15:08 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Sun, 29 Dec 2002 15:08:27 +0000 (15:08 +0000)
one from terminal.c.  Have wcwidth.c include putty.h to get its prototypes.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2377 cda61777-01e9-0310-a592-d414129be87e

putty.h
terminal.c
wcwidth.c

diff --git a/putty.h b/putty.h
index 4b85aa9..0f2911c 100644 (file)
--- a/putty.h
+++ b/putty.h
@@ -600,6 +600,12 @@ 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
  */
 #ifdef MSCRYPTOAPI
index c7d05c5..3fcff47 100644 (file)
@@ -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;
index 2d7a093..ed7529b 100644 (file)
--- a/wcwidth.c
+++ b/wcwidth.c
@@ -8,6 +8,8 @@
 
 #include <stddef.h>
 
+#include "putty.h"
+
 struct interval {
   unsigned short first;
   unsigned short last;