From c01aa37caaadb2e65667b1156a907e92e859fee8 Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Fri, 27 Apr 2007 12:58:35 +0000 Subject: Add cruise source code for scummvm svn-id: r26605 --- engines/cruise/stringSupport.cpp | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 engines/cruise/stringSupport.cpp (limited to 'engines/cruise/stringSupport.cpp') diff --git a/engines/cruise/stringSupport.cpp b/engines/cruise/stringSupport.cpp new file mode 100644 index 0000000000..8e9a5fa5ac --- /dev/null +++ b/engines/cruise/stringSupport.cpp @@ -0,0 +1,49 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2006 The ScummVM project + * + * cinE Engine is (C) 2004-2005 by CinE Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "cruise/cruise_main.h" + +namespace Cruise { + +void strcpyuint8(void* dest, void* source) +{ + strcpy((char*)dest,(char*)source); +} + +void strcatuint8(void* dest, void* source) +{ + strcat((char*)dest,(char*)source); +} + +uint8 strcmpuint8(void* string1, void* string2) +{ + return strcmp((char*)string1,(char*)string2); +} + +FILE* fopenuint8(void* name, void* param) +{ + return fopen((char*)name,(char*)param); +} + +} // End of namespace Cruise -- cgit v1.2.3 From 1ef6a1a7a1e76945ee37ac60989a79472a131739 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 27 Apr 2007 15:35:28 +0000 Subject: Fixing compilation for me svn-id: r26610 --- engines/cruise/stringSupport.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/cruise/stringSupport.cpp') diff --git a/engines/cruise/stringSupport.cpp b/engines/cruise/stringSupport.cpp index 8e9a5fa5ac..1421ba7943 100644 --- a/engines/cruise/stringSupport.cpp +++ b/engines/cruise/stringSupport.cpp @@ -26,24 +26,24 @@ namespace Cruise { -void strcpyuint8(void* dest, void* source) +void strcpyuint8(void* dest, const void* source) { - strcpy((char*)dest,(char*)source); + strcpy((char*)dest,(const char*)source); } -void strcatuint8(void* dest, void* source) +void strcatuint8(void* dest, const void* source) { - strcat((char*)dest,(char*)source); + strcat((char*)dest,(const char*)source); } -uint8 strcmpuint8(void* string1, void* string2) +uint8 strcmpuint8(const void* string1, const void* string2) { return strcmp((char*)string1,(char*)string2); } -FILE* fopenuint8(void* name, void* param) +FILE* fopenuint8(void* name, const void* param) { - return fopen((char*)name,(char*)param); + return fopen((char*)name,(const char*)param); } } // End of namespace Cruise -- cgit v1.2.3 From ffce26ebfea301ec33f3d485fa9dbaa0dffccb5b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 27 Apr 2007 22:33:45 +0000 Subject: Fix code formatting (partially) and guard defines in includes. svn-id: r26631 --- engines/cruise/stringSupport.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'engines/cruise/stringSupport.cpp') diff --git a/engines/cruise/stringSupport.cpp b/engines/cruise/stringSupport.cpp index 1421ba7943..b618d16f55 100644 --- a/engines/cruise/stringSupport.cpp +++ b/engines/cruise/stringSupport.cpp @@ -26,24 +26,20 @@ namespace Cruise { -void strcpyuint8(void* dest, const void* source) -{ - strcpy((char*)dest,(const char*)source); +void strcpyuint8(void *dest, const void *source) { + strcpy((char *)dest, (const char *)source); } -void strcatuint8(void* dest, const void* source) -{ - strcat((char*)dest,(const char*)source); +void strcatuint8(void *dest, const void *source) { + strcat((char *)dest, (const char *)source); } -uint8 strcmpuint8(const void* string1, const void* string2) -{ - return strcmp((char*)string1,(char*)string2); +uint8 strcmpuint8(const void *string1, const void *string2) { + return strcmp((char *)string1, (char *)string2); } -FILE* fopenuint8(void* name, const void* param) -{ - return fopen((char*)name,(const char*)param); +FILE *fopenuint8(void *name, const void *param) { + return fopen((char *)name, (const char *)param); } } // End of namespace Cruise -- cgit v1.2.3 From 246e83753a1585ca24e9629940df973be611a91b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 28 Apr 2007 09:03:11 +0000 Subject: Some minor cleanup (but we need to get rid of fopen/fread use here) svn-id: r26647 --- engines/cruise/stringSupport.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'engines/cruise/stringSupport.cpp') diff --git a/engines/cruise/stringSupport.cpp b/engines/cruise/stringSupport.cpp index b618d16f55..1343ba146d 100644 --- a/engines/cruise/stringSupport.cpp +++ b/engines/cruise/stringSupport.cpp @@ -38,8 +38,4 @@ uint8 strcmpuint8(const void *string1, const void *string2) { return strcmp((char *)string1, (char *)string2); } -FILE *fopenuint8(void *name, const void *param) { - return fopen((char *)name, (const char *)param); -} - } // End of namespace Cruise -- cgit v1.2.3