Module Name: src
Committed By: rillig
Date: Tue Oct 26 23:58:40 UTC 2021
Modified Files:
src/tests/usr.bin/indent: fmt_decl.c
Log Message:
tests/indent: demonstrate another example of wrong formatting
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/fmt_decl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/indent/fmt_decl.c
diff -u src/tests/usr.bin/indent/fmt_decl.c:1.4 src/tests/usr.bin/indent/fmt_decl.c:1.5
--- src/tests/usr.bin/indent/fmt_decl.c:1.4 Tue Oct 26 23:37:40 2021
+++ src/tests/usr.bin/indent/fmt_decl.c Tue Oct 26 23:58:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: fmt_decl.c,v 1.4 2021/10/26 23:37:40 rillig Exp $ */
+/* $NetBSD: fmt_decl.c,v 1.5 2021/10/26 23:58:40 rillig Exp $ */
/* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */
/* See FreeBSD r303570 */
@@ -376,3 +376,18 @@ char *(*f1)() = NULL;
char *(*f2)();
}
#indent end
+
+#indent run
+int
+main(void)
+{
+/* $ XXX: Not really pretty, the name 'f1' should be aligned, if at all. */
+ char (*f1)() = NULL;
+/* $ FIXME: The following declaration must be indented. */
+/* $ XXX: Not really pretty, the name 'f1' should be aligned, if at all. */
+char *(* f1)() = NULL;
+/* $ FIXME: The following declaration must be indented. */
+/* $ XXX: Not really pretty, the name 'f2' should be aligned, if at all. */
+char *(* f2)();
+}
+#indent end