*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/pxfchmod (3)              
Title
Content
Arch
Section
 

T(3F)

Contents


PXFCHMOD(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFCHMOD -	Sets file modes	for a named file

SYNOPSIS    [Toc]    [Back]

     CHARACTER*n path
     INTEGER ilen, imode, ierror
     CALL PXFCHMOD(path, ilen, imode, ierror)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     IEEE standard interface for FORTRAN 77

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, this routine is in libfortran.so which is	linked by
     default when compiling programs with the MIPSpro 7	Fortran	90 compiler
     or	when compiling programs	with the -craylibs option to the MIPSpro
     7.2 F77 compiler.

     The PXFCHMOD subroutine uses the chmod(2) function	to set file modes
     for the named file.

     The value of imode	indicates specific file	modes.	chmod()	changes	the
     current file modes	for the	named file in path to the file mode
     specified in imode.

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	system,	all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, the default kind is KIND=4.

     The following is a	list of	valid arguments	for this subroutine:

     path      Input character variable	or array element containing the
	       name of a file.

     ilen      Input integer variable containing the length of path in
	       characters.  If ilen is zero, all trailing blanks are
	       removed before calling chmod().

     imode     Input integer variable containing the integer value of the
	       symbolic	constant for one or more of the	following file
	       modes:

	       USER	 READ permissions bit:	S_IRUSR
			 WRITE permissions bit:	 S_IWUSR
			 SEARCH/EXECUTE	permissions bit:  S_IXUSR
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXU

	       GROUP	 READ permissions bit:	S_IRGRP
			 WRITE permissions bit:	 S_IWGRP
			 SEARCH/EXECUTE	permissions bit:  S_IXGRP
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXG

	       OTHER	 READ permissions bit:	S_IROTH
			 WRITE permissions bit:	 S_IWOTH
			 SEARCH/EXECUTE	permissions bit:  S_IXOTH
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXO

	       SETID	 Set user ID on	execution:  S_ISUID
			 Set group ID on execution:  S_ISGID

			 An integer value for each of these symbolic
			 constants is retrieved	through	the use	of
			 PXFCONS
.	 The integer values
			 may be	combined through the use of a bitwise
			 inclusive OR function.

     ierror    Output integer variable that contains zero if the requested
	       file mode bits are set or nonzero if the	requested file mode
	       bits are	not set.

     In	addition to the	errors returned	by the chmod(2)	system call,
     PXFCHMOD may return the following errors:

     EINVAL    If ilen < 0 or ilen > LEN(path).

     ENOMEM    If PXFCHMOD is unable to	obtain memory to copy path.

EXAMPLES    [Toc]    [Back]

	  program test
	  character*(12) path
	  integer ilen,	imod, ierr, imodr, imodw
	  path = 'testfile'
	  imod = 0
	  imodr	= 0
	  imodw	= 0
	  ilen = 0

	  call pxfconst('S_IRUSR',imodr,ierr)
	  if (ierr.ne.0) then
	      print *,'FAIL: error from	pxfconst S_IRUSR = ',ierr
	      stop
	  endif
	  call pxfconst('S_IROTH',imodw,ierr)
	  if (ierr.ne.0) then
	      print *,'FAIL: error from	pxfconst S_IWUSR = ',ierr
	      stop
	  endif
	  imod = IOR(imodr,imodw)
	  call pxfchmod(path,ilen,imod,ierr)
	  if (ierr.ne.0) then
	      print *,'FAIL: error from	pxfchmod = ',ierr
	  else
	      print *,'PASS: No	error from pxfchmod'
	  endif
	  end

SEE ALSO    [Toc]    [Back]

      
      
     chmod(2)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

PXFCHMOD(3F)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     PXFCHMOD -	Sets file modes	for a named file

SYNOPSIS    [Toc]    [Back]

     CHARACTER*n path
     INTEGER ilen, imode, ierror
     CALL PXFCHMOD(path, ilen, imode, ierror)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     IEEE standard interface for FORTRAN 77

DESCRIPTION    [Toc]    [Back]

     On	IRIX systems, this routine is in libfortran.so which is	linked by
     default when compiling programs with the MIPSpro 7	Fortran	90 compiler
     or	when compiling programs	with the -craylibs option to the MIPSpro
     7.2 F77 compiler.

     The PXFCHMOD subroutine uses the chmod(2) function	to set file modes
     for the named file.

     The value of imode	indicates specific file	modes.	chmod()	changes	the
     current file modes	for the	named file in path to the file mode
     specified in imode.

     When using	the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
     UNICOS, UNICOS/mk,	or IRIX	system,	all arguments must be of default
     kind unless documented otherwise.	On UNICOS and UNICOS/mk, default
     kind is KIND=8 for	integer, real, complex,	and logical arguments; on
     IRIX, the default kind is KIND=4.

     The following is a	list of	valid arguments	for this subroutine:

     path      Input character variable	or array element containing the
	       name of a file.

     ilen      Input integer variable containing the length of path in
	       characters.  If ilen is zero, all trailing blanks are
	       removed before calling chmod().

     imode     Input integer variable containing the integer value of the
	       symbolic	constant for one or more of the	following file
	       modes:

	       USER	 READ permissions bit:	S_IRUSR
			 WRITE permissions bit:	 S_IWUSR
			 SEARCH/EXECUTE	permissions bit:  S_IXUSR
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXU

	       GROUP	 READ permissions bit:	S_IRGRP
			 WRITE permissions bit:	 S_IWGRP
			 SEARCH/EXECUTE	permissions bit:  S_IXGRP
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXG

	       OTHER	 READ permissions bit:	S_IROTH
			 WRITE permissions bit:	 S_IWOTH
			 SEARCH/EXECUTE	permissions bit:  S_IXOTH
			 Inclusive OR of READ/WRITE/EXECUTE:  S_IRWXO

	       SETID	 Set user ID on	execution:  S_ISUID
			 Set group ID on execution:  S_ISGID

			 An integer value for each of these symbolic
			 constants is retrieved	through	the use	of
			 PXFCONS
.	 The integer values
			 may be	combined through the use of a bitwise
			 inclusive OR function.

     ierror    Output integer variable that contains zero if the requested
	       file mode bits are set or nonzero if the	requested file mode
	       bits are	not set.

     In	addition to the	errors returned	by the chmod(2)	system call,
     PXFCHMOD may return the following errors:

     EINVAL    If ilen < 0 or ilen > LEN(path).

     ENOMEM    If PXFCHMOD is unable to	obtain memory to copy path.

EXAMPLES    [Toc]    [Back]

	  program test
	  character*(12) path
	  integer ilen,	imod, ierr, imodr, imodw
	  path = 'testfile'
	  imod = 0
	  imodr	= 0
	  imodw	= 0
	  ilen = 0

	  call pxfconst('S_IRUSR',imodr,ierr)
	  if (ierr.ne.0) then
	      print *,'FAIL: error from	pxfconst S_IRUSR = ',ierr
	      stop
	  endif
	  call pxfconst('S_IROTH',imodw,ierr)
	  if (ierr.ne.0) then
	      print *,'FAIL: error from	pxfconst S_IWUSR = ',ierr
	      stop
	  endif
	  imod = IOR(imodr,imodw)
	  call pxfchmod(path,ilen,imod,ierr)
	  if (ierr.ne.0) then
	      print *,'FAIL: error from	pxfchmod = ',ierr
	  else
	      print *,'PASS: No	error from pxfchmod'
	  endif
	  end

SEE ALSO    [Toc]    [Back]

      
      
     chmod(2)

     Application Programmer's Library Reference	Manual,	publication SR2165,
 for the printed version of this man page.

[ Back ]
 Similar pages
Name OS Title
pathfind IRIX search for named file in named directories
chmod FreeBSD change file modes
chmod OpenBSD change file modes
pixeltransfer IRIX sets pixel/texel transfer modes
uugetty Tru64 Sets the terminal type, modes, speed, and line.
getty Tru64 Sets the terminal type, modes, speed, and line discipline
SSL_CTX_set_def_verify_paths Tru64 Sets default file path and file name of trusted CA certificate
acl_set_fd Tru64 Sets the ACL on the file or directory designated by the file descriptor
named.boot Tru64 named configuration file
named.conf FreeBSD configuration file for named(8)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service