diff options
Diffstat (limited to 'smc.c')
-rw-r--r-- | smc.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -24,7 +24,7 @@ #include <pari/pari.h> GEN -smc_hextodec (char *s) /* int */ +smc_hextodec (const char *s) /* int */ { size_t i; char c; @@ -46,7 +46,7 @@ smc_hextodec (char *s) /* int */ void -smc_genbid (AuctionData *ad, uint16_t bid) +smc_genbid (struct AuctionData *ad, uint16_t bid) { uint16_t j; pari_sp ltop = avma; @@ -59,8 +59,9 @@ smc_genbid (AuctionData *ad, uint16_t bid) ad->b = gerepilecopy (ltop, ret); } + void -smc_genalpha (AuctionData *ad) +smc_genalpha (struct AuctionData *ad) { uint16_t j; pari_sp ltop = avma; @@ -70,11 +71,12 @@ smc_genalpha (AuctionData *ad) { gel (ret, j) = gmul (gel (ad->b, j), gpowgi (ad->y, gel (ad->r, j))); } - ab->alpha = gerepilecopy (ltop, ret); + ad->alpha = gerepilecopy (ltop, ret); } + void -smc_genbeta (AuctionData *ad) +smc_genbeta (struct AuctionData *ad) { uint16_t j; pari_sp ltop = avma; @@ -84,6 +86,6 @@ smc_genbeta (AuctionData *ad) { gel (ret, j) = gpowgi (ad->g, gel (ad->r, j)); } - ab->beta = gerepilecopy (ltop, ret); + ad->beta = gerepilecopy (ltop, ret); } |