mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +09:00
Bug 1427732 - fix newline handling when copying messages and compacting folders.
Tag #1273
This commit is contained in:
parent
f14a669d8b
commit
11084d5e8c
6 changed files with 63 additions and 30 deletions
|
|
@ -178,6 +178,19 @@ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MAILNEWS, value)
|
|||
#define MSG_LINEBREAK_LEN 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* On Windows, we use \r\n as the line terminator in mbox files. On
|
||||
* other platforms, we use \n. However, we need to be able to
|
||||
* recognize line terminators produced on any platform, because we
|
||||
* allow profiles (including the mbox files they contain) to be shared
|
||||
* between platforms.
|
||||
*
|
||||
* Returns 0 (i.e., false) if the line is not blank, or otherwise the
|
||||
* length of the line terminator, i.e., 1 for \n or 2 for \r\n.
|
||||
*/
|
||||
#define IS_MSG_LINEBREAK(line) \
|
||||
(line[0] == '\012' ? 1 : ((line[0] == '\015' && line[1] == '\012') ? 2 : 0))
|
||||
|
||||
#define NS_MSG_BASE
|
||||
#define NS_MSG_BASE_STATIC_MEMBER_(type) type
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue