esh_main_loop.c 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #include "esh_main_loop.h"
  2. #include "esh_misc.h"
  3. void EShRunLoop() {
  4. for (;;) {
  5. EShShowMsg();
  6. char* command = NULL;
  7. int command_length = 0;
  8. ssize_t buf_size = 0;
  9. while ((command_length = getline(&command, &buf_size, stdin)) == 0) {
  10. // repeating
  11. }
  12. if (command_length == -1)
  13. break;
  14. }
  15. }
  16. void EShShowMsg() {
  17. EShUpdateInviteMessage();
  18. EShUpdateInviteMessage();
  19. EShUpdateInviteMessage();
  20. EShUpdateInviteMessage();
  21. printf("%s", esh_info_global->invite_message);
  22. }
  23. void EShParseCommandIntoJobs(char* command) {
  24. }
  25. void EShExecuteJobs(int jobs_num, EShJob* jobs_list) {
  26. }
  27. void EShSetJobCommandType(EShJob* job) {
  28. }
  29. void EShRunJob(EShJob* job) {
  30. }
  31. int EmptyCommand(const char* command) {
  32. }
  33. int InnerCommand(const char* command) {
  34. }
  35. void EShProcessInnerJob(const char* command) {
  36. }
  37. void EShProcessExecJob(const char* command) {
  38. }