hpdf_null.c 920 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * << Haru Free PDF Library >> -- hpdf_null.c
  3. *
  4. * URL: http://libharu.org
  5. *
  6. * Copyright (c) 1999-2006 Takeshi Kanno <[email protected]>
  7. * Copyright (c) 2007-2009 Antony Dovgal <[email protected]>
  8. *
  9. * Permission to use, copy, modify, distribute and sell this software
  10. * and its documentation for any purpose is hereby granted without fee,
  11. * provided that the above copyright notice appear in all copies and
  12. * that both that copyright notice and this permission notice appear
  13. * in supporting documentation.
  14. * It is provided "as is" without express or implied warranty.
  15. *
  16. */
  17. #include "hpdf_utils.h"
  18. #include "hpdf_objects.h"
  19. HPDF_Null
  20. HPDF_Null_New (HPDF_MMgr mmgr)
  21. {
  22. HPDF_Null obj = HPDF_GetMem (mmgr, sizeof(HPDF_Null_Rec));
  23. if (obj) {
  24. HPDF_MemSet (&obj->header, 0, sizeof(HPDF_Obj_Header));
  25. obj->header.obj_class = HPDF_OCLASS_NULL;
  26. }
  27. return obj;
  28. }