home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / SNPD9404.ZIP / HSTR_I.C < prev    next >
C/C++ Source or Header  |  1994-04-03  |  406b  |  26 lines

  1. .D 15 2
  2. .I 20 1
  3.       while (cptr && *cptr && isxdigit(*cptr))
  4. .D 21 1
  5. .I 30 20
  6.  
  7. #ifdef TEST
  8.  
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11.  
  12. int main(int argc, char *argv[])
  13. {
  14.       char *arg;
  15.       unsigned int x;
  16.  
  17.       while (--argc)
  18.       {
  19.             x = hstr_i(arg = *++argv);
  20.             printf("Hex %s = %d\n", arg, x, x);
  21.       }
  22.       return EXIT_SUCCESS;
  23. }
  24.  
  25. #endif /* TEST */
  26.