#endif
printf (" %s", mount_point);
}
- putchar ('\n');
+ PUTCHAR ('\n');
}
/* Identify the directory, if any, that device
err = dc_parse_stream (fp, filename);
- if (fp != stdin && fclose (fp) == EOF)
+ if (fp != stdin && FCLOSE (fp) == EOF)
{
error (0, errno, "%s", filename);
return 1;
int i;
for (i = 0; i < G_N_LINES; i++)
{
- fwrite (G_line[i], 1, G_line_length[i], stdout);
- fputc ('\n', stdout);
+ FWRITE (G_line[i], 1, G_line_length[i], stdout);
+ FPUTC ('\n', stdout);
}
}
else
suffix = "'\n";
}
fputs (prefix, stdout);
- fwrite (s, 1, len, stdout);
+ FWRITE (s, 1, len, stdout);
fputs (suffix, stdout);
}
}
close_stdout ();
- if (have_read_stdin && fclose (stdin) == EOF)
+ if (have_read_stdin && FCLOSE (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));
exit (err == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
human_readable (n_blocks, buf, ST_NBLOCKSIZE, output_units,
human_readable_base),
string);
- fflush (stdout);
+ FFLUSH (stdout);
}
/* Recursively print the sizes of the directories (and, if selected, files)
and later output themselves. */
static size_t dired_pos;
-#define DIRED_PUTCHAR(c) do {putchar ((c)); ++dired_pos;} while (0)
+#define DIRED_PUTCHAR(c) do {PUTCHAR ((c)); ++dired_pos;} while (0)
/* Write S to STREAM and increment DIRED_POS by S_LEN. */
#define DIRED_FPUTS(s, stream, s_len) \
for (i = 0; i < files_index; i++)
{
print_file_name_and_frills (files + i);
- putchar ('\n');
+ PUTCHAR ('\n');
}
break;
buf[i] = '?';
}
- fwrite (buf, 1, len, out);
+ FWRITE (buf, 1, len, out);
return len;
}
p = ind->string;
for (i = ind->len; i > 0; --i)
- putchar (*(p++));
+ PUTCHAR (*(p++));
}
static int
indent (pos + name_length, pos + max_name_length);
pos += max_name_length;
}
- putchar ('\n');
+ PUTCHAR ('\n');
}
}
if (col == 0)
{
- putchar ('\n');
+ PUTCHAR ('\n');
pos = 0;
}
else
name_length = length_of_file_name_and_frills (files + filesno);
max_name_length = line_fmt->col_arr[col];
}
- putchar ('\n');
+ PUTCHAR ('\n');
}
static void
if (old_pos != 0 && pos >= line_length)
{
- putchar ('\n');
+ PUTCHAR ('\n');
pos -= old_pos;
}
print_file_name_and_frills (files + filesno);
if (filesno + 1 < files_index)
{
- putchar (',');
- putchar (' ');
+ PUTCHAR (',');
+ PUTCHAR (' ');
}
}
- putchar ('\n');
+ PUTCHAR ('\n');
}
/* Assuming cursor is at position FROM, indent up to position TO.
{
if (tabsize > 0 && to / tabsize > (from + 1) / tabsize)
{
- putchar ('\t');
+ PUTCHAR ('\t');
from += tabsize - from % tabsize;
}
else
{
- putchar (' ');
+ PUTCHAR (' ');
from++;
}
}
sum += length[i];
}
- fwrite (dir_name, 1, sum, stream);
+ FWRITE (dir_name, 1, sum, stream);
}
static inline struct active_dir_ent *
The following two directories have the same inode number:\n"));
/* FIXME: test this!! */
print_nth_dir (stderr, current_depth ());
- fputc ('\n', stderr);
+ FPUTC ('\n', stderr);
print_nth_dir (stderr, old_ent->depth);
- fputc ('\n', stderr);
- fflush (stderr);
+ FPUTC ('\n', stderr);
+ FFLUSH (stderr);
free (old_ent);