예제 #1
0
/*--------------------------------------------------------- */
void clish_shell__init_pwd(clish_shell_pwd_t *pwd)
{
	pwd->line = NULL;
	pwd->view = NULL;
	pwd->pargv = NULL;
	pwd->cmd = NULL;
	pwd->prefix = NULL;
	/* initialise the tree of vars */
	lub_bintree_init(&pwd->viewid,
		clish_var_bt_offset(),
		clish_var_bt_compare, clish_var_bt_getkey);
}
예제 #2
0
파일: context.c 프로젝트: rixrix/zafu
/*--------------------------------------------------------- 
 * PRIVATE META FUNCTIONS
 *--------------------------------------------------------- */
void
lub_heap_context_meta_init(void)
{
    static bool_t initialised = BOOL_FALSE;
    if(BOOL_FALSE == initialised)
    {
        lub_heap_leak_t *leak = lub_heap_leak_instance();
        initialised = BOOL_TRUE;

        /* initialise the context tree */
        lub_bintree_init(&leak->m_context_tree,
                         offsetof(lub_heap_context_t,bt_node),
                         lub_heap_context_compare,
                         lub_heap_context_getkey);
        lub_heap_leak_release(leak);
    }
}