summaryrefslogtreecommitdiff
path: root/library/backend
authorzecke <zecke>2002-10-15 21:42:20 (UTC)
committer zecke <zecke>2002-10-15 21:42:20 (UTC)
commit676be5604cbdb3213c00775e0ff66f4e766f8dcb (patch) (unidiff)
tree63c29adab530a60371f78880ff75e2689398e239 /library/backend
parentb774e015816e51ac65e5d1c685306f8404a3a19e (diff)
downloadopie-676be5604cbdb3213c00775e0ff66f4e766f8dcb.zip
opie-676be5604cbdb3213c00775e0ff66f4e766f8dcb.tar.gz
opie-676be5604cbdb3213c00775e0ff66f4e766f8dcb.tar.bz2
Actually most of them are -+ cause I opened them in xemacs..
The main goal is to replace some header names to let them be overwritten by external once so "qpeapplication.h" is now <qpe/qpeapplication.h> I'll check if it's building on non Qt2/X11 systems...
Diffstat (limited to 'library/backend') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vcc.y2
-rw-r--r--library/backend/vcc_yacc.cpp2
-rw-r--r--library/backend/vobject.cpp116
3 files changed, 60 insertions, 60 deletions
diff --git a/library/backend/vcc.y b/library/backend/vcc.y
index 5bcf0cb..6781312 100644
--- a/library/backend/vcc.y
+++ b/library/backend/vcc.y
@@ -122,7 +122,7 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
122//#ifdef PALMTOPCENTER 122//#ifdef PALMTOPCENTER
123//#include <qpe/vobject_p.h> 123//#include <qpe/vobject_p.h>
124//#else 124//#else
125#include "vobject_p.h" 125#include <qtopia/private/vobject_p.h>
126//#endif 126//#endif
127 127
128/**** Types, Constants ****/ 128/**** Types, Constants ****/
diff --git a/library/backend/vcc_yacc.cpp b/library/backend/vcc_yacc.cpp
index 19a108f..b2b0c14 100644
--- a/library/backend/vcc_yacc.cpp
+++ b/library/backend/vcc_yacc.cpp
@@ -158,7 +158,7 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
158/*#ifdef PALMTOPCENTER */ 158/*#ifdef PALMTOPCENTER */
159/*#include <qpe/vobject_p.h> */ 159/*#include <qpe/vobject_p.h> */
160/*#else */ 160/*#else */
161#include "vobject_p.h" 161#include <qtopia/private/vobject_p.h>
162/*#endif */ 162/*#endif */
163 163
164/**** Types, Constants ****/ 164/**** Types, Constants ****/
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
index e6f6b78..dab128e 100644
--- a/library/backend/vobject.cpp
+++ b/library/backend/vobject.cpp
@@ -1,44 +1,44 @@
1/*************************************************************************** 1/***************************************************************************
2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International 2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
3Business Machines Corporation and Siemens Rolm Communications Inc. 3Business Machines Corporation and Siemens Rolm Communications Inc.
4 4
5For purposes of this license notice, the term Licensors shall mean, 5For purposes of this license notice, the term Licensors shall mean,
6collectively, Apple Computer, Inc., AT&T Corp., International 6collectively, Apple Computer, Inc., AT&T Corp., International
7Business Machines Corporation and Siemens Rolm Communications Inc. 7Business Machines Corporation and Siemens Rolm Communications Inc.
8The term Licensor shall mean any of the Licensors. 8The term Licensor shall mean any of the Licensors.
9 9
10Subject to acceptance of the following conditions, permission is hereby 10Subject to acceptance of the following conditions, permission is hereby
11granted by Licensors without the need for written agreement and without 11granted by Licensors without the need for written agreement and without
12license or royalty fees, to use, copy, modify and distribute this 12license or royalty fees, to use, copy, modify and distribute this
13software for any purpose. 13software for any purpose.
14 14
15The above copyright notice and the following four paragraphs must be 15The above copyright notice and the following four paragraphs must be
16reproduced in all copies of this software and any software including 16reproduced in all copies of this software and any software including
17this software. 17this software.
18 18
19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE 19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR 20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
21MODIFICATIONS. 21MODIFICATIONS.
22 22
23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, 23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT 24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26DAMAGE. 26DAMAGE.
27 27
28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, 28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE 29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31PURPOSE. 31PURPOSE.
32 32
33The software is provided with RESTRICTED RIGHTS. Use, duplication, or 33The software is provided with RESTRICTED RIGHTS. Use, duplication, or
34disclosure by the government are subject to restrictions set forth in 34disclosure by the government are subject to restrictions set forth in
35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. 35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
36 36
37***************************************************************************/ 37***************************************************************************/
38 38
39/* 39/*
40 * src: vobject.c 40 * src: vobject.c
41 * doc: vobject and APIs to construct vobject, APIs pretty print 41 * doc: vobject and APIs to construct vobject, APIs pretty print
42 * vobject, and convert a vobject into its textual representation. 42 * vobject, and convert a vobject into its textual representation.
43 */ 43 */
44 44
@@ -46,8 +46,8 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
46#include <malloc.h> 46#include <malloc.h>
47#endif 47#endif
48 48
49#include "vobject_p.h" 49#include <qtopia/private/vobject_p.h>
50#include "qfiledirect_p.h" 50#include <qtopia/private/qfiledirect_p.h>
51#include <string.h> 51#include <string.h>
52#include <stdio.h> 52#include <stdio.h>
53#include <fcntl.h> 53#include <fcntl.h>
@@ -327,18 +327,18 @@ DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size
327 327
328DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o) 328DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
329{ 329{
330 i->start = o->prop; 330 i->start = o->prop;
331 i->next = 0; 331 i->next = 0;
332} 332}
333 333
334DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o) 334DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
335{ 335{
336 i->start = o->next; 336 i->start = o->next;
337 i->next = 0; 337 i->next = 0;
338} 338}
339 339
340DLLEXPORT(int) moreIteration(VObjectIterator *i) 340DLLEXPORT(int) moreIteration(VObjectIterator *i)
341{ 341{
342 return (i->start && (i->next==0 || i->next!=i->start)); 342 return (i->start && (i->next==0 || i->next!=i->start));
343} 343}
344 344
@@ -403,7 +403,7 @@ DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
403 t = addProp(t,VCGroupingProp); 403 t = addProp(t,VCGroupingProp);
404 setVObjectStringZValue(t,lookupProp_(n)); 404 setVObjectStringZValue(t,lookupProp_(n));
405 } while (n != gs); 405 } while (n != gs);
406 deleteStr(gs); 406 deleteStr(gs);
407 return p; 407 return p;
408 } 408 }
409 else 409 else
@@ -799,12 +799,12 @@ static struct PreDefProp* lookupPropInfo(const char* str)
799{ 799{
800 /* brute force for now, could use a hash table here. */ 800 /* brute force for now, could use a hash table here. */
801 int i; 801 int i;
802 802
803 for (i = 0; propNames[i].name; i++) 803 for (i = 0; propNames[i].name; i++)
804 if (qstricmp(str, propNames[i].name) == 0) { 804 if (qstricmp(str, propNames[i].name) == 0) {
805 return &propNames[i]; 805 return &propNames[i];
806 } 806 }
807 807
808 return 0; 808 return 0;
809} 809}
810 810
@@ -812,7 +812,7 @@ static struct PreDefProp* lookupPropInfo(const char* str)
812DLLEXPORT(const char*) lookupProp_(const char* str) 812DLLEXPORT(const char*) lookupProp_(const char* str)
813{ 813{
814 int i; 814 int i;
815 815
816 for (i = 0; propNames[i].name; i++) 816 for (i = 0; propNames[i].name; i++)
817 if (qstricmp(str, propNames[i].name) == 0) { 817 if (qstricmp(str, propNames[i].name) == 0) {
818 const char* s; 818 const char* s;
@@ -826,7 +826,7 @@ DLLEXPORT(const char*) lookupProp_(const char* str)
826DLLEXPORT(const char*) lookupProp(const char* str) 826DLLEXPORT(const char*) lookupProp(const char* str)
827{ 827{
828 int i; 828 int i;
829 829
830 for (i = 0; propNames[i].name; i++) 830 for (i = 0; propNames[i].name; i++)
831 if (qstricmp(str, propNames[i].name) == 0) { 831 if (qstricmp(str, propNames[i].name) == 0) {
832 const char *s; 832 const char *s;
@@ -1005,27 +1005,27 @@ static int writeBase64(OFile *fp, unsigned char *s, long len)
1005 return 1; 1005 return 1;
1006} 1006}
1007 1007
1008static const char *replaceChar(unsigned char c) 1008static const char *replaceChar(unsigned char c)
1009{ 1009{
1010 if (c == '\n') { 1010 if (c == '\n') {
1011 return "=0A=\n"; 1011 return "=0A=\n";
1012 } else if ( 1012 } else if (
1013 (c >= 'A' && c <= 'Z') 1013 (c >= 'A' && c <= 'Z')
1014 || 1014 ||
1015 (c >= 'a' && c <= 'z') 1015 (c >= 'a' && c <= 'z')
1016 || 1016 ||
1017 (c >= '0' && c <= '9') 1017 (c >= '0' && c <= '9')
1018 || 1018 ||
1019 (c >= '\'' && c <= ')') 1019 (c >= '\'' && c <= ')')
1020 || 1020 ||
1021 (c >= '+' && c <= '-') 1021 (c >= '+' && c <= '-')
1022 || 1022 ||
1023 (c == '/') 1023 (c == '/')
1024 || 1024 ||
1025 (c == '?') 1025 (c == '?')
1026 || 1026 ||
1027 (c == ' ')) 1027 (c == ' '))
1028 { 1028 {
1029 return 0; 1029 return 0;
1030 } 1030 }
1031 1031
@@ -1051,7 +1051,7 @@ static const char *replaceChar(unsigned char c)
1051static void writeQPString(OFile *fp, const char *s) 1051static void writeQPString(OFile *fp, const char *s)
1052{ 1052{
1053 /* 1053 /*
1054 only A-Z, 0-9 and 1054 only A-Z, 0-9 and
1055 "'" (ASCII code 39) 1055 "'" (ASCII code 39)
1056 "(" (ASCII code 40) 1056 "(" (ASCII code 40)
1057 ")" (ASCII code 41) 1057 ")" (ASCII code 41)
@@ -1060,7 +1060,7 @@ static void writeQPString(OFile *fp, const char *s)
1060 "-" (ASCII code 45) 1060 "-" (ASCII code 45)
1061 "/" (ASCII code 47) 1061 "/" (ASCII code 47)
1062 "?" (ASCII code 63) 1062 "?" (ASCII code 63)
1063 1063
1064 should remain un-encoded. 1064 should remain un-encoded.
1065 '=' needs to be encoded as it is the escape character. 1065 '=' needs to be encoded as it is the escape character.
1066 ';' needs to be as it is a field separator. 1066 ';' needs to be as it is a field separator.
@@ -1093,7 +1093,7 @@ static bool includesUnprintable(VObject *o)
1093 } 1093 }
1094 return FALSE; 1094 return FALSE;
1095} 1095}
1096 1096
1097static void writeVObject_(OFile *fp, VObject *o); 1097static void writeVObject_(OFile *fp, VObject *o);
1098 1098
1099static void writeValue(OFile *fp, VObject *o, unsigned long size) 1099static void writeValue(OFile *fp, VObject *o, unsigned long size)
@@ -1229,7 +1229,7 @@ static void writeProp(OFile *fp, VObject *o)
1229 } 1229 }
1230 } 1230 }
1231 1231
1232 1232
1233 if (VALUE_TYPE(o)) { 1233 if (VALUE_TYPE(o)) {
1234 if ( includesUnprintable(o) ) { 1234 if ( includesUnprintable(o) ) {
1235 appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp); 1235 appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp);