diff options
author | obache <obache> | 2010-06-18 01:53:47 +0000 |
---|---|---|
committer | obache <obache> | 2010-06-18 01:53:47 +0000 |
commit | 11612dd9d23e92e99b7325a003a7dd108549af67 (patch) | |
tree | 6199e756c6ed277b57aefe24a23689ad7d0f874a /math | |
parent | 8065b2650f56dc2e7362475456e2cad3b9bff101 (diff) | |
download | pkgsrc-11612dd9d23e92e99b7325a003a7dd108549af67.tar.gz |
Adjust patch to upstream commit.
Diffstat (limited to 'math')
-rw-r--r-- | math/gcalctool/distinfo | 4 | ||||
-rw-r--r-- | math/gcalctool/patches/patch-aa | 22 |
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); |