X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fheaders%2Fdirtree_op.h;h=77f16f9b3cb4280eda562c97dd7e8552692ad3c5;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=c15498295a1598a0fbfdecbba054aff281466211;hpb=301048b51990573e58a30dc4a5bb4ec285cad554;p=ossec-hids.git diff --git a/src/headers/dirtree_op.h b/src/headers/dirtree_op.h old mode 100755 new mode 100644 index c154982..77f16f9 --- a/src/headers/dirtree_op.h +++ b/src/headers/dirtree_op.h @@ -1,5 +1,3 @@ -/* @(#) $Id$ */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -7,40 +5,33 @@ * and/or modify it under the terms of the GNU General Public * License (version 2) as published by the FSF - Free Software * Foundation. - * - * License details at the LICENSE file included with OSSEC or - * online at: http://www.ossec.net/en/licensing.html */ - + /* Common API for dealing with directory trees */ - #ifndef _OS_DIRTREE #define _OS_DIRTREE -typedef struct _OSTreeNode -{ +typedef struct _OSDirTree OSDirTree; + +typedef struct _OSTreeNode { struct _OSTreeNode *next; - void *child; - + OSDirTree *child; + char *value; void *data; -}OSTreeNode; - +} OSTreeNode; -typedef struct _OSDirTree -{ +struct _OSDirTree { OSTreeNode *first_node; OSTreeNode *last_node; -}OSDirTree; - +}; -OSDirTree *OSDirTree_Create(); -void OSDirTree_AddToTree(OSDirTree *tree, char *str, void *data, char sep); -void *OSDirTree_SearchTree(OSDirTree *tree, char *str, char sep); - +OSDirTree *OSDirTree_Create(void); +void OSDirTree_AddToTree(OSDirTree *tree, const char *str, void *data, char sep) __attribute__((nonnull(1, 2))); +void *OSDirTree_SearchTree(const OSDirTree *tree, const char *str, char sep) __attribute__((nonnull)); +OSTreeNode *OSDirTree_GetFirstNode(OSDirTree *tree) __attribute__((nonnull)); -#endif +#endif /* _OS_DIRTREE */ -/* EOF */