summaryrefslogtreecommitdiff
path: root/gallery-utils.h
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-07-27 19:13:28 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-07-27 19:13:28 +0200
commit510fff156db65795cbf211e7910a67fb316cb404 (patch)
treedfbec486ffeab2d6886f9f51863f723a2d5cd574 /gallery-utils.h
downloadcataract-510fff156db65795cbf211e7910a67fb316cb404.tar.xz
Initial commitv0.99.0
Diffstat (limited to 'gallery-utils.h')
-rw-r--r--gallery-utils.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/gallery-utils.h b/gallery-utils.h
new file mode 100644
index 0000000..1547c90
--- /dev/null
+++ b/gallery-utils.h
@@ -0,0 +1,41 @@
+/* Cataract - Static web photo gallery generator
+ * Copyright (C) 2008 Tomas Bzatek <tbzatek@users.sourceforge.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+#include <glib.h>
+
+#define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '~')
+#define IS_EQUAL_SIGN(ch) ((ch) == '=')
+
+
+/*
+ * str_replace: replace substring 'search' with a 'replace' string
+ * - only one occurence of the string is replaced
+ * - reallocates the original string
+ */
+void str_replace (char **dst, const char *search, const char *replace);
+
+/*
+ * copy_file: copy file from src to dst
+ */
+gboolean copy_file (const char *src, const char *dst);
+
+/*
+ * make_string: make string of 'substr' substrings
+ * - returns newly allocated string
+ */
+char *make_string (const char* substr, const int count);
+