Skip to content
Snippets Groups Projects
  • Nathan Sidwell's avatar
    4623a6f2
    preprocessor: Replace some flags with a single enum · 4623a6f2
    Nathan Sidwell authored
    _cpp_find_file has 3 bool arguments, at most one of which is ever set.
    Ripe for replacing with a 4-state enum.  Also, this is C++, so
    'typedef struct Foo Foo' is unnecessary.
    
    	* internal.h (typedef _cpp_file): Delete, unnecessary in C++.
    	(enum _cpp_find_file_kind): New.
    	(_cpp_find_file): Use it, not 3 bools.
    	* files.c (_cpp_find_file): Use _cpp_find_file_kind enum, not
    	bools.
    	(cpp_make_system_header): Break overly long line.
    	(_cpp_stack_include, _cpp_fake_include)
    	(_cpp_do_file_change, _cpp_compare_file_date, _cpp_has_header): Adjust.
    	* init.c (cpp_read_main): Adjust _cpp_find_file call.
    4623a6f2
    History
    preprocessor: Replace some flags with a single enum
    Nathan Sidwell authored
    _cpp_find_file has 3 bool arguments, at most one of which is ever set.
    Ripe for replacing with a 4-state enum.  Also, this is C++, so
    'typedef struct Foo Foo' is unnecessary.
    
    	* internal.h (typedef _cpp_file): Delete, unnecessary in C++.
    	(enum _cpp_find_file_kind): New.
    	(_cpp_find_file): Use it, not 3 bools.
    	* files.c (_cpp_find_file): Use _cpp_find_file_kind enum, not
    	bools.
    	(cpp_make_system_header): Break overly long line.
    	(_cpp_stack_include, _cpp_fake_include)
    	(_cpp_do_file_change, _cpp_compare_file_date, _cpp_has_header): Adjust.
    	* init.c (cpp_read_main): Adjust _cpp_find_file call.