home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / KA9Q212.ZIP / NOVELCLI.C < prev    next >
C/C++ Source or Header  |  1993-07-16  |  2KB  |  80 lines

  1. /*
  2.  
  3.     Various routines to work with Novell delivering mail to novell mail
  4.     DIR and setting extensions.
  5.  
  6.     John Bradley GST 
  7.  
  8.  */
  9.  
  10. /****************************************************************************
  11. *    $Id: novelcli.c 1.2 93/07/16 11:47:16 ROOT_DOS Exp $
  12. *    08 May 93    1.2        GT    Fix warnings.                                    *
  13. ****************************************************************************/
  14.  
  15. #include <stdio.h>
  16. #include <sys/types.h>
  17. #include <time.h>
  18. #include <sys/timeb.h>
  19. #include <ctype.h>
  20. #include <string.h>  /* for strchr() */
  21. #ifdef    __TURBOC__
  22. #include <dir.h>
  23. #endif
  24. #include "global.h"
  25. #include "cmdparse.h"
  26. #include "commands.h"
  27.  
  28. #ifdef NOVELL
  29.  
  30. static int dosernam    __ARGS((int argc,char *argv[],void *p));
  31. static int doext    __ARGS((int argc,char *argv[],void *p));
  32. static int dostart    __ARGS((int argc,char *argv[],void *p));
  33.  
  34.  
  35. static struct cmds novellcmds[] = 
  36. {
  37.     "server",        dosernam,    0,    2,    "novell server <server name>",
  38.     "ext",            doext,        0,  2,    "novell ext <mail ext>",
  39.     "start",        dostart,    0,    2,    "novell start <0|1>",
  40.     NULLCHAR,
  41. }
  42. ;
  43.  
  44. #endif
  45.  
  46. int donovell(int argc,char *argv[],void *p)
  47. {
  48. #ifdef NOVELL
  49.     return subcmd(novellcmds,argc,argv,p);
  50. #else
  51.     printf("Not built for NOVELL ops\n");
  52.     return (-1);
  53. #endif
  54. }
  55.  
  56. char    novell_server_name[128];
  57. char    novell_mail_ext[4];
  58. unsigned short    novell_start=0;
  59.  
  60. #ifdef NOVELL
  61.  
  62. static int dosernam(int argc,char *argv[],void *p)
  63. {
  64.     strcpy(novell_server_name,argv[1]);
  65.     return 0;
  66. }
  67.  
  68. static int doext(int argc,char *argv[],void *p)
  69. {
  70.     strcpy(novell_mail_ext,argv[1]);
  71.     return 0;
  72. }
  73.  
  74. static int dostart(int argc,char *argv[],void *p)
  75. {
  76.     return setshort(&novell_start,"Novell start ",argc,argv);
  77. }
  78.  
  79. #endif
  80.