/usr/include/proftpd
NameSizeModeActions
ascii.h26740644editdlrm
auth.h63810644editdlrm
base.h34970644editdlrm
bindings.h80270644editdlrm
buildstamp.h500644editdlrm
ccan-json.h36770644editdlrm
child.h15110644editdlrm
class.h30960644editdlrm
cmd.h44630644editdlrm
compat.h13240644editdlrm
conf.h39480644editdlrm
config.h366270644editdlrm
configdb.h58640644editdlrm
ctrls.h85240644editdlrm
data.h25820644editdlrm
default_paths.h30370644editdlrm
dirtree.h76480644editdlrm
display.h25140644editdlrm
encode.h37570644editdlrm
env.h19130644editdlrm
error.h188940644editdlrm
event.h35830644editdlrm
expr.h22090644editdlrm
feat.h13030644editdlrm
filter.h21130644editdlrm
fsio.h195280644editdlrm
ftp.h91960644editdlrm
glibc-glob.h72940644editdlrm
hanson-tpl.h45050644editdlrm
help.h12650644editdlrm
ident.h13340644editdlrm
inet.h53950644editdlrm
jot.h87360644editdlrm
json.h62820644editdlrm
lastlog.h16550644editdlrm
log.h68220644editdlrm
logfmt.h34440644editdlrm
memcache.h50560644editdlrm
mkhome.h15690644editdlrm
modules.h64740644editdlrm
mod_ctrls.h40580644editdlrm
mod_sftp.h109590644editdlrm
mod_tls.h64780644editdlrm
netacl.h25710644editdlrm
netaddr.h159990644editdlrm
netio.h81760644editdlrm
openbsd-blowfish.h29670644editdlrm
options.h85310644editdlrm
os.h73910644editdlrm
parser.h63510644editdlrm
pidfile.h13310644editdlrm
pool.h41380644editdlrm
pr-syslog.h35520644editdlrm
privs.h26130644editdlrm
proctitle.h16820644editdlrm
proftpd.h97270644editdlrm
random.h13250644editdlrm
redis.h159530644editdlrm
regexp.h37200644editdlrm
response.h31450644editdlrm
rlimit.h18730644editdlrm
scoreboard.h47600644editdlrm
session.h44300644editdlrm
sets.h19860644editdlrm
signals.h18790644editdlrm
stash.h21740644editdlrm
str.h57290644editdlrm
support.h44940644editdlrm
table.h118830644editdlrm
throttle.h12990644editdlrm
timers.h33700644editdlrm
trace.h24210644editdlrm
utf8.h14070644editdlrm
var.h44190644editdlrm
version.h16310644editdlrm
xferlog.h13740644editdlrm
Edit: /usr/include/proftpd/ccan-json.h (3677B)
/* Copyright (C) 2011 Joseph A. Adams (joeyadams3.14159@gmail.com) All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef CCAN_JSON_H #define CCAN_JSON_H #include #ifndef CCAN_JSON_MAX_DEPTH # define CCAN_JSON_MAX_DEPTH 16 #endif /* CCAN_JSON_MAX_DEPTH */ typedef enum { JSON_NULL, JSON_BOOL, JSON_STRING, JSON_NUMBER, JSON_ARRAY, JSON_OBJECT, } JsonTag; struct json_node_st { /* only if parent is an object or array (NULL otherwise) */ struct json_node_st *parent; struct json_node_st *prev, *next; /* only if parent is an object (NULL otherwise) */ char *key; /* Must be valid UTF-8. */ JsonTag tag; union { /* JSON_BOOL */ int bool_; /* JSON_STRING */ char *string_; /* Must be valid UTF-8. */ /* JSON_NUMBER */ double number_; /* JSON_ARRAY */ /* JSON_OBJECT */ struct { struct json_node_st *head, *tail; } children; }; }; typedef struct json_node_st JsonNode; /*** Encoding, decoding, and validation ***/ JsonNode *json_decode (const char *json); char *json_encode (const JsonNode *node); char *json_encode_string (const char *str); char *json_stringify (const JsonNode *node, const char *space); void json_delete (JsonNode *node); int json_validate (const char *json); /*** Lookup and traversal ***/ JsonNode *json_find_element (JsonNode *array, unsigned int index); JsonNode *json_find_member (JsonNode *object, const char *key); JsonNode *json_first_child (const JsonNode *node); #define json_foreach(i, object_or_array) \ for ((i) = json_first_child(object_or_array); \ (i) != NULL; \ (i) = (i)->next) /*** Construction and manipulation ***/ JsonNode *json_mknull(void); JsonNode *json_mkbool(int b); JsonNode *json_mkstring(const char *s); JsonNode *json_mknumber(double n); JsonNode *json_mkarray(void); JsonNode *json_mkobject(void); void json_append_element(JsonNode *array, JsonNode *element); void json_prepend_element(JsonNode *array, JsonNode *element); void json_append_member(JsonNode *object, const char *key, JsonNode *value); void json_prepend_member(JsonNode *object, const char *key, JsonNode *value); void json_remove_from_parent(JsonNode *node); /*** Error Handling ***/ void json_set_oom(void (*oom)(void)); /*** Debugging ***/ /* * Look for structure and encoding problems in a JsonNode or its descendents. * * If a problem is detected, return false, writing a description of the problem * to errmsg (unless errmsg is NULL). */ int json_check(const JsonNode *node, char errmsg[256]); #endif