1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| t_listoperandes *my_operandes_in_list(char *str)
{
t_listoperandes *begin;
int i;
int l;
int a;
char *res;
res = xmalloc(sizeof(*res));
begin = xmalloc(sizeof(*begin));
begin->data = 0;
begin->next = 0;
i = 0;
l = 0;
a = 0;
while (str[i] != '\0')
{
if (str[i] > 47 && str[i] < 58)
{
res[a] = str[i];
a++;
}
begin = add_to_list_operandes(res, begin);
begin = begin->next;
i++;
}
while (begin)
{
printf("%s", begin->data);
begin = begin->next;
}
} |
Partager