Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:pchenthill
evolution-data-server
bnc-193961-save-attach-cal-dont-retrieve.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc-193961-save-attach-cal-dont-retrieve.patch of Package evolution-data-server
Index: calendar/libical/src/libical/icalvalue.c =================================================================== RCS file: /cvs/gnome/libical/src/libical/icalvalue.c,v retrieving revision 1.21 retrieving revision 1.23 diff -u -p -r1.21 -r1.23 --- calendar/libical/src/libical/icalvalue.c 21 Oct 2003 18:28:27 -0000 1.21 +++ calendar/libical/src/libical/icalvalue.c 3 Jul 2006 14:29:43 -0000 1.23 @@ -4,7 +4,7 @@ FILE: icalvalue.c CREATOR: eric 02 May 1999 - $Id: icalvalue.c,v 1.21 2003/10/21 18:28:27 ettore Exp $ + $Id: icalvalue.c,v 1.23 2006/07/03 14:29:43 kharish Exp $ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -1317,6 +1317,45 @@ int icalvalue_encode_ical_string(const c return 1; } + +int icalvalue_decode_ical_string(const char *szText, char *szDecText, int nMaxBufferLen) +{ + char *str, *str_p; + const char *p; + icalvalue *value = 0; + size_t buf_sz; + + if ((szText == 0) || (szDecText == 0)) + return 0; + + buf_sz = strlen(szText); + str_p = str = (char*)icalmemory_new_buffer(buf_sz); + + if (str_p == 0){ + return 0; + } + + for (p=szText; *p!=0; p++) { + if (*p == '\\') { + icalmemory_append_char (&str,&str_p,&buf_sz,*(p+1)); + p++; + } + else + icalmemory_append_char (&str,&str_p,&buf_sz,*p); + } + + icalmemory_append_char(&str,&str_p,&buf_sz,'\0'); + + if ((int)strlen(str) > nMaxBufferLen) { + return 0; + } + + strcpy(szDecText, str); + + icalmemory_free_buffer(str); + return 1; +} + /* The remaining interfaces are 'new', 'set' and 'get' for each of the value types */ Index: calendar/libical/src/libical/icalvalue.h =================================================================== RCS file: /cvs/gnome/libical/src/libical/icalvalue.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- calendar/libical/src/libical/icalvalue.h 21 Oct 2003 18:28:27 -0000 1.12 +++ calendar/libical/src/libical/icalvalue.h 15 Jun 2006 14:42:21 -0000 1.13 @@ -4,7 +4,7 @@ CREATOR: eric 20 March 1999 - $Id: icalvalue.h,v 1.12 2003/10/21 18:28:27 ettore Exp $ + $Id: icalvalue.h,v 1.13 2006/06/15 14:42:21 kharish Exp $ $Locker: $ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -84,5 +84,8 @@ int icalvalue_kind_is_valid(const icalva /** Encode a character string in ical format, esacpe certain characters, etc. */ int icalvalue_encode_ical_string(const char *szText, char *szEncText, int MaxBufferLen); + +/** Extract the original character string encoded by the above function **/ +int icalvalue_decode_ical_string(const char *szText, char *szDecText, int nMaxBufferLen); #endif /*ICALVALUE_H*/
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor