Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shadowm@nanacore:~% gcc -o test2 test.c
- shadowm@nanacore:~% ./test2
- #textdomain wesnoth
- shadowm@nanacore:~% cat test.c
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- FILE* f = fopen("/home/shadowm/src/wesnoth/////data///_main.cfg", "r");
- size_t cc = 1000;
- char* line = calloc(cc, sizeof(char));
- getline(&line, &cc, f);
- printf("%s", line);
- fclose(f);
- free(line);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment