diff --git a/Tools/AGSHtml.m b/Tools/AGSHtml.m
index 44d361696..556f6d487 100644
--- a/Tools/AGSHtml.m
+++ b/Tools/AGSHtml.m
@@ -838,7 +838,7 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
[buf appendString: indent];
[buf appendString: @"
"];
[buf appendString:
- [self makeAnchor: name ofType: @"protocol" name: name]];
+ [self makeAnchor: unit ofType: @"protocol" name: name]];
[buf appendString: @"
\n"];
[self outputUnit: node to: buf];
unit = nil;
diff --git a/Tools/AGSParser.m b/Tools/AGSParser.m
index 5bf39f1d4..7c24d92c8 100644
--- a/Tools/AGSParser.m
+++ b/Tools/AGSParser.m
@@ -1046,6 +1046,8 @@ fail:
[dict setObject: methods forKey: @"Methods"];
}
+ [dict setObject: declared forKey: @"Declared"];
+
d = [info objectForKey: @"Protocols"];
if (d == nil)
{
diff --git a/Tools/autogsdoc.m b/Tools/autogsdoc.m
index 8b6d0a576..8394fa342 100644
--- a/Tools/autogsdoc.m
+++ b/Tools/autogsdoc.m
@@ -501,8 +501,8 @@ main(int argc, char **argv, char **env)
}
else
{
+ sdir = [sourceDirectory stringByAppendingPathComponent: hdir];
hdir = [headerDirectory stringByAppendingPathComponent: hdir];
- sdir = [sourceDirectory stringByAppendingPathComponent: sdir];
}
ddir = documentationDirectory;