This patch set removes the "register" keyword, which is no longer legal
to use.
There is still a failure, involving Boost and a Null function pointer:
...
In file included from csalerts_sdl.cpp:37:
In file included from ../../Source_Files/Misc/sdl_dialogs.h:33:
In file included from /usr/local/include/boost/function.hpp:70:
In file included from
/usr/local/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:47:
In file included from
/usr/local/include/boost/function/detail/function_iterate.hpp:14:
In file included from
/usr/local/include/boost/function/detail/maybe_include.hpp:15:
/usr/local/include/boost/function/function_template.hpp:159:33: error: called
object type 'nullptr_t' is not a function or function pointer
BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
^~~~
/usr/local/include/boost/function/function_template.hpp:81:36: note: expanded
from macro 'BOOST_FUNCTION_RETURN'
# define BOOST_FUNCTION_RETURN(X) X
^
/usr/local/include/boost/function/function_template.hpp:925:53: note: in
instantiation of member function
'boost::detail::function::void_function_obj_invoker0<nullptr_t,
void>::invoke' requested here
{ { &manager_type::manage }, &invoker_type::invoke };
^
/usr/local/include/boost/function/function_template.hpp:716:13: note: in
instantiation of function template specialization
'boost::function0<void>::assign_to<nullptr_t>' requested here
this->assign_to(f);
^
/usr/local/include/boost/function/function_template.hpp:1061:5: note: in
instantiation of function template specialization
'boost::function0<void>::function0<nullptr_t>' requested here
base_type(f)
^
../../Source_Files/Misc/sdl_widgets.h:1082:5: note: in instantiation of function
template specialization 'boost::function<void ()>::function<nullptr_t>'
requested here
, m_callback (NULL)
^
1 error generated.
gmake[3]: *** [Makefile:403: csalerts_sdl.o] Error 1
gmake[3]: Leaving directory
'/usr/obj/alephone-1.2.1/AlephOne-20150620/Source_Files/CSeries'
...
While here, remove patches/patch-Source_Files_Sound_SoundManager_cpp
which added a header that is already included.
OK to make partial progress?
Index: patches/patch-Source_Files_GameWorld_map_cpp
===================================================================
RCS file: patches/patch-Source_Files_GameWorld_map_cpp
diff -N patches/patch-Source_Files_GameWorld_map_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_GameWorld_map_cpp 16 Apr 2018 15:27:50
-0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: Source_Files/GameWorld/map.cpp
+--- Source_Files/GameWorld/map.cpp.orig
++++ Source_Files/GameWorld/map.cpp
+@@ -1015,7 +1015,7 @@ void get_object_shape_and_transfer_mode(
+ struct shape_and_transfer_mode *data)
+ {
+ struct object_data *object= get_object_data(object_index);
+- register struct shape_animation_data *animation;
++ struct shape_animation_data *animation;
+ angle theta;
+ short view;
+
+@@ -1138,7 +1138,7 @@ bool randomize_object_sequence(
+ shape_descriptor shape)
+ {
+ struct object_data *object= get_object_data(object_index);
+- register struct shape_animation_data *animation;
++ struct shape_animation_data *animation;
+ bool randomized= false;
+
+ animation= get_shape_animation_data(shape);
Index: patches/patch-Source_Files_GameWorld_world_cpp
===================================================================
RCS file: patches/patch-Source_Files_GameWorld_world_cpp
diff -N patches/patch-Source_Files_GameWorld_world_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_GameWorld_world_cpp 16 Apr 2018 15:27:50
-0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+Index: Source_Files/GameWorld/world.cpp
+--- Source_Files/GameWorld/world.cpp.orig
++++ Source_Files/GameWorld/world.cpp
+@@ -260,7 +260,7 @@ static angle m2_arctangent(
+ world_distance y = yy;
+
+ long tangent;
+- register long last_difference, new_difference;
++ long last_difference, new_difference;
+ angle search_arc, theta;
+
+ if (x)
+@@ -618,10 +618,9 @@ world_distance distance2d(
+ * r++;
+ */
+
+-int32 isqrt(
+- register uint32 x)
++int32 isqrt(uint32 x)
+ {
+- register uint32 r, nr, m;
++ uint32 r, nr, m;
+
+ r= 0;
+ m= 0x40000000;
Index: patches/patch-Source_Files_GameWorld_world_h
===================================================================
RCS file: patches/patch-Source_Files_GameWorld_world_h
diff -N patches/patch-Source_Files_GameWorld_world_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_GameWorld_world_h 16 Apr 2018 15:27:50
-0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Source_Files/GameWorld/world.h
+--- Source_Files/GameWorld/world.h.orig
++++ Source_Files/GameWorld/world.h
+@@ -205,7 +205,7 @@ world_distance guess_distance2d(world_point2d *p0, wor
+ world_distance distance3d(world_point3d *p0, world_point3d *p1);
+ world_distance distance2d(world_point2d *p0, world_point2d *p1); /* calls
isqrt() */
+
+-int32 isqrt(register uint32 x);
++int32 isqrt(uint32 x);
+
+ // LP additions: kludges for doing long-distance calculation
+ // by storing the upper digits in the upper byte of a "flags" value.
Index: patches/patch-Source_Files_Network_RingGameProtocol_cpp
===================================================================
RCS file: patches/patch-Source_Files_Network_RingGameProtocol_cpp
diff -N patches/patch-Source_Files_Network_RingGameProtocol_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_Network_RingGameProtocol_cpp 16 Apr 2018
15:27:50 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Index: Source_Files/Network/RingGameProtocol.cpp
+--- Source_Files/Network/RingGameProtocol.cpp.orig
++++ Source_Files/Network/RingGameProtocol.cpp
+@@ -1515,10 +1515,8 @@ static void NetAddFlagsToPacket(
+ static size_t NetPacketSize(
+ NetPacketPtr packet)
+ {
+- // ZZZ: "register"... how quaint... I wonder if the compiler they
used was really not smart enough on its own?
+- // Welp, doesn't hurt to give hints anyway, we'll leave it. :)
+- register size_t size = 0;
+- register short i;
++ size_t size = 0;
++ short i;
+
+ /* ZZZ: should not do this now, data was already converted
elsewhere and we've been passed the unpacked version.
+ NetPacket packet_storage;
Index: patches/patch-Source_Files_RenderMain_low_level_textures_h
===================================================================
RCS file: patches/patch-Source_Files_RenderMain_low_level_textures_h
diff -N patches/patch-Source_Files_RenderMain_low_level_textures_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_RenderMain_low_level_textures_h 16 Apr 2018
15:27:50 -0000
@@ -0,0 +1,109 @@
+$OpenBSD$
+
+Index: Source_Files/RenderMain/low_level_textures.h
+--- Source_Files/RenderMain/low_level_textures.h.orig
++++ Source_Files/RenderMain/low_level_textures.h
+@@ -114,14 +114,14 @@ void texture_horizontal_polygon_lines
+ {
+ short x0= *x0_table++, x1= *x1_table++;
+
+- register T *shading_table= (T *)data->shading_table;
+- register T *write= (T *) screen->row_addresses[y0] + x0;
+- register pixel8 *base_address= texture->row_addresses[0];
+- register uint32 source_x= data->source_x;
+- register uint32 source_y= data->source_y;
+- register uint32 source_dx= data->source_dx;
+- register uint32 source_dy= data->source_dy;
+- register short count= x1-x0;
++ T *shading_table= (T *)data->shading_table;
++ T *write= (T *) screen->row_addresses[y0] + x0;
++ pixel8 *base_address= texture->row_addresses[0];
++ uint32 source_x= data->source_x;
++ uint32 source_y= data->source_y;
++ uint32 source_dx= data->source_dx;
++ uint32 source_dy= data->source_dy;
++ short count= x1-x0;
+
+ while ((count-= 1)>=0)
+ {
+@@ -148,7 +148,7 @@ void landscape_horizontal_polygon_lines(
+ short *x1_table,
+ short line_count)
+ {
+- register short landscape_texture_width_downshift= 32 -
NextLowerExponent(texture->height);
++ short landscape_texture_width_downshift= 32 -
NextLowerExponent(texture->height);
+
+ (void) (view);
+
+@@ -156,12 +156,12 @@ void landscape_horizontal_polygon_lines(
+ {
+ short x0= *x0_table++, x1= *x1_table++;
+
+- register T *shading_table= (T *)data->shading_table;
+- register T *write= (T *)screen->row_addresses[y0] + x0;
+- register pixel8 *read= texture->row_addresses[data->source_y];
+- register uint32 source_x= data->source_x;
+- register uint32 source_dx= data->source_dx;
+- register short count= x1-x0;
++ T *shading_table= (T *)data->shading_table;
++ T *write= (T *)screen->row_addresses[y0] + x0;
++ pixel8 *read= texture->row_addresses[data->source_y];
++ uint32 source_x= data->source_x;
++ uint32 source_dx= data->source_dx;
++ short count= x1-x0;
+
+ while ((count-= 1)>=0)
+ {
+@@ -454,7 +454,7 @@ void tint_vertical_polygon_lines(
+ {
+ short tint_table_index= transfer_data&0xff;
+ struct _vertical_polygon_line_data *line= (struct
_vertical_polygon_line_data *) (data+1);
+- register short bytes_per_row= screen->bytes_per_row;
++ short bytes_per_row= screen->bytes_per_row;
+ int line_count= data->width;
+ int x= data->x0;
+
+@@ -469,10 +469,10 @@ void tint_vertical_polygon_lines(
+ while ((line_count-= 1)>=0)
+ {
+ short y0= *y0_table++, y1= *y1_table++;
+- register T *write= (T *) screen->row_addresses[y0] + x;
+- register pixel8 *read= line->texture;
+- register _fixed texture_y= line->texture_y, texture_dy=
line->texture_dy;
+- register short count= y1-y0;
++ T *write= (T *) screen->row_addresses[y0] + x;
++ pixel8 *read= line->texture;
++ _fixed texture_y= line->texture_y, texture_dy= line->texture_dy;
++ short count= y1-y0;
+
+ while ((count-=1)>=0)
+ {
+@@ -514,21 +514,21 @@ void randomize_vertical_polygon_lines(
+ uint16 transfer_data)
+ {
+ struct _vertical_polygon_line_data *line= (struct
_vertical_polygon_line_data *) (data+1);
+- register short bytes_per_row= screen->bytes_per_row;
++ short bytes_per_row= screen->bytes_per_row;
+ int line_count= data->width;
+ int x= data->x0;
+- register uint16 seed= texture_random_seed;
+- register uint16 drop_less_than= transfer_data;
++ uint16 seed= texture_random_seed;
++ uint16 drop_less_than= transfer_data;
+
+ (void) (view);
+
+ while ((line_count-= 1)>=0)
+ {
+ short y0= *y0_table++, y1= *y1_table++;
+- register T *write= (T *) screen->row_addresses[y0] + x;
+- register pixel8 *read= line->texture;
+- register _fixed texture_y= line->texture_y, texture_dy=
line->texture_dy;
+- register short count= y1-y0;
++ T *write= (T *) screen->row_addresses[y0] + x;
++ pixel8 *read= line->texture;
++ _fixed texture_y= line->texture_y, texture_dy= line->texture_dy;
++ short count= y1-y0;
+
+ while ((count-=1)>=0)
+ {
Index: patches/patch-Source_Files_RenderMain_shapes_cpp
===================================================================
RCS file: patches/patch-Source_Files_RenderMain_shapes_cpp
diff -N patches/patch-Source_Files_RenderMain_shapes_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_RenderMain_shapes_cpp 16 Apr 2018 15:27:50
-0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+
+Index: Source_Files/RenderMain/shapes.cpp
+--- Source_Files/RenderMain/shapes.cpp.orig
++++ Source_Files/RenderMain/shapes.cpp
+@@ -1938,14 +1938,14 @@ static void precalculate_bit_depth_constants(
+ aren�t any matches, add a new entry and return that index. */
+ static short find_or_add_color(
+ struct rgb_color_value *color,
+- register struct rgb_color_value *colors,
++ struct rgb_color_value *colors,
+ short *color_count,
+ bool update_flags = true)
+ {
+ short i;
+
+ // LP addition: save initial color-table pointer, just in case we
overflow
+- register struct rgb_color_value *colors_saved = colors;
++ struct rgb_color_value *colors_saved = colors;
+
+ // = 1 to skip the transparent color
+ for (i= 1, colors+= 1; i<*color_count; ++i, ++colors)
+@@ -2186,7 +2186,7 @@ static void build_shading_tables8(
+ #else
+ short find_closest_color(
+ struct rgb_color_value *color,
+- register struct rgb_color_value *colors,
++ struct rgb_color_value *colors,
+ short color_count)
+ {
+ short i;
Index: patches/patch-Source_Files_RenderMain_textures_cpp
===================================================================
RCS file: patches/patch-Source_Files_RenderMain_textures_cpp
diff -N patches/patch-Source_Files_RenderMain_textures_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_RenderMain_textures_cpp 16 Apr 2018 15:27:50
-0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Index: Source_Files/RenderMain/textures.cpp
+--- Source_Files/RenderMain/textures.cpp.orig
++++ Source_Files/RenderMain/textures.cpp
+@@ -163,9 +163,9 @@ void precalculate_bitmap_row_addresses(
+ }
+
+ void map_bytes(
+- register byte *buffer,
+- register byte *table,
+- register int32 size)
++ byte *buffer,
++ byte *table,
++ int32 size)
+ {
+ while ((size-=1)>=0)
+ {
Index: patches/patch-Source_Files_RenderOther_motion_sensor_cpp
===================================================================
RCS file: patches/patch-Source_Files_RenderOther_motion_sensor_cpp
diff -N patches/patch-Source_Files_RenderOther_motion_sensor_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Source_Files_RenderOther_motion_sensor_cpp 16 Apr 2018
15:27:50 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Index: Source_Files/RenderOther/motion_sensor.cpp
+--- Source_Files/RenderOther/motion_sensor.cpp.orig
++++ Source_Files/RenderOther/motion_sensor.cpp
+@@ -685,8 +685,8 @@ static void bitmap_window_copy(
+
+ for (y=y0;y<y1;++y)
+ {
+- register pixel8 *read= source->row_addresses[y]+x0;
+- register pixel8 *write= destination->row_addresses[y]+x0;
++ pixel8 *read= source->row_addresses[y]+x0;
++ pixel8 *write= destination->row_addresses[y]+x0;
+
+ for (count=x1-x0;count>0;--count) *write++= *read++;
+ }
+@@ -715,8 +715,8 @@ static void clipped_transparent_sprite_copy(
+
+ while ((height-= 1)>=0)
+ {
+- register pixel8 pixel, *read, *write;
+- register short width= source->width;
++ pixel8 pixel, *read, *write;
++ short width= source->width;
+ short clip_left= region[y0+y].x0, clip_right= region[y0+y].x1;
+ short offset= 0;
+
+@@ -755,8 +755,8 @@ static void unclipped_solid_sprite_copy(
+
+ while ((height-= 1)>=0)
+ {
+- register pixel8 *read, *write;
+- register short width= source->width;
++ pixel8 *read, *write;
++ short width= source->width;
+
+ assert(y>=0&&y<source->height);
+ assert(y0+y>=0&&y0+y<destination->height);
Index: patches/patch-Source_Files_Sound_SoundManager_cpp
===================================================================
RCS file: patches/patch-Source_Files_Sound_SoundManager_cpp
diff -N patches/patch-Source_Files_Sound_SoundManager_cpp
--- patches/patch-Source_Files_Sound_SoundManager_cpp 24 May 2017 01:01:29
-0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-Source_Files_Sound_SoundManager_cpp,v 1.2 2017/05/24 01:01:29
espie Exp $
-
-Directly include iostream for cerr (newer Boost versions no longer pull it in
for us)
-upstream rev 5012
-
-Index: Source_Files/Sound/SoundManager.cpp
---- Source_Files/Sound/SoundManager.cpp.orig
-+++ Source_Files/Sound/SoundManager.cpp
-@@ -22,6 +22,7 @@ SOUND.C
-
- #include <iostream>
-
-+#include <iostream>
- #include "SoundManager.h"
- #include "ReplacementSounds.h"
- #include "sound_definitions.h"
--
The way to make a small fortune in the commodities market is to start
with a large fortune.