fork download
  1. #ifdef __ANDROID_API__
  2. #include <sys/ioctl.h>
  3. #include <unistd.h>
  4. #include <stdio.h>
  5. #elif !defined(__APPLE__)
  6. #include <stdlib.h>
  7. #else
  8. #include <unistd.h>
  9. #include <term.h>
  10. #endif
  11.  
  12. void ClearScreen(){
  13. #ifdef __ANROID_API__
  14. struct winsize w;
  15. ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
  16. int i = -1;
  17. for(;i<w.ws_row;++i) puts("");
  18. #elif defined WIN32
  19. system("cls");
  20. #elif defined __APPLE__
  21. if(!cur_term){
  22. int result;
  23. setupterm(NULL, STDOUT_FILENO, &result);
  24. if(result <= 0) return;
  25. }
  26. putp(tigetstr("clear"));
  27. #else
  28. system("clear");
  29. #endif
  30. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty