On Fri, 15 Jul 2011, Ulrich Eckhardt wrote:
> On Thursday 14 July 2011 16:36:58 Vincent Torri wrote: >> raster added a 'dos2unix' function in epp to remove trailing \r (rev >> 59799). > > As I understand it, it converts '\r\n' to '\n' in a string. yes, that's what i mean by "trailing \r" >> However, when i compare the files generated by epp on Windows and >> linux (just after line 751 of edje_cc_parse.c), they have a different size >> (windows one is bigger). When I run the dos2unix tool I have on the >> windows file, then there is no difference between the unix and window file >> anymore. > > Where exactly is the difference in the file? when i'm doing the diff, it's all the file. > Does it have multiple lines at all? what do you mean ? > Try running hexdump/hd on it to get a bytewise comparison. can you tell me how i should use hexdump to compare the 2 files ? > There is a problem with the dos2unix function, it reads beyond the supplied > buffer if the last byte is a '\r'. i don't think that it's the last byte of the buffer. It really replace \r\n by \n evrytime it sees it. > I don't think this is actually a problem, > because the allocated buffer is two bytes (why two?) larger than the file's > size. Also, it allocates another, even larger buffer although it can only > shrink the required length. I'm not sure if any combination of events there > can lead to any weirdness. Just to be sure, can you try the attached patch. Ok, i'll try it thanks Vincent ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
