Skip to content

Commit

Permalink
common,cli,wrappers,retrace,gui: Use #pragma once.
Browse files Browse the repository at this point in the history
Smaller footprint, and simplifies refactoring.
  • Loading branch information
jrfonseca committed May 20, 2015
1 parent a6b011b commit 9653f95
Show file tree
Hide file tree
Showing 112 changed files with 112 additions and 379 deletions.
4 changes: 1 addition & 3 deletions cli/cli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
*
*********************************************************************/

#ifndef _APITRACE_CLI_HPP_
#define _APITRACE_CLI_HPP_
#pragma once


struct Command {
Expand All @@ -52,4 +51,3 @@ extern const Command sed_command;
extern const Command trace_command;
extern const Command trim_command;

#endif /* _APITRACE_CLI_HPP_ */
4 changes: 1 addition & 3 deletions cli/cli_pager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
**************************************************************************/


#ifndef _CLI_PAGER_HPP_
#define _CLI_PAGER_HPP_
#pragma once


void
pipepager(void);


#endif /* _CLI_PAGER_HPP_ */
4 changes: 1 addition & 3 deletions cli/cli_resources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
*
**************************************************************************/

#ifndef _CLI_RESOURCES_HPP_
#define _CLI_RESOURCES_HPP_
#pragma once


#include <stdlib.h>
Expand All @@ -43,4 +42,3 @@ os::String
findWrapper(const char *wrapperFilename, bool verbose = false);


#endif /* _CLI_RESOURCES_HPP_ */
4 changes: 1 addition & 3 deletions cli/cli_retrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
*
*********************************************************************/

#ifndef _CLI_RETRACE_HPP_
#define _CLI_RETRACE_HPP_
#pragma once


#include <vector>
Expand All @@ -43,4 +42,3 @@ executeRetrace(const std::vector<const char *> & opts,
const char *traceName);


#endif /* _CLI_RETRACE_HPP_ */
4 changes: 1 addition & 3 deletions cli/pickle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Python pickle writer
*/

#ifndef _PICKLE_HPP_
#define _PICKLE_HPP_
#pragma once

#include <assert.h>
#include <stddef.h>
Expand Down Expand Up @@ -385,4 +384,3 @@ class PickleWriter
}
};

#endif /* _Pickle_HPP_ */
4 changes: 1 addition & 3 deletions common/highlight.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Helpers for coloring output.
*/

#ifndef _HIGHLIGHT_HPP_
#define _HIGHLIGHT_HPP_
#pragma once


#include <iostream>
Expand Down Expand Up @@ -85,4 +84,3 @@ defaultHighlighter(std::ostream & os);
} /* namespace highlight */


#endif /* _HIGHLIGHT_HPP_ */
4 changes: 1 addition & 3 deletions common/os.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Simple OS abstraction layer.
*/

#ifndef _OS_HPP_
#define _OS_HPP_
#pragma once

#include <stdlib.h>
#include <stdarg.h>
Expand Down Expand Up @@ -105,4 +104,3 @@ random(void) {

} /* namespace os */

#endif /* _OS_HPP_ */
5 changes: 1 addition & 4 deletions common/os_backtrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
*
**************************************************************************/

#ifndef _OS_BACKTRACE_HPP_
#define _OS_BACKTRACE_HPP_
#pragma once

#include <vector>

Expand All @@ -43,5 +42,3 @@ void dump_backtrace();


} /* namespace os */

#endif
4 changes: 1 addition & 3 deletions common/os_binary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Force binary mode standard files on Windows.
*/

#ifndef _OS_BINARY_HPP_
#define _OS_BINARY_HPP_
#pragma once


#include <stdio.h>
Expand Down Expand Up @@ -58,4 +57,3 @@ void setBinaryMode(FILE *fp) {

} /* namespace os */

#endif /* _OS_BINARY_HPP_ */
4 changes: 1 addition & 3 deletions common/os_dl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Dynamic library linking abstraction.
*/

#ifndef _OS_DL_HPP_
#define _OS_DL_HPP_
#pragma once


#if defined(_WIN32)
Expand Down Expand Up @@ -86,4 +85,3 @@ namespace os {

} /* namespace os */

#endif /* _OS_DL_HPP_ */
4 changes: 1 addition & 3 deletions common/os_memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
* Simple OS time measurement abstraction.
*/

#ifndef _OS_MEMORY_HPP_
#define _OS_MEMORY_HPP_
#pragma once

#ifdef HAVE_READPROC_H
#include <proc/readproc.h>
Expand Down Expand Up @@ -77,4 +76,3 @@ namespace os {

} /* namespace os */

#endif /* _OS_MEMORY_HPP_ */
4 changes: 1 addition & 3 deletions common/os_process.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Sub-process abstraction.
*/

#ifndef _OS_PROCESS_HPP_
#define _OS_PROCESS_HPP_
#pragma once


#ifdef _WIN32
Expand Down Expand Up @@ -88,4 +87,3 @@ int execute(char * const * args);

} /* namespace os */

#endif /* _OS_PROCESS_HPP_ */
4 changes: 1 addition & 3 deletions common/os_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* String manipulation.
*/

