Stefan Sperling <s...@stsp.name> writes:

> On Mon, Apr 09, 2018 at 11:13:58AM +0300, Timo Myyrä wrote:
>
>> Hi,
>> 
>> Few casts to fix dungeon-crawl build.
>> 
>> Timo
>
>>  $OpenBSD: patch-source_newgame_cc,v 1.1.1.1 2005/10/22 15:20:28 espie Exp $
>> ---- source/newgame.cc.orig  Sat Oct 22 16:05:21 2005
>> -+++ source/newgame.cc       Sat Oct 22 16:06:32 2005
>> -@@ -253,8 +253,13 @@ static bool check_saved_game(void)
>> -     }
>> +Index: source/newgame.cc
>> +--- source/newgame.cc.orig
>> ++++ source/newgame.cc
>> +@@ -1911,7 +1911,7 @@ void enterPlayerName(bool blankOK)
>> +         {
>> +             textcolor( CYAN );
>> +             if (blankOK && first_time)
>> +-                cprintf(EOL "Press <Enter> to answer this after race and 
>> class are chosen."EOL);
>> ++                cprintf(EOL "Press <Enter> to answer this after race and 
>> class are chosen." EOL);
>>   
>> - #else
>> -+# ifdef SAVE_DIR_PATH
>> -+    snprintf( char_fil, sizeof(char_fil), 
>> -+              SAVE_DIR_PATH "%s%d", you.your_name, (int) getuid() );
>> -+# else
>> -     strcpy(char_fil, "");
>> -     strncat(char_fil, you.your_name, kFileNameLen);
>> -+# endif
>> -     strcat(char_fil, ".sav");
>> - #endif
>> +             first_time = false;
>>   
>> 
>
> Why is this last chunk of the patch being removed?

Ah, that would be my mistake, here's an revised diff:

Timo

Index: patches/patch-source_itemname_cc
===================================================================
RCS file: patches/patch-source_itemname_cc
diff -N patches/patch-source_itemname_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-source_itemname_cc    9 Apr 2018 10:11:44 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: source/itemname.cc
+--- source/itemname.cc.orig
++++ source/itemname.cc
+@@ -2785,7 +2785,7 @@ unsigned char check_item_knowledge(void)
+                 yps = wherey();
+ 
+                 // item_name now requires a "real" item, so we'll create a tmp
+-                item_def tmp = { ft, j, 0, 0, 0, 1, 0, 0, 0, 0, 0 };
++                item_def tmp = { static_cast<unsigned char>(ft), 
static_cast<unsigned char>(j), 0, 0, 0, 1, 0, 0, 0, 0, 0 };
+                 item_name( tmp, DESC_PLAIN, st_pass );
+ 
+                 cprintf(st_pass);
Index: patches/patch-source_liblinux_cc
===================================================================
RCS file: patches/patch-source_liblinux_cc
diff -N patches/patch-source_liblinux_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-source_liblinux_cc    9 Apr 2018 10:11:44 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: source/liblinux.cc
+--- source/liblinux.cc.orig
++++ source/liblinux.cc
+@@ -487,7 +487,7 @@ int itoa(int value, char *strptr, int radix)
+         if (!startflag)         /* Special case if value == 0 */
+             sprintf((strptr + ctr++), "0");
+ 
+-        strptr[ctr] = (char) NULL;
++        strptr[ctr] = (char) 0;
+     }
+     return (OK);                /* Me? Fail? Nah. */
+ }
Index: patches/patch-source_newgame_cc
===================================================================
RCS file: /cvs/ports/games/dungeon-crawl/patches/patch-source_newgame_cc,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-source_newgame_cc
--- patches/patch-source_newgame_cc     22 Oct 2005 15:20:28 -0000      1.1.1.1
+++ patches/patch-source_newgame_cc     9 Apr 2018 10:11:44 -0000
@@ -1,6 +1,7 @@
 $OpenBSD: patch-source_newgame_cc,v 1.1.1.1 2005/10/22 15:20:28 espie Exp $
---- source/newgame.cc.orig     Sat Oct 22 16:05:21 2005
-+++ source/newgame.cc  Sat Oct 22 16:06:32 2005
+Index: source/newgame.cc
+--- source/newgame.cc.orig
++++ source/newgame.cc
 @@ -253,8 +253,13 @@ static bool check_saved_game(void)
      }
  
@@ -14,4 +15,13 @@ $OpenBSD: patch-source_newgame_cc,v 1.1.
 +# endif
      strcat(char_fil, ".sav");
  #endif
+ 
+@@ -1911,7 +1916,7 @@ void enterPlayerName(bool blankOK)
+         {
+             textcolor( CYAN );
+             if (blankOK && first_time)
+-                cprintf(EOL "Press <Enter> to answer this after race and 
class are chosen."EOL);
++                cprintf(EOL "Press <Enter> to answer this after race and 
class are chosen." EOL);
+ 
+             first_time = false;
  

Reply via email to