Mercurial > gftp.yaz
comparison lib/cache.c @ 179:8d933999bba6
2003-6-14 Brian Masney <masneyb@gftp.org>
* lib/cache.c (gftp_delete_cache_entry) - fix for restoring newlines
* lib/gftp.h lib/protocols.c - added EOF flag for gftp_get_line()
* lib/gftp.h lib/pty.c - added get_pty_impl() function for each PTY
type
* src/text/gftp-text.c - after removing files, clear the cache for
that directory
author | masneyb |
---|---|
date | Sat, 14 Jun 2003 14:14:01 +0000 |
parents | c505d9ba9d53 |
children | 33b394ebba68 |
comparison
equal
deleted
inserted
replaced
178:8beb7bfca92b | 179:8d933999bba6 |
---|---|
322 | 322 |
323 if (remove) | 323 if (remove) |
324 unlink (centry.file); | 324 unlink (centry.file); |
325 else | 325 else |
326 { | 326 { |
327 /* Make sure when we call gftp_get_line() that we pass the read size | |
328 as sizeof(buf) - 1 so that we'll have room to put the newline */ | |
329 buf[strlen (buf)] = '\n'; | |
330 | |
331 /* Make sure we put the tabs back in the line. I do it this way | 327 /* Make sure we put the tabs back in the line. I do it this way |
332 so that I don't have to allocate memory again for each line | 328 so that I don't have to allocate memory again for each line |
333 as we read it */ | 329 as we read it */ |
334 gftp_restore_cache_line (¢ry, buf); | 330 gftp_restore_cache_line (¢ry, buf); |
335 | 331 |
332 /* Make sure when we call gftp_get_line() that we pass the read size | |
333 as sizeof(buf) - 1 so that we'll have room to put the newline */ | |
334 buf[strlen (buf)] = '\n'; | |
335 | |
336 if (gftp_fd_write (NULL, buf, strlen (buf), newfd) < 0) | 336 if (gftp_fd_write (NULL, buf, strlen (buf), newfd) < 0) |
337 break; | 337 break; |
338 } | 338 } |
339 } | 339 } |
340 | 340 |