- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.1/DyLP/src/DylpStdLib/dylib_strrtns.h

Go to the documentation of this file.

    00001 #ifndef _DYLIB_STRRTNS_H
    00002 #define _DYLIB_STRRTNS_H
    00003
    00004 /*
    00005   This file is part of the support library for the Dylp LP distribution.
    00006
    00007         Copyright (C) 2005 -- 2007 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 code is licensed under the terms of the Common Public License (CPL).
    00015 */
    00016
    00017 #include "dylib_std.h"
    00018
    00019 /*
    00020   This file contains external definitions for the routines in the string
    00021   package.
    00022
    00023   @(#)strrtns.h 1.3     06/22/04
    00024   svn/cvs: $Id: dylib_strrtns.h 148 2007-06-09 03:15:30Z lou $
    00025 */
    00026
    00027 extern int cistrcmp(const char *str1, const char *str2),        /* strrtns.c */
    00028            cimstrcmp(const char *str1, const char *str2),
    00029            mstrcmp(const char *str1, const char *str2) ;
    00030 extern char *strsave(char *original) ;
    00031
    00032 extern const char *stralloc(const char *string) ;               /* littab.c */
    00033 extern bool strfree(const char *string) ;
    00034
    00035 /*
    00036   Some macros to hide the memory allocation functions. Note that the
    00037   debugging versions of these macros use outfmt from the io library
    00038   and assume the existence of a string, rtnnme (typically the name of
    00039   the current subroutine) that's used to identify the origin of the
    00040   message.
    00041 */
    00042
    00043 #if (MALLOC_DEBUG == 2)
    00044
    00045 #include "dylib_io.h"
    00046
    00047 void *zz_ptr_zz ;
    00048 ioid  zz_chn_zz ;
    00049
    00050 #define STRALLOC(zz_sptr_zz) \
    00051   ( zz_ptr_zz = (void *) stralloc(zz_sptr_zz), \
    00052     outfmt(zz_chn_zz,FALSE,":stralloc: %#08x (%s) in %s.\n", \
    00053            zz_ptr_zz,zz_ptr_zz,rtnnme), \
    00054     (char *) zz_ptr_zz )
    00055
    00056 #define STRFREE(zz_fptr_zz) \
    00057   ( outfmt(zz_chn_zz,FALSE,":strfree: %#08x (%s) in %s.\n", \
    00058            zz_fptr_zz,zz_fptr_zz,rtnnme), \
    00059     strfree(zz_fptr_zz) )
    00060
    00061 #else
    00062
    00063 #define STRALLOC(zz_sptr_zz) stralloc(zz_sptr_zz)
    00064
    00065 #define STRFREE(zz_fptr_zz) strfree(zz_fptr_zz)
    00066
    00067 #endif
    00068
    00069
    00070 #endif /* _DYLIB_STRRTNS_H */