home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Format / asn / asn.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  1.3 KB  |  78 lines

  1. /* asn - A body part converter */ 
  2.  
  3. # ifndef lint
  4. static char Rcsid[] = "@(#)$Header: /xtel/pp/pp-beta/Format/asn/RCS/asn.c,v 6.0 1991/12/18 20:15:43 jpo Rel $";
  5. # endif
  6.  
  7. /*
  8.  * $Header: /xtel/pp/pp-beta/Format/asn/RCS/asn.c,v 6.0 1991/12/18 20:15:43 jpo Rel $
  9.  *
  10.  * $Log: asn.c,v $
  11.  * Revision 6.0  1991/12/18  20:15:43  jpo
  12.  * Release 6.0
  13.  *
  14.  */
  15.  
  16.  
  17.  
  18. #include    "head.h"
  19. #include    "asn.h"
  20.  
  21. char        *myname;
  22.  
  23.  
  24. static ASNCMD    *Asnfilt;
  25. static ASNCMD    *asnfilt_new();
  26.  
  27.  
  28.  
  29.  
  30. /* -------------------------  Main Routine  --------------------------------- */
  31.  
  32.  
  33.  
  34. /* ARGSUSED */
  35. main(argc, argv)
  36. int    argc;
  37. char    **argv;
  38. {
  39.     int    retval;
  40.  
  41.     /* -- Program Initialisation -- */
  42.     myname = *argv++;
  43.     sys_init(myname);
  44.  
  45.     /* -- Malloc -- */
  46.     Asnfilt = asnfilt_new();
  47.  
  48.     /* -- Read the command line and set struct fields -- */
  49.     opt_cmdln (argv, Asnfilt);
  50.  
  51.     /* -- Set encoder/decoder functs from cmd line asn vals -- */
  52.     opt_functs (Asnfilt);
  53.  
  54.     /* -- Process info received from stdin, and output to stdout -- */
  55.     asn_process (Asnfilt);
  56.  
  57.     exit(0);
  58. }
  59.  
  60.  
  61.  
  62.  
  63. /* ----------------------  Static  Routines  -------------------------------- */
  64.  
  65.  
  66.  
  67.  
  68. static ASNCMD *asnfilt_new ()   /* -- create new asn struct -- */
  69. {
  70.     register ASNCMD    *ap;
  71.  
  72.     PP_TRACE (("asnfilt_new ()"));
  73.  
  74.     ap = (ASNCMD *) smalloc (sizeof(ASNCMD));
  75.     bzero ((char *) ap, sizeof (*ap));
  76.     return(ap);
  77. }
  78.