Advertisement
Guest User

Untitled

a guest
Nov 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. # define LIMIT=20
  2. char buf[512] = {0};
  3.  
  4. while (1)
  5. {
  6.     printf("$> type your command here: \n");
  7.     fgets(buf, LIMIT, stdin);
  8.     if (strncmp(buf, "exit", LIMIT) == 0)
  9.         exit_this();
  10.     bzero(buf, 512);   
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement