Rev 3448 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3448 | Rev 3535 | ||
---|---|---|---|
Line 101... | Line 101... | ||
101 | fname); |
101 | fname); |
102 | return 1; |
102 | return 1; |
103 | } |
103 | } |
104 | 104 | ||
105 | do { |
105 | do { |
106 | memset(buff, 0, sizeof(buff)); |
- | |
107 | bytes = read(fd, buff, blen); |
106 | bytes = read(fd, buff, blen); |
108 | if (bytes > 0) { |
107 | if (bytes > 0) { |
109 | count += bytes; |
108 | count += bytes; |
110 | if (bytes < blen) |
- | |
111 | buff[bytes] = '\0'; |
109 | buff[bytes] = '\0'; |
112 | printf(buff); |
110 | printf("%s", buff); |
113 | reads++; |
111 | reads++; |
114 | } |
112 | } |
115 | } while (bytes > 0); |
113 | } while (bytes > 0); |
116 | 114 | ||
117 | close(fd); |
115 | close(fd); |