Skip to content

parsa011/llink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple linked list library
for use you have to add new prop to your struct , and name it 'link' , like this :

	struct name {
		int blabla;
		char *blabla2;
		// ***********
	->	L_LINK(struct_type) link;
		// ***********
	};

then you can use macros to change list like :

L_LINK_SPREV : set second object as prev for first object
L_LINK_SNEXT : like L_LINK_SPREV but for 'next'
L_LINK_INSERT : add new object to list , append after first object
L_LINK_REMOVE : remove object from 

and there some some usefull macros like :

L_LINK_NEXT : return next object of given object
L_LINK_PREV : prev object of given object

* NOTE that to pass args as pointer :)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published