home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / vmsnet / sources / d / 749 < prev    next >
Encoding:
Text File  |  1993-01-07  |  2.6 KB  |  67 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!olivea!sgigate!rutgers!mcclb0.med.nyu.edu!wfeb2.bitnet!macrides
  2. From: macrides@wfeb2.bitnet
  3. Newsgroups: vmsnet.sources.d
  4. Subject: Problem using MOST via spawns
  5. Message-ID: <1993Jan7.122046.97@wfeb2>
  6. Date: 7 Jan 93 16:20:46 GMT
  7. Organization: Worcester Fndn. for Exptl. Biol.
  8. Lines: 57
  9.  
  10.  
  11.     The MOST v3.03FM which is bundled with CSWING (patches recently posted
  12. to vmsnet.sources) has a callable interface (most_less() in main.c), but the
  13. build procedure also creates a "standalone" MOST.EXE for use from the DCL
  14. prompt.  The latter's exit routine positions the cursor at the screen length
  15. less one line, so that the carriage return added by the system will position
  16. the DCL prompt at the bottom of the screen without causing the MOST display to
  17. scroll.
  18.  
  19.     If a program invokes the standalone via spawns with lib$spawn() or
  20. system(), rather than using the callable interface, you get the intended
  21. behavior after the first spawn but after subsequent spawns the carriage return
  22. isn't added and the cursor stays positioned at the screen length less one
  23. line.  I have no idea why lib$spawn() and system() behave that way ;-(.  This
  24. is not a problem if your program immediately re-invokes an smg$ or curses
  25. screen, but if the spawns are followed by a screen output function such as
  26. printf(), which starts outputting from wherever the cursor is, after the
  27. second and subsequent spawns the output appears on what was MOST's
  28. reverse-video "filename and status" line rather than beneath it (ugh, that's
  29. ugly 8-).  Your program must explicitly position the cursor at the first
  30. column of the bottom line to get consistent behavior after every spawn (I
  31. suspect this is the case for any VMS emulation of MORE invoked via spawns).
  32.  
  33.     If you're using MOST as the pager in VMS versions of the GOPHER
  34. client, here's a quicky hack you can make in display_file() of ourutils.c to
  35. deal with the problem for VT terminals or emulators:
  36.  
  37.  
  38. GOPHER client v0.6d:
  39.  
  40.      if (strcmp(PagerCommand, "builtin") != 0) {
  41.       system(command);
  42. #ifdef VMS
  43.           printf("\033[%d;%dH", LINES, 1);
  44. #endif
  45.      }
  46.      else
  47.       Ourpager(Filename);
  48.  
  49.  
  50. GOPHER client v1.1beta:
  51.  
  52.      if (strcmp(STRget(PagerCommand), "builtin") != 0) {
  53.       system(command);
  54. #ifdef VMS
  55.           printf("\033[%d;%dH", LINES, 1);
  56. #endif
  57.      }
  58.      else
  59.       Ourpager(Filename);
  60.  
  61.                 Fote
  62.  
  63. =========================================================================
  64.  Foteos Macrides           Worcester Foundation for Experimental Biology
  65.  MACRIDES@SCI.WFEB.EDU     222 Maple Avenue, Shrewsbury, MA 01545
  66. =========================================================================
  67.