From 41ae1a0f0d86d2fc19f333ee23889c11beb0a4dd Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 26 Oct 2018 16:00:29 +0300 Subject: Confort to pedantic std-c99 and update readme --- src/cklist.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/cklist.h') diff --git a/src/cklist.h b/src/cklist.h index 3cf0f7c..dcc6763 100644 --- a/src/cklist.h +++ b/src/cklist.h @@ -16,8 +16,8 @@ #define CKLIST_H typedef struct cklist_st cklist; struct cklist_st { - int size; - int pos; + unsigned int size; + unsigned int pos; char **arr; }; @@ -28,9 +28,9 @@ extern void list_rewind(cklist *ckl); extern int list_next(cklist *ckl); extern char* list_get(cklist *ckl); -extern char* list_get_at(cklist *ckl, int pos); +extern char* list_get_at(cklist *ckl,unsigned int pos); -extern int list_size(cklist *ckl); +extern unsigned int list_size(cklist *ckl); /* rewinds */ extern cklist* list_duplicate(cklist *ckl); @@ -38,17 +38,17 @@ extern cklist* list_duplicate(cklist *ckl); extern cklist* list_move(cklist *ckl); /* rewinds * copy from index (>=) to the end */ -extern cklist* list_copy_from(cklist *ckl, int index); +extern cklist* list_copy_from(cklist *ckl,unsigned int index); /* rewinds * copy from the start until (<) index*/ -extern cklist* list_copy_until(cklist *ckl, int index); +extern cklist* list_copy_until(cklist *ckl,unsigned int index); /* rewinds * copy from (>=) until (<) */ -extern cklist* list_copy_part(cklist *ckl, int from, int until); +extern cklist* list_copy_part(cklist *ckl,unsigned int from,unsigned int until); /* return 1 if str exists in the list, 0 otherwise */ -extern int list_exists(cklist *ckl, char *str); +extern int list_exists(cklist *ckl, const char *str); /* rewinds */ extern void list_print_lisp(cklist *ckl); -- cgit v1.2.3