Blame winpr/libwinpr/utils/trio/strio.h

Packit 1fb8d4
/*************************************************************************
Packit 1fb8d4
 *
Packit 1fb8d4
 * $Id: strio.h,v 1.11 2001/12/27 17:29:20 breese Exp $
Packit 1fb8d4
 *
Packit 1fb8d4
 * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
Packit 1fb8d4
 *
Packit 1fb8d4
 * Permission to use, copy, modify, and distribute this software for any
Packit 1fb8d4
 * purpose with or without fee is hereby granted, provided that the above
Packit 1fb8d4
 * copyright notice and this permission notice appear in all copies.
Packit 1fb8d4
 *
Packit 1fb8d4
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
Packit 1fb8d4
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
Packit 1fb8d4
 * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
Packit 1fb8d4
 * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
Packit 1fb8d4
 *
Packit 1fb8d4
 ************************************************************************
Packit 1fb8d4
 *
Packit 1fb8d4
 * This maintains backwards compatibility with the strio functions.
Packit 1fb8d4
 *
Packit 1fb8d4
 ************************************************************************/
Packit 1fb8d4
Packit 1fb8d4
#ifndef TRIO_STRIO_H
Packit 1fb8d4
#define TRIO_STRIO_H
Packit 1fb8d4
Packit 1fb8d4
#if !(defined(DEBUG) || defined(NDEBUG))
Packit Service 5a9772
#define NDEBUG
Packit 1fb8d4
#endif
Packit 1fb8d4
#include "triostr.h"
Packit 1fb8d4
Packit Service 5a9772
enum
Packit Service 5a9772
{
Packit Service 5a9772
	STRIO_HASH_NONE = TRIO_HASH_NONE,
Packit Service 5a9772
	STRIO_HASH_PLAIN = TRIO_HASH_PLAIN,
Packit Service 5a9772
	STRIO_HASH_TWOSIGNED = TRIO_HASH_TWOSIGNED
Packit 1fb8d4
};
Packit 1fb8d4
Packit 1fb8d4
#define StrAlloc(n) trio_create(n)
Packit Service 5a9772
#define StrAppend(x, y) ((void)trio_append((x), (y)), (x))
Packit Service 5a9772
#define StrAppendMax(x, n, y) ((void)trio_append_max((x), (n), (y)), (x))
Packit Service 5a9772
#define StrContains(x, y) trio_contains((x), (y))
Packit Service 5a9772
#define StrCopy(x, y) ((void)trio_copy((x), (y)), (x))
Packit Service 5a9772
#define StrCopyMax(x, n, y) ((void)trio_copy_max((x), (n), (y)), (x))
Packit 1fb8d4
#define StrDuplicate(x) trio_duplicate(x)
Packit Service 5a9772
#define StrDuplicateMax(x, n) trio_duplicate((x), (n))
Packit Service 5a9772
#define StrEqual(x, y) trio_equal((x), (y))
Packit Service 5a9772
#define StrEqualCase(x, y) trio_equal_case((x), (y))
Packit Service 5a9772
#define StrEqualCaseMax(x, n, y) trio_equal_case_max((x), (n), (y))
Packit Service 5a9772
#define StrEqualLocale(x, y) trio_equal_locale((x), (y))
Packit Service 5a9772
#define StrEqualMax(x, n, y) trio_equal_max((x), (n), (y))
Packit 1fb8d4
#define StrError(n) trio_error(n)
Packit 1fb8d4
#define StrFree(x) trio_destroy(x)
Packit 1fb8d4
#define StrFormat trio_sprintf
Packit 1fb8d4
#define StrFormatAlloc trio_aprintf
Packit 1fb8d4
#define StrFormatAppendMax trio_snprintfcat
Packit Service 5a9772
#define StrFormatDateMax(x, n, y, t) trio_format_date_max((x), (n), (y), (t))
Packit 1fb8d4
#define StrFormatMax trio_snprintf
Packit Service 5a9772
#define StrHash(x, n) trio_hash((x), (n))
Packit Service 5a9772
#define StrIndex(x, y) trio_index((x), (y))
Packit Service 5a9772
#define StrIndexLast(x, y) trio_index_last((x), (y))
Packit 1fb8d4
#define StrLength(x) trio_length((x))
Packit Service 5a9772
#define StrMatch(x, y) trio_match((x), (y))
Packit Service 5a9772
#define StrMatchCase(x, y) trio_match_case((x), (y))
Packit 1fb8d4
#define StrScan trio_sscanf
Packit Service 5a9772
#define StrSpanFunction(x, f) trio_span_function((x), (f))
Packit Service 5a9772
#define StrSubstring(x, y) trio_substring((x), (y))
Packit Service 5a9772
#define StrSubstringMax(x, n, y) trio_substring_max((x), (n), (y))
Packit Service 5a9772
#define StrToDouble(x, y) trio_to_double((x), (y))
Packit Service 5a9772
#define StrToFloat(x, y) trio_to_float((x), (y))
Packit Service 5a9772
#define StrTokenize(x, y) trio_tokenize((x), (y))
Packit Service 5a9772
#define StrToLong(x, y, n) trio_to_long((x), (y), (n))
Packit Service 5a9772
#define StrToUnsignedLong(x, y, n) trio_to_unsigned_long((x), (n), (y))
Packit 1fb8d4
#define StrToUpper(x) trio_upper(x)
Packit 1fb8d4
Packit 1fb8d4
#endif /* TRIO_STRIO_H */