-rw-r--r-- | library/backend/vobject.cpp | 7 | ||||
-rw-r--r-- | library/backend/vobject_p.h | 15 |
2 files changed, 21 insertions, 1 deletions
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp index dab128e..2f22c20 100644 --- a/library/backend/vobject.cpp +++ b/library/backend/vobject.cpp | |||
@@ -1294,22 +1294,27 @@ DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list) | |||
1294 | QFileDirect f( fname); | 1294 | QFileDirect f( fname); |
1295 | if ( !f.open( IO_WriteOnly ) ) { | 1295 | if ( !f.open( IO_WriteOnly ) ) { |
1296 | qWarning("Unable to open vobject write %s", fname); | 1296 | qWarning("Unable to open vobject write %s", fname); |
1297 | return; | 1297 | return; |
1298 | } | 1298 | } |
1299 | 1299 | ||
1300 | while (list) { | 1300 | while (list) { |
1301 | writeVObject(f.directHandle(),list); | 1301 | writeVObject(f.directHandle(),list); |
1302 | list = nextVObjectInList(list); | 1302 | list = nextVObjectInList(list); |
1303 | } | 1303 | } |
1304 | } | 1304 | } |
1305 | 1305 | ||
1306 | #ifndef __SHARP_COMP_ | ||
1307 | |||
1308 | // This function is not available in the Sharp ROM for SL 5500 ! | ||
1309 | // Therefore I have to move it into the header file.. (se) | ||
1310 | |||
1306 | DLLEXPORT(const char *) vObjectTypeInfo(VObject *o) | 1311 | DLLEXPORT(const char *) vObjectTypeInfo(VObject *o) |
1307 | { | 1312 | { |
1308 | const char *type = vObjectName( o ); | 1313 | const char *type = vObjectName( o ); |
1309 | if ( strcmp( type, "TYPE" ) == 0 ) | 1314 | if ( strcmp( type, "TYPE" ) == 0 ) |
1310 | type = vObjectStringZValue( o ); | 1315 | type = vObjectStringZValue( o ); |
1311 | return type; | 1316 | return type; |
1312 | } | 1317 | } |
1313 | 1318 | #endif | |
1314 | 1319 | ||
1315 | // end of source file vobject.c | 1320 | // end of source file vobject.c |
diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h index 0d0a2a8..bab22bb 100644 --- a/library/backend/vobject_p.h +++ b/library/backend/vobject_p.h | |||
@@ -389,18 +389,33 @@ If you are linking this code into your build directly then | |||
389 | you may find them a more convenient API that the other flavors | 389 | you may find them a more convenient API that the other flavors |
390 | that take a file name. If you use them with the DLL LIB you | 390 | that take a file name. If you use them with the DLL LIB you |
391 | will get a link error. | 391 | will get a link error. |
392 | */ | 392 | */ |
393 | 393 | ||
394 | 394 | ||
395 | #if INCLUDEMFC | 395 | #if INCLUDEMFC |
396 | extern VObject* Parse_MIME_FromFile(CFile *file); | 396 | extern VObject* Parse_MIME_FromFile(CFile *file); |
397 | #else | 397 | #else |
398 | extern VObject* Parse_MIME_FromFile(FILE *file); | 398 | extern VObject* Parse_MIME_FromFile(FILE *file); |
399 | #endif | 399 | #endif |
400 | 400 | ||
401 | #define __SHARP_COMP_ | ||
402 | |||
403 | #ifndef __SHARP_COMP_ | ||
401 | extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); | 404 | extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); |
402 | 405 | ||
406 | #else | ||
407 | // This function is not available in the Sharp ROM for SL 5500 ! | ||
408 | // Therefore I have to move it into the header file.. (se) | ||
409 | |||
410 | inline const char* vObjectTypeInfo(VObject *o) | ||
411 | { | ||
412 | const char *type = vObjectName( o ); | ||
413 | if ( strcmp( type, "TYPE" ) == 0 ) | ||
414 | type = vObjectStringZValue( o ); | ||
415 | return type; | ||
416 | } | ||
417 | #endif | ||
403 | 418 | ||
404 | #endif /* __VOBJECT_H__ */ | 419 | #endif /* __VOBJECT_H__ */ |
405 | 420 | ||
406 | 421 | ||