/* comparisons */
/****************************************************************************/
+/** \brief Tells whether s begins with p.
+ *
+ * \param[in] s the input string
+ * \param[in] p the prefix
+ * \param[out] pp position in s
+ *
+ * \return 1 if a match is found, 0 otherwise.
+ */
+static inline int m_strstart(const char *s, const char *p, const char **pp)
+{
+ if (!s)
+ return 0;
+
+ while (*p) {
+ if (*s++ != *p++)
+ return 0;
+ }
+ if (pp)
+ *pp = s;
+ return 1;
+}
+
/** \brief \c NULL resistant strcmp.
* \param[in] a the first string.
* \param[in] b the second string.
M_FORMAT_MAKEPRINT = (1 << 2), /* make sure that all chars are printable */
M_FORMAT_OPTIONAL = (1 << 3),
M_FORMAT_STAT_FILE = (1 << 4), /* used by mutt_attach_fmt */
- M_FORMAT_ARROWCURSOR = (1 << 5), /* reserve space for arrow_cursor */
- M_FORMAT_INDEX = (1 << 6) /* this is a main index entry */
+ M_FORMAT_INDEX = (1 << 6), /* this is a main index entry */
} format_flag;
typedef const char *