diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-14 01:39:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-14 01:39:13 +0200 |
commit | 191e0a2bc7cb4787e19aa1f8c6958b47e05d7882 (patch) | |
tree | 33740966cf8b50b85665b6c779eb29639dab7d60 /src/fileio.c | |
parent | 80794b1ce64b394fe6a1355ddd7159d1c97d6f48 (diff) | |
download | vim-git-191e0a2bc7cb4787e19aa1f8c6958b47e05d7882.tar.gz |
Fix tiny build, move functions to undo.c.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/fileio.c b/src/fileio.c index bfc11d0d9..aad76170e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3011,63 +3011,6 @@ prepare_crypt_write(buf, lenp) #endif /* FEAT_CRYPT */ -/* - * Like fwrite() but crypt the bytes when 'key' is set. - * Returns 1 if successful. - */ - size_t -fwrite_crypt(buf, ptr, len, fp) - buf_T *buf UNUSED; - char_u *ptr; - size_t len; - FILE *fp; -{ -#ifdef FEAT_CRYPT - char_u *copy; - char_u small_buf[100]; - size_t i; - - if (*buf->b_p_key == NUL) - return fwrite(ptr, len, (size_t)1, fp); - if (len < 100) - copy = small_buf; /* no malloc()/free() for short strings */ - else - { - copy = lalloc(len, FALSE); - if (copy == NULL) - return 0; - } - crypt_encode(ptr, len, copy); - i = fwrite(copy, len, (size_t)1, fp); - if (copy != small_buf) - vim_free(copy); - return i; -#else - return fwrite(ptr, len, (size_t)1, fp); -#endif -} - -/* - * Read a string of length "len" from "fd". - * When 'key' is set decrypt the bytes. - */ - char_u * -read_string_decrypt(buf, fd, len) - buf_T *buf UNUSED; - FILE *fd; - int len; -{ - char_u *ptr; - - ptr = read_string(fd, len); -#ifdef FEAT_CRYPT - if (ptr != NULL || *buf->b_p_key != NUL) - crypt_decode(ptr, len); -#endif - return ptr; -} - - #ifdef UNIX static void set_file_time(fname, atime, mtime) |