libftdi-git Archives

Subject: port libftdi to libusb-1.0 branch, master, updated. v0.17-47-gd042a09

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 27 Sep 2010 17:40:49 +0200 (CEST)
The branch, master has been updated
       via  d042a09782ec18d4009300b6fe4d5dd57cc2061b (commit)
      from  97c6b5f63d77f28968f4ad19c6901f11598898c9 (commit)


- Log -----------------------------------------------------------------
commit d042a09782ec18d4009300b6fe4d5dd57cc2061b
Author: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date:   Sun Sep 26 18:24:21 2010 +0200

    Another approach to get the examples/streamtest.c print formatting right 
Thanks to Jim Paris

-----------------------------------------------------------------------

Summary of changes:
 examples/stream_test.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/examples/stream_test.c b/examples/stream_test.c
index cdafdbe..f8d024e 100644
--- a/examples/stream_test.c
+++ b/examples/stream_test.c
@@ -83,8 +83,8 @@ readCallback(uint8_t *buffer, int length, FTDIProgressInfo 
*progress, void *user
                if (start && (num != start +0x4000))
                {
                    uint32_t delta = ((num-start)/0x4000)-1;
-                   fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at 
blocks %10ld \n",
-                           delta, start -0x4000, num, blocks);
+                   fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at 
blocks %10llu\n",
+                           delta, start -0x4000, num, (unsigned long 
long)blocks);
                    n_err++;
                    skips += delta;
                }
@@ -98,8 +98,8 @@ readCallback(uint8_t *buffer, int length, FTDIProgressInfo 
*progress, void *user
                if (start && (num != start +0x4000))
                {
                    uint32_t delta = ((num-start)/0x4000)-1;
-                   fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at 
blocks %10ld \n",
-                           delta, start -0x4000, num, blocks);
+                   fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at 
blocks %10llu\n",
+                           delta, start -0x4000, num, (unsigned long long) 
blocks);
                    n_err++;
                    skips += delta;
                }
@@ -239,8 +239,8 @@ int main(int argc, char **argv)
        fclose(outputFile);
    }
    else if (check)
-       fprintf(stderr,"%d errors of %ld blocks (%Le), %d (%Le) blocks 
skipped\n",
-               n_err, blocks, (long double)n_err/(long double) blocks,
+       fprintf(stderr,"%d errors of %llu blocks (%Le), %d (%Le) blocks 
skipped\n",
+               n_err, (unsigned long long) blocks, (long double)n_err/(long 
double) blocks,
                skips, (long double)skips/(long double) blocks);
    exit (0);
 }
@@ -328,8 +328,8 @@ void check_outfile(char *descstring)
             {
                 if(n_shown < 30)
                 {
-                    fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at 
blocks %10ld \n",
-                            (nread-start)/0x4000, start -0x4000, nread, 
blocks);
+                    fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at 
blocks %10llu \n",
+                            (nread-start)/0x4000, start -0x4000, nread, 
(unsigned long long) blocks);
                     n_shown ++;
                 }
                 n_errors++;
@@ -342,9 +342,9 @@ void check_outfile(char *descstring)
             pc = pa;
         }
         if(n_errors)
-            fprintf(stderr, "%d blocks wrong from %ld blocks read\n",
-                    n_errors, blocks);
+            fprintf(stderr, "%d blocks wrong from %llu blocks read\n",
+                    n_errors, (unsigned long long) blocks);
         else
-            fprintf(stderr, "%ld blocks all fine\n",blocks);
+            fprintf(stderr, "%llu blocks all fine\n", (unsigned long long) 
blocks);
     }
 }


hooks/post-receive
-- 
port libftdi to libusb-1.0

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • port libftdi to libusb-1.0 branch, master, updated. v0.17-47-gd042a09, libftdi-git <=