aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2018-12-25 16:03:04 +0100
committerEinhard Leichtfuß <alguien@respiranto.de>2018-12-25 16:27:49 +0100
commit194052e67ed30121d7b66e8e7db559a32d001dab (patch)
tree23e9d61a746b337f4c0deef175b7c8e22efaa862 /configure.ac
parente82f76b87ff9779532908a02315b6425fb8a53f4 (diff)
Prevent matching illegal sequences globally
E.g., a+b will no longer be matched by anything. This is due to the global usage of a modified list_all(). Also: - Use different return types for different things (e.g. $RET_SUCCESS). `- Both internally and externally (exit codes, documented in ctct(1)). - Make --search-by-data more efficient. `- One call to grep for all files. `- The conjunction of the regexes still requires several calls. - Rename functions to more speaking names. - Document the function parameters. - Add vi modelines. - Use [[:alpha:]] instead of [A-Za-z] which appears to be the same but more clear. Notably, both seem to include non-ASCII letters, for example 'à'. - Set nullglob option in the script to prevent errors for cases where glob patterns would be used. - Add a silent option ro check_syntax() (not used). - Add a full_path option to list_all() (not used). - Use return instead of exit in main(). - Remove one remaining usage of eval. - Fix small format issue in ctct(1) (I -> B). `- They are no longer, but it hardly harms to have this option.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 70cf150..dd45df4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,13 @@ AC_CONFIG_FILES(
AC_CONFIG_FILES([ctct], [chmod +x ctct])
+# ret_success must be 0, all others nonzero.
+AC_SUBST([ret_success], 0)
+AC_SUBST([ret_failure], 1)
+AC_SUBST([ret_badsyntax], 2)
+AC_SUBST([ret_error], 4)
+
+
AC_ARG_VAR([bash_completion_dir],
['directory to store bash-completion script in'])
test -z "$bash_completion_dir" \
@@ -95,3 +102,5 @@ test -z "$default_confirm_default_yes" \
AC_OUTPUT
+
+# vi: ts=2 sw=2