=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/buf.c,v retrieving revision 1.17 retrieving revision 1.18 diff -c -r1.17 -r1.18 *** src/usr.bin/rcs/buf.c 2010/09/08 15:13:39 1.17 --- src/usr.bin/rcs/buf.c 2010/09/08 20:49:11 1.18 *************** *** 1,4 **** ! /* $OpenBSD: buf.c,v 1.17 2010/09/08 15:13:39 tobias Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: buf.c,v 1.18 2010/09/08 20:49:11 nicm Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau * All rights reserved. *************** *** 53,63 **** static void buf_grow(BUF *, size_t); /* - * buf_alloc() - * * Create a new buffer structure and return a pointer to it. This structure ! * uses dynamically-allocated memory and must be freed with buf_free(), ! * once the buffer is no longer needed. */ BUF * buf_alloc(size_t len) --- 53,61 ---- static void buf_grow(BUF *, size_t); /* * Create a new buffer structure and return a pointer to it. This structure ! * uses dynamically-allocated memory and must be freed with buf_free(), once ! * the buffer is no longer needed. */ BUF * buf_alloc(size_t len) *************** *** 78,85 **** } /* - * buf_load() - * * Open the file specified by and load all of its contents into a * buffer. * Returns the loaded buffer on success or NULL on failure. --- 76,81 ---- *************** *** 147,157 **** } /* - * buf_release() - * * Free the buffer 's structural information but do not free the contents * of the buffer. Instead, they are returned and should be freed later using ! * free(). */ void * buf_release(BUF *b) --- 143,151 ---- } /* * Free the buffer 's structural information but do not free the contents * of the buffer. Instead, they are returned and should be freed later using ! * xfree(). */ void * buf_release(BUF *b) *************** *** 163,171 **** return (tmp); } - /* - * buf_get() - */ u_char * buf_get(BUF *b) { --- 157,162 ---- *************** *** 173,180 **** } /* - * buf_empty() - * * Empty the contents of the buffer and reset pointers. */ void --- 164,169 ---- *************** *** 185,192 **** } /* - * buf_putc() - * * Append a single character to the end of the buffer . */ void --- 174,179 ---- *************** *** 202,211 **** } /* - * buf_getc() - * * Return u_char at buffer position . - * */ u_char buf_getc(BUF *b, size_t pos) --- 189,195 ---- *************** *** 214,224 **** } /* - * buf_append() - * * Append bytes of data pointed to by to the buffer . If the ! * buffer is too small to accept all data, it ! * will get resized to an appropriate size to accept all data. * Returns the number of bytes successfully appended to the buffer. */ size_t --- 198,206 ---- } /* * Append bytes of data pointed to by to the buffer . If the ! * buffer is too small to accept all data, it will get resized to an ! * appropriate size to accept all data. * Returns the number of bytes successfully appended to the buffer. */ size_t *************** *** 239,248 **** return (rlen); } - /* - * buf_fappend() - * - */ size_t buf_fappend(BUF *b, const char *fmt, ...) { --- 221,226 ---- *************** *** 264,271 **** } /* - * buf_len() - * * Returns the size of the buffer that is being used. */ size_t --- 242,247 ---- *************** *** 275,282 **** } /* - * buf_write_fd() - * * Write the contents of the buffer to the specified */ int --- 251,256 ---- *************** *** 305,312 **** } /* - * buf_write() - * * Write the contents of the buffer to the file whose path is given in * . If the file does not exist, it is created with mode . */ --- 279,284 ---- *************** *** 336,346 **** } /* - * buf_write_stmp() - * * Write the contents of the buffer to a temporary file whose path is ! * specified using