diff options
author | Adam Weinberger <adamw@FreeBSD.org> | 2014-07-28 21:54:33 +0000 |
---|---|---|
committer | Adam Weinberger <adamw@FreeBSD.org> | 2014-07-28 21:54:33 +0000 |
commit | 60b37dbedcfe6e22fe9a61ee8432ae7bd2780483 (patch) | |
tree | 42c5d548da07f10a85c92da3191700e6f34e6829 /graphics/aalib/files/patch-src_aarender.c | |
parent | security/arirang: Mark broken with Ruby 2.0 or newer (diff) |
Rename german/ and graphics/ patch-xy patches to reflect the files they modify.
Notes
Notes:
svn path=/head/; revision=363261
Diffstat (limited to 'graphics/aalib/files/patch-src_aarender.c')
-rw-r--r-- | graphics/aalib/files/patch-src_aarender.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/graphics/aalib/files/patch-src_aarender.c b/graphics/aalib/files/patch-src_aarender.c new file mode 100644 index 000000000000..e29437b8a358 --- /dev/null +++ b/graphics/aalib/files/patch-src_aarender.c @@ -0,0 +1,28 @@ +--- src/aarender.c.orig Thu Apr 26 23:37:31 2001 ++++ src/aarender.c Sat Mar 2 23:02:04 2002 +@@ -27,11 +27,11 @@ + return (p); + } + #define MYLONG_MAX 0xffffffffU /*this is enought for me. */ +-#define myrand() (state = ((state * 1103515245) + 12345) & MYLONG_MAX) ++#define myrand() (random() & MYLONG_MAX) + + void aa_renderpalette(aa_context * c, __AA_CONST aa_palette palette, __AA_CONST aa_renderparams * p, int x1, int y1, int x2, int y2) + { +- static int state; ++ static int rand_init = 0; + int x, y; + int val; + int wi = c->imgwidth; +@@ -47,6 +47,11 @@ + int randomval = p->randomval; + int dither = p->dither; + aa_palette table; ++ ++ if (!rand_init) { ++ srandomdev(); ++ rand_init = 1; ++ } + if (x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c)) + return; + if (x2 >= aa_scrwidth(c)) |