[liblouis-liblouisxml] [liblouis] r1073 committed - making typeform redefineable

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 23 Oct 2013 15:12:44 +0000

Revision: 1073
Author:   john.boyer@xxxxxxxxxxxxxxxxx
Date:     Wed Oct 23 15:12:24 2013 UTC
Log:      making typeform redefineable
http://code.google.com/p/liblouis/source/detail?r=1073

Modified:
 /trunk/liblouis/liblouis.h.in
 /trunk/liblouis/lou_backTranslateString.c
 /trunk/liblouis/lou_translateString.c
 /trunk/liblouis/louis.h
 /trunk/liblouis/wrappers.c
 /trunk/tools/lou_allround.c

=======================================
--- /trunk/liblouis/liblouis.h.in       Mon Jul  8 12:19:12 2013 UTC
+++ /trunk/liblouis/liblouis.h.in       Wed Oct 23 15:12:24 2013 UTC
@@ -31,6 +31,7 @@
 #endif                         /* __cplusplus */

 #define widechar @WIDECHAR_TYPE@
+#define formtype unsigned char

 #ifdef _WIN32
 #define EXPORT_CALL __stdcall
@@ -73,19 +74,22 @@
     (const char *tableList,
      const widechar * inbuf,
      int *inlen,
- widechar * outbuf, int *outlen, char *typeform, char *spacing, int mode);
+     widechar * outbuf, int *outlen, formtype *typeform, char *spacing,
+     int
+mode);

   int EXPORT_CALL lou_translate (const char *tableList, const widechar
                                 * inbuf,
                                 int *inlen, widechar * outbuf, int *outlen,
-                                char *typeform, char *spacing,
+                                formtype *typeform, char *spacing,
                                 int *outputPos, int *inputPos,
                                 int *cursorPos, int mode);

   int EXPORT_CALL lou_translatePrehyphenated (const char *tableList,
                                              const widechar * inbuf,
                                              int *inlen, widechar * outbuf,
-                                             int *outlen, char *typeform,
+                                             int *outlen, formtype
+                                             *typeform,
                                              char *spacing, int *outputPos,
                                              int *inputPos, int *cursorPos,
                                              char *inputHyphens,
@@ -102,13 +106,14 @@
                                           const widechar * inbuf,
                                           int *inlen,
                                           widechar * outbuf,
-                                          int *outlen, char *typeform, char
+                                          int *outlen, formtype
+                                          *typeform, char
                                           *spacing, int mode);

   int EXPORT_CALL lou_backTranslate (const char *tableList, const widechar
                                     * inbuf,
                                     int *inlen, widechar * outbuf,
-                                    int *outlen, char *typeform,
+                                    int *outlen, formtype *typeform,
                                     char *spacing, int *outputPos,
                                     int *inputPos, int *cursorPos, int mode);
   void EXPORT_CALL lou_logPrint (char *format, ...);
