Annotation of researchv10no/games/trek/rest.c, revision 1.1

1.1     ! root        1: # include      "trek.h"
        !             2: 
        !             3: /**
        !             4:  **    rest for repairs
        !             5:  **/
        !             6: 
        !             7: rest()
        !             8: {
        !             9:        float                   t;
        !            10:        register int            percent;
        !            11: 
        !            12:        if(getfltpar("How long", &t)==0) return;
        !            13:        if (t <= 0.0)
        !            14:                return;
        !            15:        percent = 100 * t / Status.time + 0.5;
        !            16:        if (percent >= 70)
        !            17:        {
        !            18:                printf("Spock: That would take %d%% of our remaining time.\n",
        !            19:                        percent);
        !            20:                if (!getynpar("Are you sure that is wise"))
        !            21:                        return;
        !            22:        }
        !            23:        Move.delta = t;
        !            24:        t = Etc.eventptr[E_LRTB]->date - Status.date;
        !            25:        if (Status.cond != DOCKED && Move.delta > t)
        !            26:                Move.delta = t + 0.0001;
        !            27:        Move.free = 0;
        !            28:        Move.resting = 1;
        !            29: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.