delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/03/27/12:00:30

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Received: by 10.224.110.68 with SMTP id m4mr10916647qap.2.1364368563049;
Wed, 27 Mar 2013 00:16:03 -0700 (PDT)
X-Received: by 10.49.95.134 with SMTP id dk6mr1289817qeb.10.1364368562951;
Wed, 27 Mar 2013 00:16:02 -0700 (PDT)
Newsgroups: comp.os.msdos.djgpp
Date: Wed, 27 Mar 2013 00:16:02 -0700 (PDT)
In-Reply-To: <f5190782-45f5-4f6b-987a-c52084c992f5@googlegroups.com>
Complaints-To: groups-abuse AT google DOT com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2.173.27.66; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr
NNTP-Posting-Host: 2.173.27.66
References: <261476b1-c137-495d-95df-a92075cd9960 AT googlegroups DOT com>
<2245ebea-be44-4a40-8b2f-7ef5e0e67157 AT googlegroups DOT com> <D85EE936F5F24E8E8E2EA7C8C3FB79C5 AT dev DOT null>
<5f806b56-af98-4f72-8984-a944be9348a4 AT googlegroups DOT com> <abe3aa9a-9e77-4df1-9177-71daeae5b51f AT googlegroups DOT com>
<6b49a77b-dcba-4c23-8a29-4ac0263e7713 AT googlegroups DOT com> <f5190782-45f5-4f6b-987a-c52084c992f5 AT googlegroups DOT com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a2b8f2c0-140e-42e9-9f73-46d6d36565ea@googlegroups.com>
Subject: Re: DJGPP scandir and alphasort example code
From: Georg Potthast <dosusb AT googlemail DOT com>
Cc: djgpp AT delorie DOT com
Injection-Date: Wed, 27 Mar 2013 07:16:03 +0000
Bytes: 2219
Lines: 15
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r2RG046M002965
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Am Dienstag, 26. März 2013 23:19:08 UTC+1 schrieb RayeR:
> > I do have long filenames in C:\ e.g. "VirtualBox-3.2.10-66523-Win.exe". It does not crash though.
> 
> 
> 
> And did you tried with some LFNs containing SPACES?

Yes, that was no problem. It seems the problem is that glob and readdir result in different file numbers for a directory. Therefore sometimes there is not enough memory allocated causing memory overrides.

Adding some additional memory to be on the safe side should fix it:

	cnt = glob_results.gl_pathc +2; //add two for . and ..
	cnt += 100; //glob and readdir report different file numbers

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019