prt.c 653 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* This file is part of the GNU plotutils package. */
  2. /*
  3. * Copyright (C) 1982-1994, Nicholas B. Tufillaro. All rights reserved.
  4. *
  5. * GNU enhancements Copyright (C) 1996, 1997, 1998, 1999 Free Software
  6. * Foundation, Inc.
  7. */
  8. /*
  9. * print queue memory management
  10. *
  11. */
  12. #include "sys-defines.h"
  13. #include "ode.h"
  14. #include "extern.h"
  15. struct prt *
  16. palloc (void)
  17. {
  18. struct prt *pp;
  19. pp = (struct prt *)xmalloc (sizeof(struct prt));
  20. pp->pr_sym = NULL;
  21. pp->pr_link = NULL;
  22. pp->pr_which = P_VALUE; /* default */
  23. return pp;
  24. }
  25. void
  26. pfree (struct prt *pp)
  27. {
  28. if (pp != NULL)
  29. {
  30. pfree (pp->pr_link);
  31. free ((void *)pp);
  32. }
  33. }