Lines Matching refs:have
96 static void showanswer(struct unittype * have, struct unittype * want);
658 showanswer(struct unittype * have, struct unittype * want)
663 if (compareunits(have, want)) {
669 showunit(have);
678 else if (have->offset != want->offset) {
681 if (have->quantity) {
684 (have->factor + have->offset-want->offset)/want->factor);
691 have->factor / want->factor,
692 (have->offset-want->offset)/want->factor,
693 want->factor / have->factor,
694 (want->offset - have->offset)/have->factor);
698 ans = have->factor / want->factor;
757 struct unittype have, want;
826 initializeunit(&have);
827 addunit(&have, havestr, 0, 1);
828 completereduce(&have);
832 showanswer(&have, &want);
853 initializeunit(&have);
855 promptstr = "You have: ";
864 } while (addunit(&have, havestr, 0, 1) ||
865 completereduce(&have));
886 showanswer(&have, &want);