-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///Users/avp/tmp/svn.20121212/LHPC/aff/trunk@103 65d2813f-f11f-0410-b17b-8647a28db151
- Loading branch information
avp
committed
Aug 18, 2007
1 parent
4cc8745
commit d4d7577
Showing
28 changed files
with
309 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdint.h> | ||
#include <stdarg.h> | ||
#include "node-i.h" | ||
|
||
struct AffNode_s * | ||
aff_node_cd(struct AffTree_s *tree, | ||
struct AffSTable_s *stable, | ||
struct AffNode_s *n, | ||
int create, | ||
...) | ||
{ | ||
struct AffNode_s *res; | ||
va_list va; | ||
|
||
va_start(va, create); | ||
res = aff_node_cdv(tree, stable, n, create, va); | ||
va_end(va); | ||
|
||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <stdint.h> | ||
#include <stdarg.h> | ||
#include "node-i.h" | ||
|
||
struct AffNode_s * | ||
aff_node_cda(struct AffTree_s *tree, | ||
struct AffSTable_s *stable, | ||
struct AffNode_s *n, | ||
int create, | ||
const char *p[]) | ||
{ | ||
/* XXX */ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include <stdint.h> | ||
#include <stdarg.h> | ||
#include "stable.h" | ||
#include "node.h" | ||
#include "tree.h" | ||
#include "node-i.h" | ||
|
||
struct AffNode_s * | ||
aff_node_chdir(struct AffTree_s *tree, | ||
struct AffSTable_s *stable, | ||
struct AffNode_s *n, | ||
int create, | ||
const char *p) | ||
{ | ||
const struct AffSymbol_s *sym; | ||
struct AffNode_s *ch; | ||
|
||
if (tree == 0 || stable == 0 || n == 0) | ||
return 0; | ||
if (p == 0) | ||
return n; | ||
|
||
sym = aff_stable_lookup(stable, p); | ||
if (sym == 0 && create) { | ||
sym = aff_stable_insert(stable, p); | ||
} | ||
if (sym == 0) | ||
return 0; | ||
|
||
ch = aff_tree_lookup(tree, n, sym); | ||
if (ch == 0 && create) { | ||
ch = aff_tree_insert(tree, n, sym); | ||
} | ||
return ch; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdint.h> | ||
#include <stdarg.h> | ||
#include "node-i.h" | ||
|
||
struct AffNode_s * | ||
aff_node_cdv(struct AffTree_s *tree, | ||
struct AffSTable_s *stable, | ||
struct AffNode_s *n, | ||
int create, | ||
va_list va) | ||
{ | ||
const char *name; | ||
|
||
for (;;) { | ||
name = va_arg(va, const char *); | ||
if (name == 0) | ||
return n; | ||
n = aff_node_chdir(tree, stable, n, create, name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
#include <stdint.h> | ||
#include "treap.h" | ||
#include "stable.h" | ||
#include "tree-i.h" | ||
#include <stdarg.h> | ||
#include "node-i.h" | ||
|
||
const struct AffTreeNode_s * | ||
aff_n_parent(const struct AffTreeNode_s *tn) | ||
struct AffNode_s * | ||
aff_node_parent(const struct AffNode_s *tn) | ||
{ | ||
if (tn == 0) | ||
return 0; | ||
return tn->key.parent; | ||
return (struct AffNode_s *)tn->key.parent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <stdint.h> | ||
#include <stdarg.h> | ||
#include "node-i.h" | ||
|
||
uint32_t | ||
aff_node_size(const struct AffNode_s *tn) | ||
{ | ||
if (tn == 0) | ||
return 0; | ||
return tn->size; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.