docs: update function reference links to use anchor fragments in headers

This commit is contained in:
lohhiiccc 2026-01-12 17:38:48 +01:00
parent 444d1fc956
commit 5213b79d7f
8 changed files with 20 additions and 20 deletions

View file

@ -24,14 +24,14 @@ typedef struct s_args
```
## Functions
### [`cli_parse`](/srcs/cli/cli.c.md)
### [`cli_parse`](/srcs/cli/cli.c.md#cli_parse)
Parses command-line arguments and populates the t_args structure.
```c
int8_t
cli_parse(t_args *args, int32_t argc, char **argv);
```
### [`cli_print_help`](/srcs/cli/help.c.md)
### [`cli_print_help`](/srcs/cli/help.c.md#cli_printhelp)
Prints help information for the command-line interface.
```c
void

View file

@ -13,7 +13,7 @@
## Functions
### [`map_grow`](/srcs/map/core.c.md)
### [`map_grow`](/srcs/map/core.c.md#map_grow)
Grows the map's capacity when needed.
```c
int8_t

View file

@ -32,28 +32,28 @@ typedef struct s_state
## Functions
### [`state_init`](/srcs/transpile/state.c.md)
### [`state_init`](/srcs/transpile/state.c.md#state_init)
Initializes the transpilation state.
```c
void
state_init(t_state *s, FILE *in, FILE *out, const char *ext, t_map *map);
```
### [`handle_fence_open`](/srcs/transpile/fence.c.md)
### [`handle_fence_open`](/srcs/transpile/fence.c.md#handle_fence_open)
Handles the opening of a code fence in the input.
```c
int8_t
handle_fence_open(t_state *s, char *line);
```
### [`handle_fence_close`](/srcs/transpile/fence.c.md)
### [`handle_fence_close`](/srcs/transpile/fence.c.md#handle_fence_open)
Handles the closing of a code fence in the input.
```c
int8_t
handle_fence_close(t_state *s);
```
### [`handle_line`](/srcs/transpile/code.c.md)
### [`handle_code_line`](/srcs/transpile/code.c.md#handle_code_line)
Handles a regular line of code in the input.
```c
int8_t

View file

@ -20,14 +20,14 @@ typedef struct s_io
## Functions
### [`io_open`](/srcs/io/streams.c.md)
### [`io_open`](/srcs/io/streams.c.md#io_open)
Opens input and output streams based on provided file paths.
```c
int8_t
io_open(t_io *io, const char *input_path, const char *output_path);
```
### [`io_close`](/srcs/io/streams.c.md)
### [`io_close`](/srcs/io/streams.c.md#io_close)
Closes the input and output streams if they are not stdin or stdout.
```c
void

View file

@ -37,14 +37,14 @@ typedef struct s_map
## Functions
### [`map_init`](/srcs/map/core.c.md)
### [`map_init`](/srcs/map/core.c.md#map_init)
Initialize a mapping structure.
```c
void
map_init(t_map *map);
```
### [`map_add`](/srcs/map/core.c.md)
### [`map_add`](/srcs/map/core.c.md#map_add)
Add a new mapping range to the mapping structure.
```c
void
@ -52,14 +52,14 @@ map_add(t_map *map, uint32_t src_start, uint32_t src_end,
uint32_t dst_start, uint32_t dst_end);
```
### [`map_write`](/srcs/map/io.c.md)
### [`map_write`](/srcs/map/io.c.md#map_write)
Write the mapping information to a file.
```c
int8_t
map_write(t_map *map, const char *path, const char *source, const char *target);
```
### [`map_free`](/srcs/map/core.c.md)
### [`map_free`](/srcs/map/core.c.md#map_free)
Free the resources associated with the mapping structure.
```c
void

View file

@ -11,7 +11,7 @@
```
## Functions
### [`transpile`](/srcs/transpile/core.c.md)
### [`transpile`](/srcs/transpile/core.c.md#transpile)
```c
int8_t
transpile(FILE *in, FILE *out, const char *ext, t_map *map);

View file

@ -10,35 +10,35 @@
```
## Functions
### [`read_line`](/srcs/utils/io/read_line.c.md)
### [`read_line`](/srcs/utils/io/read_line.c.md#read_line)
Get a line from a file.
```c
char *
read_line(FILE *f);
```
### [`starts_with`](/srcs/utils/string/starts_with.c.md)
### [`starts_with`](/srcs/utils/string/starts_with.c.md#starts_with)
Check if a string starts with a given prefix.
```c
int8_t
starts_with(const char *str, const char *prefix);
```
### [`extract_fence_ext`](/srcs/utils/string/extract_fence_ext.c.md)
### [`extract_fence_ext`](/srcs/utils/string/extract_fence_ext.c.md#extract_fence_ext)
Extract the extension from a fence string.
```c
char *
extract_fence_ext(const char *fence);
```
### [`extract_file_ext`](/srcs/utils/string/extract_file_ext.c.md)
### [`extract_file_ext`](/srcs/utils/string/extract_file_ext.c.md#extract_file_ext)
Extract the file extension from a file path.
```c
const char *
extract_file_ext(const char *path);
```
### [`infer_ext_from_filename`](/srcs/utils/string/infer_ext_from_filename.c.md)
### [`infer_ext_from_filename`](/srcs/utils/string/infer_ext_from_filename.c.md#infer_ext_from_filename)
Infer the file extension from a filename.
```c
const char *

View file

@ -10,7 +10,7 @@
## Functions
### [`validator_validate_args`](/srcs/validator/validator.c.md)
### [`validator_validate_args`](/srcs/validator/validator.c.md#validator_validate_args)
This function checks and validates the content of the `t_args` structure,
```c
int8_t