"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Data/Convert/Tex/latex_tools.cpp" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

latex_tools.cpp  (TeXmacs-1.99.4-src):latex_tools.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 165 skipping to change at line 165
skip_end_line (string s, int& i) { skip_end_line (string s, int& i) {
while (i<N(s) && s[i] != '\n') i++; while (i<N(s) && s[i] != '\n') i++;
} }
static bool static bool
parse_declaration_sub (string s, int& i, string cmd, parse_declaration_sub (string s, int& i, string cmd,
int arity, bool trail_opt, int arity, bool trail_opt,
hashmap<string,path>& h) { hashmap<string,path>& h) {
// NOTE: routine parses all options between arguments, // NOTE: routine parses all options between arguments,
// as well as any trailing option if trail_opt holds. // as well as any trailing option if trail_opt holds.
(void) trail_opt;
int b= i, n= N(s); int b= i, n= N(s);
i += N(cmd); i += N(cmd);
string first; string first;
for (int arg=0; arg<arity; arg++) { for (int arg=0; arg<arity; arg++) {
skip_whitespace (s, i); skip_whitespace (s, i);
while (i<n && s[i] == '[') { while (i<n && s[i] == '[') {
skip_square (s, i); skip_square (s, i);
skip_whitespace (s, i); skip_whitespace (s, i);
} }
if (i<n && s[i] == '{') { if (i<n && s[i] == '{') {
skipping to change at line 230 skipping to change at line 231
return true; return true;
} }
static bool static bool
parse_declaration (string s, int& i, string cmd, parse_declaration (string s, int& i, string cmd,
int arity, bool trail_opt, int arity, bool trail_opt,
hashmap<string,path>& h) { hashmap<string,path>& h) {
int b= i; int b= i;
if (!parse_declaration_sub (s, i, cmd, arity, trail_opt, h)) if (!parse_declaration_sub (s, i, cmd, arity, trail_opt, h))
i= b + N(cmd); i= b + N(cmd);
return true;
} }
hashmap<string,path> hashmap<string,path>
latex_get_declarations (string s) { latex_get_declarations (string s) {
int pos= search_forwards (s, "\\begin{document}"); int pos= search_forwards (s, "\\begin{document}");
if (pos != -1) s= s (0, pos); if (pos != -1) s= s (0, pos);
hashmap<string,path> h; hashmap<string,path> h;
int i, n= N(s); int i, n= N(s);
for (i=0; i<n; ) for (i=0; i<n; )
if (test (s, i, "\\def")) if (test (s, i, "\\def"))
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS