HP C/iX Library Reference Manual (30026-90004)
160 Chapter5
HP C/iX Library Function Descriptions
fopen
specified. The default for text and binary streams is 256 bytes. The default
for byte streams is 1 byte.
S
n
The S option specifies the maximum size of the file. The value of
n
is the
maximum size of the file in records for text and binary streams, and in
bytes for byte streams. Notice that if the S parameter is not specified, the
default is 4095.
Te If the Te option is specified, the file is saved in the temporary file domain.
If the Te option is not specified and the file is a new file, the default is to
save the file as a permanent file. If the file is old, the default is to not
change the disposition.
Tm If the Tm option is specified, disk read functions trim editor line numbers, if
they exist, and trailing blanks from each record of an ASCII fixed record
length file before returning file data to the reader. This option is used on
files opened with read only access. Random access to file data using
fseek() and lseek() is not permitted. The default is to not trim editor
line numbers and blanks.
U
n
If the U option is specified, the file is created with
n
user-label records. If
this option is not specified, the default is no user-label records.
V If the V option is specified, the file is created with an MPE variable-length
record format. If the V or Bs options are not specified, then the file is
created with an MPE fixed-length record format. This option is mutually
exclusive with the Bs option.
X
n
The X option controls exclusive access ability for the file. The option
character is followed by an integer that indicates the level of exclusivity
for this open request. The levels are specified in the MPE Intrinsics
Reference Manual under the FOPEN specification.
The following example creates or opens a fixed record binary file for writing with 256 byte
records, a file size of 1000 records, and a file code of 1030:
#include stdio.h>
FILE *
stream
;
stream
= fopen("
filename
","wb R256 S1000 F1030");
See Also
fclose(), freopen(), fflush(), ANSI C 4.9.5.3, POSIX.1 8.1