summaryrefslogtreecommitdiff
path: root/src/stat.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-09 22:56:54 +0100
committerJim Meyering <meyering@redhat.com>2012-01-11 09:27:50 +0100
commitd3227eeb90c8308abd1e6bf08ee253b7a4e78d1d (patch)
tree3ccee2bcd24ae57b9c9b539cd964b103a5271f4a /src/stat.c
parentbfe711db1c07e73a5806647a637f609eb8c1773d (diff)
downloadcoreutils-d3227eeb90c8308abd1e6bf08ee253b7a4e78d1d.tar.xz
maint: adjust formatting of certain continued strings
Add a rule to ding any source file that has a continued string with a word in the first column of the following line. Those tend to trigger malfunction in tools that try to map an arbitrary line number to an enclosing function name. Of course, very many strings do precisely this, *when they are part of the usage function*. So we exempt the body of each usage function. * src/dircolors.c (main): Separate a long, continued string into two separately-quoted parts. * src/od.c (decode_one_format): Likewise. (decode_one_format, main): Move a space from end of preceding line to the beginning of the continued line. * src/tr.c (unquote, string2_extend, validate): Likewise. * src/seq.c (main): Split in two and use string concatenation. * src/stat.c (default_format): Use a mix of techniques. * cfg.mk (sc_prohibit_continued_string_alpha_in_column_1): New rule. Exempt three files in src: system.h, od.c, printf.c.
Diffstat (limited to 'src/stat.c')
-rw-r--r--src/stat.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/stat.c b/src/stat.c
index 0da21d7d7..8254ccc0f 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1236,13 +1236,11 @@ default_format (bool fs, bool terse, bool device)
{
/* TRANSLATORS: This string uses format specifiers from
'stat --help' with --file-system, and NOT from printf. */
- format = xstrdup (_("\
- File: \"%n\"\n\
- ID: %-8i Namelen: %-7l Type: %T\n\
-Block size: %-10s Fundamental block size: %S\n\
-Blocks: Total: %-10b Free: %-10f Available: %a\n\
-Inodes: Total: %-10c Free: %d\n\
-"));
+ format = xstrdup (_(" File: \"%n\"\n"
+ " ID: %-8i Namelen: %-7l Type: %T\n"
+ "Block size: %-10s Fundamental block size: %S\n"
+ "Blocks: Total: %-10b Free: %-10f Available: %a\n"
+ "Inodes: Total: %-10c Free: %d\n"));
}
}
else /* ! fs */
@@ -1272,7 +1270,7 @@ Inodes: Total: %-10c Free: %d\n\
/* TRANSLATORS: This string uses format specifiers from
'stat --help' without --file-system, and NOT from printf. */
format = xasprintf ("%s%s", format, _("\
-Device: %Dh/%dd\tInode: %-10i Links: %-5h Device type: %t,%T\n\
+" "Device: %Dh/%dd\tInode: %-10i Links: %-5h Device type: %t,%T\n\
"));
}
else
@@ -1280,7 +1278,7 @@ Device: %Dh/%dd\tInode: %-10i Links: %-5h Device type: %t,%T\n\
/* TRANSLATORS: This string uses format specifiers from
'stat --help' without --file-system, and NOT from printf. */
format = xasprintf ("%s%s", format, _("\
-Device: %Dh/%dd\tInode: %-10i Links: %h\n\
+" "Device: %Dh/%dd\tInode: %-10i Links: %h\n\
"));
}
free (temp);
@@ -1289,7 +1287,7 @@ Device: %Dh/%dd\tInode: %-10i Links: %h\n\
/* TRANSLATORS: This string uses format specifiers from
'stat --help' without --file-system, and NOT from printf. */
format = xasprintf ("%s%s", format, _("\
-Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n\
+" "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n\
"));
free (temp);
@@ -1298,21 +1296,18 @@ Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n\
temp = format;
/* TRANSLATORS: This string uses format specifiers from
'stat --help' without --file-system, and NOT from printf. */
- format = xasprintf ("%s%s", format, _("\
-Context: %C\n\
-"));
+ format = xasprintf ("%s%s", format, _("Context: %C\n"));
free (temp);
}
temp = format;
/* TRANSLATORS: This string uses format specifiers from
'stat --help' without --file-system, and NOT from printf. */
- format = xasprintf ("%s%s", format, _("\
-Access: %x\n\
-Modify: %y\n\
-Change: %z\n\
- Birth: %w\n\
-"));
+ format = xasprintf ("%s%s", format,
+ _("Access: %x\n"
+ "Modify: %y\n"
+ "Change: %z\n"
+ "Birth: %w\n"));
free (temp);
}
}