home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / c / c-niftp.zip / unix-niftp-5.6 / lib / mmdf / rp_valstr.c < prev    next >
C/C++ Source or Header  |  1990-08-01  |  3KB  |  167 lines

  1. /* unix-niftp lib/mmdf/rp_valstr.c $Revision: 5.5 $ $Date: 90/08/01 13:36:26 $ */
  2. /*
  3.  * $Log:    rp_valstr.c,v $
  4.  * Revision 5.5  90/08/01  13:36:26  pb
  5.  * Distribution of Aug90RealPP+sequent: Full PP release and support for Sequent X.25 board
  6.  * 
  7.  * Revision 5.2  89/01/13  14:48:52  pb
  8.  * Distribution of Jan89SuckMail: Support Sucking of mail
  9.  * 
  10.  * Revision 5.0  87/03/23  03:46:03  bin
  11.  * Merger of latest UCL and Nottingham versions together with
  12.  * an extensive spring clean.
  13.  * Now UNIX-NIFTP prerelease.
  14.  * 
  15.  */
  16. #include "util.h"
  17. #include "mmdf.h"
  18.  
  19. /*
  20.  *     MULTI-CHANNEL MEMO DISTRIBUTION FACILITY  (MMDF)
  21.  *
  22.  *
  23.  *     Copyright (C) 1979,1980,1981  University of Delaware
  24.  *
  25.  *     Department of Electrical Engineering
  26.  *     University of Delaware
  27.  *     Newark, Delaware  19711
  28.  *
  29.  *     Phone:  (302) 738-1163
  30.  *
  31.  *
  32.  *     This program module was developed as part of the University
  33.  *     of Delaware's Multi-Channel Memo Distribution Facility (MMDF).
  34.  *
  35.  *     Acquisition, use, and distribution of this module and its listings
  36.  *     are subject restricted to the terms of a license agreement.
  37.  *     Documents describing systems using this module must cite its source.
  38.  *
  39.  *     The above statements must be retained with all copies of this
  40.  *     program and may not be removed without the consent of the
  41.  *     University of Delaware.
  42.  *
  43.  *
  44.  *     version  -1    David H. Crocker    March   1979
  45.  *     version   0    David H. Crocker    April   1980
  46.  *     version  v7    David H. Crocker    May     1981
  47.  *     version   1    David H. Crocker    October 1981
  48.  *
  49.  */
  50. /*                  String Labels for Reply Values                      */
  51.  
  52. char   *
  53.     rp_valstr (val)           /* return text string for reply value */
  54.     int    val;
  55. {
  56.     static char noval[] = "*** Illegal:  0000";
  57.                   /* (noval[0] == '*') => illegal       */
  58.  
  59.     switch (rp_gval (val))
  60.     {
  61.     case RP_DONE:
  62.         return ("DONE");
  63.  
  64.     case RP_OK:
  65.         return ("OK");
  66.  
  67.     case RP_MOK:
  68.         return ("MOK");
  69.  
  70.     case RP_HOK:
  71.         return ("HOK");
  72.  
  73.     case RP_DOK:
  74.         return ("DOK");
  75.  
  76.     case RP_MAST:
  77.         return ("MAST");
  78.  
  79.     case RP_SLAV:
  80.         return ("SLAV");
  81.  
  82.     case RP_AOK:
  83.         return ("AOK");
  84.  
  85.     case RP_NET:
  86.         return ("NET");
  87.  
  88.     case RP_BHST:
  89.         return ("BHST");
  90.  
  91.     case RP_DHST:
  92.         return ("DHST");
  93.  
  94.     case RP_LIO:
  95.         return ("LIO");
  96.  
  97.     case RP_NIO:
  98.         return ("NIO");
  99.  
  100.     case RP_LOCK:
  101.         return ("LOCK");
  102.  
  103.     case RP_EOF:
  104.         return ("EOF");
  105.  
  106.     case RP_NS:
  107.         return ("NS");
  108.  
  109.     case RP_AGN:
  110.         return ("AGN");
  111.  
  112.     case RP_TIME:
  113.         return ("TIME");
  114.  
  115.     case RP_NOOP:
  116.         return ("NOOP");
  117.  
  118.     case RP_FIO:
  119.         return ("FIO");
  120.  
  121.     case RP_FCRT:
  122.         return ("FCRT");
  123.  
  124.     case RP_PROT:
  125.         return ("PROT");
  126.  
  127.     case RP_RPLY:
  128.         return ("RPLY");
  129.  
  130.     case RP_MECH:
  131.         return ("MECH");
  132.  
  133.     case RP_NO:
  134.         return ("NO");
  135.  
  136.     case RP_NDEL:
  137.         return ("NDEL");
  138.  
  139.     case RP_HUH:
  140.         return ("HUH");
  141.  
  142.     case RP_NCMD:
  143.         return ("NCMD");
  144.  
  145.     case RP_PARM:
  146.         return ("PARM");
  147.  
  148.     case RP_UCMD:
  149.         return ("UCMD");
  150.  
  151.     case RP_USER:
  152.         return ("USER");
  153.  
  154.     case RP_FOPN:
  155.         return ("FOPN");
  156.  
  157.     case RP_NAUTH:
  158.         return ("NAUTH");
  159.  
  160.     default:                  /* print illegal octal value          */
  161.         noval[15] = rp_gbbit (val) + '0';
  162.         noval[16] = rp_gcbit (val) + '0';
  163.         noval[17] = rp_gsbit (val) + '0';
  164.         return (noval);
  165.     }
  166. }
  167.