Commit Graph

23 Commits

Author SHA1 Message Date
Lucas De Marchi dea2dfee9b Remove FSF mailing address
It has changed in the past, and these days, anyone can get a copy of the
LGPL via the web rather than by post.

Like 657a122 (Remove FSF mailing address) in libabc by Josh Tripplet,
but let the FSF website in which the license can be found.
2014-12-25 23:41:34 -02:00
Lucas De Marchi eb6f9112cf libkmod: remove unused inline functions
libkmod/libkmod-list.c:39:33: warning: unused function 'list_node_next' [-Wunused-function]
static inline struct list_node *list_node_next(const struct list_node *node)
                                ^
libkmod/libkmod-list.c:47:33: warning: unused function 'list_node_prev' [-Wunused-function]
static inline struct list_node *list_node_prev(const struct list_node *node)
                                ^

It doesn't really matter in the end result since the compiler won't
generate any code for it. But let's keep it clean. It wasn't needed
until now, so probably it won't be anymore.
2014-10-09 11:11:29 -03:00
Lucas De Marchi 83b855a6ed Use "-internal" suffix instead of "-private" 2013-07-04 16:13:11 -03:00
Lucas De Marchi e6b0e49b4e Update copyright notices 2013-01-16 11:27:45 -02:00
Lucas De Marchi 434f32ca8d libkmod-list: allow to append an empty list 2012-01-17 21:16:23 -02:00
Lucas De Marchi 6681951bbe doc: organize sections 2012-01-09 05:28:57 -02:00
Lucas De Marchi a66a6a999f Update copyright 2012-01-09 00:41:07 -02:00
Lucas De Marchi eb4ae531f7 Fix kmod_list_remove_n_latest()
It only worked because n was always 1. kmod_list_remove returns a
pointer to the next element, relative to the removed one. Therefore we
need to always get a pointer to the last.
2011-12-27 02:48:36 -02:00
Gustavo Sverzut Barbieri d5ec60bc0c introduce kmod_list_last()
This gets the last element in the list, that is, the previous element
of the head.
2011-12-17 19:43:11 -02:00
Gustavo Sverzut Barbieri 2a70a5d4e0 fix kmod_list_prev().
kmod_list_prev() should return NULL if the current element is the
head, not if the previous element is the head. This was likely a copy
& paste error from kmod_list_next().
2011-12-17 19:43:11 -02:00
Lucas De Marchi cb451f35d9 Change licenses
libkmod is under LGPL 2.1 or later
tools/* are under GPL
2011-12-12 18:24:35 -02:00
Lucas De Marchi c35347f15c coding style: fix lines over 80 chars
Lines should not go over 80 chars with a few exceptions:
	- headers
	- function definitions with only 1 argument
	- long strings, otherwise we break grep

This should go later in a coding-style file
2011-12-12 10:54:19 -02:00
Lucas De Marchi 7e1b3ae2b9 kmod_list: document exported functions 2011-12-08 12:25:36 -02:00
Lucas De Marchi e16e27f4a4 kmod_list: remove nodes in order 2011-12-06 03:34:51 -02:00
Lucas De Marchi 1965029cb0 kmod_list: add helper function to merge two lists
This helper function will append the second list in the first one, so
they become one single list.
2011-12-06 03:34:51 -02:00
Lucas De Marchi b91a1c6d3d kmod_list: add helper kmod_list_insert_before() 2011-12-06 03:34:51 -02:00
Lucas De Marchi 86e8788572 kmod_list: add helper kmod_list_insert_after() 2011-12-06 03:34:51 -02:00
Gustavo Sverzut Barbieri 1ce08a563e improve "const" keyword usage.
functions that do not modify their parameters get them as const pointers.

special cases:
 * kmod_get_userdata/kmod_set_userdata: return as void* for user convenience.
 * kmod_list_append/kmod_list_prepend: take const void* for user convenience.
2011-12-03 03:51:55 -02:00
Lucas De Marchi 62be799554 Add kmod_list_remove_n_latest() 2011-12-01 15:34:12 -02:00
Lucas De Marchi 79d77111dc Add kmod_list_prev to exported functions 2011-12-01 14:47:44 -02:00
Lucas De Marchi 191ab4b9e0 Fix wrong copyright
I'm the author, not the copyright owner.
2011-11-28 16:59:06 -02:00
Lucas De Marchi f87081b4d1 Add some function attributes and use them 2011-11-23 16:08:04 -02:00
Lucas De Marchi 6924e47a8d Implement circular double-linked list 2011-11-23 05:15:21 -02:00