1
0

sch_test.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ischeme_t sch = {
  2. PTYPE_LIST
  3. PTYPE {
  4. .name = "ptype1",
  5. .help = "help1",
  6. ACTION_LIST
  7. ACTION {
  8. .sym = "internal",
  9. .script = "cat /etc/passwd",
  10. },
  11. ACTION {
  12. .sym = "internal",
  13. .script = "cat /etc/group",
  14. },
  15. END_ACTION_LIST,
  16. },
  17. PTYPE {
  18. .name = "ptype2",
  19. .help = "help2",
  20. },
  21. END_PTYPE_LIST,
  22. VIEW_LIST
  23. VIEW {
  24. .name = "view1",
  25. COMMAND_LIST
  26. COMMAND {
  27. .name = "command1",
  28. .help = "help1",
  29. },
  30. COMMAND {
  31. .name = "command2",
  32. .help = "help1",
  33. },
  34. COMMAND {
  35. .name = "command3",
  36. .help = "help1",
  37. },
  38. END_COMMAND_LIST,
  39. },
  40. VIEW {
  41. .name = "view2",
  42. },
  43. VIEW {
  44. .name = "view1",
  45. COMMAND_LIST
  46. COMMAND {
  47. .name = "command4",
  48. .help = "help1",
  49. },
  50. COMMAND {
  51. .name = "command5",
  52. .help = "help1",
  53. PARAM_LIST
  54. PARAM {
  55. .name = "param1",
  56. .help = "helpparam1",
  57. .ptype = "ptype1",
  58. },
  59. PARAM {
  60. .name = "param2",
  61. .help = "helpparam2",
  62. .ptype = "ptype2",
  63. PARAM_LIST
  64. PARAM {
  65. .name = "param3",
  66. .help = "helpparam1",
  67. .ptype = "ptype1",
  68. },
  69. PARAM {
  70. .name = "param4",
  71. .help = "helpparam2",
  72. .ptype = "ptype2",
  73. },
  74. END_PARAM_LIST,
  75. },
  76. END_PARAM_LIST,
  77. ACTION_LIST
  78. ACTION {
  79. .sym = "internal",
  80. .script = "cat /etc/passwd",
  81. },
  82. ACTION {
  83. .sym = "internal",
  84. .script = "cat /etc/group",
  85. },
  86. END_ACTION_LIST,
  87. },
  88. END_COMMAND_LIST,
  89. },
  90. END_VIEW_LIST,
  91. };