Fix thousands separator handling bug.
Reported by: Franz Klammer <klammer@webonaut.com>
This commit is contained in:
parent
e39c2d5656
commit
0405303444
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=97155
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= gcalctool
|
||||
PORTVERSION= 4.3.31
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= math gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/${PORTNAME}/4.3
|
||||
|
13
math/gcalctool/files/patch-gcalctool::display.c
Normal file
13
math/gcalctool/files/patch-gcalctool::display.c
Normal file
@ -0,0 +1,13 @@
|
||||
--- gcalctool/display.c.orig Sat Jan 3 13:44:50 2004
|
||||
+++ gcalctool/display.c Sat Jan 3 14:01:31 2004
|
||||
@@ -88,8 +88,8 @@
|
||||
* definitions are potentially in read-only memory, and shouldn't be adjusted.
|
||||
*/
|
||||
|
||||
- if (strstr(str, v->tsep) != NULL) {
|
||||
- tsep_len = strlen(v->tsep);
|
||||
+ tsep_len = strlen(v->tsep);
|
||||
+ if (tsep_len && strstr(str, v->tsep) != NULL) {
|
||||
while (*srcp != '\0') {
|
||||
if (memcmp(srcp, v->tsep, tsep_len) == 0) {
|
||||
srcp += tsep_len;
|
@ -1,5 +1,14 @@
|
||||
--- gcalctool/get.c.orig Thu Dec 25 00:15:16 2003
|
||||
+++ gcalctool/get.c Thu Dec 25 00:22:50 2003
|
||||
--- gcalctool/get.c.orig Tue Dec 23 23:21:12 2003
|
||||
+++ gcalctool/get.c Sat Jan 3 13:18:24 2004
|
||||
@@ -230,7 +230,7 @@
|
||||
setlocale(LC_NUMERIC, "");
|
||||
tsep = nl_langinfo(THOUSEP);
|
||||
|
||||
- if (tsep == NULL || tsep[0] == '\0') {
|
||||
+ if (tsep == NULL) {
|
||||
return(",");
|
||||
} else {
|
||||
return(tsep);
|
||||
@@ -242,6 +242,7 @@
|
||||
init_vars() /* Setup default values for various variables. */
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user