/********************************************************************** * * gsdltools.h -- * A component of the Greenstone digital library software * from the New Zealand Digital Library Project at the * University of Waikato, New Zealand. * * Copyright (C) 1999 The New Zealand Digital Library Project * * This program 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 program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: gsdltools.h 1279 2000-07-12 22:21:53Z sjboddie $ * *********************************************************************/ #ifndef GSDLTOOLS_H #define GSDLTOOLS_H // don't actually use this but some windows // versions of STL complain about use of // bool keyword without it #include "text_t.h" // returns true if machine is little endian bool littleEndian(); // escapes '\' and '_' characters with '\' // note that single '\' characters occurring // naturally within text (or filenames!!) will // be removed by the dm macro language text_t dm_safe (const text_t &instring); // gsdl_system spawns a completely separate program (i.e. the calling // program continues and terminates normally). Arguments containing special // characters (e.g. '&') should be quoted with "" // on unix systems youcan get the same effext as this function by doing a // system call and putting the spawned process in the background // (e.g. system (funcname options &); #if defined (__WIN32__) void gsdl_system (char *cmd, ostream &logout); #endif #endif