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

  1. /* ut_misc.c - Other miscellaneous routines */ 
  2.  
  3. # ifndef lint
  4. static char Rcsid[] = "@(#)$Header: /xtel/pp/pp-beta/Chans/x40088/RCS/ut_misc.c,v 6.0 1991/12/18 20:14:27 jpo Rel $";
  5. # endif
  6.  
  7. /*
  8.  * $Header: /xtel/pp/pp-beta/Chans/x40088/RCS/ut_misc.c,v 6.0 1991/12/18 20:14:27 jpo Rel $
  9.  *
  10.  * $Log: ut_misc.c,v $
  11.  * Revision 6.0  1991/12/18  20:14:27  jpo
  12.  * Release 6.0
  13.  *
  14.  */
  15.  
  16.  
  17. #include    "util.h"
  18. #include    <isode/cmd_srch.h>
  19. #include    "tb_bpt88.h"
  20. #include    "list_bpt.h"
  21.  
  22.  
  23. extern CMD_TABLE    bptbl_body_parts88 [/* body part types */];
  24.  
  25.  
  26.  
  27. /* ---------------------  Begin  Routines  -------------------------------- */
  28.  
  29.  
  30.  
  31. int bodypart2value (bodypart)   /* bodypart -> value */
  32. char    *bodypart;
  33. {
  34.  
  35.     PP_TRACE (("x40088/bodypart2value (%s)", bodypart));
  36.  
  37.     if (bodypart == NULLCP)
  38.         return NOTOK;
  39.  
  40.     switch (cmd_srch (bodypart, bptbl_body_parts88)) {
  41.     case BPT_UNDEFINED:
  42.         return 0;
  43.     case BPT_TLX:
  44.         return 1;
  45.     case BPT_IA5:
  46.         return 2;
  47.     case BPT_G3FAX:
  48.         return 3;
  49.     case BPT_TIF0:
  50.         return 4;
  51.     case BPT_TTX:
  52.         return 5;
  53.     case BPT_VIDEOTEX:
  54.         return 6;
  55.     case BPT_VOICE:
  56.         return 7;
  57.     case BPT_SFD:
  58.         return 8;
  59.     case BPT_TIF1:
  60.         return 9;
  61.     default:
  62.         if (strncmp (bodypart, "oid.", 4) == 0)
  63.             return 10;
  64.     }
  65.  
  66.     return NOTOK;
  67. }
  68.