home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume7 / rvi / part4 / rv_xmit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  808 b   |  43 lines

  1. #include "rv.h"
  2.  
  3. void
  4. xmit_curline()
  5. /*
  6.  * Transmit the current line, if modified
  7.  */
  8. {
  9.     register struct sc_screen *sc;
  10.     register struct li_line  *line;
  11.  
  12.     sc = &screen;
  13.     if (sc->sc_origline.li_text != NULL) {
  14.         free(sc->sc_origline.li_text);
  15.         sc->sc_origline.li_text = NULL;
  16.         line = sc->sc_curline;
  17.         xmit_ed("%dc\n", sc->sc_lineno);
  18.         if (strcmp(line->li_text, ".") == 0)
  19.             fputs("\\.", file.fi_fpout);
  20.         else
  21.             fputs(line->li_text, file.fi_fpout);
  22.         fputs("\n.\n", file.fi_fpout);
  23.         file.fi_modified = TRUE;
  24.         if (set_debug > 1)
  25.             fputs("\007", stderr);
  26.     }
  27. }
  28.  
  29.  
  30. /*VARARGS1*/
  31. void
  32. xmit_ed(txt, arg1, arg2, arg3, arg4, arg5)
  33. /*
  34.  * Printf the string to ed
  35.  */
  36. char *txt, *arg1, *arg2, *arg3, *arg4, *arg5;
  37. {
  38.     char buf[512];
  39.  
  40.     sprintf(buf, txt, arg1, arg2, arg3, arg4, arg5);
  41.     fputs(buf, file.fi_fpout);
  42. }
  43.