From 3ea27fbec92833a25a66f237706ca47a2791db10 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 31 Jul 2014 11:44:58 +0200 Subject: [PATCH] Normalize some include guards --- bits.h | 6 +++--- callback.h | 6 +++--- debug.h | 6 +++--- dict.h | 6 +++--- glob.h | 6 +++--- library.h | 6 +++--- ltrace.h | 6 +++--- memstream.h | 5 +++++ options.h | 7 ++++--- output.h | 7 ++++--- proc.h | 6 +++--- prototype.h | 6 +++--- read_config_file.h | 6 +++--- summary.h | 6 +++--- sysdeps/linux-gnu/trace-defs.h | 6 +++--- sysdeps/linux-gnu/trace.h | 6 +++--- value_dict.h | 6 +++--- 17 files changed, 55 insertions(+), 48 deletions(-) diff --git a/bits.h b/bits.h index 7dbe478..d4e25bf 100644 --- a/bits.h +++ b/bits.h @@ -18,12 +18,12 @@ * 02110-1301 USA */ -#ifndef _BITS_H_ -#define _BITS_H_ +#ifndef BITS_H +#define BITS_H #include /* Count bits in U that are 1. */ unsigned bitcount(uint64_t u); -#endif /* _BITS_H_ */ +#endif /* BITS_H */ diff --git a/callback.h b/callback.h index 3db579c..62a63c4 100644 --- a/callback.h +++ b/callback.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef _CALLBACK_H_ -#define _CALLBACK_H_ +#ifndef CALLBACK_H +#define CALLBACK_H /* Notes on the iteration interface used across ltrace. Typically the * iteration function looks something like this: @@ -65,4 +65,4 @@ enum callback_status { #define CBS_STOP_IF(X) ((X) ? CBS_STOP : CBS_CONT) #define CBS_CONT_IF(X) ((X) ? CBS_CONT : CBS_STOP) -#endif /* _CALLBACK_H_ */ +#endif /* CALLBACK_H */ diff --git a/debug.h b/debug.h index 542dda5..ea6abbc 100644 --- a/debug.h +++ b/debug.h @@ -19,8 +19,8 @@ * 02110-1301 USA */ -#ifndef _DEBUG_H -#define _DEBUG_H +#ifndef DEBUG_H +#define DEBUG_H #include "backend.h" #include "forward.h" @@ -42,4 +42,4 @@ int xinfdump(struct process *proc, arch_addr_t addr, size_t length); #define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr) -#endif +#endif /* DEBUG_H */ diff --git a/dict.h b/dict.h index a17e1da..4379e7c 100644 --- a/dict.h +++ b/dict.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef _DICT_H_ -#define _DICT_H_ +#ifndef DICT_H +#define DICT_H #include #include @@ -250,4 +250,4 @@ void dict_dtor_string(const char **key, void *data); /* A cloner that calls 'strdup' on keys in a table. */ int dict_clone_string(const char **tgt, const char **src, void *data); -#endif /* _DICT_H_ */ +#endif /* DICT_H */ diff --git a/glob.h b/glob.h index d60c0a2..c732373 100644 --- a/glob.h +++ b/glob.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef _GLOB_H_ -#define _GLOB_H_ +#ifndef GLOB_H +#define GLOB_H #include #include @@ -29,4 +29,4 @@ * supported by globcomp. */ int globcomp(regex_t *preg, const char *glob, int cflags); -#endif /* _GLOB_H_ */ +#endif /* GLOB_H */ diff --git a/library.h b/library.h index 6f1dc0f..4506621 100644 --- a/library.h +++ b/library.h @@ -19,8 +19,8 @@ * 02110-1301 USA */ -#ifndef _LIBRARY_H_ -#define _LIBRARY_H_ +#ifndef LIBRARY_H +#define LIBRARY_H #include #include @@ -291,4 +291,4 @@ const char** library_exported_names_each_alias( int library_exported_names_contains(struct library_exported_names* names, const char* queryname); -#endif /* _LIBRARY_H_ */ +#endif /* LIBRARY_H */ diff --git a/ltrace.h b/ltrace.h index 3e714a8..a92d391 100644 --- a/ltrace.h +++ b/ltrace.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef _LTRACE_H_ -#define _LTRACE_H_ +#ifndef LTRACE_H +#define LTRACE_H typedef enum Event_type Event_type; enum Event_type { @@ -61,4 +61,4 @@ extern void ltrace_init(int argc, char **argv); extern void ltrace_add_callback(callback_func f, Event_type type); extern void ltrace_main(void); -#endif /* _LTRACE_H_ */ +#endif /* LTRACE_H */ diff --git a/memstream.h b/memstream.h index eb06541..7360b61 100644 --- a/memstream.h +++ b/memstream.h @@ -18,6 +18,9 @@ * 02110-1301 USA */ +#ifndef MEMSTREAM_H +#define MEMSTREAM_H + #include /* Portability wrapper for platforms that don't have @@ -33,3 +36,5 @@ struct memstream int memstream_init(struct memstream *memstream); int memstream_close(struct memstream *memstream); void memstream_destroy(struct memstream *memstream); + +#endif /* MEMSTREAM_H */ diff --git a/options.h b/options.h index 35c3d89..38f4ecd 100644 --- a/options.h +++ b/options.h @@ -21,8 +21,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ -#ifndef _OPTIONS_H_ -#define _OPTIONS_H_ + +#ifndef OPTIONS_H +#define OPTIONS_H #include #include @@ -105,4 +106,4 @@ extern struct vect opt_F; extern char **process_options(int argc, char **argv); -#endif /* _OPTIONS_H_ */ +#endif /* OPTIONS_H */ diff --git a/output.h b/output.h index 2e74d61..3f403c8 100644 --- a/output.h +++ b/output.h @@ -18,8 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ -#ifndef _OUTPUT_H_ -#define _OUTPUT_H_ + +#ifndef OUTPUT_H +#define OUTPUT_H #include "fetch.h" #include "forward.h" @@ -56,4 +57,4 @@ void report_error(char const *file, unsigned line_no, const char *fmt, ...); void report_warning(char const *file, unsigned line_no, const char *fmt, ...); void report_global_error(const char *fmt, ...); -#endif /* _OUTPUT_H_ */ +#endif /* OUTPUT_H */ diff --git a/proc.h b/proc.h index c1408be..a611456 100644 --- a/proc.h +++ b/proc.h @@ -20,8 +20,8 @@ * 02110-1301 USA */ -#ifndef _PROC_H_ -#define _PROC_H_ +#ifndef PROC_H +#define PROC_H #include "config.h" @@ -277,4 +277,4 @@ int proc_read_16(struct process *proc, arch_addr_t addr, uint16_t *lp); int proc_read_32(struct process *proc, arch_addr_t addr, uint32_t *lp); int proc_read_64(struct process *proc, arch_addr_t addr, uint64_t *lp); -#endif /* _PROC_H_ */ +#endif /* PROC_H */ diff --git a/prototype.h b/prototype.h index 824bfd9..cbb6ed2 100644 --- a/prototype.h +++ b/prototype.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef _PROTOTYPE_H_ -#define _PROTOTYPE_H_ +#ifndef PROTOTYPE_H +#define PROTOTYPE_H #include @@ -240,4 +240,4 @@ extern struct protolib_cache g_protocache; void init_global_config(void); -#endif /* _PROTOTYPE_H_ */ +#endif /* PROTOTYPE_H */ diff --git a/read_config_file.h b/read_config_file.h index 19351be..5a72a05 100644 --- a/read_config_file.h +++ b/read_config_file.h @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ -#ifndef _READ_CONFIG_FILE_H_ -#define _READ_CONFIG_FILE_H_ +#ifndef READ_CONFIG_FILE_H +#define READ_CONFIG_FILE_H #include "forward.h" int read_config_file(FILE *stream, const char *name, struct protolib *plib); -#endif /* _READ_CONFIG_FILE_H_ */ +#endif /* READ_CONFIG_FILE_H */ diff --git a/summary.h b/summary.h index f680ef9..ea9747a 100644 --- a/summary.h +++ b/summary.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef _SUMMARY_H_ -#define _SUMMARY_H_ +#ifndef SUMMARY_H +#define SUMMARY_H #include "forward.h" @@ -32,4 +32,4 @@ void summary_account_call(struct library_symbol *libsym, struct timedelta spent); void show_summary(void); -#endif /* _SUMMARY_H_ */ +#endif /* SUMMARY_H */ diff --git a/sysdeps/linux-gnu/trace-defs.h b/sysdeps/linux-gnu/trace-defs.h index aa69b83..f2e0855 100644 --- a/sysdeps/linux-gnu/trace-defs.h +++ b/sysdeps/linux-gnu/trace-defs.h @@ -17,8 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ -#ifndef _TRACE_DEFS_H_ -#define _TRACE_DEFS_H_ +#ifndef TRACE_DEFS_H +#define TRACE_DEFS_H #include /* If the system headers did not provide the constants, hard-code the @@ -89,4 +89,4 @@ # define PTRACE_EVENT_EXIT 6 #endif -#endif /* _TRACE_DEFS_H_ */ +#endif /* TRACE_DEFS_H */ diff --git a/sysdeps/linux-gnu/trace.h b/sysdeps/linux-gnu/trace.h index 94844dd..1599738 100644 --- a/sysdeps/linux-gnu/trace.h +++ b/sysdeps/linux-gnu/trace.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef _LTRACE_LINUX_TRACE_H_ -#define _LTRACE_LINUX_TRACE_H_ +#ifndef LTRACE_LINUX_TRACE_H +#define LTRACE_LINUX_TRACE_H #include "proc.h" @@ -151,4 +151,4 @@ char *linux_append_IFUNC_to_name(const char *name); struct prototype *linux_IFUNC_prototype(void); -#endif /* _LTRACE_LINUX_TRACE_H_ */ +#endif /* LTRACE_LINUX_TRACE_H */ diff --git a/value_dict.h b/value_dict.h index f75ee37..4991dd3 100644 --- a/value_dict.h +++ b/value_dict.h @@ -18,8 +18,8 @@ * 02110-1301 USA */ -#ifndef ARGS_H -#define ARGS_H +#ifndef VALUE_DICT_H +#define VALUE_DICT_H #include "forward.h" #include "vect.h" @@ -64,4 +64,4 @@ struct value *val_dict_get_name(struct value_dict *dict, const char *name); * itself (the pointer) is not freed. */ void val_dict_destroy(struct value_dict *dict); -#endif /* ARGS_H */ +#endif /* VALUE_DICT_H */ -- 2.7.4