/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
*
* 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
ptr = __tmp; \
}
+#define AUTORELEASE_STR(str, iffail) \
+{ \
+ gchar *__str; \
+ Xstrdup_a(__str, str, iffail); \
+ g_free(str); \
+ str = __str; \
+}
+
#define FILE_OP_ERROR(file, func) \
{ \
fprintf(stderr, "%s: ", file); \
perror(func); \
}
+#define IS_ASCII(c) (((guchar) c) <= 0177 ? 1 : 0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef gpointer (*GNodeMapFunc) (gpointer nodedata, gpointer data);
/* debug functions */
void ptr_array_free_strings (GPtrArray *array);
+typedef gboolean (*StrFindFunc) (const gchar *haystack,
+ const gchar *needle);
+
+gboolean str_find (const gchar *haystack,
+ const gchar *needle);
+gboolean str_case_find (const gchar *haystack,
+ const gchar *needle);
+gboolean str_find_equal (const gchar *haystack,
+ const gchar *needle);
+gboolean str_case_find_equal (const gchar *haystack,
+ const gchar *needle);
+
/* number-string conversion */
gint to_number (const gchar *nstr);
gchar *itos_buf (gchar *nstr,
gint move_file (const gchar *src,
const gchar *dest,
gboolean overwrite);
+gint copy_file_part_to_fp (FILE *fp,
+ off_t offset,
+ size_t length,
+ FILE *dest_fp);
gint copy_file_part (FILE *fp,
off_t offset,
size_t length,
const gchar * line_has_quote_char_last (const gchar *str,
const gchar *quote_chars);
-/* used in extended search */
-gchar * expand_search_string (const gchar *str);
-
guint g_stricase_hash (gconstpointer gptr);
gint g_stricase_equal (gconstpointer gptr1, gconstpointer gptr2);
gint g_int_compare (gconstpointer a, gconstpointer b);
-gchar *generate_msgid (const gchar *address, gchar *buf, gint len);
+gchar *generate_msgid (gchar *buf, gint len);
gchar *generate_mime_boundary (const gchar *prefix);
gint quote_cmd_argument(gchar * result, guint size,
const gchar * path);
GNode *g_node_map(GNode *node, GNodeMapFunc func, gpointer data);
+gboolean get_hex_value(guchar *out, gchar c1, gchar c2);
+void get_hex_str(gchar *out, guchar ch);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __UTILS_H__ */