From f4dab6dd4fe99283a9037698b89766c1d8744f8d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 30 Mar 2004 15:11:24 +0000 Subject: [PATCH] (sc_prohibit_atoi_atof): New rule. (syntax-check-rules): Add it. --- Makefile.maint | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.maint b/Makefile.maint index af9b26f..77b5160 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 '\' \ + $$(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: -- 2.7.4