delorie.com/archives/browse.cgi | search |
From: | "Thorsten Erdmann" <thorsten DOT erdmann AT gmx DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | selfmade FindFirst/FindNext |
Date: | Sun, 18 Jun 2000 17:14:07 +0200 |
Organization: | AddCom AG |
Lines: | 22 |
Message-ID: | <8iip1b$rnq$1@riker.addcom.de> |
NNTP-Posting-Host: | h-62.96.141.70.host.de.colt.net |
X-Trace: | riker.addcom.de 961341291 28410 62.96.141.70 (18 Jun 2000 15:14:51 GMT) |
X-Complaints-To: | news AT news DOT addcom DOT de |
NNTP-Posting-Date: | 18 Jun 2000 15:14:51 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2014.211 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2014.211 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hi, I am writing a little Joliet CDROM library. Therefore I want to write a DOS compatible findfirst/findnext routine for directory scanning. The ffblk structure holds only five bytes for the state of the search. That is not enough for me. Where shall I hold the search pattern? I also need storage for an long LBN (logical block number) and a search index (short). For speed it would also be good to have a sector buffer. The problem is that I don't know when the search is over. I can allocate some memory during the findfirst routine and put a pointer to it into the five reserved bytes of ffblk. But when should I free that allocated memory? When there is no search result? That would be bad if a program only searches for the first match of the search pattern. Any ideas? How does the DOS function do that? bye Thorsten
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |