Skip to content

tvalreq/cutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

cutils

cutils is a set of utils for C programs.

List

STRUCTURE
typedef struct item {
    CONTENT_TYPE content;
    struct item* next;
} item_t;

Previously, you have to define the macro CONTENT_TYPE in order to determine the type of the item content. For example:

#define CONTENT_TYPE uint32_t
MACROS
  • LIST_APPEND(head,node) appends a new item node into the list pointed by head.
  • LIST_ADD(node1,node2) adds node2 item in the list just between node1 and node1->next. alpha...
  • LIST_REMOVE(head,node) remove the item node from the list pointed by head.
  • LIST_COUNT(head,counter) counts in counter the number of items contained in the list pointed by head. alpha...

About

Useful utils for using in C programs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages