[liblouis-liblouisxml] [liblouisutdml] push by john.bo...@xxxxxxxxxxxxxxxxx - fixed emphasis in macros on 2013-08-08 03:39 GMT

  • From: liblouisutdml@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 08 Aug 2013 03:39:57 +0000

Revision: e0330357722c
Branch:   default
Author:   John Boyer <john.boyer@xxxxxxxxxxxxxxxxx>
Date:     Wed Aug  7 20:38:57 2013
Log:      fixed emphasis in macros
http://code.google.com/p/liblouisutdml/source/detail?r=e0330357722c

Modified:
 /liblouisutdml/louisutdml.h
 /liblouisutdml/semantics.c

=======================================
--- /liblouisutdml/louisutdml.h Tue Jun 11 06:14:55 2013
+++ /liblouisutdml/louisutdml.h Wed Aug  7 20:38:57 2013
@@ -332,6 +332,7 @@
 sem_act set_sem_attr (xmlNode * node);
 sem_act get_sem_attr (xmlNode * node);
 sem_act push_sem_stack (xmlNode * node);
+sem_act push_action (sem_act action);
 sem_act pop_sem_stack ();
 void destroy_semantic_table ();
 void append_new_entries ();
=======================================
--- /liblouisutdml/semantics.c  Tue Jul 30 06:28:03 2013
+++ /liblouisutdml/semantics.c  Wed Aug  7 20:38:57 2013
@@ -1247,14 +1247,14 @@
       strncat (key, macro, k);
     }
   else if (nodeEntry->style != NULL)
-  {
-  strcpy (key, "style,");
-    strcat (key, nodeEntry->style->name);
+    {
+      strcpy (key, "style,");
+      strcat (key, nodeEntry->style->name);
     }
   else
     {
-    strcpy (key, "action,");
-    strcat (key, semNames[nodeEntry->semNum]);
+      strcpy (key, "action,");
+      strcat (key, semNames[nodeEntry->semNum]);
     }
   return key;
 }
@@ -1306,6 +1306,14 @@
     }
   return (ud->stack[++ud->top] = get_sem_attr (node));
 }
+
+sem_act
+push_action (sem_act action)
+{
+  if (ud->top > (STACKSIZE - 2) || ud->top < -1)
+    ud->top = 1;
+  return (ud->stack[++ud->top] = action);
+}

 sem_act
 pop_sem_stack ()
@@ -1651,6 +1659,18 @@
     case pagenum:
       do_pagenum ();
       break;
+    case italicx:
+      push_action (italicx);
+      break;
+    case boldx:
+      push_action (boldx);
+      break;
+    case underlinex:
+      push_action (underlinex);
+      break;
+    case compbrl:
+      push_action (compbrl);
+      break;
     default:
       macroError ("semantic action %s is not supported in a macro",
                  semNames[semNum]);
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouisutdml] push by john.bo...@xxxxxxxxxxxxxxxxx - fixed emphasis in macros on 2013-08-08 03:39 GMT - liblouisutdml