summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-04-10 17:05:50 +0000
committerRüdiger Timm <rt@openoffice.org>2008-04-10 17:05:50 +0000
commit264b47728a65c12ff1b612dc4c800438087ef74b (patch)
tree3287b79ddfc355351716c3f1eda15ccd1bf32810 /soltools
parent597cfbecf5f40cc31d72dd9ef13955dc07bd960e (diff)
INTEGRATION: CWS changefileheader (1.11.22); FILE MERGED
2008/04/01 09:43:44 thb 1.11.22.1: #i73081# Improve mkdepends runtime complexity by using better data structures (fix from kendy, merged from incguards01)
Diffstat (limited to 'soltools')
-rw-r--r--soltools/mkdepend/main.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index 04fefbb354bc..f103a6e55e80 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -116,8 +116,9 @@ void freefile(struct filepointer * fp);
void redirect(char * line, char * makefile );
struct inclist inclist[ MAXFILES ],
- *inclistp = inclist,
- maininclist;
+ *inclistp = inclist;
+
+struct symhash *maininclist = NULL;
char *filelist[ MAXFILES ];
char *includedirs[ MAXDIRS + 1 ];
@@ -171,16 +172,16 @@ int main(argc, argv)
register struct inclist *ip;
char *makefile = NULL;
struct filepointer *filecontent;
- struct symtab *psymp = predefs;
+ struct pair *psymp = predefs;
char *endmarker = NULL;
char *defincdir = NULL;
struct IncludesCollection* incCollection;
ProgramName = argv[0];
- while (psymp->s_name)
+ while (psymp->p_name)
{
- define2(psymp->s_name, psymp->s_value, &maininclist);
+ hash_define(psymp->p_name, psymp->p_value, &maininclist);
psymp++;
}
if (argc == 2 && argv[1][0] == '@') {
@@ -450,10 +451,14 @@ int main(argc, argv)
incCollection = create_IncludesCollection();
for(fp=filelist; *fp; fp++) {
+ struct symhash *includes;
filecontent = getfile(*fp);
ip = newinclude(*fp, (char *)NULL);
- find_includes(filecontent, ip, ip, 0, FALSE, incCollection);
+ includes = hash_copy( maininclist );
+ find_includes(filecontent, ip, ip, 0, FALSE, incCollection, includes);
+ hash_free( includes );
+
freefile(filecontent);
recursive_pr_include(ip, ip->i_file, base_name(*fp));
inc_clean();