Subversion Repositories Kolibri OS

Rev

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

  1. #ifndef _SHELL_API_H_
  2. #define _SHELL_API_H_
  3.  
  4. #include <sys/ksys.h>
  5.  
  6. #define SHELL_OK   0
  7. #define SHELL_EXIT 1
  8. #define SHELL_PUTC 2
  9. #define SHELL_PUTS 3
  10. #define SHELL_GETC 4
  11. #define SHELL_GETS 5
  12. #define SHELL_CLS  6
  13. #define SHELL_PID  7
  14. #define SHELL_PING 8
  15.  
  16. #define SHELL_SHM_MAX 1024 * 16
  17.  
  18. extern char __shell_shm_name[32];
  19. extern char* __shell_shm;
  20. extern int __shell_is_init;
  21. extern void __shell_init();
  22.  
  23. #define __SHELL_WAIT()   \
  24.     while (*__shell_shm) \
  25.     _ksys_delay(5)
  26.  
  27. extern int shell_ping();
  28. extern unsigned shell_get_pid();
  29. extern void shell_exit();
  30.  
  31. extern char shell_getc();
  32. extern void shell_gets(char* str, int n);
  33.  
  34. extern void shell_putc(char c);
  35. extern void shell_puts(const char* str);
  36. extern void shell_printf(const char* format, ...);
  37.  
  38. extern void shell_cls();
  39. #endif
  40.