Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. #include "list.h"
  2. #include <stdlib.h>
  3. #include <setjmp.h>
  4. #include <string.h>
  5.  
  6. enum type_of_next{
  7. NXT, AND, OR // виды связей соседних команд в списке команд
  8. };
  9.  
  10. struct cmd_inf {
  11. char ** argv; // список из имени команды и аргументов
  12. char *infile; // переназначенный файл стандартного ввода
  13. char *outfile; // переназначенный файл стандартного вывода
  14. int append;
  15. int backgrnd; // =1, если команда подлежит выполнению в фоновом режиме
  16. struct cmd_inf* psubcmd; // команды для запуска в дочернем shell
  17. struct cmd_inf* pipe; // следующая команда после "|"
  18. struct cmd_inf* next; // следующая после ";" (или после "&")
  19. enum type_of_next type;// связь со следующей командой через ; или && или ||
  20. };
  21.  
  22. typedef struct cmd_inf *tree;
  23. typedef struct cmd_inf node;
  24.  
  25. void print_tree(tree, int);
  26. tree build_tree(list );
  27. void clear_tree(tree );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement