Permalink
Browse files

newlines

  • Loading branch information...
1 parent 724aeaf commit 2fa738da0b578506b93389deb8c82ad9d5c55d5a @tj tj committed Nov 28, 2010
Showing with 43 additions and 18 deletions.
  1. +1 −1 src/iterator.c
  2. +1 −1 src/list.c
  3. +40 −15 src/list.h
  4. +1 −1 test.c
View
@@ -58,4 +58,4 @@ list_iterator_next(list_iterator_t *self) {
void
list_iterator_destroy(list_iterator_t *self) {
LIST_FREE(self);
-}
+}
View
@@ -184,4 +184,4 @@ list_remove(list_t *self, list_node_t *node) {
if (self->free) self->free(node);
LIST_FREE(node);
--self->len;
-}
+}
View
@@ -70,29 +70,54 @@ typedef struct {
// Node prototypes.
-list_node_t *list_node_new(void *val);
+list_node_t *
+list_node_new(void *val);
// list_t prototypes.
-list_t *list_new();
-list_node_t *list_push(list_t *self, list_node_t *node);
-list_node_t *list_unshift(list_t *self, list_node_t *node);
-list_node_t *list_find(list_t *self, void *val);
-list_node_t *list_at(list_t *self, int index);
-list_node_t *list_pop(list_t *self);
-list_node_t *list_shift(list_t *self);
-void list_remove(list_t *self, list_node_t *node);
-void list_destroy(list_t *self);
+list_t *
+list_new();
+
+list_node_t *
+list_push(list_t *self, list_node_t *node);
+
+list_node_t *
+list_unshift(list_t *self, list_node_t *node);
+
+list_node_t *
+list_find(list_t *self, void *val);
+
+list_node_t *
+list_at(list_t *self, int index);
+
+list_node_t *
+list_pop(list_t *self);
+
+list_node_t *
+list_shift(list_t *self);
+
+void
+list_remove(list_t *self, list_node_t *node);
+
+void
+list_destroy(list_t *self);
// list_t iterator prototypes.
-list_iterator_t *list_iterator_new(list_t *list, list_direction_t direction);
-list_iterator_t *list_iterator_new_from_node(list_node_t *node, list_direction_t direction);
-list_node_t *list_iterator_next(list_iterator_t *self);
-void list_iterator_destroy(list_iterator_t *self);
+list_iterator_t *
+list_iterator_new(list_t *list, list_direction_t direction);
+
+list_iterator_t *
+list_iterator_new_from_node(list_node_t *node, list_direction_t direction);
+
+list_node_t *
+list_iterator_next(list_iterator_t *self);
+
+void
+list_iterator_destroy(list_iterator_t *self);
#ifdef __cplusplus
}
#endif
-#endif /* __LIST_H__ */
+#endif /* __LIST_H__ */
View
2 test.c
@@ -321,4 +321,4 @@ main(int argc, const char **argv){
test(list_iterator_t);
puts("... \x1b[32m100%\x1b[0m\n");
return 0;
-}
+}

0 comments on commit 2fa738d

Please sign in to comment.