c-md/includes/map.h.md
lohhiiccc 80f7a1b9b6 feat(build): add build instructions in README and convert sources to .c.md format
- 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.
2026-01-12 14:54:49 +01:00

539 B

#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