1 |
|
---|
2 | /*
|
---|
3 | *@@sourcefile xstring.h:
|
---|
4 | * header file for xstring.c. See notes there.
|
---|
5 | *
|
---|
6 | * Note: Version numbering in this file relates to XWorkplace version
|
---|
7 | * numbering.
|
---|
8 | *
|
---|
9 | *@@include #define INCL_DOSDATETIME
|
---|
10 | *@@include #include <os2.h>
|
---|
11 | *@@include #include "xstring.h"
|
---|
12 | */
|
---|
13 |
|
---|
14 | /*
|
---|
15 | * Copyright (C) 1999-2000 Ulrich Mller.
|
---|
16 | * This file is part of the XWorkplace source package.
|
---|
17 | * XWorkplace is free software; you can redistribute it and/or modify
|
---|
18 | * it under the terms of the GNU General Public License as published
|
---|
19 | * by the Free Software Foundation, in version 2 as it comes in the
|
---|
20 | * "COPYING" file of the XWorkplace main distribution.
|
---|
21 | * This program is distributed in the hope that it will be useful,
|
---|
22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
24 | * GNU General Public License for more details.
|
---|
25 | */
|
---|
26 |
|
---|
27 | #if __cplusplus
|
---|
28 | extern "C" {
|
---|
29 | #endif
|
---|
30 |
|
---|
31 | #ifndef XSTRING_HEADER_INCLUDED
|
---|
32 | #define XSTRING_HEADER_INCLUDED
|
---|
33 |
|
---|
34 | /*
|
---|
35 | *@@ XSTR:
|
---|
36 | * string type for the strhx* functions.
|
---|
37 | * That's a simple pointer to a PSZ.
|
---|
38 | */
|
---|
39 |
|
---|
40 | typedef PSZ* XSTR;
|
---|
41 |
|
---|
42 | /*
|
---|
43 | *@@ xstrIsString:
|
---|
44 | * returns TRUE if psz contains something.
|
---|
45 | *
|
---|
46 | *@@added V0.9.6 (2000-10-16) [umoeller]
|
---|
47 | */
|
---|
48 |
|
---|
49 | #define xstrIsString(psz) ( (psz != 0) && (*(psz) != 0) )
|
---|
50 |
|
---|
51 | ULONG xstrcpy(XSTR ppszBuf,
|
---|
52 | const char *pszString);
|
---|
53 |
|
---|
54 | #ifdef __XWPMEMDEBUG__ // setup.h, helpers\memdebug.c
|
---|
55 | ULONG xstrcatDebug(XSTR ppszBuf,
|
---|
56 | const char *pszString,
|
---|
57 | const char *file,
|
---|
58 | unsigned long line,
|
---|
59 | const char *function);
|
---|
60 | #define xstrcat(a, b) xstrcatDebug((a), (b), __FILE__, __LINE__, __FUNCTION__)
|
---|
61 | #else
|
---|
62 | ULONG xstrcat(XSTR ppszBuf,
|
---|
63 | const char *pszString);
|
---|
64 | #endif
|
---|
65 |
|
---|
66 | #ifdef __XWPMEMDEBUG__ // setup.h, helpers\memdebug.c
|
---|
67 | ULONG xstrrplDebug(PSZ *ppszBuf,
|
---|
68 | ULONG ulOfs,
|
---|
69 | const char *pszSearch,
|
---|
70 | const char *pszReplace,
|
---|
71 | PULONG pulAfterOfs,
|
---|
72 | const char *file,
|
---|
73 | unsigned long line,
|
---|
74 | const char *function);
|
---|
75 | #define xstrrpl(a, b, c, d, e) xstrrplDebug((a), (b), (c), (d), (e), __FILE__, __LINE__, __FUNCTION__)
|
---|
76 | #else
|
---|
77 | ULONG xstrrpl(PSZ *ppszBuf,
|
---|
78 | ULONG ulOfs,
|
---|
79 | const char *pszSearch,
|
---|
80 | const char *pszReplace,
|
---|
81 | PULONG pulAfterOfs);
|
---|
82 | #endif
|
---|
83 |
|
---|
84 | PSZ xstrins(PSZ pszBuffer,
|
---|
85 | ULONG ulInsertOfs,
|
---|
86 | const char *pszInsert);
|
---|
87 |
|
---|
88 | #endif
|
---|
89 |
|
---|
90 | #if __cplusplus
|
---|
91 | }
|
---|
92 | #endif
|
---|
93 |
|
---|