[liblouis-liblouisxml] [liblouis] r858 committed - Fix more compiler warnings

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 13 Dec 2012 15:25:50 +0000

Revision: 858
Author:   bertfrees@xxxxxxxxx
Date:     Thu Dec 13 07:25:39 2012
Log:      Fix more compiler warnings
http://code.google.com/p/liblouis/source/detail?r=858

Modified:
 /trunk/liblouis/lou_translateString.c
 /trunk/liblouis/louis.h
 /trunk/tests/typeform.c

=======================================
--- /trunk/liblouis/lou_translateString.c       Mon Dec  3 08:29:45 2012
+++ /trunk/liblouis/lou_translateString.c       Thu Dec 13 07:25:39 2012
@@ -68,7 +68,7 @@
                 int *inlen, widechar * outbuf, int *outlen,
                 char *typeform, char *spacing, int *outputPos,
                 int *inputPos, int *cursorPos,
-                TranslationTableRule ** rules, int *rulesLen, int modex)
+                const TranslationTableRule ** rules, int *rulesLen, int modex)
 {
   int k;
   int goodTrans = 1;
=======================================
--- /trunk/liblouis/louis.h     Mon Oct 22 06:19:53 2012
+++ /trunk/liblouis/louis.h     Thu Dec 13 07:25:39 2012
@@ -553,7 +553,7 @@
                        int* inlen, widechar* outbuf, int* outlen,
                        char* typeform, char* spacing, int* outputPos,
                        int* inputPos, int* cursorPos,
-                       TranslationTableRule** rules, int* rulesLen,
+                       const TranslationTableRule** rules, int* rulesLen,
                        int mode);

   char * getLastTableList();
=======================================
--- /trunk/tests/typeform.c     Thu Dec 13 05:32:50 2012
+++ /trunk/tests/typeform.c     Thu Dec 13 07:25:39 2012
@@ -8,7 +8,6 @@
 main (int argc, char **argv)
 {
     const char* strings[] = {
-
                "I",
                "Alice's Adventures In Wonderland",
                "II",
@@ -640,11 +639,11 @@
"\"I wish I hadn't mentioned Dinah!\" she said to herself in a\n melancholy tone. \"Nobody seems to like her, down here, and I'm sure she's the\n best cat in the world! Oh, my dear Dinah! I wonder if I shall ever\n see you any more!\" And here poor Alice began to cry again, for she\n felt very lonely and low-spirited. In a little while, however, she again heard a\n little pattering of footsteps in the distance, and she looked up eagerly, half\n hoping that the Mousehad changed his mind, and was coming back to\n finish his story."
     };

-    char* table = "unicode.dis,en-us-g2.ctb";
+    const char* table = "unicode.dis,en-us-g2.ctb";
+
     unsigned int i;
     int j;
     for (i=0; i < sizeof(strings)/sizeof(strings[0]); i++) {
-        /* printf("%s\n", strings[i]); */
         int inlen = strlen(strings[i]);
         int outlen = inlen * 3;
         widechar* inbuf = malloc(inlen * sizeof(widechar));
@@ -652,8 +651,7 @@
         char* typeform = malloc(outlen * sizeof(char));
         for (j=0; j<=inlen; j++)
             typeform[j] = 0;
-        if (!extParseChars(strings[i], inbuf))
-            return 1;
+        extParseChars(strings[i], inbuf);
if (!lou_translate(table, inbuf, &inlen, outbuf, &outlen, typeform, NULL, NULL, NULL, NULL, 0))
             return 1;
         free(inbuf);
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] [liblouis] r858 committed - Fix more compiler warnings - liblouis