X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=fPkkW+CLDSlIwqovyqSrNEUhn1C8FSLf+7F9aNvbBnk=; b=rrSBTe5LFKeb+GbJF6qRSFF/vq2ei2S0PhTZrgHhVmvQUYd9IHDZGnBXwgDlorjHII aj/BffVPK2k1U6VqdDIP2XtBiNMXmXOl21LLif2DBAAwS/zPnHwh8roHHgWVEY3bmsq+ XRGO7Q2oFe00ZfpOHhSi1CrMsdhc5lU6ANnBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=dM/89j0HMsgHmv41FCAV897Qc5ZmgufAMZpoxkGNOzyySqQRhMD/MuQ0Ku3wKpRLny 1kcuyZBDXMtOgpnyQ8hmGSqpX0I37PIpEdKie8/1EPGXFpQFmBc47DtgshJvcr4JDW0C sehwTeH2kHF38rRNFi9upeUGjzYHNqjHkV1x4= MIME-Version: 1.0 Date: Fri, 11 Feb 2011 17:30:42 +0200 Message-ID: Subject: findfirst/findnext question From: Ozkan Sezer To: djgpp AT delorie DOT com Content-Type: text/plain; charset=ISO-8859-1 Reply-To: djgpp AT delorie DOT com Hi: I don't know the internals of these functions so I have two questions: - Does the path pointer I pass to findfirst() must stay valid until I finish my all work with it using fnidnext() ? - Is it safe calling findfirst() & co. multiple times, i.e. something like: void func1 (const char *arg) { struct ffblk f; findfirst(arg, &f); ... } void func2 () { struct ffblk f; if (findfirst(somepath, &f) == 0) func1(f.ff_name); ... } Thanks. -- O.S.