Author: engelsman Date: 2010-04-18 11:38:13 -0700 (Sun, 18 Apr 2010) New Revision: 7530 Log: tweaked fl_wcwidth.c and mk_wcwidth.c to supercede system wchar_t
fl_wcwidth.c has a typedef unsigned int wchar_t; and mk_wcwidth.c has an #if 0 to stop #include <wchar.h> Modified: branches/branch-1.3/src/xutf8/fl_wcwidth.c branches/branch-1.3/src/xutf8/mk_wcwidth.c Modified: branches/branch-1.3/src/xutf8/fl_wcwidth.c =================================================================== --- branches/branch-1.3/src/xutf8/fl_wcwidth.c 2010-04-18 15:13:03 UTC (rev 7529) +++ branches/branch-1.3/src/xutf8/fl_wcwidth.c 2010-04-18 18:38:13 UTC (rev 7530) @@ -30,7 +30,9 @@ * forward declare the routines as static to avoid name leakage. */ -#include <wchar.h> +#include <stdio.h> /* for size_t only */ +typedef unsigned int wchar_t; /* supercede system wchar_t */ + static int mk_wcwidth(wchar_t ucs); static int mk_wcswidth(const wchar_t *pwcs, size_t n); static int mk_wcwidth_cjk(wchar_t ucs); Property changes on: branches/branch-1.3/src/xutf8/fl_wcwidth.c ___________________________________________________________________ Name: svn:keywords + Id Modified: branches/branch-1.3/src/xutf8/mk_wcwidth.c =================================================================== --- branches/branch-1.3/src/xutf8/mk_wcwidth.c 2010-04-18 15:13:03 UTC (rev 7529) +++ branches/branch-1.3/src/xutf8/mk_wcwidth.c 2010-04-18 18:38:13 UTC (rev 7530) @@ -1,4 +1,10 @@ /* + * Important! + * This file should remain as close to Markus Kuhn's original source + * as possible for easy checking for changes later, however unlikely. + * All customisations to work with FLTK shall be annotated! + */ +/* * This is an implementation of wcwidth() and wcswidth() (defined in * IEEE Std 1002.1-2001) for Unicode. * @@ -59,7 +65,14 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ +/* + * FLTK - avoid possible problems on systems with 32-bit wchar_t. + * In the first instance, wchar_t is superceded in calling file + * to avoid any unnecessary changes in this one. + */ +#if 0 #include <wchar.h> +#endif struct interval { int first; Property changes on: branches/branch-1.3/src/xutf8/mk_wcwidth.c ___________________________________________________________________ Name: svn:keywords + Id _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
