home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update20.zoo / test / diffs < prev   
Encoding:
Text File  |  1992-04-19  |  1.9 KB  |  100 lines

  1. *** 1.2    1992/03/28 07:16:50
  2. --- PatchLev.h    1992/04/19 17:07:01
  3. ***************
  4. *** 1,5 ****
  5.   
  6. ! #define    PatchLevel "02"
  7.   
  8.   /*
  9.    *
  10. --- 1,5 ----
  11.   
  12. ! #define    PatchLevel "03"
  13.   
  14.   /*
  15.    *
  16. *** 1.1    1992/03/26 21:49:31
  17. --- tprintf.c    1992/04/19 17:07:02
  18. ***************
  19. *** 19,28 ****
  20. --- 19,30 ----
  21.   #include "ansidecl.h"
  22.   #ifdef    BSD
  23.   #include </usr/include/stdio.h>
  24. + #include <strings.h>
  25.   #define EXIT_SUCCESS 0
  26.   #else
  27.   #include <stdio.h>
  28.   #include <stdlib.h>
  29. + #include <string.h>
  30.   #endif
  31.   
  32.   
  33. ***************
  34. *** 53,58 ****
  35. --- 55,89 ----
  36.     (void) printf("'\n");
  37.   }
  38.   
  39. + typedef struct {
  40. +   char          *str;
  41. +   unsigned long data;
  42. + } DATA;
  43. + static DATA dat[] = {
  44. +   {"1",         1},
  45. +   {"2",         2},
  46. +   {"65535",     65535},
  47. +   {"65536",     65536},
  48. +   {"70000",     70000},
  49. +   {"1289823",     1289823},
  50. +   {"2147483647", 0x7fffffffL},
  51. +   {"4294967295", 0xffffffffL},
  52. +   {"0",         0},
  53. +   {0,         0}
  54. + };
  55. + void 
  56. + DEFUN_VOID(test_print_unsigned_longs)
  57. + {
  58. +     DATA *d = dat;
  59. +    
  60. +     for(; d->str; d++) {
  61. +     printf("Length of \"%s\" is %lu Value is %lu\n",
  62. +      d->str, strlen(d->str), d->data);
  63. +     }
  64. + }
  65.   int
  66.   DEFUN_VOID(main)
  67.   {
  68. ***************
  69. *** 127,132 ****
  70. --- 158,166 ----
  71.           snprintf (buf, sizeof (buf), "%30s", "foo"), sizeof (buf), buf);
  72.     }
  73.   #endif
  74. +   /* more tests ++jrb */
  75. +   test_print_unsigned_longs();
  76.   
  77.     return(EXIT_SUCCESS);
  78.   }
  79. *** 1.1    1992/03/26 21:49:31
  80. --- tprintf.out    1992/04/19 17:07:03
  81. ***************
  82. *** 47,49 ****
  83. --- 47,58 ----
  84.   |  12345.0000|  1.2345e+04|   1.235e+04|
  85.   | 100000.0000|  1.0000e+05|       1e+05|
  86.   | 123456.0000|  1.2346e+05|   1.235e+05|
  87. + Length of "1" is 1 Value is 1
  88. + Length of "2" is 1 Value is 2
  89. + Length of "65535" is 5 Value is 65535
  90. + Length of "65536" is 5 Value is 65536
  91. + Length of "70000" is 5 Value is 70000
  92. + Length of "1289823" is 7 Value is 1289823
  93. + Length of "2147483647" is 10 Value is 2147483647
  94. + Length of "4294967295" is 10 Value is 4294967295
  95. + Length of "0" is 1 Value is 0
  96.