/usr/include/wombat/strutils.h is in libmama-dev 2.2.2.1-11.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | /* $Id$
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Technologies, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef _WOMBAT_STRUTILS_H
#define _WOMBAT_STRUTILS_H
#include <wombat/wincompat.h>
#if defined(__cplusplus)
extern "C" {
#endif
typedef unsigned long int w_u32_t;
typedef long int w_i32_t;
typedef float w_f32_t;
typedef double w_f64_t;
typedef unsigned long long int w_u64_t;
typedef long long int w_i64_t;
COMMONExpDLL
int wmFastCopyAndShiftStr (
char** result,
size_t* maxLen,
const char* value);
COMMONExpDLL
int wmFastCopyAndShiftChar (
char** result,
size_t* maxLen,
char value);
COMMONExpDLL
int wmFastPrintAndShiftF64 (
char** result,
size_t* maxLen,
w_f64_t value,
size_t places);
COMMONExpDLL
size_t wmStrSizeCpy (
char* dst,
const char* src,
size_t siz);
COMMONExpDLL
int wmFastPrintU32 (
char* result,
size_t maxLen,
w_u32_t value,
size_t minWidth);
COMMONExpDLL
int wmFastPrintI32 (
char* result,
size_t maxLen,
w_i32_t value,
size_t minWidth);
COMMONExpDLL
int wmFastPrintU64 (
char* result,
size_t maxLen,
w_u64_t value,
size_t minWidth);
COMMONExpDLL
int wmFastPrintI64 (
char* result,
size_t maxLen,
w_i64_t value,
size_t minWidth);
COMMONExpDLL
int wmFastPrintF32 (
char* result,
size_t maxLen,
w_f32_t value,
size_t decimalPlaces);
COMMONExpDLL
int wmFastPrintF64 (
char* result,
size_t maxLen,
w_f64_t value,
size_t decimalPlaces);
/*
* change all characters in a string to lowercase
*/
COMMONExpDLL
char* toLowerCase(char* s);
/*
* Allocate a sufficiently large string and print into it
*/
COMMONExpDLL
char* printfAlloc(const char *fmt, ...);
/*
* Similar to standard strlen(), but will return 0 for s=NULL,
* instead of crashing
*/
COMMONExpDLL
int strlenEx(const char* s);
/*
* concatenate two strings, allocating a sufficient amount of memory
*/
COMMONExpDLL
int strcatAlloc(char** s, const char* ct);
/**
* convert string (e.g. "true", "false", "yes, "no", etc) to boolean
* Return zero for the falsies, non-zero otherwise
*/
COMMONExpDLL
int strtobool(const char* s);
#if defined(__cplusplus)
}
#endif
#endif /* _WOMBAT_STRUTILS_H */
|