GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71933
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dispose.c
Go to the documentation of this file.
1 /*
2  ** Written by David Gerdes US Army Construction Engineering Research Lab
3  ** April 1992
4  ** Copyright 1992 USA-CERL All rights reserved.
5  **
6  */
7 #include <grass/linkm.h>
8 
9 
10 void link_dispose(struct link_head *Head, VOID_T * ptr)
11 {
12  if (NULL == ptr)
13  return;
14 
15  link__set_next(ptr, Head->Unused); /* ptr->next = Unused */
16  Head->Unused = ptr; /* Unused = ptr */
17 }
#define VOID_T
Definition: linkm.h:8
#define NULL
Definition: ccmath.h:32
void link__set_next(VOID_T *a, VOID_T *b)
Definition: linkm/next.c:18
void link_dispose(struct link_head *Head, VOID_T *ptr)
Definition: dispose.c:10