mh_mail needs to lowercase contentypes

This commit is contained in:
dockes
2006-12-18 12:06:11 +00:00
parent 0e531b73a7
commit 8fe7cb37d3
4 changed files with 20 additions and 5 deletions
+10 -1
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: smallut.cpp,v 1.23 2006-12-15 12:40:02 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: smallut.cpp,v 1.24 2006-12-18 12:06:11 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -77,6 +77,15 @@ int stringicmp(const string & s1, const string& s2)
return size1 == size2 ? 0 : -1;
}
}
void stringtolower(string& io)
{
string::iterator it = io.begin();
string::iterator ite = io.end();
while (it != ite) {
*it = ::tolower(*it);
it++;
}
}
extern int stringisuffcmp(const string& s1, const string& s2)
{
+3 -2
View File
@@ -16,7 +16,7 @@
*/
#ifndef _SMALLUT_H_INCLUDED_
#define _SMALLUT_H_INCLUDED_
/* @(#$Id: smallut.h,v 1.23 2006-12-15 12:40:02 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: smallut.h,v 1.24 2006-12-18 12:06:11 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
#include <map>
@@ -27,10 +27,11 @@ using std::list;
using std::map;
#endif /* NO_NAMESPACES */
// Note these are all ascii routines
extern int stringicmp(const string& s1, const string& s2);
extern int stringlowercmp(const string& alreadylower, const string& s2);
extern int stringuppercmp(const string& alreadyupper, const string& s2);
extern void stringtolower(string& io);
// Is one string the end part of the other ?
extern int stringisuffcmp(const string& s1, const string& s2);