mirror of
https://github.com/eddyem/eddys_snippets.git
synced 2026-03-21 17:20:57 +03:00
Zernike works
This commit is contained in:
@@ -91,22 +91,3 @@ void list_free(List **root){
|
||||
*root = NULL;
|
||||
}
|
||||
|
||||
#ifdef STANDALONE
|
||||
int main(void) {
|
||||
List *tp = NULL, *root_p = NULL;
|
||||
int i, ins[] = {4,2,6,1,3,4,7};
|
||||
for(i = 0; i < 7; i++){
|
||||
if(!(tp = list_add(&tp, ins[i])))
|
||||
err(1, "Malloc error"); // can't insert
|
||||
if(!root_p) root_p = tp;
|
||||
}
|
||||
tp = root_p;
|
||||
i = 0;
|
||||
do{
|
||||
printf("element %d = %d\n", i++, tp->data);
|
||||
tp = tp->next;
|
||||
}while(tp);
|
||||
list_free(&root_p);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user