Skip to content

Commit

Permalink
document the final 64bit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Jan 2, 2025
1 parent cd055d9 commit 5dd4ee8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
5 changes: 3 additions & 2 deletions man/man3/filestruct.3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH FILESTRUCT 3NEMO "7 April 2012"
.TH FILESTRUCT 3NEMO "2 January 2024"

.SH "NAME"
filestruct \- primitives for structured binary file I/O
Expand Down Expand Up @@ -274,11 +274,12 @@ https://github.com/syrte/snapio - python implementation of snap I/O

.SH "UPDATE HISTORY"
.nf
.ta +2.0i +2.0i
.ta +1.25i +4.5i
4-Apr-87 original implementation JEB
30-Aug-87 type coersion, deferred input LPH
16-Apr-88 new types, operators, etc JEB
16-May-92 random access to data PJT
5-mar-94 documented qsf PJT
2-jun-05 added blocked I/O PJT
2-jan-2024 fix 64bit problem for big items PJT
.fi
46 changes: 29 additions & 17 deletions man/man5/filestruct.5
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.TH FILESTRUCT 5NEMO "16 May 1992"
.SH NAME
.TH FILESTRUCT 5NEMO "2 January 2024"

.SH "NAME"
filestruct \- binary structured file format
.SH SYNOPSIS

.SH "SYNOPSIS"
.nf
\fB#include <stdinc.h>\fP
\fB#include "filesecret.h"\fP \fI only for local code\fP
Expand All @@ -19,23 +21,26 @@ filestruct \- binary structured file format
.PP
\fB struct item {\fP
\fB string itemtyp;\fP
\fB int itemlen;\fP
\fB size_t itemlen;\fP
\fB string itemtag;\fP
\fB int *itemdim;\fP
\fB byte *itemdat;\fP
\fB long itempos;\fP
\fB void *itemdat;\fP
\fB off_t itempos;\fP
\fB off_t itemoff;\fP
\fB };\fP
.PP
\fB struct strstk {\fP
\fB stream ss_str;\fP
\fB item *ss_stk[SetStkLen];\fP
\fB int ss_stp;\fP
\fB bool ss_seek;\fP
\fB long ss_pos;\fP \fI/* only if RANDOM access allowed */\fP
\fB int ss_mode;\fP \fI/* only if RANDOM access allowed */\fP
\fB off_t ss_pos;\fP \fI/* only if RANDOM access allowed */\fP
\fB itemptr ss_ran;\fP \fI/* only if RANDOM access allowed */\fP
\fB };\fP
.fi
.SH DESCRIPTION

.SH "DESCRIPTION"
\fIfilestruct\fP is a method for storing data files largely
consisting of character strings, booleans, and possible
multi-dimensional arrays of data. This data may be structured in a
Expand Down Expand Up @@ -74,7 +79,8 @@ otherwise. This is essentially the reason why pipes cannot be used in
The actual internal format is governed how the application programmer
uses the \fIget_XXX\fP and \fPput_XXX\fP routines (see
\fIfilestruct(3NEMO)\fP).
.SH EXPERIMENTAL FEATURES

.SH "EXPERIMENTAL FEATURES"
If compiled with \fB-DRANDOM\fP
some limited random access to data within a data-item is possible.
.PP
Expand All @@ -83,22 +89,27 @@ little/big endian machines. Otherwise,
data on disk exist in the host format, and no effort has been made to make
it machine independant (e.g. IEEE floating points and twos-compliment
integers). This is however expected in some future release.
.SH ZENO FORMAT

.SH "ZENO FORMAT"
The \fIzeno(1NEMO)\fP package also used this format, but there are some
subtle differences to be described.
.SH FILES
subtle differences still to be described here.

.SH "FILES"
.nf
.ta +2.0i
~/src/kernel/io filesecret.[ch] filestruct.h
~/inc filestruct.h
.fi
.SH SEE ALSO

.SH "SEE ALSO"
tsf(1NEMO), rsf(1NEMO), csf(1NEMO), filestruct(3NEMO), zeno(1NEMO)
.SH AUTHOR

.SH "AUTHOR"
Joshua Barnes, Lyman Hurd, Peter Teuben
.SH UPDATE HISTORY

.SH "HISTORY"
.nf
.ta +1.0i +4.0i
.ta +1.25i +4.5i
dark-ages V0.0 precurser (filestr) JEB
xx-apr-87 V1.0 basic operators JEB
xx-jul-87 V1.x added f-d coercion, deferred output Lyman Hurd
Expand All @@ -108,4 +119,5 @@ xx-xxx-87 V2.0 new types, operators, external fmt JEB
16-may-92 V3.0 finalized random access PJT
6-jul -01 documented the new uNEMO PJT
27-dec-2019 documented ZENO PJT
.fi
2-jan-2024 V3.6 fix remaining 64bit issues by using off_t, size_t PJT

0 comments on commit 5dd4ee8

Please sign in to comment.