1 /*- 2 * LstDatum.c -- 3 * Return the datum associated with a list node. 4 * 5 * Copyright (c) 1988 by University of California Regents 6 * 7 * Permission to use, copy, modify, and distribute this 8 * software and its documentation for any purpose and without 9 * fee is hereby granted, provided that the above copyright 10 * notice appears in all copies. Neither the University of California nor 11 * Adam de Boor makes any representations about the suitability of this 12 * software for any purpose. It is provided "as is" without 13 * express or implied warranty. 14 */ 15 #ifndef lint 16 static char *rcsid = 17 "$Id: lstDatum.c,v 1.4 88/11/17 20:52:07 adam Exp $ SPRITE (Berkeley)"; 18 #endif lint 19 20 #include "lstInt.h" 21 22 /*- 23 *----------------------------------------------------------------------- 24 * Lst_Datum -- 25 * Return the datum stored in the given node. 26 * 27 * Results: 28 * The datum or (ick!) NIL if the node is invalid. 29 * 30 * Side Effects: 31 * None. 32 * 33 *----------------------------------------------------------------------- 34 */ 35 ClientData 36 Lst_Datum (ln) 37 LstNode ln; 38 { 39 if (ln != NILLNODE) { 40 return (((ListNode)ln)->datum); 41 } else { 42 return ((ClientData) NIL); 43 } 44 } 45 46