All pastes #237261 Raw Edit

Untitled

public c v1 · immutable
·published 2006-11-04 13:04 UTC
rendered paste body
#include <fcntl.h>#include <unistd.h>char    *bsq(char *fichier){  char  *str;  int   fd;  char  *hauteur;  str = malloc(sizeof(*str) * 700); //malloc sale  fd = open(fichier, O_RDONLY, 0);  read(fd, hauteur, 1); // sale aussi  lseek(fd, 2, SEEK_SET);  read(fd, str, 700);  write(1, str, 700);  //Appeler la fonction find_o qui va retourner la position des O dans un char*  find_o(str);}int     main(int argc, char **argv){  if (argc > 1)    bsq(argv[1]);  else    return (0);}