[gnome-builder/wip/file-marks] snippets: add guard snippet



commit cadd9a7137a781e13fbb90a6d0d8dfc49d473ad5
Author: Christian Hergert <christian hergert me>
Date:   Wed Oct 8 16:05:09 2014 -0700

    snippets: add guard snippet

 src/resources/snippets/chdr.snippets |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/resources/snippets/chdr.snippets b/src/resources/snippets/chdr.snippets
index 201fd3d..c0a154f 100644
--- a/src/resources/snippets/chdr.snippets
+++ b/src/resources/snippets/chdr.snippets
@@ -37,3 +37,16 @@ snippet gobject
        G_END_DECLS
 
        #endif /* ${$1|functify|upper}_H */
+snippet guard
+       #ifndef ${1:$filename|stripsuffix|functify|upper}_H
+       #define $1_H
+
+       #include <glib.h>
+
+       G_BEGIN_DECLS
+
+       $0
+
+       G_END_DECLS
+
+       #endif /* $1_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]