/usr/lib/emboss/include/ajtree.h is in emboss-lib 6.3.1-6ubuntu3.
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 | #ifdef __cplusplus
extern "C"
{
#endif
#ifndef ajtree_h
#define ajtree_h
#include "ajdefine.h"
#include "ajlist.h"
enum AjETreeType {ajETreeAny, ajETreeStr, ajETreeSpecial};
#define AjPTreeNode AjOTreeNode*
/* @data AjPTree **************************************************************
**
** Tree data object. Trees are simple linked nodes with back pointers.
**
** Trees can hold any data type. Special functions are available for trees
** of AjPStr values. In general, these functions are the same. Many are
** provided for ease of use to save remembering which calls need special cases.
**
** At the top level, a tree has a list of named nodes and a pointer to the
** top node in the tree.
**
** @new ajTreeNew Creates a new general tree.
** @new ajTreestrNew Creates a new AjPStr tree.
**
** @attr Right [struct AjSTree*] Next tree node
** @attr Left [struct AjSTree*] Previous tree node
** @attr Up [struct AjSTree*] Parent tree node
** @attr Down [struct AjSTree*] First child tree node
** @attr Name [AjPStr] Name string
** @attr Data [void*] Data value
** @attr Freedata [(AjBool*)] Complex data free function
** @attr Type [AjEnum] Tree type (any, string, etc.)
** @attr Padding [char[4]] Padding to alignment boundary
** @@
******************************************************************************/
typedef struct AjSTree
{
struct AjSTree* Right;
struct AjSTree* Left;
struct AjSTree* Up;
struct AjSTree* Down;
AjPStr Name;
void* Data;
AjBool (*Freedata)(void** data);
AjEnum Type;
char Padding[4];
} AjOTree;
#define AjPTree AjOTree*
/*
** Prototype definitions
*/
AjBool ajTreeAddData(AjPTree thys, const AjPStr name, void* data);
AjPTree ajTreeAddNode(AjPTree thys);
AjPTree ajTreeAddSubNode(AjPTree thys);
AjPTree ajTreeCopy(const AjPTree thys);
void ajTreeDel(AjPTree* pthis);
void ajTreeExit(void);
void ajTreeFree(AjPTree* pthis);
AjPTree ajTreeFollow(const AjPTree thys, const AjPTree parent);
ajuint ajTreeLength(const AjPTree thys);
void ajTreeMap(AjPTree thys, void apply(void** x, void* cl), void* cl);
AjPTree ajTreeNew(void);
AjPTree ajTreeNewNewick(const AjPStr newick);
AjBool ajTreestrAddData(AjPTree thys, const AjPStr name, AjPStr data);
AjPTree ajTreestrCopy(const AjPTree thys);
void ajTreestrDel(AjPTree* pthis);
void ajTreestrFree(AjPTree* pthis);
ajuint ajTreestrLength(const AjPTree thys);
void ajTreestrMap(AjPTree thys, void apply(AjPStr* x, void* cl), void* cl);
AjPTree ajTreestrNew(void);
ajuint ajTreestrToArray(const AjPTree thys, AjPStr** array);
ajuint ajTreeToArray(const AjPTree thys, void*** array);
void ajTreeToNewick(const AjPTree thys, AjPStr* Pnewick);
void ajTreeTrace(const AjPTree thys);
void ajTreestrTrace(const AjPTree thys);
AjPTree ajTreeDown(const AjPTree thys);
AjPTree ajTreeNext(const AjPTree thys);
AjPTree ajTreePrev(const AjPTree thys);
AjPTree ajTreeUp(const AjPTree thys);
void ajTreeDummyFunction(void);
/*
** End of prototype definitions
*/
#endif
#ifdef __cplusplus
}
#endif
|