DyLP
1.10.4
Toggle main menu visibility
Loading...
Searching...
No Matches
src
DylpStdLib
dylib_strrtns.h
Go to the documentation of this file.
1
#ifndef _DYLIB_STRRTNS_H
2
#define _DYLIB_STRRTNS_H
3
4
/*
5
This file is part of the support library for the Dylp LP distribution.
6
7
Copyright (C) 2005 -- 2007 Lou Hafer
8
9
School of Computing Science
10
Simon Fraser University
11
Burnaby, B.C., V5A 1S6, Canada
12
lou@cs.sfu.ca
13
14
This code is licensed under the terms of the Eclipse Public License (EPL).
15
*/
16
17
#include "
dylib_std.h
"
18
19
/*
20
This file contains external definitions for the routines in the string
21
package.
22
23
@(#)strrtns.h 1.3 06/22/04
24
svn/cvs: $Id: dylib_strrtns.h 407 2010-12-31 20:48:48Z lou $
25
*/
26
27
extern
int
cistrcmp
(
const
char
*str1,
const
char
*str2),
/* strrtns.c */
28
cimstrcmp
(
const
char
*str1,
const
char
*str2),
29
mstrcmp
(
const
char
*str1,
const
char
*str2) ;
30
extern
char
*
strsave
(
char
*original) ;
31
32
extern
const
char
*
stralloc
(
const
char
*
string
) ;
/* littab.c */
33
extern
bool
strfree
(
const
char
*
string
) ;
34
35
/*
36
Some macros to hide the memory allocation functions. Note that the
37
debugging versions of these macros use outfmt from the io library
38
and assume the existence of a string, rtnnme (typically the name of
39
the current subroutine) that's used to identify the origin of the
40
message.
41
*/
42
43
#if (MALLOC_DEBUG == 2)
44
45
#include "
dylib_io.h
"
46
47
const
void
*zz_cptr_zz ;
48
ioid
zz_chn_zz ;
49
50
#define STRALLOC(zz_sptr_zz) \
51
( zz_cptr_zz = (const void *) stralloc(zz_sptr_zz), \
52
dyio_outfmt(zz_chn_zz,FALSE,":stralloc: %#08x (%s) in %s.\n", \
53
zz_cptr_zz,zz_cptr_zz,rtnnme), \
54
zz_cptr_zz )
55
56
#define STRFREE(zz_fptr_zz) \
57
( dyio_outfmt(zz_chn_zz,FALSE,":strfree: %#08x (%s) in %s.\n", \
58
zz_fptr_zz,zz_fptr_zz,rtnnme), \
59
strfree(zz_fptr_zz) )
60
61
#else
62
63
#define STRALLOC(zz_sptr_zz) stralloc(zz_sptr_zz)
64
65
#define STRFREE(zz_fptr_zz) strfree(zz_fptr_zz)
66
67
#endif
68
69
70
#endif
/* _DYLIB_STRRTNS_H */
dylib_io.h
ioid
int ioid
Definition
dylib_io.h:39
dylib_std.h
cistrcmp
int cistrcmp(const char *str1, const char *str2)
strsave
char * strsave(char *original)
stralloc
const char * stralloc(const char *string)
cimstrcmp
int cimstrcmp(const char *str1, const char *str2)
strfree
bool strfree(const char *string)
mstrcmp
int mstrcmp(const char *str1, const char *str2)
Generated by
1.17.0