You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
734 B

15 years ago
15 years ago
15 years ago
15 years ago
  1. /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
  2. /* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
  3. Provided under GPL version 2 or later.
  4. */
  5. #ifdef HAVE_CONFIG_H
  6. #include "../config.h"
  7. #endif
  8. #include "null.h"
  9. #include "libburn.h"
  10. #include <stdlib.h>
  11. #include <string.h>
  12. int null_read(struct burn_source *source, unsigned char *buffer, int size)
  13. {
  14. memset(buffer, 0, size);
  15. return size;
  16. }
  17. struct burn_source *burn_null_source_new(void)
  18. {
  19. struct burn_source *src;
  20. src = calloc(1, sizeof(struct burn_source));
  21. src->refcount = 1;
  22. src->read = null_read;
  23. src->read_sub = NULL;
  24. src->get_size = 0;
  25. /* ts A70126 */
  26. src->set_size = NULL;
  27. src->free_data = NULL;
  28. src->data = NULL;
  29. return src;
  30. }