X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fheaders%2Fdirtree_op.h;fp=src%2Fheaders%2Fdirtree_op.h;h=77f16f9b3cb4280eda562c97dd7e8552692ad3c5;hp=7563a79da555f80033061cd2b62f1e1a804c4657;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/headers/dirtree_op.h b/src/headers/dirtree_op.h old mode 100755 new mode 100644 index 7563a79..77f16f9 --- a/src/headers/dirtree_op.h +++ b/src/headers/dirtree_op.h @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/headers/dirtree_op.h, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * @@ -8,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 */