Compare commits
9 Commits
2d9418fbb2
...
2e29a34073
Author | SHA1 | Date | |
---|---|---|---|
2e29a34073 | |||
b8c9df87da | |||
5550e41b2c | |||
46e37dc059 | |||
d85c4fe1fa | |||
ab79a779ac | |||
5e808083ae | |||
4e63a33abf | |||
9afcdaaf19 |
38
docs/functions/core/llist/why2_list_find.md
Normal file
38
docs/functions/core/llist/why2_list_find.md
Normal file
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_find
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
| `value` | `void *` |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | [`why2_node_t *`](../../../../types/core/llist/why2_node_t) |
|
||||
| **Header comment** | `FIND ELEMENT IN LIST` |
|
||||
| **Added in commit** | [`10632e00703f0935d963c1e2133940c061eb8ed3`](https://github.com/ENGO150/WHY2/commit/10632e00703f0935d963c1e2133940c061eb8ed3) |
|
||||
|
||||
## Description
|
||||
|
||||
Finds node in linked-list (`list`) containing `value` and returns pointer to it. If no match is found, `NULL` is returned.
|
37
docs/functions/core/llist/why2_list_get_size.md
Normal file
37
docs/functions/core/llist/why2_list_get_size.md
Normal file
@ -0,0 +1,37 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_get_size
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | `unsigned long` |
|
||||
| **Header comment** | `GET SIZE` |
|
||||
| **Added in commit** | [`c4ddb6888afd807abc3c60576475c170e306a5ba`](https://github.com/ENGO150/WHY2/commit/c4ddb6888afd807abc3c60576475c170e306a5ba) |
|
||||
|
||||
## Description
|
||||
|
||||
Calculates size of linked-list (`list`) (how many nodes are present) and returns it.
|
39
docs/functions/core/llist/why2_list_push.md
Normal file
39
docs/functions/core/llist/why2_list_push.md
Normal file
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_push
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
| `value` | `void *` |
|
||||
| `size` | `unsigned long` |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | `void` |
|
||||
| **Header comment** | `PUSH ELEMENT TO LIST BACK` |
|
||||
| **Added in commit** | [`10632e00703f0935d963c1e2133940c061eb8ed3`](https://github.com/ENGO150/WHY2/commit/10632e00703f0935d963c1e2133940c061eb8ed3) |
|
||||
|
||||
## Description
|
||||
|
||||
Function appends new node containing `value` of `size` to the back of linked-list (`list`).
|
42
docs/functions/core/llist/why2_list_push_at.md
Normal file
42
docs/functions/core/llist/why2_list_push_at.md
Normal file
@ -0,0 +1,42 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_push_at
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
| `index` | `unsigned long` |
|
||||
| `value` | `void *` |
|
||||
| `size` | `unsigned long` |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | `void` |
|
||||
| **Header comment** | `PUSH ELEMENT TO INDEX index of LIST` |
|
||||
| **Added in commit** | [`0e246be627c33f33d82a0fb2e5b43dd3fa024e0c`](https://github.com/ENGO150/WHY2/commit/0e246be627c33f33d82a0fb2e5b43dd3fa024e0c) |
|
||||
|
||||
## Description
|
||||
|
||||
Function appends new node containing `value` of `size` to the `index` position of linked-list (`list`).
|
||||
|
||||
`index` starts with 0.
|
38
docs/functions/core/llist/why2_list_remove.md
Normal file
38
docs/functions/core/llist/why2_list_remove.md
Normal file
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_remove
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
| `node` | [`why2_node_t *`](../../../../types/core/llist/why2_node_t) |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | `void` |
|
||||
| **Header comment** | `REMOVE ELEMENT` |
|
||||
| **Added in commit** | [`10632e00703f0935d963c1e2133940c061eb8ed3`](https://github.com/ENGO150/WHY2/commit/10632e00703f0935d963c1e2133940c061eb8ed3) |
|
||||
|
||||
## Description
|
||||
|
||||
Removes `node` from linked-list (`list`).
|
38
docs/functions/core/llist/why2_list_remove_at.md
Normal file
38
docs/functions/core/llist/why2_list_remove_at.md
Normal file
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_remove_at
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
| `index` | `unsigned long` |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | `void` |
|
||||
| **Header comment** | `REMOVE ELEMENT WITH INDEX index` |
|
||||
| **Added in commit** | [`90643d82470dba0c5aaf884a231a55894b8dd39f`](https://github.com/ENGO150/WHY2/commit/90643d82470dba0c5aaf884a231a55894b8dd39f) |
|
||||
|
||||
## Description
|
||||
|
||||
Removes node on `index` from linked-list (`list`).
|
37
docs/functions/core/llist/why2_list_remove_back.md
Normal file
37
docs/functions/core/llist/why2_list_remove_back.md
Normal file
@ -0,0 +1,37 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_remove_back
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | `void` |
|
||||
| **Header comment** | `REMOVE LAST ELEMENT` |
|
||||
| **Added in commit** | [`acee29c374353447c8e3bcce7c26000a991e2f6f`](https://github.com/ENGO150/WHY2/commit/acee29c374353447c8e3bcce7c26000a991e2f6f) |
|
||||
|
||||
## Description
|
||||
|
||||
Removes last node from linked-list (`list`).
|
38
docs/functions/core/llist/why2_list_reverse.md
Normal file
38
docs/functions/core/llist/why2_list_reverse.md
Normal file
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
This is part of WHY2
|
||||
Copyright (C) 2022 Václav Šmejkal
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
# why2_list_reverse
|
||||
|
||||
## Parameters
|
||||
|
||||
| Identifier | Data type |
|
||||
| ---------- | ----------------------------------------------------------- |
|
||||
| `list` | [`why2_list_t *`](../../../../types/core/llist/why2_list_t) |
|
||||
| `size` | `unsigned long` |
|
||||
|
||||
## Attributes
|
||||
|
||||
| | |
|
||||
| ------------------ | --------------------------------------------------------------------- |
|
||||
| **Return type** | `void` |
|
||||
| **Header comment** | `REVERSES list` |
|
||||
| **Added in commit** | [`7dcbd4fc80fa13e5f9d0d4fe90a742c0f8dfab3d`](https://github.com/ENGO150/WHY2/commit/7dcbd4fc80fa13e5f9d0d4fe90a742c0f8dfab3d) |
|
||||
|
||||
## Description
|
||||
|
||||
Reverses node order in linked-list (`list`). `size` is size of nodes in `list`, because of the reallocations.
|
@ -72,6 +72,19 @@ You can find documentation for every *public* function of WHY2 below.
|
||||
| [`why2_set_padding`](./core/flags/setters/why2_set_padding) | Set padding rate without rewriting input flags |
|
||||
| [`why2_reset_memory_identifier`](./core/flags/setters/why2_reset_memory_identifier) | *This functions doesn't have any description.* |
|
||||
|
||||
### Linked-list
|
||||
|
||||
| Function | Description |
|
||||
| ------------------------------------------------------------- | ----------------------------------- |
|
||||
| [`why2_list_push`](./core/llist/why2_list_push) | Push element to list back |
|
||||
| [`why2_list_push_at`](./core/llist/why2_list_push_at) | Push element to index index of list |
|
||||
| [`why2_list_remove`](./core/llist/why2_list_remove) | Remove element |
|
||||
| [`why2_list_remove_at`](./core/llist/why2_list_remove_at) | Remove element with index index |
|
||||
| [`why2_list_remove_back`](./core/llist/why2_list_remove_back) | Remove last element |
|
||||
| [`why2_list_find`](./core/llist/why2_list_find) | Find element in list |
|
||||
| [`why2_list_get_size`](./core/llist/why2_list_get_size) | Get size |
|
||||
| [`why2_list_reverse`](./core/llist/why2_list_reverse) | Reverses list |
|
||||
|
||||
## Logger
|
||||
|
||||
## Chat
|
Loading…
x
Reference in New Issue
Block a user