Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Util.h

Go to the documentation of this file.
00001 /*
00002  *  CUnit - A Unit testing framework library for C.
00003  *  Copyright (C) 2001  Anil Kumar
00004  *  Copyright (C) 2004  Anil Kumar, Jerry St.Clair
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Library General Public
00008  *  License as published by the Free Software Foundation; either
00009  *  version 2 of the License, or (at your option) any later version.
00010  *
00011  *  This library is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *  Library General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Library General Public
00017  *  License along with this library; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  *  Contains Type Definitions for some generic functions used across
00023  *  CUnit project files.
00024  *
00025  *  Created By     : Anil Kumar on 13/Oct/2001
00026  *  Last Modified  : 13/Oct/2001
00027  *  Comment        : Moved some of the generic functions declarations
00028  *                   from other files to this one so as to use the
00029  *                   functions consitently. This file is not included
00030  *                   in the distribution headers because it is used
00031  *                   internally by CUnit.
00032  *  EMail          : aksaharan@yahoo.com
00033  *
00034  *  Last Modified  : 20-Jul-2004 (JDS)
00035  *  Comment        : New interface, support for deprecated version 1 names.
00036  *  EMail          : jds2@users.sourceforge.net
00037  *
00038  *  Modified       : 5-Sep-2004 (JDS)
00039  *  Comment        : Added internal test interface.
00040  *  EMail          : jds2@users.sourceforge.net
00041  */
00042 
00050 #ifndef _CUNIT_UTIL_H
00051 #define _CUNIT_UTIL_H
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00058 #define CUNIT_MAX_STRING_LENGTH 1024
00059 
00060 #define CUNIT_MAX_ENTITY_LEN 5
00061 
00062 int CU_translate_special_characters(const char* szSrc, char* szDest, int maxlen);
00063 int CU_compare_strings(const char* szSrc, const char* szDest);
00064 
00065 void CU_trim_left(char* szString);
00066 void CU_trim_right(char* szString);
00067 void CU_trim(char* szString);
00068 
00069 #ifdef CUNIT_BUILD_TESTS
00070 void test_cunit_Util(void);
00071 #endif
00072 
00073 #ifdef __cplusplus
00074 }
00075 #endif
00076 
00077 #ifdef USE_DEPRECATED_CUNIT_NAMES
00078 
00079 #define translate_special_characters(src, dest, len) CU_translate_special_characters(src, dest, len)
00080 
00081 #define compare_strings(src, dest) CU_compare_strings(src, dest)
00082 
00084 #define trim_left(str) CU_trim_left(str)
00085 
00086 #define trim_right(str) CU_trim_right(str)
00087 
00088 #define trim(str) CU_trim(str)
00089 
00090 #endif  /* USE_DEPRECATED_CUNIT_NAMES */
00091 
00092 #endif /* _CUNIT_UTIL_H */
00093 

Generated on Thu Apr 28 12:36:09 2005 for CUnit by  doxygen 1.3.9.1