1 |
– |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ SGI"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* sm_list.c |
6 |
|
* Routines for handling linked generic linked lists, stack, and |
17 |
|
extern int Malloc_cnt; |
18 |
|
#endif |
19 |
|
LIST |
20 |
+ |
/* NOTE: Memory is not initialized */ |
21 |
|
*new_list() |
22 |
|
{ |
23 |
|
LIST *l; |
34 |
|
if( !(l = (LIST *)malloc(sizeof(LIST)))) |
35 |
|
error(SYSTEM,"new_list():Unable to allocate memory"); |
36 |
|
} |
39 |
– |
/* clear the memory */ |
40 |
– |
bzero(l, sizeof(LIST)); |
41 |
– |
|
37 |
|
return(l); |
38 |
|
} |
39 |
|
|
69 |
|
|
70 |
|
list = new_list(); |
71 |
|
SET_LIST_DATA(list,d); |
72 |
< |
|
72 |
> |
SET_LIST_NEXT(list,NULL); |
73 |
|
if(!l) |
74 |
|
{ |
75 |
|
if(end) |
205 |
|
} |
206 |
|
return(FALSE); |
207 |
|
} |
208 |
+ |
|
209 |
+ |
|
210 |
+ |
|
211 |
+ |
|
212 |
|
|
213 |
|
|
214 |
|
|