ugtext.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*+-------------------------------------------------------------------------
  2. ugtext.c
  3. wht@atl.ga.us
  4. Defined functions:
  5. UG_text(ugstat)
  6. --------------------------------------------------------------------------*/
  7. /*+:EDITS:*/
  8. /*:04-26-2000-11:16-wht@bob-RELEASE 4.42 */
  9. /*:01-24-1997-02:38-wht@yuriatin-SOURCE RELEASE 4.00 */
  10. /*:09-11-1996-20:01-wht@yuriatin-3.48-major telnet,curses,structural overhaul */
  11. /*:11-23-1995-11:20-wht@kepler-source control 3.37 for tsx-11 */
  12. /*:11-14-1995-10:23-wht@kepler-3.37.80-source control point: SOCKETS */
  13. /*:01-12-1995-15:50-wht@n4hgf-remove unnecessary break statements */
  14. /*:05-04-1994-04:40-wht@n4hgf-ECU release 3.30 */
  15. /*:04-17-1994-17:58-wht@n4hgf-creation */
  16. #include "ecuungetty.h"
  17. /*+-------------------------------------------------------------------------
  18. UG_text(ugstat) - text for ecuungetty code
  19. --------------------------------------------------------------------------*/
  20. char *
  21. UG_text(ugstat)
  22. int ugstat;
  23. {
  24. static char errant[32];
  25. switch (ugstat)
  26. {
  27. case UG_NOTENAB:
  28. return ("line not enabled");
  29. case UG_RESTART:
  30. return ("restart needed");
  31. case UG_FAIL:
  32. return ("line in use");
  33. case UGE_T_LOGIN:
  34. return ("-t found US_LOGIN");
  35. case UGE_T_LOGGEDIN:
  36. return ("-t found US_LOGGGEDIN");
  37. case UGE_T_NOTFOUND:
  38. return ("not found");
  39. case UGE_BADSWITCH:
  40. return ("usage: bad switch");
  41. case UGE_BADARGC:
  42. return ("usage: bad arg count");
  43. case UGE_BADARGV:
  44. return ("this a valid tty??");
  45. case UGE_NOTROOT:
  46. return ("not setuid root");
  47. case UGE_CALLER:
  48. return ("invalid caller");
  49. case UGE_NOUUCP:
  50. return ("cannot find uucp passwd entry");
  51. case UGE_LOGIC:
  52. return ("logic error");
  53. case UGE_BOMB:
  54. return ("core dumped or killed");
  55. case UGE_DNE:
  56. return ("did not execute");
  57. }
  58. sprintf(errant, "error %u", ugstat);
  59. return (errant);
  60. } /* end of UG_text */
  61. /* vi: set tabstop=4 shiftwidth=4: */
  62. /* end of ugtext.c */