OpenDNSSEC-enforcer  1.3.16
string_util2.h
Go to the documentation of this file.
1 /*
2  * $Id: string_util2.h 4141 2010-10-25 15:26:40Z sion $
3  *
4  * Copyright (c) 2008-2009 Nominet UK. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
29 #ifndef KSM_STRING_UTIL2_H
30 #define KSM_STRING_UTIL2_H
31 
32 /*+
33  * Filename: string_util2.h
34  *
35  * Description:
36  * Additional string function definitions.
37 -*/
38 
39 #include <ksm/system_includes.h>
40 #include <ksm/memory.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* Structure definition for StrKeywordSearch function */
47 
48 typedef struct {
49  const char* string;
50  int value;
52 
53 /* Function definitions */
54 
55 void StrAppend(char** str1, const char* str2);
56 void StrArglistAdd(char*** argv, const char* string);
57 void StrArglistFree(char*** argv);
58 char** StrArglistCreate(const char* string);
59 int StrKeywordSearch(const char* search, STR_KEYWORD_ELEMENT* keywords, int* value);
60 int StrStrtol(const char* string, long* value);
61 int StrStrtoul(const char* string, unsigned long* value);
62 int StrStrtoi(const char* string, int* value);
63 int StrStrtoui(const char* string, unsigned int* value);
64 int StrIsDigits(const char* string);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* KSM_STRING_UTIL2_H */
int StrIsDigits(const char *string)
Definition: string_util2.c:590
int StrStrtol(const char *string, long *value)
Definition: string_util2.c:389
int StrStrtoui(const char *string, unsigned int *value)
Definition: string_util2.c:551
void StrArglistFree(char ***argv)
Definition: string_util2.c:199
const char * string
Definition: string_util2.h:49
void StrAppend(char **str1, const char *str2)
Definition: string_util2.c:78
int StrStrtoi(const char *string, int *value)
Definition: string_util2.c:508
int StrKeywordSearch(const char *search, STR_KEYWORD_ELEMENT *keywords, int *value)
Definition: string_util2.c:321
void StrArglistAdd(char ***argv, const char *string)
Definition: string_util2.c:144
int StrStrtoul(const char *string, unsigned long *value)
Definition: string_util2.c:449
char ** StrArglistCreate(const char *string)
Definition: string_util2.c:240