aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-inspect.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-05test-inspect: reset locale after gtk_init()Davidson Francis1-0/+2
The test-inspect tool uses GTK to visualize symbol nodes. It turns out that gtk_init() implicitly sets the locale to the system locale, and since Sparse uses strtod()/strtold() for parsing floating-point numbers in expressions, parsing becomes locale-dependent. Since the system's locale may be different from "C", test-inspect may be unable to parse float numbers. Steps to reproduce: $ echo "int main(void){3.14;}" > test.c $ LC_ALL="fr_FR.UTF-8" test-inspect test.c Output: test.c:1:16: error: constant 3.14 is not a valid number Fix this by resetting the locale right after gtk_init(). Signed-off-by: Davidson Francis <davidsondfgl@gmail.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-06-21ptrlist: remove the now unneeded FOR_EACH_PTR_NOTAG()Luc Van Oostenryck1-2/+2
Now that FOR_EACH_PTR() doesn't strip the tag anymore, there is no more needs for FOR_EACH_PTR_NOTAG() as both do the same. So convert the few uses to FOR_EACH_PTR() and remove its definition. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2010-07-13inspect: Add test-inspect programChristopher Li1-0/+43
The test program will launch a gtk treeview windows to display the symbol node in the AST. Signed-Off-By: Christopher Li <sparse@chrisli.org>