diff options
Diffstat (limited to 'src/xine-engine/scratch.c')
-rw-r--r-- | src/xine-engine/scratch.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c index 67281b041..7376a3f9e 100644 --- a/src/xine-engine/scratch.c +++ b/src/xine-engine/scratch.c @@ -15,12 +15,9 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: scratch.c,v 1.24 2007/01/19 00:12:22 dgp85 Exp $ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * top-level xine functions - * */ #ifdef HAVE_CONFIG_H @@ -29,7 +26,6 @@ #include <stdio.h> #include <stdarg.h> -#include <string.h> /* For memset */ #define LOG_MODULE "scratch" #define LOG_VERBOSE @@ -37,8 +33,8 @@ #define LOG */ -#include "xineutils.h" -#include "scratch.h" +#include <xine/xineutils.h> +#include <xine/scratch.h> static void __attribute__((__format__(__printf__, 2, 0))) scratch_printf (scratch_buffer_t *this, const char *format, va_list argp) @@ -108,15 +104,11 @@ static void scratch_dispose (scratch_buffer_t *this) { scratch_buffer_t *_x_new_scratch_buffer (int num_lines) { scratch_buffer_t *this; - int i; this = xine_xmalloc (sizeof (scratch_buffer_t)); - this->lines = xine_xmalloc (sizeof (char *) * (num_lines + 1)); - this->ordered = xine_xmalloc (sizeof (char *) * (num_lines + 1)); - - for (i = 0; i <= num_lines; i++) - this->lines[i] = this->ordered[i] = NULL; + this->lines = xine_xcalloc ((num_lines + 1), sizeof(char*)); + this->ordered = xine_xcalloc ((num_lines + 1), sizeof(char*)); this->scratch_printf = scratch_printf; this->get_content = scratch_get_content; |