diff options
| -rw-r--r-- | src/atom-writer.h | 13 | ||||
| -rw-r--r-- | src/block-parser.h | 11 | ||||
| -rw-r--r-- | src/gallery-utils.h | 15 | ||||
| -rw-r--r-- | src/generators.h | 9 | ||||
| -rw-r--r-- | src/items.h | 12 | ||||
| -rw-r--r-- | src/job-manager.h | 9 | ||||
| -rw-r--r-- | src/jpeg-utils.h | 15 | ||||
| -rw-r--r-- | src/replace-table.h | 11 | ||||
| -rw-r--r-- | src/setup.h | 13 | ||||
| -rw-r--r-- | src/stats.h | 5 | ||||
| -rw-r--r-- | src/xml-parser.h | 11 |
11 files changed, 93 insertions, 31 deletions
diff --git a/src/atom-writer.h b/src/atom-writer.h index cf90001..2daa031 100644 --- a/src/atom-writer.h +++ b/src/atom-writer.h @@ -15,12 +15,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __ATOM_WRITER_H__ -#define __ATOM_WRITER_H__ +#ifndef __CGG__ATOM_WRITER_H__ +#define __CGG__ATOM_WRITER_H__ #include <glib.h> #include "setup.h" +G_BEGIN_DECLS + + /* * Resources: * http://tools.ietf.org/html/rfc4287 @@ -59,7 +62,7 @@ void atom_writer_set_base_url (TAtomFeed *feed, const gchar *base_u void atom_writer_set_feed_url (TAtomFeed *feed, const gchar *feed_url); void atom_writer_free (TAtomFeed *feed); /* will free data of all items */ -TAtomFeedItem * atom_writer_add_item (TAtomFeed *feed); +TAtomFeedItem * atom_writer_add_item (TAtomFeed *feed); void atom_feed_item_set_title (TAtomFeedItem *item, const gchar *title); void atom_feed_item_set_path (TAtomFeedItem *item, const gchar *path); void atom_feed_item_set_date (TAtomFeedItem *item, const gchar *date); @@ -67,4 +70,6 @@ void atom_feed_item_set_summary (TAtomFeedItem *item, const gch void atom_feed_item_set_summary_type (TAtomFeedItem *item, const gchar *summary_type); -#endif /* __ATOM_WRITER_H__ */ +G_END_DECLS + +#endif /* __CGG__ATOM_WRITER_H__ */ diff --git a/src/block-parser.h b/src/block-parser.h index 0e94f73..b975ea8 100644 --- a/src/block-parser.h +++ b/src/block-parser.h @@ -15,12 +15,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __CGG__BLOCK_PARSER_H__ +#define __CGG__BLOCK_PARSER_H__ #include <stdio.h> #include <glib.h> -typedef struct BlockParser BlockParser; +G_BEGIN_DECLS + +typedef struct BlockParser BlockParser; BlockParser *block_parser_new (); @@ -62,3 +66,8 @@ gboolean block_parser_has_unused_data (BlockParser *parser, const gchar *key); * */ gchar * block_parser_read_and_parse (BlockParser *parser, FILE *stream); + + +G_END_DECLS + +#endif /* __CGG__BLOCK_PARSER_H__ */ diff --git a/src/gallery-utils.h b/src/gallery-utils.h index b354a38..521a1fe 100644 --- a/src/gallery-utils.h +++ b/src/gallery-utils.h @@ -15,14 +15,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef __cplusplus - extern "C" { -#endif +#ifndef __CGG__GALLERY_UTILS_H__ +#define __CGG__GALLERY_UTILS_H__ #include <glib.h> #include <string.h> +G_BEGIN_DECLS + + #define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '~') #define IS_EQUAL_SIGN(ch) ((ch) == '=') #define GET_EXT(s) strrchr (s, '.') @@ -79,6 +80,6 @@ void log_error (const gchar *format, ...) G_GNUC_PRINTF (1, 2); gboolean needs_update (const gchar *source, const gchar *dest); -#ifdef __cplusplus - } -#endif +G_END_DECLS + +#endif /* __CGG__GALLERY_UTILS_H__ */ diff --git a/src/generators.h b/src/generators.h index a6da10a..a890eb8 100644 --- a/src/generators.h +++ b/src/generators.h @@ -15,11 +15,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __CGG__GENERATORS_H__ +#define __CGG__GENERATORS_H__ + #include <glib.h> #include "setup.h" #include "items.h" +G_BEGIN_DECLS /* @@ -65,3 +69,8 @@ gboolean write_html_image (TGallerySetup *setup, const gchar *dst, TIndexItem *item, TAlbum *parent_items); + + +G_END_DECLS + +#endif /* __CGG__GENERATORS_H__ */ diff --git a/src/items.h b/src/items.h index d1ef7d8..f1f13c9 100644 --- a/src/items.h +++ b/src/items.h @@ -15,12 +15,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __ITEMS_H__ -#define __ITEMS_H__ - +#ifndef __CGG__ITEMS_H__ +#define __CGG__ITEMS_H__ #include <glib.h> +G_BEGIN_DECLS + typedef enum { GALLERY_TYPE_INDEX = 1 << 0, @@ -99,4 +100,7 @@ int get_album_objects_count (const gchar *filename); */ void get_album_titles (const gchar *filename, gchar **title, gchar **description, gchar **thumbnail); -#endif /* __ITEMS_H__ */ + +G_END_DECLS + +#endif /* __CGG__ITEMS_H__ */ diff --git a/src/job-manager.h b/src/job-manager.h index df7e19f..2a0c3ff 100644 --- a/src/job-manager.h +++ b/src/job-manager.h @@ -15,11 +15,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __CGG__JOB_MANAGER_H__ +#define __CGG__JOB_MANAGER_H__ + #include <glib.h> #include "setup.h" #include "items.h" +G_BEGIN_DECLS + /* * build_tree: generate complete gallery tree based on source xml files @@ -36,3 +41,7 @@ gboolean build_tree (TGallerySetup *setup, int parent_item_index, int jobs); + +G_END_DECLS + +#endif /* __CGG__JOB_MANAGER_H__ */ diff --git a/src/jpeg-utils.h b/src/jpeg-utils.h index 6e0dc9c..e5845bc 100644 --- a/src/jpeg-utils.h +++ b/src/jpeg-utils.h @@ -15,14 +15,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifdef __cplusplus - extern "C" { -#endif +#ifndef __CGG__JPEG_UTILS_H__ +#define __CGG__JPEG_UTILS_H__ #include <glib.h> #include "setup.h" +G_BEGIN_DECLS + + #define SQUARED_SIMPLE_SHAVE_AMOUNT 5 /* percent */ @@ -93,6 +94,6 @@ void calculate_sizes (const unsigned long max_width, const unsigned long max_hei void modify_exif (const gchar *filename, gboolean strip_thumbnail, const gchar *add_copyright); -#ifdef __cplusplus - } -#endif +G_END_DECLS + +#endif /* __CGG__JPEG_UTILS_H__ */ diff --git a/src/replace-table.h b/src/replace-table.h index b59c9fb..ab2f28a 100644 --- a/src/replace-table.h +++ b/src/replace-table.h @@ -15,13 +15,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __CGG__REPLACE_TABLE_H__ +#define __CGG__REPLACE_TABLE_H__ #include <glib.h> - -typedef GHashTable ReplaceTable; +G_BEGIN_DECLS +typedef GHashTable ReplaceTable; ReplaceTable *replace_table_new (); @@ -67,3 +69,8 @@ void adjust_tags_parameter (gchar **str); * */ gchar * get_next_token (const gchar *s, gchar **start, gchar **end, gboolean *tag_parameter); + + +G_END_DECLS + +#endif /* __CGG__REPLACE_TABLE_H__ */ diff --git a/src/setup.h b/src/setup.h index 188191a..3bc3b3f 100644 --- a/src/setup.h +++ b/src/setup.h @@ -15,12 +15,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __SETUP_H__ -#define __SETUP_H__ - +#ifndef __CGG__SETUP_H__ +#define __CGG__SETUP_H__ #include <glib.h> +G_BEGIN_DECLS + /* Directory names */ #define DEFAULT_THUMBNAIL_DIR "_thumb" @@ -123,7 +124,9 @@ void free_setup_data (TGallerySetup *setup); * find_templates_directory: absolute/relative path checks, trying to find templates directory * - returned string should be freed */ -gchar *find_templates_directory (TGallerySetup *setup); +gchar * find_templates_directory (TGallerySetup *setup); + +G_END_DECLS -#endif /* __SETUP_H__ */ +#endif /* __CGG__SETUP_H__ */ diff --git a/src/stats.h b/src/stats.h index 10ac0a3..5f73f24 100644 --- a/src/stats.h +++ b/src/stats.h @@ -15,6 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __CGG__STATS_H__ +#define __CGG__STATS_H__ /* Thread safe statistics counting */ @@ -26,3 +28,6 @@ int stats_images; void stats_errors_inc (); void stats_dirs_inc (); void stats_images_inc (); + + +#endif /* __CGG__STATS_H__ */ diff --git a/src/xml-parser.h b/src/xml-parser.h index 3d89616..c750b57 100644 --- a/src/xml-parser.h +++ b/src/xml-parser.h @@ -15,11 +15,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef __CGG__XML_PARSER_H__ +#define __CGG__XML_PARSER_H__ + #include <glib.h> #include <libxml/xmlmemory.h> #include <libxml/xpath.h> +G_BEGIN_DECLS + typedef struct { xmlDocPtr doc; @@ -27,7 +32,6 @@ typedef struct { } TXMLFile; - /* * xml_parser_load: initialize and load the XML document */ @@ -66,3 +70,8 @@ gboolean xml_file_get_node_present (TXMLFile *file, const gchar *x_path); * xml_file_node_get_children_count: retrieve number of children items of the specified XPath node */ int xml_file_node_get_children_count (TXMLFile *file, const gchar *x_path); + + +G_END_DECLS + +#endif /* __CGG__XML_PARSER_H__ */ |
