128, 128, 0
};
-/**
- * \brief copy a string into a buffer of a known size. abort if we exceed the limits
- * \param dest the targetbuffer
- * \param src the source string
- * \param n the size od dest
- * \returns the number of characters copied if dest is big enough, -n if not.
+/*
+ * copy a string into a buffer of a known size. abort if we exceed the limits
+ *
+ * dest the targetbuffer
+ * src the source string
+ * n the size od dest
+ *
+ * returns the number of characters copied if dest is big enough, -n if not.
*/
int safestrncpy(char *dest, const char *src, size_t n)
{
return strdup(line);
}
- result = (char*) malloc(strlen(UTF8_HEADER) + 4 + length * 2);
+ result = (char*) malloc(sizeof(UTF8_HEADER) + 4 + length * 2);
strncpy (result, UTF8_HEADER, strlen (UTF8_HEADER));
CtdlEncodeBase64(result + strlen(UTF8_HEADER), line, length, 0);
end = strlen (result);
* Determine whether the specified message number is contained within the
* specified sequence set.
*/
-int is_msg_in_sequence_set(char *mset, long msgnum) {
+int is_msg_in_sequence_set(const char *mset, long msgnum) {
int num_sets;
int s;
char setstr[128], lostr[128], histr[128];
* Determine whether the specified message number is contained within the specified set.
* Returns nonzero if the specified message number is in the specified message set string.
*/
-int is_msg_in_mset(char *mset, long msgnum) {
+int is_msg_in_mset(const char *mset, long msgnum) {
int num_sets;
int s;
char setstr[SIZ], lostr[SIZ], histr[SIZ]; /* was 1024 */
/*
- * \brief searches for a paternn within asearch string
- * \param search the string to search
- * \param patn the pattern to find in string
- * \returns position in string
+ * searches for a pattern within a search string
+ * returns position in string
*/
int pattern2(char *search, char *patn)
{
*/
char *Ctdl_Utf8StrCut(char *str, int maxlen)
{
- int n, m = 0;
+ int n = 0, m = 0;
char *aptr;
if (str == NULL)
}
}
+