home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!olivea!sgigate!rutgers!mcclb0.med.nyu.edu!wfeb2.bitnet!macrides
- From: macrides@wfeb2.bitnet
- Newsgroups: vmsnet.sources.d
- Subject: Problem using MOST via spawns
- Message-ID: <1993Jan7.122046.97@wfeb2>
- Date: 7 Jan 93 16:20:46 GMT
- Organization: Worcester Fndn. for Exptl. Biol.
- Lines: 57
-
-
- The MOST v3.03FM which is bundled with CSWING (patches recently posted
- to vmsnet.sources) has a callable interface (most_less() in main.c), but the
- build procedure also creates a "standalone" MOST.EXE for use from the DCL
- prompt. The latter's exit routine positions the cursor at the screen length
- less one line, so that the carriage return added by the system will position
- the DCL prompt at the bottom of the screen without causing the MOST display to
- scroll.
-
- If a program invokes the standalone via spawns with lib$spawn() or
- system(), rather than using the callable interface, you get the intended
- behavior after the first spawn but after subsequent spawns the carriage return
- isn't added and the cursor stays positioned at the screen length less one
- line. I have no idea why lib$spawn() and system() behave that way ;-(. This
- is not a problem if your program immediately re-invokes an smg$ or curses
- screen, but if the spawns are followed by a screen output function such as
- printf(), which starts outputting from wherever the cursor is, after the
- second and subsequent spawns the output appears on what was MOST's
- reverse-video "filename and status" line rather than beneath it (ugh, that's
- ugly 8-). Your program must explicitly position the cursor at the first
- column of the bottom line to get consistent behavior after every spawn (I
- suspect this is the case for any VMS emulation of MORE invoked via spawns).
-
- If you're using MOST as the pager in VMS versions of the GOPHER
- client, here's a quicky hack you can make in display_file() of ourutils.c to
- deal with the problem for VT terminals or emulators:
-
-
- GOPHER client v0.6d:
-
- if (strcmp(PagerCommand, "builtin") != 0) {
- system(command);
- #ifdef VMS
- printf("\033[%d;%dH", LINES, 1);
- #endif
- }
- else
- Ourpager(Filename);
-
-
- GOPHER client v1.1beta:
-
- if (strcmp(STRget(PagerCommand), "builtin") != 0) {
- system(command);
- #ifdef VMS
- printf("\033[%d;%dH", LINES, 1);
- #endif
- }
- else
- Ourpager(Filename);
-
- Fote
-
- =========================================================================
- Foteos Macrides Worcester Foundation for Experimental Biology
- MACRIDES@SCI.WFEB.EDU 222 Maple Avenue, Shrewsbury, MA 01545
- =========================================================================
-