summaryrefslogtreecommitdiff
path: root/math/gnumeric2/files/patch-src::stf-parse.c
blob: b0610997e852ad26d2201f1b8dd9e773d7d4343f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$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 <ctype.h>
-#include <wctype.h>
-#include <stdlib.h>
 
 #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))
 			return (char *)s;
-		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;