]> git.pond.sub.org Git - empserver/commitdiff
(rada): Replace the "unit" text with "land" to be more clear.
authorRon Koenderink <rkoenderink@yahoo.ca>
Fri, 4 Aug 2006 19:59:24 +0000 (19:59 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Fri, 4 Aug 2006 19:59:24 +0000 (19:59 +0000)
src/lib/commands/rada.c

index f0444d65a89df0d4ccbd0571ce03aaf50375c227..73d4dbb6e998a9aa42072f0196ae081eeaca7fb0 100644 (file)
@@ -49,12 +49,12 @@ rada(void)
     union empobj_storage item;
     char buf[1024];
     short type;
+    char prompt[80];
 
     type = player->argp[0][0] == 'l' ? EF_LAND : EF_SHIP;
 
-    cp = getstarg(player->argp[1],
-       type == EF_SHIP ? "Radar from (ship # or sector(s)) : " :
-       "Radar from (unit # or sector(s)) : ", buf);
+    sprintf(prompt, "Radar from (%s # or sector(s)) : ", ef_nameof(type));
+    cp = getstarg(player->argp[1], prompt, buf);
                      
     if (cp == 0)
        return RET_SYN;
@@ -80,8 +80,7 @@ rada(void)
     case NS_GROUP:
        /* assumes a NS_LIST return is a unit no */
        if (!snxtitem(&ni, type, cp)) {
-           pr("Specify at least one %s\n",
-               type == EF_SHIP ? "ship" : "unit");
+           pr("Specify at least one %s\n", ef_nameof(type));
            return RET_SYN;
        }
        while (nxtitem(&ni, &item)) {
@@ -115,8 +114,7 @@ rada(void)
        }
        break;
     default:
-       pr("Must use a %s or sector specifier\n",
-           type == EF_SHIP ? "ship" : "unit");
+       pr("Must use a %s or sector specifier\n", ef_nameof(type));
        return RET_SYN;
     }
     return RET_OK;