/* add.h */
#ifndef _TEST_H_ //防止头文件重复定义
#define _TEST_H_
int g_var;
extern int add(inta,intb); #endif//防止头文件重复定义
#define _TEST_H_
int g_var;
extern int add(inta,intb); #endif
/*linker.c*/
#include #include #include "linker.h"
void init_list(st_node **head)
{
*head = NULL;
}
int insert_list_head(st_node **head, item data)
{
st_node *new = NULL;
/* malloc for new node and fill it */
new= malloc( sizeof(st_node) );
if( new == NULL )
{
printf("malloc failure\n");
return -1;
}
new->data = data;
new->next = NULL;
if( NULL==*head )
{
/* link list is empty then let it be the first node */
*head = new;