- Add detailed build and bootstrap instructions to README.md. - Convert all source and header files from .c/.h to .c.md/.h.md. - Add bootstrap.sh script for automated building across version history. - Update Makefile and sources.mk to reflect new markdown-based source organization.
37 lines
539 B
Markdown
37 lines
539 B
Markdown
```c
|
|
#ifndef MAP_H
|
|
# define MAP_H
|
|
|
|
# include <stddef.h>
|
|
# include <stdint.h>
|
|
|
|
typedef struct s_range
|
|
{
|
|
uint32_t src_start;
|
|
uint32_t src_end;
|
|
uint32_t dst_start;
|
|
uint32_t dst_end;
|
|
} t_range;
|
|
|
|
typedef struct s_map
|
|
{
|
|
t_range *ranges;
|
|
size_t count;
|
|
size_t capacity;
|
|
} t_map;
|
|
|
|
void
|
|
map_init(t_map *map);
|
|
|
|
void
|
|
map_add(t_map *map, uint32_t src_start, uint32_t src_end,
|
|
uint32_t dst_start, uint32_t dst_end);
|
|
|
|
int8_t
|
|
map_write(t_map *map, const char *path, const char *source, const char *target);
|
|
|
|
void
|
|
map_free(t_map *map);
|
|
|
|
#endif
|
|
```
|