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

  man pages->IRIX man pages -> ftn/putc (3)              


PUTC(3F)							      PUTC(3F)

NAME    [Toc]    [Back]

     putc, fputc - write a character to	a fortran logical unit

SYNOPSIS    [Toc]    [Back]

     integer function putc (char)
     character char

     integer function fputc (lunit, char)
     character char

DESCRIPTION    [Toc]    [Back]

     These funtions write a character to the file associated with a fortran
     logical unit bypassing normal fortran I/O.	 Putc writes to	logical	unit
     6,	normally connected to the control terminal output.

     The value of each function	will be	zero unless some error occurred; a
     system error code otherwise. See perror(3F).

FILES    [Toc]    [Back]


SEE ALSO    [Toc]    [Back]

     putc(3S), intro(2), perror(3F)

ORIGIN    [Toc]    [Back]

     MIPS Computer Systems

									Page 1

PUTC(3S)							      PUTC(3S)

NAME    [Toc]    [Back]

     putc, putchar, fputc, putw, putc_unlocked,	putchar_unlocked - put
     character or word on a stream

SYNOPSIS    [Toc]    [Back]

     #include <stdio.h>

     int putc (int c, FILE *stream);

     int putchar (int c);

     int fputc (int c, FILE *stream);

     int putw (int w, FILE *stream);

     int putc_unlocked (int c, FILE *stream);

     int putchar_unlocked (int c);

DESCRIPTION    [Toc]    [Back]

     Fputc  and	 putc write the	character c onto the output stream indicated
     by	stream at the position indicated by the	associated file	pointer	(if
     defined), advancing this pointer to the next character position.  For
     files which cannot	be positioned, or which	have been opened in append
     mode (see fopen(3s)), the character is appended to	the output stream.
     putchar(c)	is defined as putc(c, stdout).	Each of	these functions	is
     available in the C	library.  In addition, putc and	putchar	are macros
     defined in	<stdio.h>.  (see below under CAVEATS for important details on
     the implementation	of these macros.)

     The function versions of putc and putchar,	as well	as fputc runs more
     slowly than the corresponding macros, but they take less space per
     invocation	and the	function name can be passed as an argument to another

     putw writes the word (i.e.	integer) w to the output stream	(at the
     position at which the file	pointer, if defined, is	pointing).  The	size
     of	a word is the size of an integer and varies from machine to machine.
     putw neither assumes nor causes special alignment in the file.

     The putc_unlocked and putchar_unlocked functions are equivalent to	the
     putc and putchar functions, respectively.	However, these functions are
     not thread-safe and thus must only	be called under	the protection of the
     flockfile (or ftrylockfile) and funlockfile functions.

SEE ALSO    [Toc]    [Back]

     fclose(3S), ferror(3S), fopen(3S),	fread(3S), printf(3S), puts(3S),
     setbuf(3S), stdio(3S).

									Page 1

PUTC(3S)							      PUTC(3S)

     On	success, putc, putchar,	and fputc each return the value	they have
     written.  On failure, they	return the constant EOF.  This will occur if
     the stream	cannot be written for some reason, such	as it is not open for
     writing or	if the output file cannot be extended.

     Putw returns the value of ferror(stream), which is	non-zero if an error
     occurred on stream.

CAVEATS    [Toc]    [Back]

     When using	the macro versions of putc and putchar,	the stream argument
     may be evaluated more than	once.  Thus, it	must not be an expression with
     side-effects.  In particular, putc(c,*f++)	does not work sensibly.	 In
     these situations, the macro must either be	#undef'd, or fputc should be
     used instead.

     Because of	possible differences in	word length and	byte ordering, files
     written using putw	are machine-dependent, and may not be read using getw
     on	a different processor.

BUGS    [Toc]    [Back]

     When using	the macros for putc and	putchar, hidden	external names may be
     referenced. Although these	names are prefixed with	an underscore, they
     may conflict with names which the ANSI C Standard reserves	for the	user
     when appearing in a local context.	 It is thus recommended	that users of
     these macros reserve all names which begin	with an	underscore for the
     implementation, and avoid defining	such names, even in a local context.

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
setbuf IRIX assign buffering to a stream logical unit FORTRAN SYNOPSIS #include character *(BUFSIZ+8) buf intege
maplun IRIX returns the integer file descriptor for a Fortran logical unit number
getc IRIX get a character from a logical unit
fseek IRIX reposition a file on a logical unit
AFreadmisc IRIX read from / write to / move logical read/write pointer for data in a miscellaneous chunk in an audio file
fcd IRIX Constructs a Cray character pointer in Fortran character Descriptor (FCD) format
DXmCSTextGetLastPosition Tru64 Retrieves (returns) the logical position of the last character in the text.
DXmCSTextSetTopPosition Tru64 Sets the logical position of the first character in the displayed text.
DXmCSTextGetTopPosition Tru64 Retrieves (returns) the logical position of the first character in the displayed text.
lvsplit HP-UX split mirrored LVM logical volume into two logical volumes
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service