@@ 134,24 134,52 @@ int speak_finalize(char *ssml) {
switch (getc(stdin)) {
case 'A':
// 🠕
+ if (in_table) {
+ tablerow--;
+ if (tablerow > 0) {
+ sprintf(mark, "-rhaps-tablecell%i:%ix%i", tableno, tablerow, tablecol);
+ speak(ssml, mark);
+ break;
+ } else in_table = 0;
+ }
section_no--;
sprintf(mark, "-rhaps-section%i", section_no);
speak(ssml, section_no > 0 ? mark : NULL);
break;
case 'B':
// 🠗
+ if (in_table) {
+ tablerow++;
+ sprintf(mark, "-rhaps-tablecell%i:%ix%i", tableno, tablerow, tablecol);
+ speak(ssml, mark);
+ break; // FIXME What if that mark doesn't exist?
+ }
section_no++;
sprintf(mark, "-rhaps-section%i", section_no);
speak(ssml, section_no > 0 ? mark : NULL);
break;
case 'C':
// ➔
+ if (in_table) {
+ tablecol++;
+ sprintf(mark, "-rhaps-tablecell%i:%ix%i", tableno, tablerow, tablecol);
+ speak(ssml, mark);
+ break; // FIXME What if that mark doesn't exist?
+ }
paragraph_no++;
sprintf(mark, "-rhaps-paragraph%i", paragraph_no);
speak(ssml, paragraph_no > 0 ? mark : NULL);
break;
case 'D':
// 🠔
+ if (in_table) {
+ tablecol--;
+ if (tablecol > 0) {
+ sprintf(mark, "-rhaps-tablecell%i:%ix%i", tableno, tablerow, tablecol);
+ speak(ssml, mark);
+ break;
+ } else in_table = 0;
+ }
paragraph_no--;
sprintf(mark, "-rhaps-paragraph%i", paragraph_no);
speak(ssml, paragraph_no > 0 ? mark : NULL);