www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/12/20/07:09:00

Date: Mon, 20 Dec 93 12:05:12 +0100
From: joep AT ichsun6 DOT ich DOT nl (Joep Jansen)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: go32 does not handle globbing properly?

When I tried to port the gnu file utilities (fileutils-3.9) to djgpp,
I ran into several problems.

One problem seems to be in the way go32 1.11 handles filename globbing. 
I found out it does not work as in Unix.
Some examples:
suppose you have a directory containing the files:

	foo foo.c foo.o bar bar.c bar.o

Then "ls foo*" results in:

	foo

instead of:

	foo foo.c foo.o

While "ls foo.*"

results in:

	foo foo.c foo.o

instead of

	foo.c foo.o

Also patterns like "*oo*" or "[a-b]*" are not handled properly.
The problem is not with the "ls" program but with go32.
It can be reproduced with a simple testprogram "globtest.c" (listed below).

I guess other people have run into the same problem.

Does anyone know a fix or workaround ?

Joep Jansen
joep AT ichfsnl DOT ich DOT nl


-----
#include <stdio.h>
 
main(argc, argv)
int argc;
char *argv[];
{
    int i;
    for (i=1; i<argc; i++) {
        printf("%s\n",argv[i]);
    }
}
----------



- Raw text -


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