hmmlconv.c: Fix-up \-escaping
hmml_to_html.c: More concisely set QuoteDir
This commit is contained in:
parent
c78193b74f
commit
f371e656dc
|
@ -358,15 +358,11 @@ StringToInt(char *String)
|
||||||
int
|
int
|
||||||
BuildQuote(quote_info *Info, char *Speaker, int ID)
|
BuildQuote(quote_info *Info, char *Speaker, int ID)
|
||||||
{
|
{
|
||||||
char *QuoteDir;
|
char *QuoteDir = "/home/matt/git/GitHub/insofaras/25fc16d58a297a486334";
|
||||||
if(!StringsDiffer(Speaker, "handmade_hero"))
|
if(!StringsDiffer(Speaker, "handmade_hero"))
|
||||||
{
|
{
|
||||||
QuoteDir = "/home/matt/git/GitHub/Chronister/01e754a09fd84c839ad7";
|
QuoteDir = "/home/matt/git/GitHub/Chronister/01e754a09fd84c839ad7";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
QuoteDir = "/home/matt/git/GitHub/insofaras/25fc16d58a297a486334";
|
|
||||||
}
|
|
||||||
|
|
||||||
char Path[255] = {0};
|
char Path[255] = {0};
|
||||||
sprintf(Path, "%s/#%s", QuoteDir, Speaker);
|
sprintf(Path, "%s/#%s", QuoteDir, Speaker);
|
||||||
|
|
|
@ -248,7 +248,8 @@ void ProcessAnnotation(char *Line, FILE *OutFile)
|
||||||
|
|
||||||
// Escape stuff
|
// Escape stuff
|
||||||
else if(*LinePtr == ']' ||
|
else if(*LinePtr == ']' ||
|
||||||
(LinePtr[0] == '\\' && LinePtr[1] != '"') ||
|
*LinePtr == '[' ||
|
||||||
|
*LinePtr == '\\' ||
|
||||||
(LinePtr > Line && LinePtr[-1] == ' ' && strchr(":~@", LinePtr[0]) && !IsAlNum(LinePtr[1])))
|
(LinePtr > Line && LinePtr[-1] == ' ' && strchr(":~@", LinePtr[0]) && !IsAlNum(LinePtr[1])))
|
||||||
{
|
{
|
||||||
fprintf(OutFile, "%.*s\\", (int)(LinePtr - RunStart), RunStart);
|
fprintf(OutFile, "%.*s\\", (int)(LinePtr - RunStart), RunStart);
|
||||||
|
|
Loading…
Reference in New Issue