From 82c07df8d387e8c5fc54f1b9b01369a2ac0e0a78 Mon Sep 17 00:00:00 2001 From: Yukihiro Nakai Date: Sun, 3 Mar 2002 10:12:42 +0000 Subject: Update stf-parse.c patch not to break multibyte fix --- math/gnumeric/Makefile | 1 + math/gnumeric/files/patch-src::stf-parse.c | 43 ++++++----------------------- math/gnumeric2/Makefile | 1 + math/gnumeric2/files/patch-src::stf-parse.c | 43 ++++++----------------------- 4 files changed, 20 insertions(+), 68 deletions(-) (limited to 'math') diff --git a/math/gnumeric/Makefile b/math/gnumeric/Makefile index 4d6a1f333a1b..db58961dc952 100644 --- a/math/gnumeric/Makefile +++ b/math/gnumeric/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnumeric PORTVERSION= 1.0.4 +PORTREVISION= 1 CATEGORIES?= math gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= stable/sources/gnumeric diff --git a/math/gnumeric/files/patch-src::stf-parse.c b/math/gnumeric/files/patch-src::stf-parse.c index b0610997e852..b45569925e68 100644 --- a/math/gnumeric/files/patch-src::stf-parse.c +++ b/math/gnumeric/files/patch-src::stf-parse.c @@ -1,37 +1,12 @@ - -$FreeBSD$ - ---- src/stf-parse.c 2001/12/27 19:36:17 1.1 -+++ src/stf-parse.c 2001/12/27 19:44:24 -@@ -29,8 +29,6 @@ - #include "clipboard.h" - - #include --#include --#include - - #define WARN_TOO_MANY_ROWS _("Too many rows in data to parse: %d") - #define WARN_TOO_MANY_COLS _("Too many columns in data to parse: %d") -@@ -865,20 +863,9 @@ - wchar_t wstr; - int len; - -- for (s = data; *s != '\0';) { -- len = mblen(s, MB_CUR_MAX); -- if (len == -1) -+ for (s = data; *s != '\0'; s++) { -+ if (!isprint (*s) && !isspace (*s)) +--- src/stf-parse.c.orig Fri Mar 1 21:03:09 2002 ++++ src/stf-parse.c Fri Mar 1 21:03:17 2002 +@@ -870,8 +870,7 @@ + if (len == -1) return (char *)s; -- if (len > 1) { + if (len > 1) { - if (mbstowcs (&wstr, s, 1) == 1 && - !iswprint (wstr) && !iswspace (wstr)) -- return (char *)s; -- s += len; -- } else { -- if (!isprint (*s) && !isspace (*s)) -- return (char *)s; -- s++; -- } - } - - return NULL; ++ if (mbstowcs (&wstr, s, 1) == 1) + return (char *)s; + s += len; + } else { diff --git a/math/gnumeric2/Makefile b/math/gnumeric2/Makefile index 4d6a1f333a1b..db58961dc952 100644 --- a/math/gnumeric2/Makefile +++ b/math/gnumeric2/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnumeric PORTVERSION= 1.0.4 +PORTREVISION= 1 CATEGORIES?= math gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= stable/sources/gnumeric diff --git a/math/gnumeric2/files/patch-src::stf-parse.c b/math/gnumeric2/files/patch-src::stf-parse.c index b0610997e852..b45569925e68 100644 --- a/math/gnumeric2/files/patch-src::stf-parse.c +++ b/math/gnumeric2/files/patch-src::stf-parse.c @@ -1,37 +1,12 @@ - -$FreeBSD$ - ---- src/stf-parse.c 2001/12/27 19:36:17 1.1 -+++ src/stf-parse.c 2001/12/27 19:44:24 -@@ -29,8 +29,6 @@ - #include "clipboard.h" - - #include --#include --#include - - #define WARN_TOO_MANY_ROWS _("Too many rows in data to parse: %d") - #define WARN_TOO_MANY_COLS _("Too many columns in data to parse: %d") -@@ -865,20 +863,9 @@ - wchar_t wstr; - int len; - -- for (s = data; *s != '\0';) { -- len = mblen(s, MB_CUR_MAX); -- if (len == -1) -+ for (s = data; *s != '\0'; s++) { -+ if (!isprint (*s) && !isspace (*s)) +--- src/stf-parse.c.orig Fri Mar 1 21:03:09 2002 ++++ src/stf-parse.c Fri Mar 1 21:03:17 2002 +@@ -870,8 +870,7 @@ + if (len == -1) return (char *)s; -- if (len > 1) { + if (len > 1) { - if (mbstowcs (&wstr, s, 1) == 1 && - !iswprint (wstr) && !iswspace (wstr)) -- return (char *)s; -- s += len; -- } else { -- if (!isprint (*s) && !isspace (*s)) -- return (char *)s; -- s++; -- } - } - - return NULL; ++ if (mbstowcs (&wstr, s, 1) == 1) + return (char *)s; + s += len; + } else { -- cgit v1.2.3