www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/06/12:00:05

Date: Sun, 6 Apr 1997 18:48:24 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Omnichron <noone AT nowhere DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: Trouble With Globbing
In-Reply-To: <3347afbf.1493961@news.erols.com>
Message-ID: <Pine.SUN.3.91.970406183949.2930F-100000@is>
MIME-Version: 1.0

On Sun, 6 Apr 1997, Omnichron wrote:

> parameters - ..\maxhead.ico." After I bit of checking, I found that
> instead of passing "..\*.ico" to MOVE, it was getting passed a big
> string.

This is incorrect.  What the DJGPP filename globbing does is expand 
"..\*.ico" into a list of argv[] strings, whereby each argv[i] gets a 
name of a single file, like so:

	argv[0]=program name
	argv[1]="..\foo.ico"
	argv[2]="..\bar.ico"
	argv[3]="..\baz.ico"

etc.

If you need for a program to get the original wildcard, just quote it,
like so: 

	move '..\*.ico' destination

double quotes will also work:

	move "..\*.ico" destination

If that is not acceptable, just put this anywhere in your source:

#include <crt0.h>
char **
__crt0_glob_function(char *a)
{
  return 0;
}

This is exactly how it is explained in the FAQ, have you looked there?

- Raw text -


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