specter@disk.uucp (Byron Max Guernsey) (06/09/91)
Is there any way to do an effective getch() on stdio using lattice? I'm not talking about their getchar() ot getc(stdin) functions. Those WAIT on input, and they require a carriage return. I want something that will return NULL if nothing is currently in the input buffer, and otherwise return the character. That way I can use it as part of an input/event loop that does input and events at the same time. I have been using the windows IDCMP flag vanillakey and getting the character codes from the message port, but that is inconsistant with stdio... You have to click on the title bar of the window you open to type single character input and then click on the console window to use stdio. It just doesn't work out, and if I finally get stdio redirected to the serial port, it needs to work through there also. I have tried looking at the buffer structure associate with input (stdin) but it doesn't contain anything until the user presses return. (bummer eh?) Byron -- Byron 'Maxwell' Guernsey | /// //\\ specter@disk.UUCP or | /// // \\ uunet!ukma!corpane!disk!specter | \\\/// //====\\ "Great programs aren't written, they're fathered." \\\/ // \\ m i g a