"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Data/Convert/Texmacs/upgradetm.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.

upgradetm.cpp  (TeXmacs-1.99.4-src):upgradetm.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 405 skipping to change at line 405
string s; string s;
tree r (CONCAT); tree r (CONCAT);
for (i=0; i<n; ) { for (i=0; i<n; ) {
if (t->label[i] == '<') { if (t->label[i] == '<') {
int start= i; int start= i;
for (i++; i<n; i++) for (i++; i<n; i++)
if (t->label[i-1] == '>') break; if (t->label[i-1] == '>') break;
string ss= t->label (start, i); string ss= t->label (start, i);
if (t->label[i-1] != '>') ss << '>'; if (t->label[i-1] != '>') ss << '>';
if (starts (ss, "<left-")) { if (starts (ss, "<left-")) {
if (s != "") r << s; s= ""; if (s != "") { r << s; s= ""; }
r << tree (LEFT, ss (6, N(ss)-1)); r << tree (LEFT, ss (6, N(ss)-1));
} }
else if (starts (ss, "<mid-")) { else if (starts (ss, "<mid-")) {
if (s != "") r << s; s= ""; if (s != "") { r << s; s= ""; }
r << tree (MID, ss (5, N(ss)-1)); r << tree (MID, ss (5, N(ss)-1));
} }
else if (starts (ss, "<right-")) { else if (starts (ss, "<right-")) {
if (s != "") r << s; s= ""; if (s != "") { r << s; s= ""; }
r << tree (RIGHT, ss (7, N(ss)-1)); r << tree (RIGHT, ss (7, N(ss)-1));
} }
else if (starts (ss, "<big-")) { else if (starts (ss, "<big-")) {
if (s != "") r << s; s= ""; if (s != "") { r << s; s= ""; }
r << tree (BIG, ss (5, N(ss)-1)); r << tree (BIG, ss (5, N(ss)-1));
} }
else s << ss; else s << ss;
} }
else if (((t->label[i] == '\'') || (t->label[i] == '`')) && else if (((t->label[i] == '\'') || (t->label[i] == '`')) &&
(!is_nil (mode_stack)) && (mode_stack->item == 1)) (!is_nil (mode_stack)) && (mode_stack->item == 1))
{ {
int start= i++; int start= i++;
while ((i<n) && (t->label[i] == t->label[i-1])) i++; while ((i<n) && (t->label[i] == t->label[i-1])) i++;
if (s != "") r << s; s= ""; if (s != "") { r << s; s= ""; }
tree_label op= t->label[start] == '`'? LPRIME: RPRIME; tree_label op= t->label[start] == '`'? LPRIME: RPRIME;
r << tree (op, t->label (start, i)); r << tree (op, t->label (start, i));
} }
else s << t->label[i++]; else s << t->label[i++];
} }
if (s != "") r << s; if (s != "") r << s;
if (N(r) == 1) return r[0]; if (N(r) == 1) return r[0];
return r; return r;
} }
else { else {
skipping to change at line 4003 skipping to change at line 4003
if (r[i] == MATH_FONT_SERIES && !font_series) { if (r[i] == MATH_FONT_SERIES && !font_series) {
tree ins= tree (WITH, FONT_SERIES, copy (r[i+1])); tree ins= tree (WITH, FONT_SERIES, copy (r[i+1]));
return r (0, i) * ins * r (i, N(r)); return r (0, i) * ins * r (i, N(r));
} }
} }
return r; return r;
} }
} }
/****************************************************************************** /******************************************************************************
* Upgrade draw over/under
******************************************************************************/
tree
upgrade_draw_over_under (tree t) {
if (is_atomic (t)) return t;
else if (is_compound (t, "draw-over", 2))
return compound ("draw-over",
upgrade_ancient (t[0]),
upgrade_ancient (t[1]), "0cm");
else if (is_compound (t, "draw-under", 2))
return compound ("draw-under",
upgrade_ancient (t[0]),
upgrade_ancient (t[1]), "0cm");
else {
int i, n= N(t);
tree r (t, n);
for (i=0; i<n; i++)
r[i]= upgrade_draw_over_under (t[i]);
return r;
}
}
/******************************************************************************
* Upgrade from previous versions * Upgrade from previous versions
******************************************************************************/ ******************************************************************************/
tree tree
upgrade_tex (tree t) { upgrade_tex (tree t) {
upgrade_tex_flag= true; upgrade_tex_flag= true;
t= upgrade_apply_expand_value (t); t= upgrade_apply_expand_value (t);
t= upgrade_new_environments (t); t= upgrade_new_environments (t);
t= upgrade_items (t); t= upgrade_items (t);
t= upgrade_table (t); t= upgrade_table (t);
skipping to change at line 4187 skipping to change at line 4211
t= upgrade_doc_language (t); t= upgrade_doc_language (t);
} }
if (version_inf_eq (version, "1.0.7.21")) { if (version_inf_eq (version, "1.0.7.21")) {
t= upgrade_varsession (t); t= upgrade_varsession (t);
t= upgrade_subsession (t); t= upgrade_subsession (t);
} }
if (version_inf_eq (version, "1.99.2")) { if (version_inf_eq (version, "1.99.2")) {
t= upgrade_quotes (t); t= upgrade_quotes (t);
t= upgrade_ancient (t); t= upgrade_ancient (t);
} }
if (version_inf_eq (version, "1.99.4"))
t= upgrade_draw_over_under (t);
if (is_non_style_document (t)) if (is_non_style_document (t))
t= automatic_correct (t, version); t= automatic_correct (t, version);
return t; return t;
} }
 End of changes. 7 change blocks. 
5 lines changed or deleted 31 lines changed or added

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