Subversion Repositories Kolibri OS

Rev

Rev 9207 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #include "../include/shell_api.h"
  2.  
  3. char string[256];
  4.  
  5. int main()
  6. {
  7.     shell_cls();
  8.     shell_printf("SHELL PID=%d\n\r", shell_get_pid());
  9.  
  10.     shell_puts("This is a test console application for Shell\n\r");
  11.     shell_puts("Type a string (255 symbols max): ");
  12.  
  13.     shell_gets(string, 255);
  14.     shell_printf("You typed: %s\n\r", string);
  15.  
  16.     shell_puts("Press any key: ");
  17.     string[0] = shell_getc();
  18.     shell_printf("\n\rYou pressed: %c", string[0]);
  19.     shell_exit();
  20.     return 0;
  21. }