TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Francois Thunus
from: andrew clarke
date: 1996-10-08 13:06:00
subject: silly findfirst question

05 Oct 96 18:54, Francois Thunus wrote to All:

 > /* test of findfirst / findnext under emx */

 > #include 
...

 >    FindBuf=malloc(sizeof(FILEFINDBUF3));

 > This works as advertised when compiled to os/2 EXE with Emx.

Want to bet ten trillion dollars on that?  :-)  There are a number of
problems with your code.

 > However
 > 1) I'm getting a warning "assignment makes pointer from integer 
 > without a cast" on the malloc line
 > why ? I've always done that under dos and my compiler never
 > complained ?

There is no prototype for malloc.  #include 

 > 2) when compiled to dual standart (ie dos/os/2 exe with rsx/emx.dll) it 
 > still works under os/2 but bombs out with GP in a dos box. Related to 
 > previous ? what to do ?

DOS doesn't implement support for the DosFindFirst/FindNext calls provided
by the native OS/2 API.  You need to use interrupt 21h under DOS to perform
directory searches - refer to a DOS programmers reference guide (eg. Ralf
Brown's Interrupt List) for more information.  Bob Stout's SNIPPETS archive
may also be of use.

Regards
Andrew

-- randy{at}zws.com

--- Msged/2 4.00
* Origin: Blizzard of Ozz, Melbourne, Australia (3:635/727.4{at}fidonet)
SEEN-BY: 50/99 620/243 625/100 632/536 635/503 544 727 711/409 410 413 430
SEEN-BY: 711/808 809 934 955 712/515 713/888 800/1
@PATH: 635/727 544 50/99 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.