fopen man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

Digital UNIX Diffs - fopen(5)			 Digital UNIX Diffs - fopen(5)

NAME
       fopen, freopen, fdopen -	 Open a stream

LIBRARY
	Standard C Library (libc.a)

SYNOPSIS
       #include <stdio.h>

       FILE ∗fopen(
	       const char ∗path,
	       const char ∗mode);

       FILE ∗fdopen(
	       int filedes,
	       const char ∗mode);

       FILE ∗freopen(
	       const char ∗path,
	       const char ∗mode,
	       FILE ∗stream);

PARAMETERS
       Points  to  a character string that contains the name of the file to be
       opened.	If the final component of the path parameter specifies a  sym‐
       bolic  link,  the  link is traversed and pathname resolution continues.
       Points to a character string that controls whether the file  is	opened
       for  reading (r), writing (w), or appending (a) and whether the file is
       opened for updating (+).	 Specifies  the	 input	stream.	  Specifies  a
       valid open file descriptor.

DIFFERENCES
       vms-files(5): OpenVMS File System Differences

       The syntax of filename path are different on UNIX and OpenVMS.

       OpenVMS	has  a versioned file system.  When you use mode "w", the next
       version of the file is created; the prior version remanins intact.   ON
       UNIX,  freopen(3)  and fopen(3) truncate the file to zero-length effec‐
       tively losing the content.

       OpenVMS supports an additional mode of "b" that can be used in  conjuc‐
       tion  with  the	other  modes.	"b" means binary access mode.  In this
       case, no conversion of carriage-control information is attempted.

       OpenVMS supports additional arguments on fopen  and  freopen  calls  to
       describe OpenVMS RMS attributes of the file.

       vms-process(5): OpenVMS Process Differences

       Due to the differences in vfork(5) and exec(5) sequences on the 2 oper‐
       ating systems, the state of files in the child differs  between	the  2
       systems.	  File	pointers  are  not transfered to the child on OpenVMS.
       Process	permanent  files  are  not  inheritted	by  the	 child	either
       (replaced  with	the  null  device).   Both of these are transferred on
       UNIX.

       vms-vaxc(5): OpenVMS VAX C vs DEC C Differences

       In the DEC C RTL, files opened in append mode always have writes forced
       to end-of-file (EOF).  With the VAX C RTL, the behavior of files opened
       in append mode was to start at EOF and, thereafter, write a the current
       file position.

       In  the	DEC  C RTL, the EOF flag for a file is always cleared when the
       file is first opened.  The VAX C RTL sets the EOF flag to true  if  the
       file opened is empty.

       With  the  DEC  C  RTL, files open for write access mode are opened for
       exclusive access.  With VAX C, such files are opened in	RMS  "shr=get"
       mode.

       With  the  DEC C RTL, files containing binary data that are opened with
       stream I/O must specify "ctx=bin" in the OpenVMS	 specific  parameters.
       This is not required on VAX C RTL.

RELATED INFORMATION
       Functions:  fopen(3), fdopen(3), freopen(3)

CATEGORY INDEX
	vms-files(5), vms-process(5), vms-vaxc(5)

       delim off

						 Digital UNIX Diffs - fopen(5)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net