#define FPUTS_LITERAL(s, stream) \
do {fputs ((s), (stream)); dired_pos += sizeof((s)) - 1;} while (0)
+#define DIRED_INDENT() \
+ do \
+ { \
+ /* FIXME: remove the `&& format == long_format' clause. */ \
+ if (dired && format == long_format) \
+ FPUTS_LITERAL (" ", stdout); \
+ } \
+ while (0)
+
/* With --dired, store pairs of beginning and ending indices of filenames. */
static struct obstack dired_obstack;
{
const char *dir;
- /* FIXME: remove the `&& format == long_format' clause. */
- if (dired && format == long_format)
- FPUTS_LITERAL (" ", stdout);
+ DIRED_INDENT ();
dir = (realname ? realname : name);
PUSH_CURRENT_DIRED_POS (&subdired_obstack);
FPUTS (dir, stdout, strlen (dir));
if (format == long_format || print_block_size)
{
char buf[6 + 20 + 1 + 1];
+
+ DIRED_INDENT ();
sprintf (buf, "total %u\n", total_blocks);
FPUTS (buf, stdout, strlen (buf));
}
sprintf (p, "%s ", full_time ? timebuf : timebuf + 4);
p += strlen (p);
- if (dired)
- FPUTS_LITERAL (" ", stdout);
-
+ DIRED_INDENT ();
FPUTS (bigbuf, stdout, p - bigbuf);
PUSH_CURRENT_DIRED_POS (&dired_obstack);
print_name_with_quoting (f->name);