diff options
Diffstat (limited to 'x11/xview-lib/patches/patch-eg')
-rw-r--r-- | x11/xview-lib/patches/patch-eg | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/x11/xview-lib/patches/patch-eg b/x11/xview-lib/patches/patch-eg new file mode 100644 index 00000000000..73418d40a4b --- /dev/null +++ b/x11/xview-lib/patches/patch-eg @@ -0,0 +1,65 @@ +$NetBSD: patch-eg,v 1.1 2006/01/05 18:25:57 joerg Exp $ + +--- lib/libxview/textsw/txt_once.c.orig 2006-01-04 11:09:00.000000000 +0000 ++++ lib/libxview/textsw/txt_once.c +@@ -18,6 +18,7 @@ static char sccsid[] = "@(#)txt_once.c 2 + #include <xview/textsw.h> + #include <xview_private/txt_impl.h> + #include <fcntl.h> ++#include <limits.h> + #include <signal.h> + #include <pixrect/pr_util.h> + +@@ -548,13 +549,21 @@ textsw_init_internal(folio, status, defa + Es_handle ps_esh; + Ei_handle plain_text_eih; + char *name = 0; ++#ifdef NAME_MAX ++ CHAR scratch_name[NAME_MAX]; ++#else + CHAR scratch_name[MAXNAMLEN]; ++#endif + Es_status es_status; + Frame frame; + Xv_Notice text_notice; + extern void textsw_split_init_proc(); + #ifdef OW_I18N ++#ifdef NAME_MAX ++ CHAR name_wc[NAME_MAX]; ++#else + CHAR name_wc[MAXNAMLEN]; ++#endif + #ifdef FULL_R5 + XVaNestedList va_nested_list; + #endif /* FULL_R5 */ +@@ -642,18 +651,30 @@ textsw_init_internal(folio, status, defa + name = (char *) defaults[1]; + #ifdef OW_I18N + if (name) ++#ifdef NAME_MAX ++ (void) mbstowcs(name_wc, name, NAME_MAX); ++#else + (void) mbstowcs(name_wc, name, MAXNAMLEN); + #endif ++#endif + } + + #ifdef OW_I18N + defaults = attr_find(attrs, TEXTSW_FILE_WCS); + if (*defaults) { ++#ifdef NAME_MAX ++ char name_mb[NAME_MAX]; ++#else + char name_mb[MAXNAMLEN]; ++#endif + + ATTR_CONSUME(*defaults); + STRCPY(name_wc, (CHAR *) defaults[1]); ++#ifdef NAME_MAX ++ (void) wcstombs(name_mb, name_wc, NAME_MAX); ++#else + (void) wcstombs(name_mb, name_wc, MAXNAMLEN); ++#endif + name = name_mb; + } + if (name_wc[0] != NULL) { /* } for match */ |