summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2002-07-24 18:11:13 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2002-07-24 18:11:13 +0000
commit979ccb9bd0524d2843670799490378274c8028e2 (patch)
tree877e80cc8cc4ac3a1be9e157d627ec6d2af50224
parentbdf1d691ca93420e5da55a76398a1cea29899db6 (diff)
downloadATCD-979ccb9bd0524d2843670799490378274c8028e2.tar.gz
ChangeLogTag: Wed Jul 24 13:10:19 2002 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog15
-rw-r--r--ChangeLogs/ChangeLog-03a15
-rw-r--r--bin/MakeProjectCreator/modules/Creator.pm26
-rw-r--r--bin/MakeProjectCreator/modules/GUID.pm42
-rw-r--r--bin/MakeProjectCreator/modules/ProjectCreator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/VC7ProjectCreator.pm3
6 files changed, 75 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 453e0c43a98..c39573ff8d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Wed Jul 24 13:10:19 2002 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/modules/ProjectCreator.pm:
+
+ Add README and readme to the default documentation
+ files.
+
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/GUID.pm:
+ * bin/MakeProjectCreator/modules/VC7ProjectCreator.pm:
+
+ Change the GUID generation code to be deterministic (but still
+ unique) to allow for multiple solution files to contain the same
+ project files without having to regenerate the solutions.
+
Wed Jul 24 13:42:37 2002 Steve Huston <shuston@riverace.com>
* ace/OS.cpp (uname): Added case for PROCESSOR_ARCHITECTURE_IA64
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 453e0c43a98..c39573ff8d5 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,18 @@
+Wed Jul 24 13:10:19 2002 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/modules/ProjectCreator.pm:
+
+ Add README and readme to the default documentation
+ files.
+
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/GUID.pm:
+ * bin/MakeProjectCreator/modules/VC7ProjectCreator.pm:
+
+ Change the GUID generation code to be deterministic (but still
+ unique) to allow for multiple solution files to contain the same
+ project files without having to regenerate the solutions.
+
Wed Jul 24 13:42:37 2002 Steve Huston <shuston@riverace.com>
* ace/OS.cpp (uname): Added case for PROCESSOR_ARCHITECTURE_IA64
diff --git a/bin/MakeProjectCreator/modules/Creator.pm b/bin/MakeProjectCreator/modules/Creator.pm
index d2dbbfc5811..6b9e970f1e5 100644
--- a/bin/MakeProjectCreator/modules/Creator.pm
+++ b/bin/MakeProjectCreator/modules/Creator.pm
@@ -34,14 +34,15 @@ sub new {
my($type) = shift;
my($self) = Parser::new($class);
- $self->{'relative'} = $relative;
- $self->{'template'} = $template;
- $self->{'ti'} = $ti;
- $self->{'global_cfg'} = $global;
- $self->{'grammar_type'} = $type;
- $self->{'type_check'} = $type . '_defined';
- $self->{'global_read'} = 0;
- $self->{'include_path'} = $inc;
+ $self->{'relative'} = $relative;
+ $self->{'template'} = $template;
+ $self->{'ti'} = $ti;
+ $self->{'global_cfg'} = $global;
+ $self->{'grammar_type'} = $type;
+ $self->{'type_check'} = $type . '_defined';
+ $self->{'global_read'} = 0;
+ $self->{'include_path'} = $inc;
+ $self->{'current_input'} = "";
return $self;
}
@@ -97,6 +98,8 @@ sub generate {
}
if ($status) {
+ $self->{'current_input'} = $input;
+
## An empty input file name says that we
## should generate a default input file and use that
if ($input eq "") {
@@ -301,6 +304,13 @@ sub transform_file_name {
return $name;
}
+
+sub get_current_input {
+ my($self) = shift;
+ return $self->{'current_input'};
+}
+
+
# ************************************************************
# Virtual Methods To Be Overridden
# ************************************************************
diff --git a/bin/MakeProjectCreator/modules/GUID.pm b/bin/MakeProjectCreator/modules/GUID.pm
index e53f6ea1b08..944813a1543 100644
--- a/bin/MakeProjectCreator/modules/GUID.pm
+++ b/bin/MakeProjectCreator/modules/GUID.pm
@@ -11,6 +11,7 @@ package GUID;
# ************************************************************
use strict;
+use Cwd;
# ************************************************************
# Subroutine Section
@@ -26,27 +27,32 @@ sub new {
sub generate {
my($self) = shift;
- my($str) = shift;
- my($time) = time(); ## 32 bits
- my($hash) = 0; ## 32 bits
- my($rand1) = int(rand(0xffff)); ## 16 bits
- my($rand2) = int(rand(0xffff)); ## 16 bits
- my($rand3) = int(rand(0xffff)); ## 16 bits
- my($rand4) = $$ + int(rand(0xff)); ## 16 bits
-
-
- ## Hash the input string
- my($length) = length($str);
- for(my $i = 0; $i < $length; $i++) {
- my($high) = $hash & 0xf8000000;
- $hash <<= 5;
- $hash ^= ($high >> 27);
- $hash ^= ord(substr($str, $i, 1));
- }
+ my($out) = shift;
+ my($in) = shift;
+ my($chash) = $self->hash(getcwd());
+ my($nhash) = $self->hash($out);
+ my($ihash) = $self->hash($in);
+ my($val) = 0xfeca1bad;
return sprintf("%08X-%04X-%04X-%04X-%04X%08X",
- $hash, $rand1, $rand2, $rand3, $rand4, $time);
+ $nhash, ($val >> 16) & 0xffff, ($val & 0xffff),
+ ($ihash >> 16) & 0xffff, $ihash & 0xffff, $chash);
}
+sub hash {
+ my($self) = shift;
+ my($str) = shift;
+ my($value) = 0;
+
+ if (defined $str) {
+ my($length) = length($str);
+ for(my $i = 0; $i < $length; $i++) {
+ $value = ($value << 4) ^ ($value >> 28) ^ ord(substr($str, $i, 1));
+ }
+ }
+
+ return $value;
+}
+
1;
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm
index a8835e9275d..4cc981859eb 100644
--- a/bin/MakeProjectCreator/modules/ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm
@@ -100,7 +100,7 @@ sub new {
'header_files' => [ "\\.h", "\\.hxx", "\\.hh", ],
'inline_files' => [ "\\.i", "\\.inl", ],
'idl_files' => [ "\\.idl", ],
- 'documentation_files' => [ "\\.doc", "\\.txt", ],
+ 'documentation_files' => [ "README", "readme", "\\.doc", "\\.txt", ],
'resource_files' => [ "\\.rc", ],
);
diff --git a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
index c2307044ae2..08bc44a6f51 100644
--- a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm
@@ -80,7 +80,8 @@ sub fill_value {
if ($name eq "guid") {
my($guid) = new GUID();
- $value = $guid->generate($self->project_file_name());
+ $value = $guid->generate($self->project_file_name(),
+ $self->get_current_input());
}
return $value;
}