--- sar/disk.cpp.old 2006-04-08 12:06:34.000000000 +0200 +++ sar/disk.cpp 2006-04-08 12:08:13.000000000 +0200 @@ -131,11 +131,7 @@ return(0); // Dan S: typecast is due to const. -#if defined(__cplusplus) || defined(c_plusplus) - while(ISBLANK(reinterpret_cast(*path))) -#else while(ISBLANK(*path)) -#endif path++; return(*path == DIR_DELIMINATOR); --- sar/menumap.c.old 2006-04-08 11:41:01.000000000 +0200 +++ sar/menumap.c 2006-04-08 11:41:48.000000000 +0200 @@ -279,9 +279,10 @@ } /* Allocate structure */ - m->object[n] = (void *)map = SAR_MENU_MAP(calloc( + m->object[n] = SAR_MENU_MAP(calloc( 1, sizeof(sar_menu_map_struct) )); + map = (sar_menu_map_struct *)m->object[n]; if(map == NULL) return(-1); --- sar/sarfioopen.c.old 2006-04-08 11:43:53.000000000 +0200 +++ sar/sarfioopen.c 2006-04-08 12:02:13.000000000 +0200 @@ -270,7 +270,7 @@ ) { sar_parm_version_struct *pv = - (sar_parm_version_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_VERSION ); @@ -295,7 +295,7 @@ ) { sar_parm_name_struct *pv = - (sar_parm_name_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NAME ); @@ -311,7 +311,7 @@ ) { sar_parm_description_struct *pv = - (sar_parm_description_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_DESCRIPTION ); @@ -326,7 +326,7 @@ ) { sar_parm_player_model_file_struct *pv = - (sar_parm_player_model_file_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_PLAYER_MODEL_FILE ); @@ -343,7 +343,7 @@ ) { sar_parm_weather_struct *pv = - (sar_parm_weather_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_WEATHER ); @@ -361,7 +361,7 @@ { int h, m, s; sar_parm_time_of_day_struct *pv = - (sar_parm_time_of_day_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_TIME_OF_DAY ); @@ -382,7 +382,7 @@ ) { sar_parm_register_location_struct *pv = - (sar_parm_register_location_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_REGISTER_LOCATION ); @@ -418,7 +418,7 @@ ) { sar_parm_scene_gps_struct *pv = - (sar_parm_scene_gps_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_SCENE_GPS ); @@ -440,7 +440,7 @@ ) { sar_parm_scene_map_struct *pv = - (sar_parm_scene_map_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_SCENE_MAP ); @@ -464,7 +464,7 @@ ) { sar_parm_scene_elevation_struct *pv = - (sar_parm_scene_elevation_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_SCENE_ELEVATION ); @@ -480,7 +480,7 @@ ) { sar_parm_scene_cant_struct *pv = - (sar_parm_scene_cant_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_SCENE_CANT ); @@ -496,7 +496,7 @@ ) { sar_parm_scene_ground_flags_struct *pv = - (sar_parm_scene_ground_flags_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_SCENE_GROUND_FLAGS ); @@ -522,7 +522,7 @@ ) { sar_parm_scene_ground_tile_struct *pv = - (sar_parm_scene_ground_tile_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_SCENE_GROUND_TILE ); @@ -560,7 +560,7 @@ ) { sar_parm_texture_base_directory_struct *pv = - (sar_parm_texture_base_directory_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_TEXTURE_BASE_DIRECTORY ); @@ -576,7 +576,7 @@ ) { sar_parm_texture_load_struct *pv = - (sar_parm_texture_load_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_TEXTURE_LOAD ); @@ -605,7 +605,7 @@ ) { sar_parm_mission_scene_file_struct *pv = - (sar_parm_mission_scene_file_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_SCENE_FILE ); @@ -620,7 +620,7 @@ ) { sar_parm_mission_new_objective_struct *pv = - (sar_parm_mission_new_objective_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_NEW_OBJECTIVE ); @@ -660,7 +660,7 @@ ) { sar_parm_mission_time_left_struct *pv = - (sar_parm_mission_time_left_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_TIME_LEFT ); @@ -676,7 +676,7 @@ ) { sar_parm_mission_begin_at_struct *pv = - (sar_parm_mission_begin_at_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_BEGIN_AT ); @@ -695,7 +695,7 @@ ) { sar_parm_mission_begin_at_pos_struct *pv = - (sar_parm_mission_begin_at_pos_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_BEGIN_AT_POS ); @@ -723,7 +723,7 @@ ) { sar_parm_mission_arrive_at_struct *pv = - (sar_parm_mission_arrive_at_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_ARRIVE_AT ); @@ -742,7 +742,7 @@ ) { sar_parm_mission_message_success_struct *pv = - (sar_parm_mission_message_success_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_MESSAGE_SUCCESS ); @@ -761,7 +761,7 @@ ) { sar_parm_mission_message_fail_struct *pv = - (sar_parm_mission_message_fail_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_MESSAGE_FAIL ); @@ -780,7 +780,7 @@ ) { sar_parm_mission_humans_tally_struct *pv = - (sar_parm_mission_humans_tally_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_HUMANS_TALLY ); @@ -810,7 +810,7 @@ ) { sar_parm_mission_add_intercept_struct *pv = - (sar_parm_mission_add_intercept_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MISSION_ADD_INTERCEPT ); @@ -883,7 +883,7 @@ ) { sar_parm_new_object_struct *pv = - (sar_parm_new_object_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NEW_OBJECT ); @@ -901,7 +901,7 @@ ) { sar_parm_new_helipad_struct *pv = - (sar_parm_new_helipad_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NEW_HELIPAD ); @@ -1005,7 +1005,7 @@ ) { sar_parm_new_runway_struct *pv = - (sar_parm_new_runway_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NEW_RUNWAY ); @@ -1108,7 +1108,7 @@ ) { sar_parm_new_human_struct *pv = - (sar_parm_new_human_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NEW_HUMAN ); @@ -1186,7 +1186,7 @@ ) { sar_parm_new_fire_struct *pv = - (sar_parm_new_fire_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NEW_FIRE ); @@ -1211,7 +1211,7 @@ ) { sar_parm_new_smoke_struct *pv = - (sar_parm_new_smoke_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NEW_SMOKE ); @@ -1254,7 +1254,7 @@ ) { sar_parm_new_premodeled_struct *pv = - (sar_parm_new_premodeled_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NEW_PREMODELED ); @@ -1278,7 +1278,7 @@ ) { sar_parm_select_object_by_name_struct *pv = - (sar_parm_select_object_by_name_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_SELECT_OBJECT_BY_NAME ); @@ -1298,7 +1298,7 @@ ) { sar_parm_model_file_struct *pv = - (sar_parm_model_file_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_MODEL_FILE ); @@ -1316,7 +1316,7 @@ ) { sar_parm_range_struct *pv = - (sar_parm_range_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_RANGE ); @@ -1338,7 +1338,7 @@ ) { sar_parm_range_far_struct *pv = - (sar_parm_range_far_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_RANGE_FAR ); @@ -1361,7 +1361,7 @@ ) { sar_parm_translate_struct *pv = - (sar_parm_translate_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_TRANSLATE ); @@ -1382,7 +1382,7 @@ ) { sar_parm_translate_random_struct *pv = - (sar_parm_translate_random_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_TRANSLATE_RANDOM ); @@ -1401,7 +1401,7 @@ ) { sar_parm_rotate_struct *pv = - (sar_parm_rotate_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_ROTATE ); @@ -1421,7 +1421,7 @@ ) { sar_parm_no_depth_test_struct *pv = - (sar_parm_no_depth_test_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_NO_DEPTH_TEST ); @@ -1435,7 +1435,7 @@ ) { sar_parm_polygon_offset_struct *pv = - (sar_parm_polygon_offset_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_POLYGON_OFFSET ); @@ -1481,7 +1481,7 @@ ) { sar_parm_contact_bounds_spherical_struct *pv = - (sar_parm_contact_bounds_spherical_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_CONTACT_BOUNDS_SPHERICAL ); @@ -1503,7 +1503,7 @@ ) { sar_parm_contact_bounds_cylendrical_struct *pv = - (sar_parm_contact_bounds_cylendrical_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_CONTACT_BOUNDS_CYLENDRICAL ); @@ -1538,7 +1538,7 @@ ) { sar_parm_contact_bounds_rectangular_struct *pv = - (sar_parm_contact_bounds_rectangular_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_CONTACT_BOUNDS_RECTANGULAR ); @@ -1589,7 +1589,7 @@ ) { sar_parm_ground_elevation_struct *pv = - (sar_parm_ground_elevation_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_GROUND_ELEVATION ); @@ -1606,7 +1606,7 @@ ) { sar_parm_object_name_struct *pv = - (sar_parm_object_name_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_OBJECT_NAME ); @@ -1627,7 +1627,7 @@ ) { sar_parm_object_map_description_struct *pv = - (sar_parm_object_map_description_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_OBJECT_MAP_DESCRIPTION ); @@ -1645,7 +1645,7 @@ ) { sar_parm_fuel_struct *pv = - (sar_parm_fuel_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_FUEL ); @@ -1670,7 +1670,7 @@ ) { sar_parm_hitpoints_struct *pv = - (sar_parm_hitpoints_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_HITPOINTS ); @@ -1695,7 +1695,7 @@ ) { sar_parm_engine_state_struct *pv = - (sar_parm_engine_state_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_ENGINE_STATE ); @@ -1711,7 +1711,7 @@ ) { sar_parm_passengers_struct *pv = - (sar_parm_passengers_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_PASSENGERS ); @@ -1738,7 +1738,7 @@ ) { sar_parm_runway_approach_lighting_north_struct *pv = - (sar_parm_runway_approach_lighting_north_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_RUNWAY_APPROACH_LIGHTING_NORTH ); @@ -1776,7 +1776,7 @@ ) { sar_parm_runway_approach_lighting_south_struct *pv = - (sar_parm_runway_approach_lighting_south_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_RUNWAY_APPROACH_LIGHTING_SOUTH ); @@ -1815,7 +1815,7 @@ ) { sar_parm_human_message_enter_struct *pv = - (sar_parm_human_message_enter_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_HUMAN_MESSAGE_ENTER ); @@ -1834,7 +1834,7 @@ ) { sar_parm_human_reference_struct *pv = - (sar_parm_human_reference_struct *)p = SARParmNew( + p = SARParmNew( SAR_PARM_HUMAN_REFERENCE ); @@ -2030,7 +2030,7 @@ if(FILTER_CHECK(SAR_PARM_MISSION_LOG_HEADER)) { p_mission_log_header = - (sar_parm_mission_log_header_struct *)p = + p = SARParmNew(SAR_PARM_MISSION_LOG_HEADER); DO_ADD_PARM --- sar/menu.c.old 2006-04-08 11:27:14.000000000 +0200 +++ sar/menu.c 2006-04-08 11:40:37.000000000 +0200 @@ -701,9 +701,8 @@ } /* Allocate structure */ - m->object[n] = (void *)label_ptr = SAR_MENU_LABEL(calloc( - 1, sizeof(sar_menu_label_struct) - )); + m->object[n] = SAR_MENU_LABEL(calloc(1, sizeof(sar_menu_label_struct))); + label_ptr = (sar_menu_label_struct *)m->object[n]; if(label_ptr == NULL) return(-3); @@ -780,9 +779,10 @@ } /* Allocate structure */ - m->object[n] = (void *)button = SAR_MENU_BUTTON(calloc( + m->object[n] = SAR_MENU_BUTTON(calloc( 1, sizeof(sar_menu_button_struct) )); + button = (sar_menu_button_struct *)m->object[n]; if(button == NULL) return(-3); @@ -861,9 +861,10 @@ } /* Allocate structure */ - m->object[n] = (void *)pb = SAR_MENU_PROGRESS(calloc( + m->object[n] = SAR_MENU_PROGRESS(calloc( 1, sizeof(sar_menu_progress_struct) )); + pb = (sar_menu_progress_struct *)m->object[n]; if(pb == NULL) return(-3); @@ -964,9 +965,10 @@ } /* Allocate structure */ - m->object[n] = (void *)mesgbox = SAR_MENU_MESSAGE_BOX(calloc( + m->object[n] = SAR_MENU_MESSAGE_BOX(calloc( 1, sizeof(sar_menu_message_box_struct) )); + mesgbox = (sar_menu_message_box_struct *)m->object[n]; if(mesgbox == NULL) return(-3); @@ -1078,9 +1080,10 @@ } /* Allocate structure */ - m->object[n] = (void *)list = SAR_MENU_LIST(calloc( + m->object[n] = SAR_MENU_LIST(calloc( 1, sizeof(sar_menu_list_struct) )); + list = (sar_menu_list_struct *)m->object[n]; if(list == NULL) return(-3); @@ -1326,9 +1329,10 @@ } /* Allocate structure */ - m->object[n] = (void *)mdpy = SAR_MENU_MDISPLAY(calloc( + m->object[n] = SAR_MENU_MDISPLAY(calloc( 1, sizeof(sar_menu_mdisplay_struct) )); + mdpy = (sar_menu_mdisplay_struct *)m->object[n]; if(mdpy == NULL) return(-3); @@ -1416,9 +1420,10 @@ } /* Allocate structure */ - m->object[n] = (void *)sw = SAR_MENU_SWITCH(calloc( + m->object[n] = SAR_MENU_SWITCH(calloc( 1, sizeof(sar_menu_switch_struct) )); + sw = (sar_menu_switch_struct *)m->object[n]; if(sw == NULL) return(-3); @@ -1556,9 +1561,10 @@ } /* Allocate structure */ - m->object[n] = (void *)spin = SAR_MENU_SPIN(calloc( + m->object[n] = SAR_MENU_SPIN(calloc( 1, sizeof(sar_menu_spin_struct) )); + spin = (sar_menu_spin_struct *)m->object[n]; if(spin == NULL) return(-3); @@ -2010,9 +2016,10 @@ } /* Allocate structure */ - m->object[n] = (void *)slider = SAR_MENU_SLIDER(calloc( + m->object[n] = SAR_MENU_SLIDER(calloc( 1, sizeof(sar_menu_slider_struct) )); + slider = (sar_menu_slider_struct *)m->object[n]; if(slider == NULL) return(-3); --- sar/menuobjview.c.old 2006-04-08 11:42:14.000000000 +0200 +++ sar/menuobjview.c 2006-04-08 11:43:00.000000000 +0200 @@ -151,9 +151,10 @@ } /* Allocate structure */ - m->object[n] = (void *)objview = SAR_MENU_OBJVIEW(calloc( + m->object[n] = SAR_MENU_OBJVIEW(calloc( 1, sizeof(sar_menu_objview_struct) )); + objview = (sar_menu_objview_struct *)m->object[n]; if(objview == NULL) return(-1); --- sar/sound.c.old 2006-04-08 12:04:32.000000000 +0200 +++ sar/sound.c 2006-04-08 12:05:57.000000000 +0200 @@ -230,7 +230,7 @@ * YIDNULL. */ #define SET_SND_PLAY_YID_NULL(p) \ - { if((p) != NULL) (snd_play_struct *)(p)->data = (void *)YIDNULL; } + { if((p) != NULL) (p)->data = (void *)YIDNULL; } if(recorder->con != NULL) {