diff options
author | Pietro Cerutti <gahr@FreeBSD.org> | 2010-10-20 12:13:20 +0000 |
---|---|---|
committer | Pietro Cerutti <gahr@FreeBSD.org> | 2010-10-20 12:13:20 +0000 |
commit | 611bfd30362f0affd93bcd14f7f63b4d83878f19 (patch) | |
tree | 748130b72260d91a4643bf93a175b628f0ed1213 /games/deal | |
parent | 20149f14b8dc0d4574c5b184bc59b2730c8464c8 (diff) | |
download | ports-611bfd30362f0affd93bcd14f7f63b4d83878f19.tar.gz ports-611bfd30362f0affd93bcd14f7f63b4d83878f19.zip |
Notes
Diffstat (limited to 'games/deal')
-rw-r--r-- | games/deal/Makefile | 2 | ||||
-rw-r--r-- | games/deal/distinfo | 6 | ||||
-rw-r--r-- | games/deal/files/patch-deal.c | 97 |
3 files changed, 4 insertions, 101 deletions
diff --git a/games/deal/Makefile b/games/deal/Makefile index d776a35072a5..6a6de020007a 100644 --- a/games/deal/Makefile +++ b/games/deal/Makefile @@ -6,7 +6,7 @@ # PORTNAME= deal -PORTVERSION= 2.4 +PORTVERSION= 2.5 CATEGORIES= games MASTER_SITES= http://catb.org/~esr/deal/ diff --git a/games/deal/distinfo b/games/deal/distinfo index 76eeda83f043..92a729f8fc5a 100644 --- a/games/deal/distinfo +++ b/games/deal/distinfo @@ -1,3 +1,3 @@ -MD5 (deal-2.4.tar.gz) = 824a1780bb4f3a83fe9f9a897665280f -SHA256 (deal-2.4.tar.gz) = 370a6975ea36df7cb1a4b819808bda004a8718c19a32c9a7a87d02b856d5ec7a -SIZE (deal-2.4.tar.gz) = 12832 +MD5 (deal-2.5.tar.gz) = d1ded3d267a8fc98937df694263eb564 +SHA256 (deal-2.5.tar.gz) = 739cb00034867608065a3cfa63d044043cda505f64d8249acda941c074a8902c +SIZE (deal-2.5.tar.gz) = 7353 diff --git a/games/deal/files/patch-deal.c b/games/deal/files/patch-deal.c deleted file mode 100644 index 1fd7a650a74f..000000000000 --- a/games/deal/files/patch-deal.c +++ /dev/null @@ -1,97 +0,0 @@ ---- deal.c.orig 1996-09-27 00:31:22.000000000 +0200 -+++ deal.c 2007-11-30 00:00:29.000000000 +0100 -@@ -35,8 +35,10 @@ - * rounds to zero. - */ - #include <stdio.h> -+#include <stdlib.h> - #include <math.h> - #include <signal.h> -+#include <unistd.h> - - #define BASE_DEFAULT 7 /* # cards in initial deal */ - #define TURNS_DEFAULT 20 /* show this many turns if total is greater */ -@@ -49,6 +51,7 @@ - static int verbose = FALSE; - - static double log_a_choose_b(int a, int b); -+static double hyper_prob(int, int, int, int); - - static void hypercatch(int sig) - { -@@ -74,13 +77,12 @@ - exit(0); - } - --main(argc, argv) -+int main(argc, argv) - int argc; - char **argv; - { - extern char *optarg; /* set by getopt */ - extern int optind; /* set by getopt */ -- static double hyper_prob(); - - int status, special, total, columns, i, j; - int base = BASE_DEFAULT; -@@ -97,11 +99,11 @@ - switch (status) - { - case 'b': -- base = atoi(optarg); -+ base = (int)strtol(optarg, (char **)NULL, 10); - break; - - case 'c': -- columns = atoi(optarg); -+ columns = (int)strtol(optarg, (char **)NULL, 10); - break; - - case 'G': -@@ -142,7 +144,7 @@ - } - - if (gammatest) { -- double p = lgamma(atoi(argv[optind])); -+ double p = lgamma(strtod(argv[optind], (char **)NULL)); - - (void) printf("lgamma(%d) = %f\n", atoi(argv[optind]), p); - exit(0); -@@ -212,7 +214,7 @@ - (void) printf("\n"); - (void) printf("-----+"); - for (j = 0; j < columns; j++) -- (void) printf(wide ? "----" : "---", j); -+ (void) printf(wide ? "----" : "---"); - (void) printf("\n"); - } - -@@ -239,6 +241,8 @@ - - (void) printf("\n"); - } -+ -+ return (0); - } - - /* -@@ -276,7 +280,8 @@ - sa = a; - sb = b; - -- signal(SIGFPE, choosecatch); -+ if(signal(SIGFPE, choosecatch) == SIG_ERR) -+ exit(EXIT_FAILURE); - - if (b >= a) - p = 0; -@@ -287,7 +292,8 @@ - if (verbose) - (void) fprintf(stderr, "log_a_choose_b(%d, %d) = %f\n", a, b, p); - -- signal(SIGFPE, hypercatch); -+ if(signal(SIGFPE, hypercatch) == SIG_ERR) -+ exit(EXIT_FAILURE); - - return(p); - } |