* 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];
* Strip a boundarized substring out of a string (for example, remove
* parentheses and anything inside them).
*/
-void stripout(char *str, char leftboundary, char rightboundary) {
+int stripout(char *str, char leftboundary, char rightboundary) {
int a;
int lb = (-1);
int rb = (-1);
if ( (lb > 0) && (rb > lb) ) {
strcpy(&str[lb - 1], &str[rb + 1]);
+ return 1;
}
else if ( (lb == 0) && (rb > lb) ) {
strcpy(str, &str[rb + 1]);
+ return 1;
}
-
+ return 0;
}
* 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)
}
}
+