🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.msdos.programmer
4 messages
4 total messages Started by Bud Lo Fri, 19 Apr 1996 15:49
DOS doesn't expands wildcard argument...!
#1212
Author: Bud Lo
Date: Fri, 19 Apr 1996 15:49
15 lines
883 bytes
hello...

i've written a C program and compiled both a Unix and DOS version,
the Unix version correctly expands its wildcard argument  like *.jpg 
into its constituent files while the DOS version do nothing...
Can anyone suggest solution to make it work in DOS...

(i know that the Unix's shell do the work of wildcard expansion
before passing them to my program, and observing this behaviors 
in DOS, does it imply that command.com simply leave this task to 
programmer???)

thanks a lot..

Herman
Re: DOS doesn't expands wildcard argument...!
#1213
Author: Scott McMahan - Softbase Systems
Date: Fri, 19 Apr 1996 16:54
48 lines
2090 bytes
It really makes me mad that people post messages with bad return
addresses. They want help, and you're nice enough to help them and
e-mail a response, and you get a MIME-Encapsulated mailer daemon
message for your troubles!

Bud Lo (budlo@bud.com) wrote:

: i've written a C program and compiled both a Unix and DOS version,
: the Unix version correctly expands its wildcard argument  like *.jpg 
: into its constituent files while the DOS version do nothing...

DOS's command processor does not expand wildcards. That's why some
DOS command behave bizarrely and inconsistently when you try
to use them. The UNIX shell expands them and passes the expansions
to the program.

: Can anyone suggest solution to make it work in DOS...

Most DOS compilers have a module you can link in to do it for you.
Read your compiler documentation.

Scott

-*-

Look at this crap!

This is a MIME-encapsulated message

--JAA03664.829932689/ramona.cyborganic.com

The original message was received at Fri, 19 Apr 1996 09:51:27 -0700 (PDT)
from softbase@mercury.interpath.com [199.72.1.1]

   ----- The following addresses have delivery notifications -----
<budlo@bud.com>  (unrecoverable error)

   ----- Transcript of session follows -----
... while talking to xanadu.cyborganic.net.:
>>> RCPT To:<budlo@bud.com>
<<< 550 <budlo@bud.com>... User unknown
550 <budlo@bud.com>... User unknown

--JAA03664.829932689/ramona.cyborganic.com
Content-Type: message/delivery-status


--JAA03664.829932689/ramona.cyborganic.com--
Re: DOS doesn't expands wildcard argument...!
#1215
Author: Mike Rubenstein
Date: Sat, 20 Apr 1996 02:37
20 lines
1206 bytes
budlo@bud.com (Bud Lo) wrote:

> hello...
> 
> i've written a C program and compiled both a Unix and DOS version,
> the Unix version correctly expands its wildcard argument  like *.jpg 
> into its constituent files while the DOS version do nothing...
> Can anyone suggest solution to make it work in DOS...
> 
> (i know that the Unix's shell do the work of wildcard expansion
> before passing them to my program, and observing this behaviors 
> in DOS, does it imply that command.com simply leave this task to 
> programmer???)

Yes, but every C compiler I've seen for DOS includes a file that you
can just link in with your program to get the wildcard expansion.
Check your documentation.


Michael M Rubenstein
Re: DOS doesn't expands wildcard argument...!
#1216
Author: gruch
Date: Sat, 20 Apr 1996 13:13
28 lines
1489 bytes
budlo@bud.com (Bud Lo) wrote:

>hello...

>i've written a C program and compiled both a Unix and DOS version,
>the Unix version correctly expands its wildcard argument  like *.jpg 
>into its constituent files while the DOS version do nothing...
>Can anyone suggest solution to make it work in DOS...

>(i know that the Unix's shell do the work of wildcard expansion
>before passing them to my program, and observing this behaviors 
>in DOS, does it imply that command.com simply leave this task to 
>programmer???)

>thanks a lot..

>Herman

Yes and no Herman.  COMMAND does not automatically expand wildcards
before passing them to your program.  But DOS does have two services
you can to accomplish this task.  They can be accessed through Int 21
functions 4Eh and 4Fh.  Look in your compiler documentation first
though- It probably contains a function like 
_dos_findfirst and _dos_findnext to make the job a little easier.  If
not you can find the information you need in "The new Peter Norton
Programmers Guide to the IBM PC & PS/2"  ISBN 1-55615-131-4.  Enjoy!

~Gerry
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads