Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        ecore_x_events.c 


Log Message:
Accept both \r\n and \n as file termination.

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- ecore_x_events.c    24 Mar 2005 19:24:09 -0000      1.48
+++ ecore_x_events.c    24 Mar 2005 20:52:27 -0000      1.49
@@ -1116,12 +1116,16 @@
                    }
                  else
                    {
-                      if (data[is] != '\n')
+                      if ((data[is] != '\r')
+                          && (data[is] != '\n'))
                         {
-                           tmp[i++] = data[is];
+                           tmp[i++] = data[is++];
                         }
                       else
                         {
+                           while ((data[is] == '\r')
+                                  || (data[is] == '\n'))
+                             is++;
                            tmp[i] = 0;
                            e->num_files++;
                            e->files = realloc(e->files, e->num_files * 
sizeof(char *));
@@ -1129,7 +1133,6 @@
                            tmp[0] = 0;
                            i = 0;
                         }
-                      is++;
                    }
               }
             if (i > 0)




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to