[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Start function open braces on first column.
From: |
Ralf Wildenhues |
Subject: |
[PATCH] Start function open braces on first column. |
Date: |
Wed, 10 Oct 2007 20:05:42 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello,
can we agree to put a newline before the brace that starts the shell
function compound-command? It both fits with GCS style (yes, for C)
and it also helps my editor jump between functions quickly with the
`[[' and `]]' commands. ;-)
I did not adjust the shell spy functions on purpose: they are expanded
very often and already way too much vertical space is spent in a
generated configure script.
Cheers,
Ralf
---
2007-10-10 Ralf Wildenhues <address@hidden>
* lib/autotest/general.m4: Put function braces in separate line.
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 9215350..cc50b5f 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -251,7 +251,8 @@ at_func_log_failure ()
# at_func_check_skip EXIT-CODE
# Check whether EXIT-CODE is the special exit code 77, and if so exit the shell
# with that same exit code.
-at_func_check_skip () {
+at_func_check_skip ()
+{
case $[1] in
77) echo 77 > "$at_status_file"; exit 77;;
esac
@@ -261,7 +262,8 @@ at_func_check_skip () {
# Check whether EXIT-CODE is the expected exit code, and if so do nothing.
Else,
# if it is 77 exit the shell with that same exit code; if it is anything else
# print an error message and fail the test.
-at_func_check_status () {
+at_func_check_status ()
+{
dnl This order ensures that we don't `skip' if we are precisely checking $?
= 77.
case $[2] in
$[1] ) ;;
@@ -274,7 +276,8 @@ at_func_check_status () {
# at_func_diff_devnull FILE
# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless
# diff invocations.
-at_func_diff_devnull () {
+at_func_diff_devnull ()
+{
test -s "$[1]" || return 0
$at_diff "$at_devnull" "$[1]"
}
--
1.5.3.1.153.g89df5
- [PATCH] Start function open braces on first column.,
Ralf Wildenhues <=