exit 1; } || :
sc_cast_of_argument_to_free:
- @prohibit='\<free *\( *\(' halt='don'\''t cast free argument' \
+ @prohibit='\<free *\( *\(' halt="don't cast free argument" \
$(_sc_search_regexp)
sc_cast_of_x_alloc_return_value:
@prohibit='\*\) *x(m|c|re)alloc\>' \
- halt='don'\''t cast x*alloc return value' \
+ halt="don't cast x*alloc return value" \
$(_sc_search_regexp)
sc_cast_of_alloca_return_value:
@prohibit='\*\) *alloca\>' \
- halt='don'\''t cast alloca return value' \
+ halt="don't cast alloca return value" \
$(_sc_search_regexp)
sc_space_tab:
$(_sc_search_regexp)
# Use STREQ rather than comparing strcmp == 0, or != 0.
+sp_ = strcmp *\(.+\)
sc_prohibit_strcmp:
- @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \
+ @grep -nE '! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \
$$($(VC_LIST_EXCEPT)) \
| grep -vE ':# *define STRN?EQ\(' && \
- { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
+ { echo '$(ME): replace strcmp calls above with STREQ/STRNEQ' \
1>&2; exit 1; } || :
# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
sc_prohibit_hash_pjw_without_use:
@h='hash-pjw.h' \
- re='\<hash_pjw *\(' \
+ re='\<hash_pjw\>' \
$(_sc_header_without_use)
sc_prohibit_safe_read_without_use:
sc_prohibit_canonicalize_without_use:
@h='canonicalize.h' \
- re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
+ re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode|file_name)' \
$(_sc_header_without_use)
sc_prohibit_root_dev_ino_without_use:
#
# This is a perl script that is expected to be the single-quoted argument
# to a command-line "-le". The remaining arguments are file names.
-# Print the name of each file that ends in exactly one newline byte.
+# Print the name of each file that does not end in exactly one newline byte.
# I.e., warn if there are blank lines (2 or more newlines), or if the
# last byte is not a newline. However, currently we don't complain
# about any file that contains exactly one byte.
# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
_makefile_at_at_check_exceptions ?=
sc_makefile_at_at_check:
- @perl -ne '/\@[A-Z_0-9]+\@/' \
- -e ' && !/([A-Z_0-9]+)\s+=.*\@\1\@$$/' \
+ @perl -ne '/\@\w+\@/' \
+ -e ' && !/(\w+)\s+=.*\@\1\@$$/' \
-e ''$(_makefile_at_at_check_exceptions) \
-e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
$$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
# Sometimes it is useful to change the PATH environment variable
# in Makefiles. When doing so, it's better not to use the Unix-centric
# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use '\'':'\'' above; use $$(PATH_SEPARATOR) instead'
+msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead'
sc_makefile_path_separator_check:
@prohibit='PATH[=].*:' \
in_vc_files='akefile|\.mk$$' \