All pastes #219042 Raw Edit

Unnamed

public c v1 · immutable
#219042 ·published 2006-10-24 14:02 UTC
rendered paste body
#include <unistd.h>#include <stdlib.h>char    *stock(int taille);int     my_put_nbr(int nb);int     my_putstr(char *str);char    *stock(int taille){  char *str;  int   fd;  str = malloc(sizeof(*str)*taille);  fd =  read(0, str, taille);  if (fd == taille)    {      DecToBase("01", my_getnbr(*str));      write(1, str, fd);    }  else    write(1, "Error.", 6);  return (str);}int     main(int argc, char **argv){  BaseToDec("01", argv[1]);  if (argc > 3)    stock(my_getnbr(argv[3]));  else    write(1, "Error.", 6);  return (0);}