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 8fddcd4fa3
8 changed files with 20 additions and 20 deletions

View file

@ -24,14 +24,14 @@ typedef struct s_args
``` ```
## Functions ## 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. Parses command-line arguments and populates the t_args structure.
```c ```c
int8_t int8_t
cli_parse(t_args *args, int32_t argc, char **argv); 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. Prints help information for the command-line interface.
```c ```c
void void

View file

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

View file

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

View file

@ -20,14 +20,14 @@ typedef struct s_io
## Functions ## 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. Opens input and output streams based on provided file paths.
```c ```c
int8_t int8_t
io_open(t_io *io, const char *input_path, const char *output_path); 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. Closes the input and output streams if they are not stdin or stdout.
```c ```c
void void

View file

@ -37,14 +37,14 @@ typedef struct s_map
## Functions ## Functions
### [`map_init`](/srcs/map/core.c.md) ### [`map_init`](/srcs/map/core.c.md#map_init)
Initialize a mapping structure. Initialize a mapping structure.
```c ```c
void void
map_init(t_map *map); 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. Add a new mapping range to the mapping structure.
```c ```c
void 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); 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. Write the mapping information to a file.
```c ```c
int8_t int8_t
map_write(t_map *map, const char *path, const char *source, const char *target); 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. Free the resources associated with the mapping structure.
```c ```c
void void

View file

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

View file

@ -10,35 +10,35 @@
``` ```
## Functions ## 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. Get a line from a file.
```c ```c
char * char *
read_line(FILE *f); 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. Check if a string starts with a given prefix.
```c ```c
int8_t int8_t
starts_with(const char *str, const char *prefix); 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. Extract the extension from a fence string.
```c ```c
char * char *
extract_fence_ext(const char *fence); 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. Extract the file extension from a file path.
```c ```c
const char * const char *
extract_file_ext(const char *path); 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. Infer the file extension from a filename.
```c ```c
const char * const char *

View file

@ -10,7 +10,7 @@
## Functions ## 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, This function checks and validates the content of the `t_args` structure,
```c ```c
int8_t int8_t