]> Pileus Git - ~andy/fetchmail/blob - trio/strio.h
Sign .xz; upload to sf.net; upload .xz to local site.
[~andy/fetchmail] / trio / strio.h
1 /*************************************************************************
2  *
3  * $Id: strio.h,v 1.11 2001/12/27 17:29:20 breese Exp $
4  *
5  * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13  * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14  * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15  *
16  ************************************************************************
17  *
18  * This maintains backwards compatibility with the strio functions.
19  *
20  ************************************************************************/
21
22 #ifndef TRIO_STRIO_H
23 #define TRIO_STRIO_H
24
25 #if !(defined(DEBUG) || defined(NDEBUG))
26 # define NDEBUG
27 #endif
28 #include "triostr.h"
29
30 enum {
31   STRIO_HASH_NONE = TRIO_HASH_NONE,
32   STRIO_HASH_PLAIN = TRIO_HASH_PLAIN,
33   STRIO_HASH_TWOSIGNED = TRIO_HASH_TWOSIGNED
34 };
35
36 #define StrAlloc(n) trio_create(n)
37 #define StrAppend(x,y) ((void)trio_append((x),(y)),(x))
38 #define StrAppendMax(x,n,y) ((void)trio_append_max((x),(n),(y)),(x))
39 #define StrContains(x,y) trio_contains((x),(y))
40 #define StrCopy(x,y) ((void)trio_copy((x),(y)),(x))
41 #define StrCopyMax(x,n,y) ((void)trio_copy_max((x),(n),(y)),(x))
42 #define StrDuplicate(x) trio_duplicate(x)
43 #define StrDuplicateMax(x,n) trio_duplicate((x),(n))
44 #define StrEqual(x,y) trio_equal((x),(y))
45 #define StrEqualCase(x,y) trio_equal_case((x),(y))
46 #define StrEqualCaseMax(x,n,y) trio_equal_case_max((x),(n),(y))
47 #define StrEqualLocale(x,y) trio_equal_locale((x),(y))
48 #define StrEqualMax(x,n,y) trio_equal_max((x),(n),(y))
49 #define StrError(n) trio_error(n)
50 #define StrFree(x) trio_destroy(x)
51 #define StrFormat trio_sprintf
52 #define StrFormatAlloc trio_aprintf
53 #define StrFormatAppendMax trio_snprintfcat
54 #define StrFormatDateMax(x,n,y,t) trio_format_date_max((x),(n),(y),(t))
55 #define StrFormatMax trio_snprintf
56 #define StrHash(x,n) trio_hash((x),(n))
57 #define StrIndex(x,y) trio_index((x),(y))
58 #define StrIndexLast(x,y) trio_index_last((x),(y))
59 #define StrLength(x) trio_length((x))
60 #define StrMatch(x,y) trio_match((x),(y))
61 #define StrMatchCase(x,y) trio_match_case((x),(y))
62 #define StrScan trio_sscanf
63 #define StrSpanFunction(x,f) trio_span_function((x),(f))
64 #define StrSubstring(x,y) trio_substring((x),(y))
65 #define StrSubstringMax(x,n,y) trio_substring_max((x),(n),(y))
66 #define StrToDouble(x,y) trio_to_double((x),(y))
67 #define StrToFloat(x,y) trio_to_float((x),(y))
68 #define StrTokenize(x,y) trio_tokenize((x),(y))
69 #define StrToLong(x,y,n) trio_to_long((x),(y),(n))
70 #define StrToUnsignedLong(x,y,n) trio_to_unsigned_long((x),(n),(y))
71 #define StrToUpper(x) trio_upper(x)
72
73 #endif /* TRIO_STRIO_H */