Merge pull request #2 from sztanpet/includeguard

modernize header guards to #pragma once
master
Jim 2013-10-14 12:10:27 -07:00
commit 1493a325bb
51 changed files with 52 additions and 205 deletions

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef GS_D3D11EXPORTS_H
#define GS_D3D11EXPORTS_H
#pragma once
#include "util/c99defs.h"
@ -196,5 +195,3 @@ EXPORT void shader_setval(shader_t shader, sparam_t param, const void *val,
EXPORT void shader_setdefault(shader_t shader, sparam_t param);
}
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef GS_GLEXPORTS
#define GS_GLEXPORTS
#pragma once
#include "util/c99defs.h"
@ -188,5 +187,3 @@ EXPORT void shader_settexture(shader_t shader, sparam_t param, texture_t val);
EXPORT void shader_setval(shader_t shader, sparam_t param, const void *val,
size_t size);
EXPORT void shader_setdefault(shader_t shader, sparam_t param);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef GL_HELPERS_H
#define GL_HELPERS_H
#pragma once
/*
* Okay, so GL error handling is.. unclean to work with. I don't want
@ -128,5 +127,3 @@ extern bool gl_create_buffer(GLenum target, GLuint *buffer, GLsizeiptr size,
extern bool update_buffer(GLenum target, GLuint buffer, void *data,
size_t size);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef GL_SHADER_PARSER_H
#define GL_SHADER_PARSER_H
#pragma once
/*
* Parses shaders into GLSL. Shaders are almost identical to HLSL
@ -67,5 +66,3 @@ static inline void gl_shader_parser_free(struct gl_shader_parser *glsp)
extern bool gl_shader_parse(struct gl_shader_parser *glsp,
const char *shader_str, const char *file);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef GL_SUBSYSTEM_H
#define GL_SUBSYSTEM_H
#pragma once
#include "util/darray.h"
#include "graphics/graphics.h"
@ -459,7 +458,3 @@ extern void gl_platform_destroy(struct gl_platform *platform);
extern struct gl_windowinfo *gl_windowinfo_create(struct gs_init_data *info);
extern void gl_windowinfo_destroy(struct gl_windowinfo *wi);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef AXISANG_H
#define AXISANG_H
#pragma once
#include "../util/c99defs.h"
@ -63,5 +62,3 @@ EXPORT void axisang_from_quat(struct axisang *dst, const struct quat *q);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef BOUNDS_H
#define BOUNDS_H
#pragma once
#include "math-defs.h"
#include "vec3.h"
@ -131,5 +130,3 @@ EXPORT float bounds_min_dist(const struct bounds *b, const struct plane *p);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef EFFECT_PARSER_H
#define EFFECT_PARSER_H
#pragma once
#include "../util/darray.h"
#include "../util/cf-parser.h"
@ -282,5 +281,3 @@ extern bool ep_parse(struct effect_parser *ep, effect_t effect,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef EFFECT_H
#define EFFECT_H
#pragma once
#include "effect-parser.h"
#include "graphics.h"
@ -177,5 +176,3 @@ EXPORT void effect_upload_shader_params(effect_t effect, shader_t shader,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef GRAPHICS_INTERNAL_H
#define GRAPHICS_INTERNAL_H
#pragma once
#include "../util/darray.h"
#include "graphics.h"
@ -225,5 +224,3 @@ struct graphics_subsystem {
DARRAY(uint32_t) colors;
DARRAY(struct vec2) texverts[16];
};
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef GRAPHICS_H
#define GRAPHICS_H
#pragma once
#include "../util/bmem.h"
#include "input.h"
@ -706,5 +705,3 @@ static inline uint32_t gs_num_total_levels(uint32_t width, uint32_t height)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef INPUT_H
#define INPUT_H
#pragma once
/* TODO: incomplete/may not be necessary */
@ -151,5 +150,3 @@ EXPORT int input_getbuttonstate(input_t input, uint32_t button);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef MATH_DEFS
#define MATH_DEFS
#pragma once
#include "../util/c99defs.h"
#include <math.h>
@ -44,5 +43,3 @@ static inline bool close_float(float f1, float f2, float precision)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef MATH_EXTRA_H
#define MATH_EXTRA_H
#pragma once
#include "../util/c99defs.h"
@ -62,5 +61,3 @@ EXPORT float rand_float(int positive_only);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef MATRIX_H
#define MATRIX_H
#pragma once
#include "vec3.h"
@ -83,5 +82,3 @@ EXPORT void matrix3_mirrorv(struct matrix3 *dst, const struct matrix3 *m,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef MATRIX4_H
#define MATRIX4_H
#pragma once
#include "vec4.h"
@ -72,5 +71,3 @@ EXPORT void matrix4_perspective(struct matrix4 *dst, float angle,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef PLANE_H
#define PLANE_H
#pragma once
#include "math-defs.h"
#include "vec3.h"
@ -97,5 +96,3 @@ static inline bool plane_coplanar(const struct plane *p1,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef QUAT_H
#define QUAT_H
#pragma once
#include "../util/c99defs.h"
#include "math-defs.h"
@ -181,5 +180,3 @@ EXPORT void quat_interpolate_cubic(struct quat *dst, const struct quat *q1,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef SHADER_PARSER_H
#define SHADER_PARSER_H
#pragma once
#include "../util/cf-parser.h"
#include "graphics.h"
@ -277,5 +276,3 @@ static inline struct shader_func *shader_parser_getfunc(
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef VECT2_H
#define VECT2_H
#pragma once
#include "../util/c99defs.h"
#include <math.h>
@ -168,4 +167,3 @@ EXPORT void vec2_norm(struct vec2 *dst, const struct vec2 *v);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef VECT_H
#define VECT_H
#pragma once
#include "math-defs.h"
#include <xmmintrin.h>
@ -232,5 +231,3 @@ EXPORT void vec3_rand(struct vec3 *dst, int positive_only);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef VECT4_H
#define VECT4_H
#pragma once
#include "math-defs.h"
#include <xmmintrin.h>
@ -249,5 +248,3 @@ EXPORT void vec4_transform(struct vec4 *dst, const struct vec4 *v,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef AUDIO_IO_H
#define AUDIO_IO_H
#pragma once
#include "../util/c99defs.h"
#include "media-io.h"
@ -87,5 +86,3 @@ EXPORT void audio_output_close(audio_t audio);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef MEDIA_IO_H
#define MEDIA_IO_H
#pragma once
/*
* Media input/output components used for connecting media outputs/inputs
@ -73,5 +72,3 @@ EXPORT void media_close(media_t media);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef VIDEO_IO_H
#define VIDEO_IO_H
#pragma once
#include "../util/c99defs.h"
#include "media-io.h"
@ -65,5 +64,3 @@ EXPORT void video_output_close(video_t video);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef OBS_DATA_H
#define OBS_DATA_H
#pragma once
#include "util/darray.h"
#include "util/threading.h"
@ -79,5 +78,3 @@ struct obs_data {
};
extern void *obs_video_thread(void *param);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef OBS_DEFS_H
#define OBS_DEFS_H
#pragma once
#define MODULE_SUCCESS 0
#define MODULE_ERROR -1
@ -26,5 +25,3 @@
#define SOURCE_VIDEO (1<<0)
#define SOURCE_AUDIO (1<<1)
#define SOURCE_ASYNC (1<<2)
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef OBS_MODULE_H
#define OBS_MODULE_H
#pragma once
#include "util/darray.h"
@ -28,5 +27,3 @@ struct obs_module {
extern void *load_module_subfunc(void *module, const char *module_name,
const char *name, const char *func, bool required);
extern void free_module(struct obs_module *mod);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef OBS_OUTPUT_H
#define OBS_OUTPUT_H
#pragma once
#include "util/c99defs.h"
#include "util/dstr.h"
@ -115,5 +114,3 @@ struct obs_output {
extern bool get_output_info(void *module, const char *module_name,
const char *output_name, struct output_info *info);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef OBS_SCENE_H
#define OBS_SCENE_H
#pragma once
#include "obs.h"
#include "obs-source.h"
@ -38,5 +37,3 @@ struct obs_scene {
source_t source;
DARRAY(struct obs_scene_item*) items;
};
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef OBS_SERVICE_H
#define OBS_SERVICE_H
#pragma once
struct service_data;
@ -29,5 +28,3 @@ struct service_info {
/* get (viewers/etc) */
/* send (current game/title/activate commercial/etc) */
};
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef SOURCE_H
#define SOURCE_H
#pragma once
#include "util/c99defs.h"
#include "util/darray.h"
@ -204,5 +203,3 @@ extern void source_init(obs_t obs, struct obs_source *source);
EXPORT void source_activate(source_t source);
EXPORT void source_deactivate(source_t source);
EXPORT void source_video_tick(source_t source, float seconds);
#endif

View File

@ -15,8 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef LIBOBS_H
#define LIBOBS_H
#pragma once
#include "util/c99defs.h"
#include "graphics/graphics.h"
@ -300,5 +299,3 @@ EXPORT void output_save_settings(output_t output, const char *settings);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef BASE_H
#define BASE_H
#pragma once
#include <wctype.h>
#include <stdarg.h>
@ -54,5 +53,3 @@ EXPORT void bcrash(const char *format, ...);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef BALLOC_H
#define BALLOC_H
#pragma once
#include "c99defs.h"
#include "base.h"
@ -92,5 +91,3 @@ static inline wchar_t *bwstrdup(const wchar_t *str)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef C99DEFS_H
#define C99DEFS_H
#pragma once
/*
* Contains hacks for getting some C99 stuff working in VC, things like
@ -71,5 +70,3 @@ typedef long ssize_t;
#include <sys/types.h>
#endif /* _MSC_VER */
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef CF_LEXER_H
#define CF_LEXER_H
#pragma once
#include "lexer.h"
@ -212,5 +211,3 @@ static inline struct cf_token *cf_preprocessor_gettokens(
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef CF_PARSER_H
#define CF_PARSER_H
#pragma once
#include "cf-lexer.h"
@ -280,5 +279,3 @@ static inline int next_name_ref(struct cf_parser *p, struct strref *dst,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef CONFIG_FILE_H
#define CONFIG_FILE_H
#pragma once
#include "c99defs.h"
@ -83,5 +82,3 @@ EXPORT double config_get_double(config_t config, const char *section,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef DARRAY_H
#define DARRAY_H
#pragma once
#include "c99defs.h"
#include <string.h>
@ -541,5 +540,3 @@ static inline void darray_swap(const size_t element_size,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef DSTR_H
#define DSTR_H
#pragma once
#include <string.h>
#include <stdarg.h>
@ -306,5 +305,3 @@ static inline int dstr_ncmpi(const struct dstr *str1, const char *str2,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef LEXER_H
#define LEXER_H
#pragma once
#include "c99defs.h"
#include "dstr.h"
@ -290,5 +289,3 @@ EXPORT void lexer_getstroffset(const struct lexer *lex, const char *str,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef PLATFORM_H
#define PLATFORM_H
#pragma once
#include <stdio.h>
#include <wchar.h>
@ -78,5 +77,3 @@ EXPORT off_t ftello(FILE *stream);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef SERIALIZER_H
#define SERIALIZER_H
#pragma once
/*
* General programmable serialization functions. (A shared interface to
@ -124,5 +123,3 @@ static inline void serializer_write_double(struct serializer *s, double d)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef TEXT_LOOKUP_H
#define TEXT_LOOKUP_H
#pragma once
/*
* Text Lookup interface
@ -51,5 +50,3 @@ EXPORT bool text_lookup_getstr(lookup_t lookup, const char *lookup_val,
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,8 +21,7 @@
distribution.
******************************************************************************/
#ifndef BASE_THREADING_H
#define BASE_THREADING_H
#pragma once
/*
* Allows posix thread usage on windows as well as other operating systems.
@ -129,5 +128,3 @@ static inline void event_reset(event_t *event)
#ifdef __cplusplus
}
#endif
#endif

View File

@ -14,11 +14,11 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
/*
* utf8: implementation of UTF-8 charset encoding (RFC3629).
*/
#ifndef _UTF8_H_
#define _UTF8_H_
#ifdef __cplusplus
extern "C" {
@ -35,5 +35,3 @@ size_t wchar_to_utf8(const wchar_t *in, size_t insize, char *out,
#ifdef __cplusplus
}
#endif
#endif /* !_UTF8_H_ */

View File

@ -1,5 +1,4 @@
#ifndef _STDBOOL_H
#define _STDBOOL_H
#pragma once
#if !defined(__cplusplus)
typedef int8_t _Bool;
@ -8,5 +7,3 @@ typedef int8_t _Bool;
#define false 0
#define __bool_true_false_are_defined 1
#endif
#endif

View File

@ -1,5 +1,4 @@
#ifndef FILTER_TEST_H
#define FILTER_TEST_H
#pragma once
#include "obs.h"
@ -23,5 +22,3 @@ EXPORT void test_video_render(struct test_filter *rt);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,5 +1,4 @@
#ifndef OBS_CAPTURE_EXPORTS_H
#define OBS_CAPTURE_EXPORTS_H
#pragma once
#include "util/c99defs.h"
@ -13,5 +12,3 @@ EXPORT bool enum_filters(size_t idx, const char **name);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,5 +1,4 @@
#ifndef RANDOM_TEX_H
#define RANDOM_TEX_H
#pragma once
#include "obs.h"
@ -24,5 +23,3 @@ EXPORT int random_getheight(struct random_tex *rt);
#ifdef __cplusplus
}
#endif
#endif