shadowm

Untitled

Jul 17th, 2014
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. shadowm@nanacore:~% gcc -o test2 test.c
  2. shadowm@nanacore:~% ./test2
  3. #textdomain wesnoth
  4. shadowm@nanacore:~% cat test.c
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7.  
  8. int main()
  9. {
  10. FILE* f = fopen("/home/shadowm/src/wesnoth/////data///_main.cfg", "r");
  11. size_t cc = 1000;
  12. char* line = calloc(cc, sizeof(char));
  13. getline(&line, &cc, f);
  14. printf("%s", line);
  15. fclose(f);
  16. free(line);
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment