2004-11-18 [paul] 0.9.12cvs158.1
[claws.git] / src / common / utils.h
index 8df78bdef4ff916e678335e10156a231dff653af..96bdadc65700d66bedd89b45d79ad29e2e46c10c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * 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
        perror(func); \
 }
 
+#define IS_ASCII(c) (((guchar) c) <= 0177 ? 1 : 0)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -173,6 +175,18 @@ guint str_case_hash                (gconstpointer   key);
 
 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,
@@ -380,6 +394,10 @@ gint copy_file                     (const gchar    *src,
 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,
@@ -445,13 +463,16 @@ 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