delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/24/08:20:58

Date: Fri, 24 May 1996 15:17:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: dan AT math DOT uiuc DOT edu
Cc: djgpp AT delorie DOT com
Subject: Re: globbing a:*.c bug
In-Reply-To: <4o1r22$nfm@vixen.cso.uiuc.edu>
Message-Id: <Pine.SUN.3.91.960524151101.5559A-100000@is>
Mime-Version: 1.0

On 23 May 1996, Dan Grayson wrote:

> Globbing a:*.c doesn't work with the latest djgpp v2, for it yields ./a:foo.c
> ../a:bar.c ...

It surely works for me.  I wrote a simple program (attached at the end),
and it dutifully printed all the *.c files on a floppy when I invoked it
with a:*.c as its single argument.  So it must be some other reason that
in your case it didn't work.  Please tell more about the program that
failed with globbing.  I suspect that the globbing worked, but then the
program's code thought that a:bar.c is a relative pathname, because it 
doesn't have a leading slash.  Programs written for Unix often fail in 
this way.

------------------------------------------------------------------
#include <stdio.h>

int main (int argc, char *argv[])
{
  while (--argc)
    printf ("%s\n", *++argv);

  return 0;
}

- Raw text -


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