diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -0,0 +1,38 @@ +#include <stdio.h> +#include <stdlib.h> + +#include "include/map.h" + +#define EXT_ERR_PARAMS 1 +int main(int argc, char *argv[]){ + string_map special_char = init_map(1024); + + insert_map("aa", "aa", special_char); + insert_map("d", "d", special_char); + + char *test = get_value("aa", special_char); + printf("%s\n", test); + test = get_value("d", special_char); + printf("%s\n", test); + test = get_value("d", special_char); + printf("%s\n", test); + test = get_value("aa", special_char); + printf("%s\n", test); + /* + if(argc != 2){ + fprintf(stderr, "passe o nome do arquivo\n"); + exit(EXT_ERR_PARAMS); + } + + char *file_path = argv[1]; + FILE *fp = fopen(file_path, "r"); + + char tmp; + while(fscanf(fp, "%c", &tmp) != EOF){ + printf("%c", tmp); + } + + fclose(fp); + */ + return 0; +} |