var
	aTopicList: THndTopicsInfoArray;
	sModuleName: string;
	nCurTopic: integer;

begin
	HndGeneratorInfo.CurrentFile := ExtractFileName(HndGeneratorInfo.OutputFile);
	sModuleName := ChangeFileExt(ExtractFileName(HndGeneratorInfo.OutputFile), '');
	aTopicList := HndTopics.GetTopicList(False);
	
	printfln('! Project: %s', [HndProjects.GetProjectTitle()]);
	println ('! Generated by HelpNDoc - http://www.helpndoc.com');
	println ('');
	printfln ('Module %s', [sModuleName]);
	println ('');
	for nCurTopic := 0 to length(aTopicList) - 1 do
	begin
		printfln('INTEGER, PARAMETER :: HELP_%s = %d %s ! Topic: "%s"', [aTopicList[nCurTopic].HelpId, aTopicList[nCurTopic].HelpContext, #09#09#09#09, aTopicList[nCurTopic].Caption]);
	end;
	println ('');
	printfln ('End Module %s', [sModuleName]);
	
end.