2 |
|
#include <stdlib.h> |
3 |
|
#include <string.h> |
4 |
|
|
5 |
< |
#include <node_list.h> |
6 |
< |
#include <make_nodes.h> |
7 |
< |
#include <simError.h> |
5 |
> |
#include "node_list.h" |
6 |
> |
#include "make_nodes.h" |
7 |
> |
#include "simError.h" |
8 |
|
|
9 |
|
/* |
10 |
|
walks to to the top of a stmt_list. Needed when assigning the |
215 |
|
the_node = ( struct node_tag* )malloc( sizeof( node ) ); |
216 |
|
|
217 |
|
the_node->type = MOLECULE_HEAD; |
218 |
+ |
the_node->index = 0; |
219 |
+ |
the_node->next_stmt = NULL; |
220 |
+ |
the_node->prev_stmt = NULL; |
221 |
+ |
the_node->stmt_list = walk_to_top( stmt_list ); |
222 |
+ |
|
223 |
+ |
return the_node; |
224 |
+ |
} |
225 |
+ |
|
226 |
+ |
struct node_tag* rigidbody_blk( int index, struct node_tag* stmt_list ){ |
227 |
+ |
|
228 |
+ |
struct node_tag* the_node; |
229 |
+ |
the_node = ( struct node_tag* )malloc( sizeof( node ) ); |
230 |
+ |
|
231 |
+ |
the_node->type = RIGIDBODY_HEAD; |
232 |
|
the_node->index = 0; |
233 |
|
the_node->next_stmt = NULL; |
234 |
|
the_node->prev_stmt = NULL; |