- static wxChar *line_buffer;
- stopRunning = FALSE;
- wxStrcpy(TexFileRoot, filename);
- StripExtension(TexFileRoot);
- wxSprintf(TexBibName, _T("%s.bb"), TexFileRoot);
- wxSprintf(TexTmpBibName, _T("%s.bb1"), TexFileRoot);
-
- TexPathList.EnsureFileAccessible(filename);
-
- if (line_buffer)
- delete line_buffer;
-
- line_buffer = new wxChar[MAX_LINE_BUFFER_SIZE];
-
- 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;
- }
+ 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);
+
+ TexPathList.EnsureFileAccessible(filename);