-dnl ./aclocal.m4 generated automatically by aclocal 1.4-p5
+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
-<?xml version="1.0"?>
+<?xml version = '1.0'?>
<kdevelop>
- <general>
- <author>Gerd v. Egidy</author>
- <email>info@intra2net.com</email>
- <version>0.1</version>
- <projectmanagement>KDevAutoProject</projectmanagement>
- <primarylanguage>C++</primarylanguage>
- <keywords>
- <keyword>C++</keyword>
- <keyword>Code</keyword>
- </keywords>
- </general>
- <kdevautoproject>
<general>
- <activetarget>src/libi2ncommon</activetarget>
- <useconfiguration>debug</useconfiguration>
+ <author>Gerd v. Egidy</author>
+ <email>info@intra2net.com</email>
+ <version>0.1</version>
+ <projectmanagement>KDevAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ </keywords>
</general>
- <run>
- <mainprogram>src/libi2ncommon</mainprogram>
- <terminal>true</terminal>
- </run>
+ <kdevautoproject>
+ <general>
+ <activetarget>src/libi2ncommon</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>src/libi2ncommon</mainprogram>
+ <terminal>true</terminal>
+ <directoryradio>executable</directoryradio>
+ </run>
<configurations>
<optimized>
<builddir>optimized</builddir>
<cxxflags>-O0 -g3</cxxflags>
</debug>
</configurations>
- </kdevautoproject>
- <kdevdoctreeview>
+ <make>
+ <envvars>
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </envvars>
+ </make>
+ </kdevautoproject>
+ <kdevdoctreeview>
<ignoretocs>
<toc>ada</toc>
<toc>ada_bugs_gcc</toc>
<ignoredoxygen>
<toc>KDE Libraries (Doxygen)</toc>
</ignoredoxygen>
- </kdevdoctreeview>
- <kdevfilecreate>
- <useglobaltypes>
- <type ext="cpp"/>
- <type ext="h"/>
- </useglobaltypes>
- </kdevfilecreate>
- <kdevfileview>
+ </kdevdoctreeview>
+ <kdevfilecreate>
+ <useglobaltypes>
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevfileview>
<groups>
<group pattern="*.h" name="Header files" />
<group pattern="*.cpp" name="Source files" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
</groups>
- </kdevfileview>
+ <tree>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ </tree>
+ </kdevfileview>
+ <kdevcppsupport>
+ <references/>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>true</automaticCodeCompletion>
+ <automaticArgumentsHint>true</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ </codecompletion>
+ </kdevcppsupport>
</kdevelop>
# the library search path.
lib_LTLIBRARIES = libi2ncommon.la
-include_HEADERS = escape.hxx insocketstream.hxx oftmpstream.hxx pipestream.hxx filefunc.hxx stringfunc.hxx timefunc.hxx ipfunc.hxx
-libi2ncommon_la_SOURCES = oftmpstream.cpp escape.cpp ipfunc.cpp timefunc.cpp filefunc.cpp stringfunc.cpp
+include_HEADERS = insocketstream.hxx oftmpstream.hxx pipestream.hxx filefunc.hxx stringfunc.hxx timefunc.hxx ipfunc.hxx
+libi2ncommon_la_SOURCES = oftmpstream.cpp ipfunc.cpp timefunc.cpp filefunc.cpp stringfunc.cpp
# Note: If you specify a:b:c as the version in the next line,
# the library that is made has version (a-c).c.b. In this
+++ /dev/null
-/***************************************************************************
- escape.cpp - escaping of strings
- -------------------
- begin : Sun Nov 14 1999
- copyright : (C) 1999 by Intra2net AG
- email : info@intra2net.com
- ***************************************************************************/
-
-#include <string>
-#include <iostream>
-#include <stdexcept>
-
-using namespace std;
-
-string escape(const string &s)
-{
- string out(s);
- string::size_type p;
-
- p=0;
- while ((p=out.find_first_of("\"\\",p))!=out.npos)
- {
- out.insert(p,"\\");
- p+=2;
- }
-
- p=0;
- while ((p=out.find_first_of("\r",p))!=out.npos)
- {
- out.replace(p,1,"\\r");
- p+=2;
- }
-
- p=0;
- while ((p=out.find_first_of("\n",p))!=out.npos)
- {
- out.replace(p,1,"\\n");
- p+=2;
- }
-
- out='"'+out+'"';
-
- return out;
-}
-
-string descape(const string &s, int startpos, int &endpos)
-{
- string out;
-
- if (s.at(startpos) != '"')
- throw out_of_range("value not type escaped string");
-
- out=s.substr(startpos+1);
- string::size_type p=0;
-
- // search for the end of the string
- while((p=out.find("\"",p))!=out.npos)
- {
- int e=p-1;
- bool escaped=false;
-
- // the " might be escaped with a backslash
- while(e>=0 && out.at(e)=='\\')
- {
- if (escaped == false)
- escaped=true;
- else
- escaped=false;
-
- e--;
- }
-
- if (escaped==false)
- break;
- else
- p++;
- }
-
- // we now have the end of the string
- out=out.substr(0,p);
-
- // tell calling prog about the endposition
- endpos=startpos+p+1;
-
- // descape all \ stuff inside the string now
- p=0;
- while((p=out.find_first_of("\\",p))!=out.npos)
- {
- switch(out.at(p+1))
- {
- case 'r':
- out.replace(p,2,"\r");
- break;
- case 'n':
- out.replace(p,2,"\n");
- break;
- default:
- out.erase(p,1);
- }
- p++;
- }
-
- return out;
-}
-
-string escape_shellarg(const string &input)
-{
- if (!input.size())
- return "";
-
- string output = "'";
- string::const_iterator it, it_end = input.end();
- for (it = input.begin(); it != it_end; it++) {
- if ((*it) == '\'')
- output += "'\\'";
-
- output += *it;
- }
-
- output += "'";
- return output;
-}
+++ /dev/null
-/***************************************************************************
- escape.hxx - escaping of strings
- -------------------
- begin : Sun Nov 14 1999
- copyright : (C) 1999 by Intra2net AG
- email : info@intra2net.com
- ***************************************************************************/
-
-#ifndef __ESCAPE_HXX
-#define __ESCAPE_HXX
-
-#include <string>
-
-std::string escape(const std::string &s);
-
-std::string descape(const std::string &s, int startpos, int &endpos);
-std::string descape(const std::string &s)
-{
- int endpos;
- return descape(s,0,endpos);
-}
-
-std::string escape_shellarg(const std::string &input);
-
-#endif
return out.str();
}
+string escape(const string &s)
+{
+ string out(s);
+ string::size_type p;
+
+ p=0;
+ while ((p=out.find_first_of("\"\\",p))!=out.npos)
+ {
+ out.insert(p,"\\");
+ p+=2;
+ }
+
+ p=0;
+ while ((p=out.find_first_of("\r",p))!=out.npos)
+ {
+ out.replace(p,1,"\\r");
+ p+=2;
+ }
+
+ p=0;
+ while ((p=out.find_first_of("\n",p))!=out.npos)
+ {
+ out.replace(p,1,"\\n");
+ p+=2;
+ }
+
+ out='"'+out+'"';
+
+ return out;
+}
+
+string descape(const string &s, int startpos, int &endpos)
+{
+ string out;
+
+ if (s.at(startpos) != '"')
+ throw out_of_range("value not type escaped string");
+
+ out=s.substr(startpos+1);
+ string::size_type p=0;
+
+ // search for the end of the string
+ while((p=out.find("\"",p))!=out.npos)
+ {
+ int e=p-1;
+ bool escaped=false;
+
+ // the " might be escaped with a backslash
+ while(e>=0 && out.at(e)=='\\')
+ {
+ if (escaped == false)
+ escaped=true;
+ else
+ escaped=false;
+
+ e--;
+ }
+
+ if (escaped==false)
+ break;
+ else
+ p++;
+ }
+
+ // we now have the end of the string
+ out=out.substr(0,p);
+
+ // tell calling prog about the endposition
+ endpos=startpos+p+1;
+
+ // descape all \ stuff inside the string now
+ p=0;
+ while((p=out.find_first_of("\\",p))!=out.npos)
+ {
+ switch(out.at(p+1))
+ {
+ case 'r':
+ out.replace(p,2,"\r");
+ break;
+ case 'n':
+ out.replace(p,2,"\n");
+ break;
+ default:
+ out.erase(p,1);
+ }
+ p++;
+ }
+
+ return out;
+}
+string escape_shellarg(const string &input)
+{
+ if (!input.size())
+ return "";
+
+ string output = "'";
+ string::const_iterator it, it_end = input.end();
+ for (it = input.begin(); it != it_end; it++) {
+ if ((*it) == '\'')
+ output += "'\\'";
+
+ output += *it;
+ }
+
+ output += "'";
+ return output;
+}
std::string utf8_to_iso(const std::string& utf8string);
std::string iso_to_html(const std::string& isostring);
+std::string escape(const std::string &s);
+
+std::string descape(const std::string &s, int startpos, int &endpos);
+std::string descape(const std::string &s)
+{
+ int endpos;
+ return descape(s,0,endpos);
+}
+
+std::string escape_shellarg(const std::string &input);
+
#endif