-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
125 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
name: Create documentation | ||
on: | ||
push: | ||
branches: [ v2 ] | ||
pull_request: | ||
branches: [ v2 ] | ||
|
||
jobs: | ||
doxygen: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Doxygen Action | ||
uses: mattnotmitt/[email protected] | ||
with: | ||
doxyfile-path: "./Doxyfile" | ||
working-directory: "." | ||
|
||
- name: Deploy documentation | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** @file list.h | ||
* @brief Fuse linked list function prototypes | ||
* | ||
* This file contains the function prototypes for creating and destroying | ||
* linked lists. | ||
*/ | ||
#ifndef FUSE_LIST_H | ||
#define FUSE_LIST_H | ||
#include "fuse.h" | ||
|
||
/** @brief Linked list defintion | ||
*/ | ||
typedef struct fuse_list_instance fuse_list_t; | ||
|
||
/** @brief Create a new empty linked list | ||
* @param fuse The fuse application | ||
* @returns A new empty linked list, or NULL if memory could not be allocated | ||
*/ | ||
fuse_list_t *fuse_list_new(fuse_t *fuse); | ||
|
||
/** @brief Deallocate a fuse linked list | ||
* | ||
* @param self The linked list to deallocate | ||
*/ | ||
void fuse_list_destroy(fuse_list_t *self); | ||
|
||
/** @brief Return the number of nodes in the list | ||
* | ||
* @param self The linked list | ||
* @returns The number of nodes in the list | ||
*/ | ||
void fuse_list_count(fuse_list_t *self); | ||
|
||
/** @brief Return the next node in the list | ||
* | ||
* @param self The linked list | ||
* @param ptr The current node, or NULL if the first node should be returned | ||
* @returns The next node in the linked list, or NULL if there is no next node | ||
*/ | ||
void *fuse_list_next(fuse_list_t *self, void *ptr); | ||
|
||
/** @brief Return the previous node in the list | ||
* | ||
* @param self The linked list | ||
* @param ptr The current node, or NULL if the last node should be returned | ||
* @returns The previous node in the linked list, or NULL if there is no previous node | ||
*/ | ||
void *fuse_list_prev(fuse_list_t *self, void *ptr); | ||
|
||
/** @brief Add a node at the end of the list | ||
* | ||
* @param self The linked list | ||
* @param ptr The new node to add to the end of the list | ||
* @returns Returns true if successful, false otherwise | ||
*/ | ||
void *fuse_list_push(fuse_list_t *self, void *ptr); | ||
|
||
/** @brief Remove a node from the beginning of the list | ||
* | ||
* @param self The linked list | ||
* @returns Returns the node removed from the beginning of the list, or NULL if the list is empty | ||
*/ | ||
void *fuse_list_pop(fuse_list_t *self); | ||
|
||
#endif // FUSE_LIST_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** @file list.h | ||
* @brief Private function prototypes and structure definitions for linked lists | ||
*/ | ||
#ifndef FUSE_PRIVATE_LIST_H | ||
#define FUSE_PRIVATE_LIST_H | ||
|
||
#include <fuse/fuse.h> | ||
|
||
/* @brief Represents an instance of a fuse linked list | ||
*/ | ||
struct fuse_list_instance | ||
{ | ||
struct fuse_list_node *first; ///< The first node in the list, or NULL if the list is empty | ||
struct fuse_list_node *last; ///< The last node in the list, or NULL if the list is empty | ||
size_t count; ///< The number of nodes in the list | ||
}; | ||
|
||
/* @brief Represents a node in a fuse linked list | ||
*/ | ||
struct fuse_list_node | ||
{ | ||
void *ptr; ///< The pointer to the node data | ||
struct fuse_list_node *prev; ///< The previous node in the list, or NULL if this is the first node | ||
struct fuse_list_node *next; ///< The next node in the list, or NULL if this is the last node | ||
}; | ||
|
||
#endif |