#ifndef _OS_STRING_HPP_
#define _OS_STRING_HPP_
#pragma once


#include <assert.h>
Expand Down Expand Up @@ -434,4 +433,3 @@ bool removeFile(const String &fileName);

} /* namespace os */

#endif /* _OS_STRING_HPP_ */
4 changes: 1 addition & 3 deletions common/os_time.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Simple OS time measurement abstraction.
*/

#ifndef _OS_TIME_HPP_
#define _OS_TIME_HPP_
#pragma once


#if defined(_WIN32)
Expand Down Expand Up @@ -103,4 +102,3 @@ namespace os {

} /* namespace os */

#endif /* _OS_TIME_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
*
**************************************************************************/

#ifndef _TRACE_API_HPP_
#define _TRACE_API_HPP_
#pragma once


#include <stdlib.h>
Expand Down Expand Up @@ -55,4 +54,3 @@ enum API {

} /* namespace trace */

#endif /* _TRACE_API_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_callset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
*
*/

#ifndef _TRACE_CALLSET_HPP_
#define _TRACE_CALLSET_HPP_
#pragma once


#include <limits>
Expand Down Expand Up @@ -194,4 +193,3 @@ namespace trace {
} /* namespace trace */


#endif /* _TRACE_CALLSET_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_dump.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Human-readible dumping.
*/

#ifndef _TRACE_DUMP_HPP_
#define _TRACE_DUMP_HPP_
#pragma once


#include <iostream>
Expand Down Expand Up @@ -74,4 +73,3 @@ inline std::ostream & operator <<(std::ostream &os, Call &call) {

} /* namespace trace */

#endif /* _TRACE_DUMP_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_fast_callset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
*
*********************************************************************/

#ifndef _TRACE_FAST_CALLSET_HPP_
#define _TRACE_FAST_CALLSET_HPP_
#pragma once

#include "trace_model.hpp"

Expand Down Expand Up @@ -139,4 +138,3 @@ class FastCallSet {

} /* namespace trace */

#endif /* _TRACE_FAST_CALLSET_HPP_ */
5 changes: 1 addition & 4 deletions common/trace_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
**************************************************************************/


#ifndef TRACE_FILE_HPP
#define TRACE_FILE_HPP
#pragma once

#include <string>
#include <fstream>
Expand Down Expand Up @@ -205,5 +204,3 @@ operator<=(const File::Offset &one, const File::Offset &two)


} /* namespace trace */

#endif
4 changes: 1 addition & 3 deletions common/trace_format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
* See FORMAT.markdown for details.
*/

#ifndef _TRACE_FORMAT_HPP_
#define _TRACE_FORMAT_HPP_
#pragma once

namespace trace {

Expand Down Expand Up @@ -82,4 +81,3 @@ enum BacktraceDetail {

} /* namespace trace */

#endif /* _TRACE_FORMAT_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_loader.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef TRACE_LOADER_HPP
#define TRACE_LOADER_HPP
#pragma once

#include "trace_file.hpp"
#include "trace_parser.hpp"
Expand Down Expand Up @@ -62,4 +61,3 @@ class Loader

}

#endif // TRACE_LOADER_HPP
4 changes: 1 addition & 3 deletions common/trace_lookup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Helper code for function name indexed lookup tables.
*/

#ifndef _TRACE_LOOKUP_HPP_
#define _TRACE_LOOKUP_HPP_
#pragma once


#include <assert.h>
Expand Down Expand Up @@ -108,4 +107,3 @@ entryLookup(const char *name, const Entry<T> (& entries)[n], const T & default_)

} /* namespace trace */

#endif /* _TRACE_LOOKUP_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* Object hierarchy for describing the traces in memory.
*/

#ifndef _TRACE_MODEL_HPP_
#define _TRACE_MODEL_HPP_
#pragma once


#include <assert.h>
Expand Down Expand Up @@ -584,4 +583,3 @@ class Call

} /* namespace trace */

#endif /* _TRACE_MODEL_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_option.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
*
**************************************************************************/

#ifndef _TRACE_OPTION_HPP_
#define _TRACE_OPTION_HPP_
#pragma once

namespace trace {

Expand All @@ -37,4 +36,3 @@ intOption(const char *option, int default_ = 0);

} /* namespace trace */

#endif /* _TRACE_CALLSET_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
*
**************************************************************************/

#ifndef _TRACE_PARSER_HPP_
#define _TRACE_PARSER_HPP_
#pragma once


#include <iostream>
Expand Down Expand Up @@ -223,4 +222,3 @@ class Parser

} /* namespace trace */

#endif /* _TRACE_PARSER_HPP_ */
4 changes: 1 addition & 3 deletions common/trace_profiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
*
**************************************************************************/

#ifndef TRACE_PROFILER_H
#define TRACE_PROFILER_H
#pragma once

#include <string>
#include <vector>
Expand Down Expand Up @@ -142,4 +141,3 @@ class Profiler
};
}

#endif // TRACE_PROFILER_H
Loading

0 comments on commit 9653f95

Please sign in to comment.