diff options
author | pho <pho@pkgsrc.org> | 2020-01-30 13:56:12 +0000 |
---|---|---|
committer | pho <pho@pkgsrc.org> | 2020-01-30 13:56:12 +0000 |
commit | bce9657478196d95c05822c15f93e3991d8a793a (patch) | |
tree | 65aec667d18ede98a91e13888bfa7961091a2068 /games | |
parent | 78aac3099c87b58f932e35248e14f10c33d4f3df (diff) | |
download | pkgsrc-bce9657478196d95c05822c15f93e3991d8a793a.tar.gz |
Fix an error on 64-bits platforms.
Diffstat (limited to 'games')
-rw-r--r-- | games/hengband/Makefile | 3 | ||||
-rw-r--r-- | games/hengband/distinfo | 3 | ||||
-rw-r--r-- | games/hengband/patches/patch-src_cmd3.c | 40 |
3 files changed, 44 insertions, 2 deletions
diff --git a/games/hengband/Makefile b/games/hengband/Makefile index 3f00f1d9dc2..85546d84ff9 100644 --- a/games/hengband/Makefile +++ b/games/hengband/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2020/01/24 13:33:32 pho Exp $ +# $NetBSD: Makefile,v 1.2 2020/01/30 13:56:12 pho Exp $ DISTNAME= hengband-1.6.2 +PKGREVISION= 1 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_OSDN:=hengband/10331/} EXTRACT_SUFX= .tar.bz2 diff --git a/games/hengband/distinfo b/games/hengband/distinfo index 562c096e5c7..7c16e5d0429 100644 --- a/games/hengband/distinfo +++ b/games/hengband/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.1 2020/01/24 13:33:32 pho Exp $ +$NetBSD: distinfo,v 1.2 2020/01/30 13:56:12 pho Exp $ SHA1 (heng-graf-16x16.tar.gz) = 27166a215209f3ec0f2c4a61761fce5d802cddc1 RMD160 (heng-graf-16x16.tar.gz) = eb2e8034d43709b9b7e06b69eac4b6a84d026cc1 @@ -11,6 +11,7 @@ Size (hengband-1.6.2.tar.bz2) = 2029169 bytes SHA1 (patch-lib_Makefile.am) = 35a066930834f9ea23c6ce9fb2a088c7ec86c28a SHA1 (patch-lib_xtra_graf_Makefile.am) = 71d8e17bfc39a689ab30f3a02b5f052687bcf1db SHA1 (patch-src_Makefile.am) = 57f08de8ecbd8083917fe36436286b7b1aef307c +SHA1 (patch-src_cmd3.c) = a573a317663133bbbd0b6119736d7c27ae67c1a3 SHA1 (patch-src_h-type.h) = b9327f3110d831a2b5ce711450fe73e0d093e5ad SHA1 (patch-src_init2.c) = fe7064f23bce494ced5a524f2a60117ac0ef56ff SHA1 (patch-src_main-gcu.c) = 8bffb440de8beb18a45b9257a95e33e033260036 diff --git a/games/hengband/patches/patch-src_cmd3.c b/games/hengband/patches/patch-src_cmd3.c new file mode 100644 index 00000000000..73e0b9c2dbc --- /dev/null +++ b/games/hengband/patches/patch-src_cmd3.c @@ -0,0 +1,40 @@ +$NetBSD: patch-src_cmd3.c,v 1.1 2020/01/30 13:56:12 pho Exp $ + +Use the correct format specifier. + +Local Variables: +coding: euc-jp +End: + +--- src/cmd3.c.orig 2004-03-28 05:05:36.000000000 +0000 ++++ src/cmd3.c +@@ -45,12 +45,12 @@ void do_cmd_inven(void) + item_tester_full = FALSE; + + #ifdef JP +- sprintf(out_val, "持ち物: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ", ++ sprintf(out_val, "持ち物: 合計 %3d.%1d kg (限界の%d%%) コマンド: ", + lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) , + (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) + / 2)); + #else +- sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ", ++ sprintf(out_val, "Inventory: carrying %d.%d pounds (%d%% of capacity). Command: ", + (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10), + (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2)); + #endif +@@ -120,12 +120,12 @@ void do_cmd_equip(void) + + /* Build a prompt */ + #ifdef JP +- sprintf(out_val, "装備: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ", ++ sprintf(out_val, "装備: 合計 %3d.%1d kg (限界の%d%%) コマンド: ", + lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) , + (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) + / 2)); + #else +- sprintf(out_val, "Equipment: carrying %d.%d pounds (%ld%% of capacity). Command: ", ++ sprintf(out_val, "Equipment: carrying %d.%d pounds (%d%% of capacity). Command: ", + (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10), + (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2)); + #endif |