summaryrefslogtreecommitdiff
path: root/math/gcalctool
diff options
context:
space:
mode:
authorobache <obache>2010-06-18 01:53:47 +0000
committerobache <obache>2010-06-18 01:53:47 +0000
commit453ab8da7c9b9e20a143b2d207f6c93bbc8015df (patch)
tree6199e756c6ed277b57aefe24a23689ad7d0f874a /math/gcalctool
parenta32bfb735e09f07748eb6a49344d68951fef9af5 (diff)
downloadpkgsrc-453ab8da7c9b9e20a143b2d207f6c93bbc8015df.tar.gz
Adjust patch to upstream commit.
Diffstat (limited to 'math/gcalctool')
-rw-r--r--math/gcalctool/distinfo4
-rw-r--r--math/gcalctool/patches/patch-aa22
2 files changed, 14 insertions, 12 deletions
diff --git a/math/gcalctool/distinfo b/math/gcalctool/distinfo
index e1d476ee654..0ca334ee0d3 100644
--- a/math/gcalctool/distinfo
+++ b/math/gcalctool/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.44 2010/06/17 08:56:46 obache Exp $
+$NetBSD: distinfo,v 1.45 2010/06/18 01:53:47 obache Exp $
SHA1 (gcalctool-5.30.1.tar.bz2) = 9a7f561705e931416ba028f712ef3f16c9b58fee
RMD160 (gcalctool-5.30.1.tar.bz2) = 27122e63ceb2880ca27cf550ab8c55bfd865d169
Size (gcalctool-5.30.1.tar.bz2) = 1125957 bytes
-SHA1 (patch-aa) = dd8311ca98bf93748a904e623af2043e5da6e402
+SHA1 (patch-aa) = 67e23446b886b4bb442a7650e5bbe2e394c05958
diff --git a/math/gcalctool/patches/patch-aa b/math/gcalctool/patches/patch-aa
index 3f7471d6501..9a01962063b 100644
--- a/math/gcalctool/patches/patch-aa
+++ b/math/gcalctool/patches/patch-aa
@@ -1,32 +1,34 @@
-$NetBSD: patch-aa,v 1.15 2010/06/17 08:56:46 obache Exp $
+$NetBSD: patch-aa,v 1.16 2010/06/18 01:53:47 obache Exp $
portability fix (no advantage to use getline(3) here)
- https://bugzilla.gnome.org/show_bug.cgi?id=621863
+ http://git.gnome.org/browse/gcalctool/commit/?id=436147a1f63fbf980d117f880d253fa0abbd11f8
--- src/gcalccmd.c.orig 2010-04-26 01:14:22.000000000 +0000
+++ src/gcalccmd.c
-@@ -73,7 +73,7 @@ int
+@@ -72,8 +72,7 @@ str_adjust(char *str)
+ int
main(int argc, char **argv)
{
- char *equation;
+- char *equation;
- int bytes_read;
-+ char *line_read;
++ char *equation, *line;
size_t nbytes = MAXLINE;
/* Seed random number generator. */
-@@ -82,12 +82,12 @@ main(int argc, char **argv)
+@@ -82,12 +81,12 @@ main(int argc, char **argv)
equation = (char *) malloc(MAXLINE * sizeof(char));
while (1) {
printf("> ");
- bytes_read = getline(&equation, &nbytes, stdin);
-+ line_read = fgets(equation, nbytes, stdin);
-
+-
- if (bytes_read >= 0)
-+ if (line_read != NULL)
++ line = fgets(equation, nbytes, stdin);
++
++ if (line != NULL)
str_adjust(equation);
- if (bytes_read < 0 || strcmp(equation, "exit") == 0 || strcmp(equation, "quit") == 0 || strlen(equation) == 0)
-+ if (line_read == NULL || strcmp(equation, "exit") == 0 || strcmp(equation, "quit") == 0 || strlen(equation) == 0)
++ if (line == NULL || strcmp(equation, "exit") == 0 || strcmp(equation, "quit") == 0 || strlen(equation) == 0)
break;
solve(equation);