diff options
author | joerg <joerg@pkgsrc.org> | 2006-01-05 18:25:56 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-01-05 18:25:56 +0000 |
commit | 2bbbd70847b9f606c46f5193c569c96f384aae19 (patch) | |
tree | 659ad7ad2255232ad9accf5dbc9b4465f2bf905d /x11/xview-lib/patches/patch-eg | |
parent | b3fb906ebb28f94782914910bd09312ff21e3842 (diff) | |
download | pkgsrc-2bbbd70847b9f606c46f5193c569c96f384aae19.tar.gz |
First try on fixing xview. Fix errno. Add DragonFly support.
Use NAME_MAX when available. Don't try to fake a FILE on DragonFly.
The implementation of textsw_scanf can be improved, it is very
defensively and slow ATM, the snprintf usage should be portable.
Fix a number of prototype mismatches, e.g. variable argument functions
can conflict with K&R prototypes.
Bump revision since the package "compiled" before, e.g. build
errors where ignored.
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 */ |