Name | Description | Notes | Source | Availability | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
fwide() |
Set/determine stream width | (·) | <wchar.h> |
C95 | C99 | C11 |
A text stream may be byte-oriented, wide-oriented or initially unoriented. When byte-oriented functions operate on an unoriented stream, it becomes byte-oriented.
Name | Description | Notes | Source | Availability | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
assert() |
Test assertion | M | (·) | <assert.h> |
C89 | C90 | C95 | C99 | C11 | ||
fgetc() |
Input character | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
fgets() |
Input line of characters | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
fprintf() |
Print formatted text | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
fprintf_s() |
Print formatted text | ? | (·) | <stdio.h> |
C11 | ||||||
fputc() |
Output character | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
fputs() |
Output line of characters | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
fscanf() |
Input formatted text | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
fscanf_s() |
Input formatted text | ? | (·) | <stdio.h> |
C11 | ||||||
getc() |
Input character | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
getchar() |
Input character from standard input | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
gets() |
Input line of characters from standard input | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | ||||
gets_s() |
Input line of characters from standard input | ? | (·) | <stdio.h> |
C11 | ||||||
perror() |
Report last error | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
printf() |
Print formatted text | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
printf_s() |
Print formatted text | ? | (·) | <stdio.h> |
C11 | ||||||
putc() |
Output character | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
putchar() |
Output character to standard output | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
puts() |
Output line of characters to standard output | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
scanf() |
Input formatted text | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
scanf_s() |
Input formatted text | ? | (·) | <stdio.h> |
C11 | ||||||
ungetc() |
Replace character | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
vfprintf() |
Print formatted text | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
vfprintf_s() |
Print formatted text | ? | (·) | <stdio.h> |
C11 | ||||||
vfscanf() |
Input formatted text | (·) | <stdio.h> |
C99 | C11 | ||||||
vfscanf_s() |
Input formatted text | ? | (·) | <stdio.h> |
C11 | ||||||
vprintf() |
Print formatted text | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
vprintf_s() |
Print formatted text | ? | (·) | <stdio.h> |
C11 | ||||||
vscanf() |
Input formatted text | (·) | <stdio.h> |
C99 | C11 | ||||||
vscanf_s() |
Input formatted text | ? | (·) | <stdio.h> |
C11 |
When wide-oriented functions operate on an unoriented stream, it becomes wide-oriented.
Name | Description | Notes | Source | Availability | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
fgetwc() |
Input wide character | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
fgetws() |
Input line of wide characters | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
fputwc() |
Output wide character | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
fputws() |
Output line of wide characters | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
fwprintf() |
Print formatted text | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
fwprintf_s() |
Print formatted text | ? | (·) | <wchar.h> |
C11 | ||||||
fwscanf() |
Input formatted text | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
fwscanf_s() |
Input formatted text | ? | (·) | <wchar.h> |
C11 | ||||||
getwc() |
Input wide character | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
getwchar() |
Input wide character from standard input | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
putwc() |
Output wide character | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
putwchar() |
Output wide character to standard output | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
ungetwc() |
Replace character | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
vfwprintf() |
Print formatted text | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
vfwprintf_s() |
Print formatted text | ? | (·) | <wchar.h> |
C11 | ||||||
vfwscanf() |
Input formatted text | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
vfwscanf_s() |
Input formatted text | ? | (·) | <wchar.h> |
C11 | ||||||
vwprintf() |
Print formatted text | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
vwprintf_s() |
Print formatted text | ? | (·) | <wchar.h> |
C11 | ||||||
vwscanf() |
Input formatted text | (·) | <wchar.h> |
C99 | C11 | ||||||
vwscanf_s() |
Input formatted text | ? | (·) | <wchar.h> |
C11 | ||||||
wprintf() |
Print formatted text | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
wprintf_s() |
Print formatted text | ? | (·) | <wchar.h> |
C11 | ||||||
wscanf() |
Input formatted text | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
wscanf_s() |
Input formatted text | ? | (·) | <wchar.h> |
C11 |
Wide-oriented streams contain a hidden multibyte
conversion state, equivalent to an mbstate_t
, that helps
to transform between internal wide characters and external
multibyte characters. This state is also recorded in an
fpos_t
.
It is an error to apply a byte-oriented function to a wide-oriented stream, or a wide-oriented function to a byte-oriented stream.
#include<stdio.h>
#include<wchar.h>
int fwide(FILE *stream, int mode);
An unoriented stream's orientation can be set with
fwide
.
It attempts to make the stream wide-oriented if mode
is positive, and byte-oriented if negative.
It does not attempt to change it if mode
is zero. It returns the new orientation,
positive for wide-oriented, and negative for
byte-oriented.