// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-unsigned long leftCurley = 0;
-unsigned long rightCurley = 0;
-static wxString currentFileName = _T("");
+unsigned long leftCurly = 0;
+unsigned long rightCurly = 0;
+static wxString currentFileName = wxEmptyString;
- errBuf.Printf(_T("An extra right Curley brace ('}') was detected at line %lu inside file %s"), LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str());
+ errBuf.Printf(_T("An extra right Curly brace ('}') was detected at line %lu inside file %s"), LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str());
- errBuf.Printf(_T("Curley braces do not match inside file %s\n%lu opens, %lu closes"),
- (const wxChar*) currentFileName.c_str(),leftCurley,rightCurley);
+ errBuf.Printf(_T("Curly braces do not match inside file %s\n%lu opens, %lu closes"),
+ (const wxChar*) currentFileName.c_str(),leftCurly,rightCurly);
{
wxChar buf2[400];
wxSnprintf(buf2, sizeof(buf2), _T("%s.tex"), fileNameStr.c_str());
{
wxChar buf2[400];
wxSnprintf(buf2, sizeof(buf2), _T("%s.tex"), fileNameStr.c_str());
- errBuf.Printf(_T("Curley braces do not match inside file %s\n%lu opens, %lu closes"),
- (const wxChar*) currentFileName.c_str(),leftCurley,rightCurley);
+ errBuf.Printf(_T("Curly braces do not match inside file %s\n%lu opens, %lu closes"),
+ (const wxChar*) currentFileName.c_str(),leftCurly,rightCurly);
wxChar *env = NULL;
bool tmpParseToBrace = true;
TexMacroDef *def = MatchMacro(buffer, &pos, &env, &tmpParseToBrace);
wxChar *env = NULL;
bool tmpParseToBrace = true;
TexMacroDef *def = MatchMacro(buffer, &pos, &env, &tmpParseToBrace);
/*
* If all else fails, we assume that we have
* a pair of braces on their own, so return a `dummy' macro
/*
* If all else fails, we assume that we have
* a pair of braces on their own, so return a `dummy' macro
arg->macroId = chunk->macroId;
pos = ParseArg(arg, arg->children, buffer, pos, NULL, true, customMacroArgs);
arg->macroId = chunk->macroId;
pos = ParseArg(arg, arg->children, buffer, pos, NULL, true, customMacroArgs);
{
// Remove white space before and after the ampersand,
// since this is probably a table column separator with
// some convenient -- but useless -- white space in the text.
{
// Remove white space before and after the ampersand,
// since this is probably a table column separator with
// some convenient -- but useless -- white space in the text.
- static wxChar *line_buffer;
- stopRunning = false;
- wxStrcpy(TexFileRoot, filename);
- StripExtension(TexFileRoot);
- wxSnprintf(TexBibName, 300, _T("%s.bb"), TexFileRoot);
- wxSnprintf(TexTmpBibName, 300, _T("%s.bb1"), TexFileRoot);
+ static wxChar *line_buffer;
+ stopRunning = false;
+ wxStrcpy(TexFileRoot, filename);
+ StripExtension(TexFileRoot);
+ wxSnprintf(TexBibName, 300, _T("%s.bb"), TexFileRoot);
+ wxSnprintf(TexTmpBibName, 300, _T("%s.bb1"), TexFileRoot);
- Inputs[0] = wxFopen(filename, _T("r"));
- LineNumbers[0] = 1;
- FileNames[0] = copystring(filename);
- if (Inputs[0])
- {
- read_a_line(line_buffer);
- ParseMacroBody(_T("toplevel"), TopLevel, 1, line_buffer, 0, NULL, true);
- if (Inputs[0]) fclose(Inputs[0]);
- return true;
- }
+ Inputs[0] = wxFopen(filename, _T("r"));
+ LineNumbers[0] = 1;
+ FileNames[0] = copystring(filename);
+ if (Inputs[0])
+ {
+ read_a_line(line_buffer);
+ ParseMacroBody(_T("toplevel"), TopLevel, 1, line_buffer, 0, NULL, true);
+ if (Inputs[0]) fclose(Inputs[0]);
+ return true;
+ }
}
TexMacroDef::TexMacroDef(int the_id, const wxChar *the_name, int n, bool ig, bool forbidLevel)
}
TexMacroDef::TexMacroDef(int the_id, const wxChar *the_name, int n, bool ig, bool forbidLevel)
break;
case ltSPECIALDOUBLEDOLLAR: // Interpret as center
OnMacro(ltCENTER, no_args, start);
break;
case ltSPECIALDOUBLEDOLLAR: // Interpret as center
OnMacro(ltCENTER, no_args, start);
wxChar fileBuf[300];
wxStrcpy(fileBuf, bibFile);
wxString actualFile = TexPathList.FindValidPath(fileBuf);
wxChar fileBuf[300];
wxStrcpy(fileBuf, bibFile);
wxString actualFile = TexPathList.FindValidPath(fileBuf);
{
wxStrcat(fileBuf, _T(".bib"));
actualFile = TexPathList.FindValidPath(fileBuf);
}
{
wxStrcat(fileBuf, _T(".bib"));
actualFile = TexPathList.FindValidPath(fileBuf);
}