[comp.sys.amiga.programmer] ===> Help with Lattice C functions <===

greenwoode@merrimack.edu (Ed Greenwood) (05/19/91)

                                                  

     I am writing a small database progam using Lattice C (verion 5.04),
and for one part of it, I need to display a list file names stored in
a given directory.  Lattice provides three functions, "getfnl" 
(get file name list), "dfind" and "dnext", that should work nicely, but I 
cannot seem to get them any of them to work properly. 

     Are the examples in the user's manual correct?  Am I leaving something
out that is not mentioned?  I've tried many ds, and most
of the time, my programs instantly crash.  I would greatly appreciate
any help!

                                                       Thanks,
                                                      

                                                       Edward Greenwood

laza@cip-s01.informatik.rwth-aachen.de (Alexander Lazarevic) (05/23/91)

greenwoode@merrimack.edu (Ed Greenwood) writes:


>a given directory.  Lattice provides three functions, "getfnl" 
>(get file name list), "dfind" and "dnext", that should work nicely, but I 
>cannot seem to get them any of them to work properly. 

I've tried to get the example given with getfnl() to work, but it every time
it gurus with "memory freed twice". I've ajusted the stack, so that shouldn't
be the problem.
With _dfind and _dnext I get in trouble scaning a file in RAM:. It seems,
that _dfind gets the first entry, but _dnext fails.

I've reported this to SAS today. Let's see.

 /\
/--\lex.