allow spaces in imap foldernames
[claws.git] / src / utils.h
index 61bbccd0553de15a7841bb92c83bb40095a89d14..1d3729fec3628a15e6ba346cdabf5f1ecdc8907b 100644 (file)
        ptr = __tmp; \
 }
 
+#define Xstrconcat_a(ptr, str1, str2, iffail) \
+{ \
+       gchar *__tmp; \
+ \
+       if ((__tmp = alloca(strlen(str1) + strlen(str2) + 1)) == NULL) { \
+               g_warning("can't allocate memory\n"); \
+               iffail; \
+       } else { \
+               strcpy(__tmp, str1); \
+               strcat(__tmp, str2); \
+       } \
+ \
+       ptr = __tmp; \
+}
+
 #define FILE_OP_ERROR(file, func) \
 { \
        fprintf(stderr, "%s: ", file); \