coding style

This commit is contained in:
Markus Teich 2016-06-01 01:40:29 +02:00
parent ec2d1365a8
commit 33bf645eaf

10
smc.c
View File

@ -22,13 +22,13 @@
#include <pari/pari.h>
GEN
smc_hextodec(char *s) /* int */
smc_hextodec (char *s) /* int */
{
long i, tmp;
GEN ret = gen_0; /* int */
GEN v = gtovecsmall(strtoGENstr(s)); /* vecsmall */
GEN v = gtovecsmall (strtoGENstr (s)); /* vecsmall */
for (i = 1; i < lg(v); ++i)
for (i = 1; i < lg (v); ++i)
{
if ((v[i] >= '0') && (v[i] <= '9'))
tmp = v[i] - '0';
@ -37,8 +37,8 @@ smc_hextodec(char *s) /* int */
else if ((v[i] >= 'A') && (v[i] <= 'F'))
tmp = v[i] + 10 - 'A';
else
pari_err(e_MISC, "invalid input format");
ret = addis(shifti(ret, 4), tmp);
pari_err (e_MISC, "invalid input format");
ret = addis (shifti (ret, 4), tmp);
}
return ret;
}