=========================================================================== BBS: The Abacus * HST/DS * Potterville MI Date: 06-11-93 (17:55) Number: 102 From: GEOFFREY LIU Refer#: 91 To: CALVIN FRENCH Recvd: NO Subj: TWO THINGS... Conf: (35) Quick Basi --------------------------------------------------------------------------- CF>First, someone (awhile back) posted a QB replacement for PDS' CF>"FILE$" statement. I really need it now ... Anyone have CF>it? This is my version, same thing as the FILE$, but also returns the error code. DECLARE FUNCTION WildCard$ (GLfilename$, GLFlag%) '$INCLUDE: 'qb.bi' 'DEFINT A-Z 'b = 0 'PRINT 'a$ = WildCard$("C:\*.*", b) 'DO ' IF b <> 0 THEN ' EXIT DO ' END IF ' PRINT a$ ' a$ = WildCard$("", b) 'LOOP DEFINT A-Z FUNCTION WildCard$ (GLfilename$, GLFlag%) ' ' Returns filenames with wildcards ' ' GLFilename$ is name of file. *,? ok ' GLfilename$ = "" if second and subsequent calls with same ' GLFilename$ (FindNext instead of FindFirst) ' ' Returns: If sucessful, ASCII filename (Strips extra nulls) ' if failed, in GLFlag:2 is file not found,3 is path not found, ' 12h is no more files ' Changes GLflag to 0 if sucessful ' ' NOTE: DON'T CHANGE THE DTA BETWEEN CALLS! ' STATIC GLDTa AS STRING * 43 'DTA size needed by findfirst/next STATIC GLPath$ DIM GLRegs AS RegTypeX GLRegs.ds = VARSEG(GLDTa) GLRegs.dx = VARPTR(GLDTa) GLRegs.ax = &H1A00 CALL INTERRUPTX(&H21, GLRegs, GLRegs) IF GLfilename$ = "" THEN GLRegs.ax = &H4F00 GLRegs.cx = &H0 CALL INTERRUPTX(&H21, GLRegs, GLRegs) ELSE GLcolon = INSTR(GLfilename$, ":") DO GLslash = GLslash1 GLslash1 = INSTR(GLslash + 1, GLfilename$, "\") LOOP UNTIL GLslash1 = 0 IF GLcolon > GLslash THEN GLslash = GLcolon END IF GLPath$ = MID$(GLfilename$, 1, GLslash) GLfilename$ = GLfilename$ + CHR$(0) GLRegs.ds = VARSEG(GLfilename$) GLRegs.dx = SADD(GLfilename$) GLRegs.ax = &H4E00 GLRegs.cx = &H0 CALL INTERRUPTX(&H21, GLRegs, GLRegs) END IF IF (GLRegs.flags AND 1) THEN 'CF is set GLFlag = GLRegs.ax ELSE GLFlag = 0 GLFilename2$ = MID$(GLDTa, 31) GLnul = INSTR(GLFilename2$, CHR$(0)) IF GLnul THEN WildCard$ = GLPath$ + LEFT$(GLFilename2$, GLnul - 1) END IF END IF END FUNCTION CF>Second, does anyone have the hack (?) that keeps QB from CF>dropping DTR? To prevent CLOSE or END from lowering the DTR on comm ports, SEEK: B0 00 E3 01 40 83 C2 04 EE MAKE: B0 00 90 90 40 83 C2 04 EE Be advised that if you install that last patch, you will need to drop the DTR manually if you want it lowered. My PBClone library can do that for you. (Continued in the next message) --- * DeLuxe* 1.26b #11507 * Two Wrongs Don't Make A Right, But Three Lefts Do. --- FidoPCB v1.4 beta * Origin: CRS Online, Toronto, Ontario (1:229/15) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/110 159/100 125 430 575 950 203/23 209/209 SEEN-BY: 261/1023 280/1 390/1 396/1 15 397/2 2230/100 2440/5 3603/20