X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fplanets.c;h=c7fb44008db7a586d625498d87fc16ca4cba2f93;hb=cd1ac5957730cc1646ba29e2252c35d213b3557a;hp=dd04b621b9ee330409cdcc676358e48336b15493;hpb=d87b83a23fb7b5ac0ba610069a3ce7da8026fd80;p=super-star-trek.git diff --git a/src/planets.c b/src/planets.c index dd04b62..c7fb440 100644 --- a/src/planets.c +++ b/src/planets.c @@ -118,7 +118,7 @@ void beam(void) if (!damaged(DSHUTTL) && (game.state.plnets[game.iplnet].known==shuttle_down || game.iscraft == 1)) { skip(1); proutn(_("Spock- \"May I suggest the shuttle craft, Sir?\" ")); - if (ja() != 0) shuttle(); + if (ja() == true) shuttle(); } return; } @@ -141,7 +141,7 @@ void beam(void) /* Coming from planet */ if (game.state.plnets[game.iplnet].known==shuttle_down) { proutn(_("Spock- \"Wouldn't you rather take the Galileo?\" ")); - if (ja() != 0) { + if (ja() == true) { chew(); return; } @@ -160,7 +160,7 @@ void beam(void) prout(_("Spock- \"Captain, I fail to see the logic in")); prout(_(" exploring a planet with no dilithium crystals.")); proutn(_(" Are you sure this is wise?\" ")); - if (ja()==0) { + if (ja() == false) { chew(); return; } @@ -250,7 +250,7 @@ void usecrystals(void) prout(_(" raw dilithium crystals into the ship's power")); prout(_(" system may risk a severe explosion.")); proutn(_(" Are you sure this is wise?\" ")); - if (ja()==0) { + if (ja() == false) { chew(); return; } @@ -330,7 +330,7 @@ void shuttle(void) (int)(100*game.optime/game.state.remtime)); prout(_("remaining time.")); proutn(_("Are you sure this is wise?\" ")); - if (ja()==0) { + if (ja() == false) { game.optime = 0.0; return; } @@ -341,7 +341,7 @@ void shuttle(void) /* Galileo on ship! */ if (!damaged(DTRANSP)) { proutn(_("Spock- \"Would you rather use the transporter?\" ")); - if (ja() != 0) { + if (ja() == true) { beam(); return; } @@ -420,7 +420,7 @@ void deathray(void) prout(_("Spock- \"Captain, the 'Experimental Death Ray'")); prout(_(" is highly unpredictible. Considering the alternatives,")); proutn(_(" are you sure this is wise?\" ")); - if (ja()==0) return; + if (ja() == false) return; prout(_("Spock- \"Acknowledged.\"")); skip(1); game.ididit=1; @@ -512,9 +512,10 @@ void deathray(void) char *systemname(int pindx) { - /* the below array shoud not be static, or it won't gettextize + static char copy[BUFSIZ]; + /* the below array should not be static, or it won't gettextize * because of the early initialization. */ - char *names[NINHAB] = + char *names[NINHAB+1] = { /* * I used to find planets @@ -553,7 +554,7 @@ char *systemname(int pindx) _("Marcos XII"), /* TOS: "And the Children Shall Lead", */ _("Omega IV"), /* TOS: "The Omega Glory" */ _("Regulus V"), /* TOS: "Amok Time */ - _("Deeva"), /* TOS: "Operation -- Annihilate!" */ + _("Deneva"), /* TOS: "Operation -- Annihilate!" */ /* Worlds from BSD Trek */ _("Rigel II"), /* TOS: "Shore Leave" ("III" in BSD) */ _("Beta III"), /* TOS: "The Return of the Archons" */ @@ -570,7 +571,8 @@ char *systemname(int pindx) _("Coridan (Desotriana)"), /* TOS: "Journey to Babel" */ _("Iotia"), /* TOS: "A Piece of the Action" */ #endif - }; + }; - return names[pindx]; + strcpy(copy, names[pindx]); + return copy; }