Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2.fluke 9/24/84; site vax2.fluke.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!fluke!sota From: sota@fluke.UUCP (Bruce White) Newsgroups: net.micro.pc Subject: Sidekick vs. Microsoft C followup Message-ID: <981@vax2.fluke.UUCP> Date: Fri, 18-Oct-85 17:28:47 EDT Article-I.D.: vax2.981 Posted: Fri Oct 18 17:28:47 1985 Date-Received: Sun, 20-Oct-85 05:00:46 EDT Distribution: net Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 46 {} Several people have responded to my initial query regarding Sidekick coming up when the host program was executing a "gets()" function. The general opinion was that lower level I/O calls should be used to allow Sidekick to come up. Taking that advice, I then wrote a primitive version of gets() using putch(), getch(), and kbhit(). This lower level I/O function seems to work just fine with Sidekick. As an added comment, "HOMEBASE", another memory resident desktop-type program came up just fine through the original program. The new gets, (getsraw), follows: getsraw (string) char *string; { int i = 0; char ch; while (1) { if (!kbhit()) { if ((ch = getch()) == '\r') { string[i] = '\0'; putch ('\r'); putch ('\n'); return(0); } else if (ch == '\b') { putch ('\b'); putch (' '); putch ('\b'); i--; } else { string[i++] = ch; putch(ch); } } } } -- Bruce T. White John Fluke Mfg. Co., Inc. {uw-beaver,decvax!microsof,ucbvax!lbl-csam,allegra,ssc-vax}!fluke!sota