ansi c and directories

Mike Tietel mike at ntmtka.mn.org
Thu Nov 23 07:18:29 AEST 1989


In article <13295 at s.ms.uky.edu>, beech at ms.uky.edu (Wayne Beech) writes:
> what i was getting at was most programs perform their work on files so it
> looks like there would have been something mentioned in the standard about
> handling routine actions on file systems, things like how do you get the
> names of files in a directory( or on a minidisk).

I think you may be overgeneralizing to say that "most programs perform
their work on files...".  Perhaps most programs you design and implement
perform their work on files, however, I am certain that there are more
than a few programs that do not perform their work on files.

Perhaps you could write your own interface library to provide the needed
functionality.  For the given program, the process of porting to a new
machine then consists of updating the interface library...

int isdir(name)
char *name;
{
#ifdef SYSTEMV
...
#endif SYSTEMV

#ifdef BSD
...
#endif BSD

#ifdef MSDOS
...
#endif MSDOS
}

just a thought...

mjt
-- 
Mike Tietel
Northern Telecom, Inc.       (612) 932-8017
9701 Data Park, S-100        mike at ntmtka.mn.org
Minnetonka, MN 55343         uunet!rosevax!ntmtka!mike



More information about the Comp.std.c mailing list