LINUX.ORG.RU

История изменений

Исправление unt1tled, (текущая версия) :

питонщик чтоли?

 
   if (ac != 3) {
        fprintf(stderr, "usage: %s source destination\n", *av);
        exit(1);
    }

Исправление unt1tled, :

питонщик чтоли?

 
   if (ac != 3) {
        fprintf(stderr, "usage: %s source destination\n", *av);
        exit(1);
    }
    ...
    while ((n_chars = read(in_fd, buf, BUFERSIZE)) > 0) {
        if (write(out_fd, buf, n_chars) != n_chars)
            oops("Write error to", av[2]);
        if (n_chars == -1)
            oops("Read error from", av[1]);
    }

Исходная версия unt1tled, :

if (ac != 3) { fprintf(stderr, «usage: %s source destination\n», *av); exit(1); } ... while ((n_chars = read(in_fd, buf, BUFERSIZE)) > 0) { if (write(out_fd, buf, n_chars) != n_chars) oops(«Write error to», av[2]); if (n_chars == -1) oops(«Read error from», av[1]); }