diff options
author | Jim Meyering <jim@meyering.net> | 2004-03-30 15:11:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-03-30 15:11:24 +0000 |
commit | f4dab6dd4fe99283a9037698b89766c1d8744f8d (patch) | |
tree | c41ea8197ad0c06b84712af98ac7c984fb78ac12 /Makefile.maint | |
parent | 3840db865c4153200bb7cde667e4c0eb1dd5cb4d (diff) | |
download | coreutils-f4dab6dd4fe99283a9037698b89766c1d8744f8d.tar.xz |
(sc_prohibit_atoi_atof): New rule.
(syntax-check-rules): Add it.
Diffstat (limited to 'Makefile.maint')
-rw-r--r-- | Makefile.maint | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.maint b/Makefile.maint index af9b26fa1..77b51602d 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -74,6 +74,7 @@ syntax-check-rules = \ sc_cast_of_alloca_return_value \ sc_changelog \ sc_error_exit_success \ + sc_prohibit_atoi_atof \ sc_space_tab \ sc_sun_os_names \ sc_system_h_headers \ @@ -125,6 +126,13 @@ sc_space_tab: { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \ 1>&2; exit 1; } || : +sc_prohibit_atoi_atof: + @( cvsu --list ) > /dev/null 2>&1 || : && \ + grep '\<ato[fil]\>' \ + $$(cvsu --list | grep -vEf .x-$@ ) && \ + { echo '$(ME): do not use atof, atoi, or atol' \ + 1>&2; exit 1; } || : + # Using EXIT_SUCCESS as the first argument to error is misleading, # since when that parameter is 0, error does not exit. Use `0' instead. sc_error_exit_success: |