Hi, It's normal that you are confusion, the cause is my terrible english!
An example of multiline value are: ADR;TYPE=WORK:;;Addressxx1[new line character] 2xxxxxxxxxxxxxxxxxxxxxxx3[new line character] 4xxxxxxxxxxxxxxxxxxxxxxx5[new line character] 6xxx;;;;[new line character] The value of this field is "Addressxx12xxxxxxxxxxxxxxxxxxxxxx34xxxxxxxxxxxxxxxxxxxxxx56xxx" So I must to join the 4 line into 1 string and skip the space character at begin of line and new line character at end of line. Now, the question is: > -------8<--------- > value_ml = malloc(strlen(vcard) - (value - vcard)); > -------8<--------- > > Are you sure that this is correct? I need a new buffer to concatenate the four lines. The variable "value" point to the character "A" of "Addressxx1" word, and I don't know the size of the entire multiline-values because I don't finish to parse it so I need to reserve a buffer with size equal at size of vcard minus the number of character that I already parse before the beginning of multiline value (value - vcard) so I'm sure to have enough space. Do you agree wit me? I hope that this e-mail is more clear that the first! Regards Sergio Il giorno gio, 03/11/2005 alle 20.39 +0100, Nabil Sayegh ha scritto: > Am Freitag 28 Oktober 2005 15:19 schrieb Sergio CERLESI: > > Hi, > > > > I don't know the size of multiline value so, I reserve a buffer with > > size equal to size of vcard (strlen(vcard)) minus the size of vcard > > before the begin of value (value - vcard) so I have a buffer with the > > maximum size the multiline-value can have. > > Sorry for the confusion, I thought 'value' is actually a value :-/ ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Synce-devel mailing list Synce-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synce-devel