<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 28 May 1981 16:03:00-PDT
From   : fylstra.tsca@Sri-Unix
Subject: Search/Search Next

Can anyone enlighten me about a detail concerning the BDOS functions
search/search next?  The CPM 2.x documentation is reasonably explicit
and it is fairly obvious how to develop a list of file names that
match a given ambiguous file name.  What is unclear is whether one
can issue other BDOS function calls between consecutive search next's.
For example, a "TYPE *.ASM" command might look like this...

       while ((dircode = srchnxt(fcb)) != 0xFF)
               typefile( tbuff + (dircode << 5));
       typefile (fcb)
       {       ... various BDOS read sequential calls ... }

The reason I pose this question is that the 1.4 documentation rather
cryptically says that the Search for next occurrence function is
the same as Search for file, "but called after function 17 (no other
intermediate BDOS calls allowed)", whereas the 2.x documentation
takes no stand on this question.  If it is true that one cannot
do anything useful between consecutive search next's (other than
print out a directory), how does one implement something like the
above TYPE command?  The only examples I have seen actually scan the
entire directory first and store a list of filenames in a table
before performing the function on each name in turn.

Dave Fylstra
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>