In an action involving a contract and tort claim, the trial court judgment is: 1) affirmed when the defendant is barred from a reward as the prevailing party by Civil Code section 1717 (b)(2); and 2) reversed where the purchase agreement is broad enough and the contested fee easily falls within the reach of the fee provision in that agreement.