00001 #ifndef _DYLIB_STRRTNS_H 00002 #define _DYLIB_STRRTNS_H 00003 00004 /* 00005 This file is part of the support library for the OsiDylp LP distribution. 00006 00007 Copyright (C) 2005 Lou Hafer 00008 00009 School of Computing Science 00010 Simon Fraser University 00011 Burnaby, B.C., V5A 1S6, Canada 00012 lou@cs.sfu.ca 00013 00014 This program is free software; you can redistribute it and/or modify it 00015 under the terms of the GNU General Public License as published by the Free 00016 Software Foundation; either version 2 of the License, or (at your option) 00017 any later version. 00018 00019 This program is distributed in the hope that it will be useful, but WITHOUT 00020 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00021 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00022 more details. 00023 00024 You should have received a copy of the GNU General Public License along 00025 with this program; if not, write to the Free Software Foundation, Inc., 00026 51 Franklin St., Fifth Floor, Boston, MA 02110-1301 USA 00027 */ 00028 00029 #include "dylib_std.h" 00030 00031 /* 00032 This file contains external definitions for the routines in the string 00033 package. 00034 00035 @(#)strrtns.h 1.3 06/22/04 00036 svn/cvs: $Id: dylib_strrtns.h 71 2006-06-09 04:21:15Z andreasw $ 00037 */ 00038 00039 extern int cistrcmp(const char *str1, const char *str2), /* strrtns.c */ 00040 cimstrcmp(const char *str1, const char *str2), 00041 mstrcmp(const char *str1, const char *str2) ; 00042 extern char *strsave(char *original) ; 00043 00044 extern const char *stralloc(const char *string) ; /* littab.c */ 00045 extern bool strfree(const char *string) ; 00046 00047 /* 00048 Some macros to hide the memory allocation functions. Note that the 00049 debugging versions of these macros use outfmt from the io library 00050 and assume the existence of a string, rtnnme (typically the name of 00051 the current subroutine) that's used to identify the origin of the 00052 message. 00053 */ 00054 00055 #if (MALLOC_DEBUG == 2) 00056 00057 #include "dylib_io.h" 00058 00059 void *zz_ptr_zz ; 00060 ioid zz_chn_zz ; 00061 00062 #define STRALLOC(zz_sptr_zz) \ 00063 ( zz_ptr_zz = (void *) stralloc(zz_sptr_zz), \ 00064 outfmt(zz_chn_zz,FALSE,":stralloc: %#08x (%s) in %s.\n", \ 00065 zz_ptr_zz,zz_ptr_zz,rtnnme), \ 00066 (char *) zz_ptr_zz ) 00067 00068 #define STRFREE(zz_fptr_zz) \ 00069 ( outfmt(zz_chn_zz,FALSE,":strfree: %#08x (%s) in %s.\n", \ 00070 zz_fptr_zz,zz_fptr_zz,rtnnme), \ 00071 strfree(zz_fptr_zz) ) 00072 00073 #else 00074 00075 #define STRALLOC(zz_sptr_zz) stralloc(zz_sptr_zz) 00076 00077 #define STRFREE(zz_fptr_zz) strfree(zz_fptr_zz) 00078 00079 #endif 00080 00081 00082 #endif /* _DYLIB_STRRTNS_H */