|
|
DataMuseum.dkPresents historical artifacts from the history of: ICL Comet 32 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about ICL Comet 32 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1507 (0x5e3)
Types: TextFile
Notes: UNIX file
Names: »openp.3x«
└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
└─⟦28c352965⟧ »/a« UNIX Filesystem
└─⟦this⟧ »usr/man/man3/openp.3x«
.ig @(#)openp.3x 2.1 7/1/84 @(#)Copyright (C) 1983 by National Semiconductor Corp. .. .TH OPENP 3X .SH "NAME" openp, fopenp \- open file using search path .SH "SYNOPSIS" .nf .B openp (path, fname, fullname, mode) .B char *path, *fname, *fullname; .B int mode; .sp .B #include <stdio.h> .B FILE *fopenp (path, fname, fullname, mode) .B char *path, *fname, *fullname, *mode; .sp .B cc ... -lnsc .fi .SH "DESCRIPTION" .I Openp constructs a sequence of full pathnames from the file leafname .I fname and the .IR sh (1)-style search path .IR path . As each pathname is constructed, .I openp attempts to .IR open (2) the file so designated with the I/O mode .IR mode . As soon as an attempt is successful, .I openp returns the resulting file descriptor. On return, .I fullname points to the last pathname constructed; on entry it must point to sufficient space to hold the longest of these. .PP .I Fopenp is a version of .I openp that interfaces to the standard I/O library; it uses .IR fopen (3) in place of .IR open (2) and returns a .B FILE pointer in place of a file descriptor. .PP These functions are kept in the .I /usr/lib/libnsc.a library. .SH "CAVEATS" If .I fopenp is called with a .I mode that allows writing, a file early in the search sequence may be created from scratch, even though a file later in the search sequence already exists. .SH "DIAGNOSTICS" If no .I fullname succeeds, .I openp returns -1, whereas .I fopenp returns the pointer .BR NULL . .SH "SEE ALSO" open(2), fopen(3), sh(1)