2006-10-30 05:32:33 +00:00
|
|
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
|
|
|
|
2010-02-14 08:45:14 +00:00
|
|
|
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
|
|
Provided under GPL version 2 or later.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-05-16 09:07:42 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../config.h"
|
|
|
|
#endif
|
|
|
|
|
2006-10-30 05:32:33 +00:00
|
|
|
#include "null.h"
|
|
|
|
#include "libburn.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
int null_read(struct burn_source *source, unsigned char *buffer, int size)
|
|
|
|
{
|
|
|
|
memset(buffer, 0, size);
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct burn_source *burn_null_source_new(void)
|
|
|
|
{
|
|
|
|
struct burn_source *src;
|
|
|
|
|
2010-07-12 19:37:31 +00:00
|
|
|
src = calloc(1, sizeof(struct burn_source));
|
2006-10-30 05:32:33 +00:00
|
|
|
src->refcount = 1;
|
|
|
|
src->read = null_read;
|
|
|
|
src->read_sub = NULL;
|
|
|
|
|
|
|
|
src->get_size = 0;
|
2007-01-26 17:33:29 +00:00
|
|
|
|
|
|
|
/* ts A70126 */
|
|
|
|
src->set_size = NULL;
|
|
|
|
|
2006-10-30 05:32:33 +00:00
|
|
|
src->free_data = NULL;
|
|
|
|
src->data = NULL;
|
|
|
|
return src;
|
|
|
|
}
|