hmml_to_html.c: Fix integration [#25]
This commit is contained in:
parent
811abe6271
commit
d08f45a75a
|
@ -1,6 +1,6 @@
|
|||
#if 0
|
||||
ctime -begin ${0%.*}.ctm
|
||||
gcc -g -Wall -fsanitize=address -std=c99 $0 -o ${0%.*} hmml.a
|
||||
gcc -g -Wall -fsanitize=address -std=c99 -pipe $0 -o ${0%.*} hmml.a
|
||||
ctime -end ${0%.*}.ctm
|
||||
exit
|
||||
#endif
|
||||
|
@ -179,6 +179,7 @@ CopyStringNoFormat(char *Dest, char *String)
|
|||
*Dest++ = *String++;
|
||||
++Length;
|
||||
}
|
||||
*Dest = '\0';
|
||||
return Length;
|
||||
}
|
||||
|
||||
|
@ -2431,7 +2432,7 @@ HMML.metadata.project);
|
|||
(TemplatePtr+2 - TemplateBuffer < TemplateSize && TemplatePtr[2] == '-'))
|
||||
{
|
||||
char *CommentStart = &OutputPtr[-1];
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize && *TemplatePtr != '>')
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize)
|
||||
{
|
||||
if(*TemplatePtr == '_')
|
||||
{
|
||||
|
@ -2445,11 +2446,16 @@ HMML.metadata.project);
|
|||
FoundHeader = TRUE;
|
||||
OutputPtr = CommentStart;
|
||||
OutputPtr += CopyStringNoFormat(OutputPtr, Header.Location);
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize && *TemplatePtr != '>')
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize)
|
||||
{
|
||||
if(TemplatePtr[0] == '>' && TemplatePtr[-1] == '-' && TemplatePtr[-2] == '-')
|
||||
{
|
||||
break;
|
||||
}
|
||||
++TemplatePtr;
|
||||
}
|
||||
++TemplatePtr;
|
||||
break;
|
||||
}
|
||||
else if(!(StringsDifferT(TitleTag, TemplatePtr, '\0')))
|
||||
{
|
||||
|
@ -2466,11 +2472,16 @@ HMML.metadata.project);
|
|||
FoundTitle = TRUE;
|
||||
OutputPtr = CommentStart;
|
||||
OutputPtr += CopyStringNoFormat(OutputPtr, Title.Location);
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize && *TemplatePtr != '>')
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize)
|
||||
{
|
||||
if(TemplatePtr[0] == '>' && TemplatePtr[-1] == '-' && TemplatePtr[-2] == '-')
|
||||
{
|
||||
break;
|
||||
}
|
||||
++TemplatePtr;
|
||||
}
|
||||
++TemplatePtr;
|
||||
break;
|
||||
}
|
||||
else if(!(StringsDifferT(PlayerTag, TemplatePtr, '\0')))
|
||||
{
|
||||
|
@ -2482,11 +2493,16 @@ HMML.metadata.project);
|
|||
FoundPlayer = TRUE;
|
||||
OutputPtr = CommentStart;
|
||||
OutputPtr += CopyStringNoFormat(OutputPtr, Player.Location);
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize && *TemplatePtr != '>')
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize)
|
||||
{
|
||||
if(TemplatePtr[0] == '>' && TemplatePtr[-1] == '-' && TemplatePtr[-2] == '-')
|
||||
{
|
||||
break;
|
||||
}
|
||||
++TemplatePtr;
|
||||
}
|
||||
++TemplatePtr;
|
||||
break;
|
||||
}
|
||||
else if(!(StringsDifferT(ScriptTag, TemplatePtr, '\0')))
|
||||
{
|
||||
|
@ -2498,11 +2514,16 @@ HMML.metadata.project);
|
|||
FoundScript = TRUE;
|
||||
OutputPtr = CommentStart;
|
||||
OutputPtr += CopyStringNoFormat(OutputPtr, Script.Location);
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize && *TemplatePtr != '>')
|
||||
while(TemplatePtr - TemplateBuffer < TemplateSize)
|
||||
{
|
||||
if(TemplatePtr[0] == '>' && TemplatePtr[-1] == '-' && TemplatePtr[-2] == '-')
|
||||
{
|
||||
break;
|
||||
}
|
||||
++TemplatePtr;
|
||||
}
|
||||
++TemplatePtr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*OutputPtr++ = *TemplatePtr++;
|
||||
|
|
Loading…
Reference in New Issue