diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-10-13 13:45:17 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-13 13:49:24 +0300 |
commit | 6954aad4e5c99ce193d3dd60a43f6d41d7c0a87f (patch) | |
tree | ffba0bee05b37a70311ae198281f420600e30127 /include/sal/config.h | |
parent | 8ede32d15735b78e3528107bfbcfb69e3beb7439 (diff) |
Reduce copypasta: Introduce SAL_NEWLINE_STRING and use it
Contains the platform-dependent on-disk line separator ("\r\n" for Windows,
"\n" otherwise, and yes, I assume an ASCII-based world).
Use it instead of static constant char array fields, with ifdeffed
initialisations, in various classes here and there.
Change-Id: Ibea1f2cc1acfb8cc067c3892a41f73bf44f2c78a
Diffstat (limited to 'include/sal/config.h')
-rw-r--r-- | include/sal/config.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sal/config.h b/include/sal/config.h index bd2b833fae89..a7943a50210f 100644 --- a/include/sal/config.h +++ b/include/sal/config.h @@ -31,6 +31,7 @@ #define SAL_DLLEXTENSION ".dll" #define SAL_PATHSEPARATOR ';' #define SAL_PATHDELIMITER '\\' +#define SAL_NEWLINE_STRING "\r\n" #define SAL_CONFIGFILE( name ) name ".ini" #ifdef _MSC_VER @@ -58,6 +59,7 @@ #define SAL_DLLPREFIX "lib" #define SAL_PATHSEPARATOR ':' #define SAL_PATHDELIMITER '/' +#define SAL_NEWLINE_STRING "\n" #define SAL_CONFIGFILE( name ) name "rc" #endif @@ -67,6 +69,7 @@ #define SAL_DLLPREFIX "lib" #define SAL_PATHSEPARATOR ':' #define SAL_PATHDELIMITER '/' +#define SAL_NEWLINE_STRING "\n" #define SAL_CONFIGFILE( name ) name "rc" #endif @@ -79,6 +82,7 @@ #define SAL_DLLPREFIX "lib" #define SAL_PATHSEPARATOR ':' #define SAL_PATHDELIMITER '/' +#define SAL_NEWLINE_STRING "\n" #define SAL_CONFIGFILE( name ) name "rc" #endif |