|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
|
|
|
|
|
long decode(char *nbr, char *base_from)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
int i;
|
|
|
|
|
long result;
|
|
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
@ -24,7 +24,7 @@ long decode(char *nbr, char *base_from)
|
|
|
|
|
void convert(long medium, char *base_to,
|
|
|
|
|
char *unestring, int *p_i)
|
|
|
|
|
{
|
|
|
|
|
long l_base;
|
|
|
|
|
long l_base;
|
|
|
|
|
|
|
|
|
|
l_base = check(base_to);
|
|
|
|
|
if (medium >= 0 && medium < l_base)
|
|
|
|
@ -42,7 +42,7 @@ void convert(long medium, char *base_to,
|
|
|
|
|
|
|
|
|
|
char *jonemar(char *cepafini, char *celafin, int i)
|
|
|
|
|
{
|
|
|
|
|
int j;
|
|
|
|
|
int j;
|
|
|
|
|
|
|
|
|
|
j = 0;
|
|
|
|
|
while (cepafini[j])
|
|
|
|
@ -59,16 +59,14 @@ char *recode(long medium, char *base_to, int posi)
|
|
|
|
|
{
|
|
|
|
|
char cepafini[50];
|
|
|
|
|
char *celafin;
|
|
|
|
|
int i;
|
|
|
|
|
int *p_i;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
p_i = &i;
|
|
|
|
|
convert(medium, base_to, cepafini, p_i);
|
|
|
|
|
convert(medium, base_to, cepafini, &i);
|
|
|
|
|
if (posi < 0)
|
|
|
|
|
celafin = (char *)malloc(sizeof(char) * (*p_i + 3));
|
|
|
|
|
celafin = (char *)malloc(sizeof(char) * (i + 3));
|
|
|
|
|
else
|
|
|
|
|
celafin = (char *)malloc(sizeof(char) * (*p_i + 2));
|
|
|
|
|
celafin = (char *)malloc(sizeof(char) * (i + 2));
|
|
|
|
|
if (!(celafin))
|
|
|
|
|
return (0);
|
|
|
|
|
if (posi < 0 && medium != 0)
|
|
|
|
|