]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Put prototypes for the functions exported by wcwidth.c in putty.h, and remove
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 29 Dec 2002 15:08:27 +0000 (15:08 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
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.

[originally from svn r2377]

putty.h
terminal.c
wcwidth.c

diff --git a/putty.h b/putty.h
index 4b85aa904618ac3f0c71b3c20dcf63e24119ea85..0f2911c538fe5ad127d1e6798e236f05fbf121ef 100644 (file)
--- 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
  */
index c7d05c5004b201e221d37ed848e578f0e753a7bc..3fcff47f29874b71f1563b7ca46000607323bcf8 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 2d7a093582b33334a10348dd12593bd7e4257c3a..ed7529ba8eec76f4d343672aee275b0694e7ce2b 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;