Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : SWMODRSP.ZIP
Filename : SWMODRSP.PRG

 
Output of file : SWMODRSP.PRG contained in archive : SWMODRSP.ZIP
******************************************************************************
*
* Function Name: smgetresp
*
* Copyright (C) 1980, SilverWare Inc.
*
* Author: John P. Halovanic
*
* Date / Time: Thurs Jan 25 23:16:13 1990
*
* Reference Name: Hayes modem response parser
*
* Comment: This function is for reading smart modem responses.
* It makes the assumption that the response is in the
* form of . The smgetresp function
* will read for the modem response until it is found or
* it times out. The function returns the modem string
* or .
*
* Modification Log:
*
* Rev. Date By Description
* --------------------------------------------------------------
* 1.00 01/18/90 John P. Halovanic Initial Creation
*
*
*
*
******************************************************************************



FUNCTION smgetresp
PARAMETERS port,waittime

******************************************************************************
* port = Port number to read response from.
* waittime = The max time to wait (in secs) for a modem response.
* The function returns the modem string or
******************************************************************************

private port,waittime,retstring,buildstring,endtime,maxlf,lfcheck
retstring = "No Modem Response Detected"
buildstring = ""
endtime = swgtime()+waittime
maxlf = 2
lfcheck = 0
do while .t.
if swgtime() > endtime
exit
endif
if !rxempty(port)
modechar = rxchar(port)
if modechar != 13 .and. modechar != 10
buildstring = buildstring +chr(modechar)
else
if modechar = 10
lfcheck = lfcheck + 1
if lfcheck = 0 .and. len(buildstring) >0
maxlf = 1
endif
if lfcheck = maxlf
retstring = buildstring
exit
endif
endif
endif
endif
enddo
RETURN retstring


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : SWMODRSP.ZIP
Filename : SWMODRSP.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/