dns_isspace() and dns_toupper() are all functions operating upon ASCII
characters. So lets move them into ascii.hh and keep them together with
dns_tolower().
*/
#pragma once
+inline bool dns_isspace(char c)
+{
+ return c==' ' || c=='\t' || c=='\r' || c=='\n';
+}
+
+inline unsigned char dns_toupper(unsigned char c)
+{
+ if(c>='a' && c<='z')
+ c+='A'-'a';
+ return c;
+}
+
inline unsigned char dns_tolower(unsigned char c)
{
if(c>='A' && c<='Z')
return ret;
}
-
-inline bool dns_isspace(char c)
-{
- return c==' ' || c=='\t' || c=='\r' || c=='\n';
-}
-
-inline unsigned char dns_toupper(unsigned char c)
-{
- if(c>='a' && c<='z')
- c+='A'-'a';
- return c;
-}
-
inline const string toLower(const string &upper)
{
string reply(upper);
#include "config.h"
#endif
#include "rcpgenerator.hh"
+#include "ascii.hh"
#include "dnsparser.hh"
#include "misc.hh"
#include "utility.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include "ascii.hh"
#include "dnsparser.hh"
#include "sstuff.hh"
#include "misc.hh"