Fortran vs. Unix File System
Brandon Allbery
bsa at ncoast.UUCP
Wed Jul 31 00:26:38 AEST 1985
Expires:
Quoted from <3287 at decwrl.UUCP> ["unix file system"], by jcampbell at mrfort.DEC (Jon Campbell)...
+---------------
| Some of us at Digital think we have found a basic problem with the UNIX
| file system for FORTRAN. The problem is that there is no place to put
| various kinds of information about the contents of the file. More
| specifically:
|
(long list of Fortran and/or ANSI-magtape specific information)
|
| I would like to propose that UNIX users and developers begin thinking
| about which "file attributes" (knowledge about the file that would be
| useful to know for generalized programs which cannot have previous
| knowledge about each file) would be useful to attach to UNIX files.
|
(more)
+---------------
How about going by the grand tradition of ar, ld, etc.:
struct _for_dat {
short _fd_mag; /* magic number */
short _fd_recs; /* record size */
short _fd_type; /* sequential, ISAM, etc. */
short _fd_cset; /* 0=ASCII, 1=EBCDIC, etc. */
short _fd_byte; /* byte size in bits */
short _fd_recf; /* Fixed, Variable, Undefined */
short _fd_delim; /* delimiter value */
};
If the header is a fixed size, you can easily accomodate it, and simple
programs can convert between the two formats.
The type flag might be handled with:
#define FD_FIXED 0 /* fixed _fd_recs-length records, undelimited */
#define FD_DELIM 1 /* fixed _fd_recs-length records, delimited */
#define FD_ASCII 0 /* ASCII carriage control, or none */
#define FD_ANSIC 2 /* ANSI-style carriage control in col 1 */
#define FD_SEQ 0 /* sequential access */
#define FD_REL 4 /* relative access */
#define FD_ISAM 8 /* ISAM access */
#define FD_UDA 12 /* user-defined access */
Et cetera. So what's so hard about it?
--bsa
--
Brandon Allbery, Unix Consultant -- 6504 Chestnut Road, Independence, OH 44131
decvax!cwruecmp!ncoast!bsa; ncoast!bsa at case.csnet; +1 216 524 1416; 74106,1032
========================> Trekkies have Warped minds. <=======================
More information about the Comp.unix.wizards
mailing list