[liblouis-liblouisxml] [liblouis] r717 committed - Make sure we have valid code according to C90

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 04 Jul 2012 09:12:25 +0000

Revision: 717
Author:   christian.egli@xxxxxxxxxxxxxx
Date:     Wed Jul  4 02:12:20 2012
Log:      Make sure we have valid code according to C90

http://code.google.com/p/liblouis/source/detail?r=717

Modified:
 /trunk/tests/squash_space.c

=======================================
--- /trunk/tests/squash_space.c Fri Jun  1 14:06:45 2012
+++ /trunk/tests/squash_space.c Wed Jul  4 02:12:20 2012
@@ -6,7 +6,9 @@
 int main(int argc, char **argv)
 {

+  int i;
   int result = 0;
+
   const char *tests[] = {
     /* first column is the text, the second is the expected value */
     " ", " ",
@@ -46,11 +48,6 @@
     "\n    ",     "\n "
   };

-  int tests_len = sizeof(tests)/sizeof(char*);
-
-  for (int i = 0; i < tests_len; i += 2)
- result |= check_translation("squash_space_with_repeated.utb", tests[i], NULL, tests[i+1]);
-
   /* A number of strings that we want to squash, i.e. they should all
      result in an output of one space */
   const char *strings[] = {
@@ -95,15 +92,20 @@
   };
   const char *expected = " ";

+  int tests_len = sizeof(tests)/sizeof(char*);
+
+  for (i = 0; i < tests_len; i += 2)
+ result |= check_translation("squash_space_with_repeated.utb", tests[i], NULL, tests[i+1]);
+
   tests_len = sizeof(strings)/sizeof(char*);

-  for (int i = 0; i < tests_len; i++)
+  for (i = 0; i < tests_len; i++)
result |= check_translation("squash_space_with_correct.utb", strings[i], NULL, expected);

-  for (int i = 0; i < tests_len; i++)
+  for (i = 0; i < tests_len; i++)
result |= check_translation("squash_space_with_context_1.utb", strings[i], NULL, expected);

-  for (int i = 0; i < tests_len; i++)
+  for (i = 0; i < tests_len; i++)
result |= check_translation("squash_space_with_context_2.utb", strings[i], NULL, expected);


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] r717 committed - Make sure we have valid code according to C90 - liblouis