home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume28 / yapp / part01 / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-29  |  2.1 KB  |  82 lines

  1. /* MAIN.C */
  2. static  char sccsid[] = "@(#)main.c 1.5 93/04/21 Copyright (c)1993 thalerd";
  3. #include <stdio.h>
  4. #include "config.h"
  5.  
  6. /******************************************************************************/
  7. /* PROCESS COMMAND LINE ARGUMENTS                                             */
  8. /******************************************************************************
  9. Function:    main
  10. Called by:   (user)
  11. Arguments:   command line arguments
  12. Returns:     (nothing)
  13. Calls:       init to set up global variables
  14.              join to start up first conference
  15.              command to process user commands
  16. Description: This function parses the command line arguments,
  17.              and acts as the main driver.
  18. *******************************************************************************/
  19. void                        /* RETURNS: (nothing)                  */
  20. main(argc, argv)            /* ARGUMENTS:                          */
  21. int argc;                   /*    Number of command line arguments */
  22. char **argv;                /*    Array of command line arguments  */
  23. {
  24.      init(argc,argv); /* set up globals */
  25.    
  26.      while (get_command(NULL));
  27.      endbbs(0);
  28. }
  29.  
  30. /******************************************************************************/
  31. /* The following output routines simply call the standard output routines.    */
  32. /* In the Motif version, the w-output routines send output to the windows     */
  33. /******************************************************************************/
  34. void
  35. wputs(s)
  36. char *s;
  37. {
  38.    fputs(s,stdout); /* NO newline like puts() does */
  39. }
  40.  
  41. extern char evalbuf[MAX_LINE_LENGTH];
  42. /* KKK note that the eval stuff won't work with MOTIF until this is
  43.    changed around a bit */
  44. void
  45. wfputs(s,stream)
  46. char *s;
  47. FILE *stream;
  48. {
  49.    if (stream)
  50.       fputs(s,stream);
  51.    else
  52.       strcat(evalbuf,s,MAX_LINE_LENGTH-strlen(evalbuf)-1);
  53. }
  54.  
  55. void
  56. wputchar(c)
  57. char c;
  58. {  
  59.    putchar(c);
  60. }
  61.  
  62. void
  63. wfputc(c,fp)
  64. char c;
  65. FILE *fp;
  66. {
  67.    char s[2];
  68.  
  69.    if (fp)
  70.       fputc(c,fp);
  71.    else {
  72.       s[0]=c; s[1]='\0';
  73.       strcat(evalbuf,s,MAX_LINE_LENGTH-strlen(evalbuf)-1);
  74.    }
  75. }
  76.  
  77. void
  78. wgets(a,b)
  79. char *a,*b;
  80. {
  81. }
  82.