+2012-11-08 Pierre Muller <muller@sourceware.org>
+
+ * contrib/ari/gdb_ari.sh (LANG, LC_ALL): Use 'C' instead of 'c'
+ as default language.
+ (AWK): Use = instead of == for sh test to avoid warning.
+ (Linux rule): Correct [:digit] into [[:digit:]].
+ (__func__ rule): Adapt to "gdb_assert.h" move to common subdirectory.
+ (vasprintf rule): Adapt to common subdirectory moves.
+ (xasprintf rule): Idem.
+ (xvasprintf rule): Idem.
+ (var_boolean rule): Accept occurence in == or != test.
+
+ * contrib/ari/gdb_find.sh: Also prune gdbtk directory.
+
2012-11-08 Stephane Carrez <Stephane.Carrez@gmail.com>
* tui/tui-hooks.c (tui_inferior_exit): New function.
# Make certain that the script is not running in an internationalized
# environment.
-LANG=c ; export LANG
-LC_ALL=c ; export LC_ALL
+LANG=C ; export LANG
+LC_ALL=C ; export LC_ALL
# Permanent checks take the form:
errors="${errors} error[ari_${e}] = 1;"
done
-if [ "$AWK" == "" ] ; then
+if [ "$AWK" = "" ] ; then
AWK=awk
fi
&& !/(^|[^_[:alnum:]])Linux\[sic\]([^_[:alnum:]]|$)/ \
&& !/(^|[^_[:alnum:]])GNU\/Linux([^_[:alnum:]]|$)/ \
&& !/(^|[^_[:alnum:]])Linux kernel([^_[:alnum:]]|$)/ \
-&& !/(^|[^_[:alnum:]])Linux [:digit:]\.[:digit:]+)/ {
+&& !/(^|[^_[:alnum:]])Linux [[:digit:]]\.[[:digit:]]+)/ {
fail("GNU/Linux")
}
BEGIN { doc["__func__"] = "\
Do not use __func__, ISO C 90 does not support this macro"
category["__func__"] = ari_regression
- fix("__func__", "gdb/gdb_assert.h", 1)
+ fix("__func__", "common/gdb_assert.h", 1)
}
/(^|[^_[:alnum:]])__func__([^_[:alnum:]]|$)/ {
fail("__func__")
BEGIN { doc["vasprintf"] = "\
Do not use vasprintf(), instead use xstrvprintf"
- fix("vasprintf", "gdb/utils.c", 1)
+ fix("vasprintf", "common/common-utils.c", 1)
category["vasprintf"] = ari_regression
}
/(^|[^_[:alnum:]])vasprintf[[:space:]]*\(/ {
BEGIN { doc["xasprintf"] = "\
Do not use xasprintf(), instead use xstrprintf"
- fix("xasprintf", "gdb/defs.h", 1)
- fix("xasprintf", "gdb/utils.c", 1)
+ fix("xasprintf", "common/common-utils.h", 1)
+ fix("xasprintf", "common/common-utils.c", 1)
category["xasprintf"] = ari_regression
}
/(^|[^_[:alnum:]])xasprintf[[:space:]]*\(/ {
BEGIN { doc["xvasprintf"] = "\
Do not use xvasprintf(), instead use xstrvprintf"
- fix("xvasprintf", "gdb/defs.h", 1)
- fix("xvasprintf", "gdb/utils.c", 1)
+ fix("xvasprintf", "common/common-utils.h", 1)
+ fix("xvasprintf", "common/common-utils.c", 1)
category["xvasprintf"] = ari_regression
}
/(^|[^_[:alnum:]])xvasprintf[[:space:]]*\(/ {
fix("var_boolean", "cli/cli-decode.c", 2)
}
/(^|[^_[:alnum:]])var_boolean([^_[:alnum:]]|$)/ {
- if ($0 !~ /(^|[^_[:alnum:]])case *var_boolean:/) {
+ if (($0 !~ /(^|[^_[:alnum:]])case *var_boolean:/) \
+ && ($0 !~ /(^|[^_[:alnum:]])[=!]= *var_boolean/)) {
fail("var_boolean")
}
}