platform.h File Reference

platform/compiler specific stuff. More...

#include <hugin_shared.h>
#include <math.h>
#include <string>

Include dependency graph for platform.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  hugin_utils

Functions

template<class str>
str quoteStringInternal (const str &arg, const str &quotechar, const str &replacements)
 utility function; escapes characters in replacements with quotechar.
template<class str>
str quoteString (const str &arg)
 Try to escape special chars on windows and linux.
template<class str>
str quoteStringShell (const str &arg)
 Try to escape special chars in a string used by a unix type shell.
template<class str>
str escapeStringMake (const str &arg)
 Escape dangerous chars in makefile strings/filenames (space),#,=.
template<class str>
str quoteFilename (const str &arg)
 Quote a filename, so that it is surrounded by "".


Detailed Description

platform/compiler specific stuff.

Author:
Pablo d'Angelo <pablo.dangelo@web.de>
$Id$

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition in file platform.h.


Function Documentation

template<class str>
str escapeStringMake const str &  arg  ) 
 

Escape dangerous chars in makefile strings/filenames (space),#,=.

Definition at line 154 of file platform.h.

References hugin_utils::quoteStringInternal().

template<class str>
str quoteFilename const str &  arg  ) 
 

Quote a filename, so that it is surrounded by "".

I don't know the escape char for windows

Definition at line 169 of file platform.h.

References hugin_utils::quoteStringInternal().

Referenced by AutoPanoKolor::automatch(), and AutoPanoSift::automatch().

template<class str>
str quoteString const str &  arg  ) 
 

Try to escape special chars on windows and linux.

: I'm quite sure that this routine doesn't replace some important shell chars I don't know of. This could lead to nasty behaviour and maybe even security holes.

Definition at line 117 of file platform.h.

References hugin_utils::quoteStringInternal().

template<class str>
str quoteStringInternal const str &  arg,
const str &  quotechar,
const str &  replacements
 

utility function; escapes characters in replacements with quotechar.

Definition at line 65 of file platform.h.

Referenced by hugin_utils::escapeStringMake(), hugin_utils::quoteFilename(), hugin_utils::quoteString(), and hugin_utils::quoteStringShell().

template<class str>
str quoteStringShell const str &  arg  ) 
 

Try to escape special chars in a string used by a unix type shell.

: I'm quite sure that this routine doesn't replace some important shell chars I don't know of. This could lead to nasty behaviour and maybe even security holes.

Note that : and = are not special shell charaters but they also should be escaped because they causes problems with gnumake.

Definition at line 139 of file platform.h.

References hugin_utils::quoteStringInternal().


Generated on Wed Jul 16 01:25:40 2014 for Hugintrunk by  doxygen 1.3.9.1