🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #937

Re: ansi c and directories

#937
From: Mike Tietel
Date: Wed, 22 Nov 1989 20:18
39 lines
1583 bytes
In article <13295@s.ms.uky.edu>, beech@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@ntmtka.mn.org
Minnetonka, MN 55343         uunet!rosevax!ntmtka!mike
Technical Details
Message-ID: <1848@ntmtka.mn.org>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!wuarchive!uwm.edu!uwvax!umn-d-ub!umn-cs!nis!ntmtka!mike
References: <13295@s.ms.uky.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!wuarchive!uwm.edu!uwvax!umn-d-ub!umn-cs!nis!ntmtka!mike
From: mike@ntmtka.mn.org (Mike Tietel)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: ansi c and directories
Message-ID: <1848@ntmtka.mn.org>
Date: 22 Nov 89 20:18:29 GMT
References: <13295@s.ms.uky.edu>
Followup-To: comp.lang.c
Organization: Northern Telecom Inc., Minnetonka, MN
Lines: 39