getwc() has the same semantics as fgetwc() but may be a function or
macro. According to the manpage "there is no reason ever to use it".
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
errno = 0;
old_pos = ftell(ctl->f);
- while (getwc(ctl->f) != L'\n') {
+ while (fgetwc(ctl->f) != L'\n') {
long new_pos;
if (ferror(ctl->f) || feof(ctl->f))
col = -1;
continue;
}
- c = getwc(ctl->f);
+ c = fgetwc(ctl->f);
switch (c) {
case 033: /* ESC */
- c = getwc(ctl->f);
+ c = fgetwc(ctl->f);
if (c == L'8') {
col = rubchars(ctl, col, 1);
continue;
int padding;
for (;;) {
- c = getwc(stdin);
+ c = fgetwc(stdin);
if (c == WEOF)
return 0;
if (c == '\t')
/* Loop getting rid of characters */
while (!last || ct < last) {
- c = getwc(stdin);
+ c = fgetwc(stdin);
if (c == WEOF)
return 0;
if (c == '\n') {
/* Output last of the line */
for (;;) {
- c = getwc(stdin);
+ c = fgetwc(stdin);
if (c == WEOF)
break;
if (c == '\n') {
{
wint_t c;
- switch (c = getwc(f)) {
+ switch (c = fgetwc(f)) {
case HREV:
if (0 < ctl->half_position) {
ctl->mode &= ~SUBSCRIPT;
wint_t c;
int i, width;
- while ((c = getwc(f)) != WEOF) {
+ while ((c = fgetwc(f)) != WEOF) {
switch (c) {
case '\b':
set_column(ctl, ctl->column && 0 < ctl->column ? ctl->column - 1 : 0);
continue;
case ESC:
if (handle_escape(ctl, tcs, f)) {
- c = getwc(f);
+ c = fgetwc(f);
errx(EXIT_FAILURE,
_("unknown escape sequence in input: %o, %o"), ESC, c);
}