Updated parts of code from libical.cvs which removes hardcoded LF

Bug 254356: incorrect line endings
This commit is contained in:
mostafah%oeone.com 2004-09-10 13:38:38 +00:00
Родитель 226b7a0a73
Коммит d5fabce17c
2 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -2,7 +2,7 @@
FILE: icalcomponent.c
CREATOR: eric 28 April 1999
$Id: icalcomponent.c,v 1.14 2004-03-12 20:14:52 mostafah%oeone.com Exp $
$Id: icalcomponent.c,v 1.15 2004-09-10 13:38:38 mostafah%oeone.com Exp $
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
@ -283,15 +283,11 @@ icalcomponent_as_ical_string (icalcomponent* component)
pvl_elem itr;
struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
/* WIN32 automatically adds the \r, Anybody else need it?
#ifdef ICAL_UNIX_NEWLINE
*/
char newline[] = "\n";
/*
#else
char newline[] = "\r\n";
#endif
*/
icalcomponent *c;
icalproperty *p;

Просмотреть файл

@ -4,7 +4,7 @@
FILE: icalproperty.c
CREATOR: eric 28 April 1999
$Id: icalproperty.c,v 1.5 2004-09-07 16:12:29 mostafah%oeone.com Exp $
$Id: icalproperty.c,v 1.6 2004-09-10 13:38:38 mostafah%oeone.com Exp $
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
@ -197,10 +197,12 @@ icalproperty* icalproperty_new_from_string(const char* str)
/* Is this a HACK or a crafty reuse of code? */
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:VCALENDAR\n");
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:VCALENDAR");
icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
icalmemory_append_string(&buf, &buf_ptr, &buf_size, str);
icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "END:VCALENDAR\n");
icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
icalmemory_append_string(&buf, &buf_ptr, &buf_size, "END:VCALENDAR");
icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline);
comp = icalparser_parse_string(buf);