=======================================
--- /trunk/liblouis/lou_backTranslateString.c   Mon Sep  9 23:32:08 2013 UTC
+++ /trunk/liblouis/lou_backTranslateString.c   Wed Oct 23 15:12:24 2013 UTC
@@ -1,4 +1,3 @@
-
 /* liblouis Braille Translation and Back-Translation
 Library

@@ -60,7 +59,8 @@
 int EXPORT_CALL
 lou_backTranslateString (const char *tableList, const widechar
                         * inbuf,
-                        int *inlen, widechar * outbuf, int *outlen, char
+                        int *inlen, widechar * outbuf, int *outlen,
+                        formtype
                         *typeform, char *spacing, int modex)
 {
   return lou_backTranslate (tableList, inbuf, inlen, outbuf, outlen,
@@ -72,7 +72,7 @@
                   widechar
                   * inbuf,
                   int *inlen, widechar * outbuf, int *outlen,
-                  char *typeform, char *spacing, int
+                  formtype *typeform, char *spacing, int
                   *outputPos, int *inputPos, int *cursorPos, int modex)
 {
   int k;
=======================================
--- /trunk/liblouis/lou_translateString.c       Fri Oct 18 17:35:21 2013 UTC
+++ /trunk/liblouis/lou_translateString.c       Wed Oct 23 15:12:24 2013 UTC
@@ -45,7 +45,8 @@
 int EXPORT_CALL
 lou_translateString (const char *tableList, const widechar
                     * inbufx,
-                    int *inlen, widechar * outbuf, int *outlen, char
+                    int *inlen, widechar * outbuf, int *outlen,
+                    formtype
                     *typeform, char *spacing, int mode)
 {
   return
@@ -57,7 +58,7 @@
 lou_translate (const char *tableList, const widechar
               * inbufx,
               int *inlen, widechar * outbuf, int *outlen,
-              char *typeform, char *spacing, int *outputPos,
+              formtype *typeform, char *spacing, int *outputPos,
               int *inputPos, int *cursorPos, int modex)
 {
   return trace_translate (tableList, inbufx, inlen, outbuf, outlen,
@@ -68,7 +69,7 @@
 int
 trace_translate (const char *tableList, const widechar * inbufx,
                 int *inlen, widechar * outbuf, int *outlen,
-                char *typeform, char *spacing, int *outputPos,
+                formtype *typeform, char *spacing, int *outputPos,
                 int *inputPos, int *cursorPos,
                 const TranslationTableRule ** rules, int *rulesLen,
                 int modex)
@@ -278,7 +279,7 @@
 lou_translatePrehyphenated (const char *tableList,
                            const widechar * inbufx, int *inlen,
                            widechar * outbuf, int *outlen,
-                           char *typeform, char *spacing,
+                           formtype *typeform, char *spacing,
                            int *outputPos, int *inputPos, int *cursorPos,
                            char *inputHyphens, char *outputHyphens,
                            int modex)
=======================================
--- /trunk/liblouis/louis.h     Tue Feb 19 18:00:48 2013 UTC
+++ /trunk/liblouis/louis.h     Wed Oct 23 15:12:24 2013 UTC
@@ -533,14 +533,16 @@
   int other_translate (const char *trantab, const widechar
                       * inbuf,
                       int *inlen, widechar * outbuf, int *outlen,
-                      char *typeform, char *spacing, int *outputPos, int
+                      formtype *typeform, char *spacing, int
+                      *outputPos, int
                       *inputPos, int *cursorPos, int mode);

 /*Call wrappers for other translators */
   int other_backTranslate (const char *trantab, const widechar
                           * inbuf,
                           int *inlen, widechar * outbuf, int *outlen,
-                          char *typeform, char *spacing, int *outputPos, int
+                          formtype *typeform, char *spacing, int
+                          *outputPos, int
                           *inputPos, int *cursorPos, int mode);
 /*Call wrappers for other back-translators.*/

@@ -551,7 +553,8 @@

   int trace_translate (const char* tableList, const widechar* inbuf,
                        int* inlen, widechar* outbuf, int* outlen,
-                       char* typeform, char* spacing, int* outputPos,
+                       formtype* typeform, char* spacing, int*
+                       outputPos,
                        int* inputPos, int* cursorPos,
                        const TranslationTableRule** rules, int* rulesLen,
                        int mode);
=======================================
--- /trunk/liblouis/wrappers.c  Wed May 30 17:00:22 2012 UTC
+++ /trunk/liblouis/wrappers.c  Wed Oct 23 15:12:24 2013 UTC
@@ -82,7 +82,7 @@
 other_translate (const char *trantab, const widechar
                 * inbuf,
                 int *inlen, widechar * outbuf, int *outlen,
-                char *typeform, char *spacing, int *outputPos, int
+                formtype *typeform, char *spacing, int *outputPos, int
                 *inputPos, int *cursorPos, int mode)
 {
   char transSpec[MAXSTRING];
@@ -112,7 +112,8 @@
 other_backTranslate (const char *trantab, const widechar
                     * inbuf,
                     int *inlen, widechar * outbuf, int *outlen,
-                    char *typeform, char *spacing, int *outputPos, int
+                    formtype *typeform, char *spacing, int *outputPos,
+                    int
                     *inputPos, int *cursorPos, int mode)
 {
   char transSpec[MAXSTRING];
=======================================
--- /trunk/tools/lou_allround.c Wed Mar  6 11:13:16 2013 UTC
+++ /trunk/tools/lou_allround.c Wed Oct 23 15:12:24 2013 UTC
@@ -87,7 +87,7 @@
 static int enteredCursorPos = -1;
 static unsigned int mode;
 static char table[BUFSIZE];
-static char emphasis[BUFSIZE];
+static formtype emphasis[BUFSIZE];
 static char spacing[BUFSIZE];
 static char enteredEmphasis[BUFSIZE];
 static char enteredSpacing[BUFSIZE];
@@ -364,7 +364,9 @@
       else
        while (1)
          {
-           strcpy (emphasis, enteredEmphasis);
+           for (k = 0; k < strlen (enteredEmphasis); k++)
+             emphasis[k] = enteredEmphasis[k];
+           emphasis[k] = 0;
            strcpy (spacing, enteredSpacing);
            cursorPos = enteredCursorPos;
            inlen = getInput ();
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: