Revision: 41963
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41963&view=rev
Author:   erikgreenwald
Date:     2011-01-05 21:07:29 +0000 (Wed, 05 Jan 2011)

Log Message:
-----------
Minor fixes for windows, and change seed to use time(0) instead of gettimeofday.

Modified Paths:
--------------
    brlcad/trunk/src/util/pixblend.c

Modified: brlcad/trunk/src/util/pixblend.c
===================================================================
--- brlcad/trunk/src/util/pixblend.c    2011-01-05 21:05:30 UTC (rev 41962)
+++ brlcad/trunk/src/util/pixblend.c    2011-01-05 21:07:29 UTC (rev 41963)
@@ -39,6 +39,7 @@
 #  include <sys/time.h>
 #endif
 #include <string.h>
+#include <time.h>
 #include "bio.h"
 
 #include "bu.h"
@@ -65,9 +66,7 @@
 int
 timeseed(void)
 {
-    struct timeval tv;
-    gettimeofday(&tv, (struct timezone *)NULL);
-    return (int)tv.tv_usec;
+       return time(0);
 }
 
 
@@ -180,7 +179,7 @@
     }
 
     if (rflg) {
-#ifdef HAVE_SRAND48
+#ifdef HAVE_DRAND48
        srand48((long)seed);
 #else
        threshold = (int) (value * 65536.0);
@@ -199,7 +198,7 @@
     while (1) {
        unsigned char *cb1, *cb2;       /* current input buf ptrs */
        unsigned char *cb3;     /* current output buf ptr */
-       int r1, r2, len, todo;
+       size_t r1, r2, len, todo;
 
        ++c;
        r1 = fread(b1, 1, CHUNK, f1);
@@ -234,7 +233,6 @@
                } else {
 #ifdef HAVE_DRAND48
                    double d;
-                   extern double drand48(void);
                    d = drand48();
                    if (d >= value)
 #else


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to