From: "Tim Van Holder" To: Subject: RE: DOZE and WINDOZE versions Date: Sun, 31 Dec 2000 20:23:08 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: <1225-Sun31Dec2000205652+0200-eliz@is.elta.co.il> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id OAA32194 Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > > strcpy (lowername, name); > > strlwr (lowername); > > if (strcmp (name, lowername) != 0) { > > printf ("%s -> %s\n", name, lowername); > > if (rename (name, lowername) != 0) { > This is not supposed to work with stock v2.03. I only committed > yesterday the changes that make this work, so before that, even the > CVS version won't DTRT. I'll admit that this particular code was taken from a tool written for Linux (except for the added __opendir_flags). And, upon testing, it indeed doesn't work. But I've been using a similar tool (relevant snippet below) since 1998, and it has always worked just fine, so I had no reason to think it wouldn't work. Guess it matters that below, both args to rename() are lowercase. == snippet start DIR *d = opendir("."); struct dirent *de; while (de = readdir(d)) { if (DirsToo || (access(de->d_name, D_OK))) rename (de->d_name, strlwr(de->d_name)); } == end snippet