Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include "ft_stock_par.h"
- void ft_print_words_tables(char **tab)
- {
- int i;
- int j;
- i = 0;
- j = 0;
- while (tab[i])
- {
- while (tab[i][j])
- {
- ft_putchar(tab[i][j]);
- j++;
- }
- i++;
- j = 0;
- ft_putchar('\n');
- }
- }
- void ft_putstr(char *str)
- {
- int i;
- i = 0;
- while(str[i])
- {
- ft_putchar(str[i]);
- i++;
- }
- }
- void ft_putnbr(int nb)
- {
- long n;
- n = nb;
- if (n > 9)
- {
- ft_putnbr(n /10);
- ft_putnbr(n % 10);
- }
- else
- {
- ft_putchar(n + '0');
- }
- }
- void ft_show_tab(struct s_stock_par *par)
- {
- int i;
- i = 0;
- while (par[i].str != 0)
- {
- ft_putstr(par[i].copy);
- ft_putchar('\n');
- ft_putnbr(par[i].size_param);
- ft_putchar('\n');
- ft_print_words_tables(par[i].tab);
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement