home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / emx / test / bsdtest.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  483 b   |  33 lines

  1. /* bsdtest.c (emx+gcc) */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. static void usage (void)
  7. {
  8.   printf ("Usage: bsdtest -r\n");
  9.   exit (1);
  10. }
  11.  
  12.  
  13. int main (int argc, char *argv[])
  14. {
  15.   int i;
  16.   long n;
  17.  
  18.   if (argc != 2)
  19.     usage ();
  20.   if (strcmp (argv[1], "-r") == 0)
  21.     for (i = 0; i < 1024; ++i)
  22.       {
  23.         n = random ();
  24.         printf ("%12ld", n);
  25.         if (i % 6 == 5)
  26.         putchar ('\n');
  27.       }
  28.   else
  29.     usage ();
  30.   return (0);
  31. }
  32.  
  33.