#define STRING 256
#define SHORT_STRING 128
-#define NONULL(x) (x?x:"")
-#define ISSPACE(c) isspace((unsigned char)c)
+#define NONULL(x) (x?x:"")
+#define ISSPACE(c) isspace((unsigned char)c)
extern unsigned char const __m_strdigits[128];
extern signed char const __m_b64digits[128];
}
static inline int m_strncmp(const char *a, const char *b, ssize_t n) {
- return strncmp (NONULL(a), NONULL(b), n);
+ return strncmp(NONULL(a), NONULL(b), n);
}
static inline int m_strncasecmp(const char *a, const char *b, ssize_t n) {
return (*p = m_strdup(s));
}
+static inline ssize_t m_strputc(char *dst, ssize_t n, int c) {
+ if (n > 1) {
+ dst[0] = c;
+ dst[1] = '\0';
+ }
+ return 1;
+}
+
ssize_t m_strcpy(char *dst, ssize_t n, const char *src);
ssize_t m_strncpy(char *dst, ssize_t n, const char *src, ssize_t l);
return m_stristrn(haystack, needle, m_strlen(needle));
}
-
-/****************************************************************************/
-/* misc functions */
-/****************************************************************************/
-
-/* replace any %s with src, or appends " $src" */
-ssize_t m_snsubst(char *dst, ssize_t n, const char *fmt, const char *src);
-
#endif /* MUTT_LIB_LIB_STR_H */