printfs have been banished. All outputnow goes through prout/proutn/prouts.
[super-star-trek.git] / finish.c
index e0fb221822b892e0c4257bb6a237700c996f6584..657bc51c15dbd376a26136cd2cba93d9de1637a1 100644 (file)
--- a/finish.c
+++ b/finish.c
@@ -68,11 +68,12 @@ void finish(FINTYPE ifin) {
        int igotit = 0;\r
        alldone = 1;\r
        skip(3);\r
-       printf("It is stardate %.1f .\n\n", game.state.date);\r
+       prout("It is stardate %.1f.", game.state.date);\r
+       prout("");\r
        switch (ifin) {\r
                case FWON: // Game has been won\r
                        if (game.state.nromrem != 0)\r
-                               printf("The remaining %d Romulans surrender to Starfleet Command.\n",\r
+                               prout("The remaining %d Romulans surrender to Starfleet Command.",\r
                                           game.state.nromrem);\r
                        \r
                        prout("You have smashed the Klingon invasion fleet and saved");\r
@@ -325,40 +326,40 @@ void score(void) {
        skip(2);\r
        prout("Your score --");\r
        if (game.state.nromkl)\r
-               printf("%6d Romulans destroyed                 %5d\n",\r
+               prout("%6d Romulans destroyed                 %5d",\r
                           game.state.nromkl,20*game.state.nromkl);\r
        if (game.state.nromrem)\r
-               printf("%6d Romulans captured                  %5d\n",\r
+               prout("%6d Romulans captured                  %5d",\r
                           game.state.nromrem, game.state.nromrem);\r
        if (game.state.killk)\r
-               printf("%6d ordinary Klingons destroyed        %5d\n",\r
+               prout("%6d ordinary Klingons destroyed        %5d",\r
                           game.state.killk, 10*game.state.killk);\r
        if (game.state.killc)\r
-               printf("%6d Klingon commanders destroyed       %5d\n",\r
+               prout("%6d Klingon commanders destroyed       %5d",\r
                           game.state.killc, 50*game.state.killc);\r
        if (game.state.nsckill)\r
-               printf("%6d Super-Commander destroyed          %5d\n",\r
+               prout("%6d Super-Commander destroyed          %5d",\r
                           game.state.nsckill, 200*game.state.nsckill);\r
        if (ithperd)\r
-               printf("%6.2f Klingons per stardate              %5d\n",\r
+               prout("%6.2f Klingons per stardate              %5d",\r
                           perdate, ithperd);\r
        if (game.state.starkl)\r
-               printf("%6d stars destroyed by your action     %5d\n",\r
+               prout("%6d stars destroyed by your action     %5d",\r
                           game.state.starkl, -5*game.state.starkl);\r
        if (game.state.nplankl)\r
-               printf("%6d planets destroyed by your action   %5d\n",\r
+               prout("%6d planets destroyed by your action   %5d",\r
                           game.state.nplankl, -10*game.state.nplankl);\r
        if (game.state.basekl)\r
-               printf("%6d bases destroyed by your action     %5d\n",\r
+               prout("%6d bases destroyed by your action     %5d",\r
                           game.state.basekl, -100*game.state.basekl);\r
        if (nhelp)\r
-               printf("%6d calls for help from starbase       %5d\n",\r
+               prout("%6d calls for help from starbase       %5d",\r
                           nhelp, -45*nhelp);\r
        if (casual)\r
-               printf("%6d casualties incurred                %5d\n",\r
+               prout("%6d casualties incurred                %5d",\r
                           casual, -casual);\r
        if (klship)\r
-               printf("%6d ship(s) lost or destroyed          %5d\n",\r
+               prout("%6d ship(s) lost or destroyed          %5d",\r
                           klship, -100*klship);\r
        if (alive==0)\r
                prout("Penalty for getting yourself killed        -200");\r
@@ -372,10 +373,10 @@ void score(void) {
                        case 4: proutn("Expert game  "); break;\r
                        case 5: proutn("Emeritus game"); break;\r
                }\r
-               printf("           %5d\n", iwon);\r
+               prout("           %5d", iwon);\r
        }\r
        skip(2);\r
-       printf("TOTAL SCORE                               %5d\n", iscore);\r
+       prout("TOTAL SCORE                               %5d", iscore);\r
 }\r
 \r
 void plaque(void) {\r
@@ -388,16 +389,16 @@ void plaque(void) {
        skip(2);\r
        \r
        while (fp == NULL) {\r
-               printf("File or device name for your plaque:");\r
+               proutn("File or device name for your plaque:");\r
                fgets(winner, 128, stdin);\r
                winner[strlen(winner)-1] = '\0';\r
                fp = fopen(winner, "w");\r
                if (fp==NULL) {\r
-                       printf("Invalid name.\n");\r
+                       prout("Invalid name.");\r
                }\r
        }\r
 \r
-       printf("Enter name to go on plaque (up to 30 characters):");\r
+       proutn("Enter name to go on plaque (up to 30 characters):");\r
        fgets(winner, 128, stdin);\r
        winner[strlen(winner)-1] = '\0';\r
        winner[30] = '\0';\r