Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ungetwc(3c) [hpux man page]

ungetwc(3C)															       ungetwc(3C)

NAME
ungetwc() - push a wide character back into an input stream SYNOPSIS
Obsolescent Interface Remarks: This function is compliant with the XPG4 Worldwide Portability Interface wide-character I/O functions. It parallels the 8-bit character I/O function defined in ungetc(3S). DESCRIPTION
pushes the character corresponding to the wide-character code wc into the buffer associated with an input stream. That wide-character code, wc, is returned by the next call to (see getwc(3C)) on that stream. A successful intervening call to a file positioning function with stream or erases all memory of the pushed-back characters. affects only the buffer associated with the input stream. It does not affect the contents of the file corresponding to stream. One character of pushback is guaranteed. If wc equals does nothing to the buffer and returns The definition for this function, the type and the value are provided in the header. Obsolescent Interface pushes a wide character back into an input stream. APPLICATION USAGE
After is applied to a stream, the stream becomes wide-oriented (see orientation(5)). EXTERNAL INFLUENCES
Locale The category determines how wide character conversions are done. International Code Set Support Single- and multi-byte character code sets are supported. RETURN VALUE
If successful, and return wc and clear the end-of-file indicator for the stream. and return if they cannot insert the wide character. WARNINGS
is an obsolescent interface supported only for compatibility with existing DCE applications. New multithreaded applications should use AUTHOR
and were developed by OSF and HP. SEE ALSO
flockfile(3S), fseek(3S), fgetpos(3S), getwc(3C), setbuf(3S), orientation(5), thread_safety(5). STANDARDS CONFORMANCE
ungetwc(3C)

Check Out this Related Man Page

ungetwc(3C)						   Standard C Library Functions 					       ungetwc(3C)

NAME
ungetwc - push wide-character code back into input stream SYNOPSIS
#include <stdio.h> #include <wchar.h> wint_t ungetwc(wint_t wc, FILE *stream); DESCRIPTION
The ungetwc() function pushes the character corresponding to the wide character code specified by wc back onto the input stream pointed to by stream. The pushed-back characters will be returned by subsequent reads on that stream in the reverse order of their pushing. A success- ful intervening call (with the stream pointed to by stream) to a file-positioning function ( fseek(3C), fsetpos(3C) or rewind(3C)) discards any pushed-back characters for the stream. The external storage corresponding to the stream is unchanged. One character of push-back is guaranteed. If ungetwc() is called too many times on the same stream without an intervening read or file- positioning operation on that stream, the operation may fail. If the value of wc equals that of the macro WEOF, the operation fails and the input stream is unchanged. A successful call to ungetwc() clears the end-of-file indicator for the stream. The value of the file-position indicator for the stream after reading or discarding all pushed-back characters will be the same as it was before the characters were pushed back. The file-position indicator is decremented (by one or more) by each successful call to ungetwc(); if its value was 0 before a call, its value is indetermi- nate after the call. RETURN VALUES
Upon successful completion, ungetwc() returns the wide-character code corresponding to the pushed-back character. Otherwise it returns WEOF. ERRORS
The ungetwc() function may fail if: EILSEQ An invalid character sequence is detected, or a wide-character code does not correspond to a valid character. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ |ATTRIBUTE TYPE |ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
read(2), fseek(3C), fsetpos(3C), rewind(3C), setbuf(3C), attributes(5), standards(5) SunOS 5.11 14 Aug 2002 ungetwc(3C)
Man Page