home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_09 / 9n09062a < prev    next >
Text File  |  1991-06-07  |  481b  |  28 lines

  1. /*
  2.  * ts2vn.c -- Convert from Transfer Syntax
  3.  *            to Value Notation.
  4.  */
  5.  
  6. #include <stdio.h>
  7. #include <string.h>
  8. #include <limits.h>
  9. #include "asn1.h"
  10.  
  11. #define BUFFER_SIZE 32768
  12.  
  13. char            buffer[BUFFER_SIZE];
  14.  
  15. int
  16. main(int argc, char *argv[])
  17. {
  18.  
  19.     char           *p = buffer;
  20.     int             c;
  21.  
  22.     for (p = buffer; (c = fgetc(stdin)) != EOF; *p++)
  23.     *p = (char) c;
  24.  
  25.     show_value_notation(buffer, p - buffer, 0);
  26.     return 0;
  27. }
  28.