[PATCH] dcopidl - accepting '\r' characters

Jarosław Staniek js at iidea.pl
Fri Feb 11 11:14:52 GMT 2005


> Jarosław Staniek wrote:
> 
>>qFatal() was raised because of unrecognizable character '\r'.
>>These characters may usually come from macosx or win32 environments.
>>Since macosx and win32 KDE developemnt became something real, there may
>>exist (at least by accident) source files with '\r' character. My patch
>>accepts them by removing before parsing, as C/C++ preprocessors do.
>>
>>Ok to commit?
> 
> 
> Isn't it possible to condense \r\n into \n instead? I don't think simply 
> eating all \r is healthy.

That's better indeed. but not tr/\r/\n/ -- see below.

> Stray \r in the source code is certainly corrupted file.
> 
> BTW, doesn't Mac use \r alone as its line-breaking character? 

Yeas it is.

If so, maybe
> tr/\r/\n/ is the way to go, since whitespaces are whitespaces anywhere.

What about this?

#define BLAH \<-----\r\n here
   FOOBAR

Applying tr/\r/\n/ will result:

#define BLAH \<-----\n here
<--- \n here, ERROR
   FOOBAR

-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska / Kexi Team
  Developers Wanted! Kexi 0.1 Beta 5 Released: http://www.kexi-project.org
  KDElibs/Windows: http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32





More information about the kde-core-devel mailing list