🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2546

Wanted: Sample program that uses FCBs to wildcard

#2546
From: heintzefmcsse.enet.dec.com Sieg ...
Date: Fri, 05 Oct 1990 04:19
36 lines
2042 bytes
    I want to write a program in C that uses wildcarding to display the 
    sizes of all the files in the current directory.

    I typed in a program "find.c" that uses "handles" from Terry Dettmann's
    book "MSDOS  Programmer's reference".  This program successfully
    displayed all the files on the top level directory and recursed down
    thru the directory structures displaying all the files in them.   

    I wrote a second program "filesize.c"  that accepted a file name from
    the command line, called INT 0x21, FUNC 0x29 (parse file name into FCB)
    and finally called INT 0x21, FUNC 0x23 (get file size) and displayed
    the number of bytes used by that one file.

    Both of these programs worked.  I tried modifying the first program
    (find.c) so it would display the size of the file.  I could not make
    INT 0x21 FUNC 0x23 return the correct file size anymore even though I
    did a verbatim cut and past of the function used in "filesize.c".

    Would it be correct to conclude that FCBs and file handles should not 
    coexist in the same program?  

    I tried writing a 3rd program that used FCBs to perform wildcarding but
    I could not make this work.  Can anyone reference me to an example of
    this?  (or, better yet, mail me one?)

            Thanks,

            Sieg


heintze@genral.enet.dec.com
Digital Equipment Corporation
1110 Chapel Hills Drive  CXN2-2/35
Colorado Springs, CO 80920-3995
719-260-2184
Technical Details
Message-ID: <15812@shlump.nac.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!bacchus.pa.dec.com!deccrl!shlump.nac.dec.com!mcsse.enet.dec.com!heintze

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!bacchus.pa.dec.com!deccrl!shlump.nac.dec.com!mcsse.enet.dec.com!heintze
From: heintzefmcsse.enet.dec.com (Sieg Heintze)
Newsgroups: comp.os.msdos.programmer
Subject: Wanted:  Sample program that uses FCBs to wildcard
Summary: Trouble with getting file size with handles.
Keywords: wildcard, FCB
Message-ID: <15812@shlump.nac.dec.com>
Date: 5 Oct 90 04:19:34 GMT
Sender: newsdaemon@shlump.nac.dec.com
Organization: Digital Equipment Corporation
Lines: 36