home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume7 / rvi / part2 / rv_main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  2.0 KB  |  79 lines

  1. #include "rv.h"
  2. /*
  3.  *    Rvi - Portable distributed screen editor (DSE).
  4.  *    86/07/16.  Alan Klietz
  5.  *    Copyright (c) 1986, Research Equipment Incorporated
  6.  *                Minnesota Supercomputer Center
  7.  *
  8.  * Permission is hereby granted to use this software on any computer system
  9.  * and to copy this software, including for purposes of redistribution, subject
  10.  * to the conditions that 
  11.  *
  12.  *  o  The full text of this copyright message is retained and prominently
  13.  *      displayed
  14.  *
  15.  *  o  No misrepresentation is made as to the authorship of this software
  16.  *
  17.  *  o  The software is not used for resale or direct commercial advantage
  18.  *
  19.  *  By copying, installing, or using this software, the user agrees to abide
  20.  *  by the above terms and agrees that the software is accepted on an "as is"
  21.  *  basis, WITHOUT WARRANTY expressed or implied, and relieves Research Equip-
  22.  *  ment Inc., its affiliates, officers, agents, and employees of any and all
  23.  *  liability, direct of consequential, resulting from copying, installing
  24.  *  or using this software.
  25.  */
  26. #ifndef lint
  27. static char *copyright = "Copyright (c) 1986, Research Equipment Incorporated.";
  28. #endif
  29.  
  30. /*
  31.  * Make initial program,
  32.  * Alan Klietz, Nov 11, 1985.
  33.  */
  34.  
  35. /*
  36.  * Declare global externals
  37.  */
  38. struct    fi_file        file;
  39. struct    li_line        *line_array;
  40. struct  ya_yank        yank_array[NUM_YANK_BUFS];
  41. struct    un_undo        undo;
  42. struct    wi_window    window;
  43. struct    sc_screen    screen;
  44.  
  45. INT    errflag;    /* 1 if error in command line parsing */
  46. INT    nwin_lines;    /* Number of lines in window */
  47. char    editlist[256];    /* List of files to edit */
  48. char    **Argv;
  49. boolean    use_linemode = 1 ;/* TRUE to set linemode on tty during shell escapes */
  50.  
  51. /*
  52.  * Parse command line arguments
  53.  * Call major routines
  54.  */
  55. main(argc, argv)
  56. int argc;
  57. char **argv;
  58. {
  59.     void  rv_cmd(), usage(), initialize();
  60.  
  61.     if (argc < 4)
  62.         usage();
  63.     Argv = argv;
  64.     strncpy(editlist, argv[3], 255);
  65.     if (argc == 5)
  66.         use_linemode++;
  67.     initialize();
  68.     rv_cmd();
  69.     /*NOTREACHED*/
  70. }
  71.  
  72.  
  73. void
  74. usage()
  75. {
  76.     fprintf(stderr, "Usage: rvi in_fd out_fd \"files\"\n");
  77.     exit(1);
  78. }
  79.