File toycars-constchar.patch of Package toycars
Index: toycars_track_editor/src/TrackView.cxx
===================================================================
--- toycars_track_editor/src/TrackView.cxx.orig
+++ toycars_track_editor/src/TrackView.cxx
@@ -89,7 +89,7 @@ TiXmlDocument *findXMLFile(const char *f
//{jpg,png,bmp,pnm,pbm,pgm,ppm}
Fl_Image* loadImage(const char *filename)
{
- char *suffix = strrchr(filename, '.');
+ const char *suffix = strrchr(filename, '.');
if (suffix == NULL)
return NULL;
if (strcmp(suffix,".jpg") == 0)
@@ -969,13 +969,13 @@ void TrackView::installMap(const char *n
uninstallMap(name);
// chop off any .xml suffix
- temp = strrchr(name, '.');
+ temp = (char *)strrchr(name, '.');
if (temp) {
if (strcmp(temp, ".xml") == 0)
temp[0] = '\0';
}
// remove path
- temp = strrchr(name, '/');
+ temp = (char *)strrchr(name, '/');
if (temp) {
strncpy(trackname, temp+1, 255);
}
@@ -1044,13 +1044,13 @@ void TrackView::uninstallMap(const char
char *temp;
// chop off any .xml suffix
- temp = strrchr(name, '.');
+ temp = (char *)strrchr(name, '.');
if (temp) {
if (strcmp(temp, ".xml") == 0)
temp[0] = '\0';
}
// remove path
- temp = strrchr(name, '/');
+ temp = (char *)strrchr(name, '/');
if (temp) {
strncpy(trackname, temp+1, 255);
}
Index: toycars_vehicle_editor/src/VehicleObject.cpp
===================================================================
--- toycars_vehicle_editor/src/VehicleObject.cpp.orig
+++ toycars_vehicle_editor/src/VehicleObject.cpp
@@ -533,13 +533,13 @@ void VehicleObject::installVehicle(const
uninstallVehicle(name);
// chop off any .xml suffix
- temp = strrchr(name, '.');
+ temp = (char *)strrchr(name, '.');
if (temp) {
if (strcmp(temp, ".xml") == 0)
temp[0] = '\0';
}
// remove path
- temp = strrchr(name, '/');
+ temp = (char *)strrchr(name, '/');
if (temp) {
strncpy(carname, temp+1, 255);
}
@@ -610,13 +610,13 @@ void VehicleObject::uninstallVehicle(con
char *temp;
// chop off any .xml suffix
- temp = strrchr(name, '.');
+ temp = (char *)strrchr(name, '.');
if (temp) {
if (strcmp(temp, ".xml") == 0)
temp[0] = '\0';
}
// remove path
- temp = strrchr(name, '/');
+ temp = (char *)strrchr(name, '/');
if (temp) {
strncpy(carname, temp+1, 255);
}
Index: toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
===================================================================
--- toycars_vehicle_editor/src/LoadSpriteFromImage.cpp.orig
+++ toycars_vehicle_editor/src/LoadSpriteFromImage.cpp
@@ -23,7 +23,7 @@
//{jpg,png,bmp,pnm,pbm,pgm,ppm}
Fl_Image* loadImage(const char *filename)
{
- char *suffix = strrchr(filename, '.');
+ const char *suffix = strrchr(filename, '.');
if (suffix == NULL)
return NULL;
if (strcmp(suffix,".jpg") == 0)