home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / menushell / part02 / mshell.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-30  |  2.4 KB  |  99 lines

  1. #include <stdio.h>
  2. #include <curses.h>
  3. #include <sys/signal.h>
  4. #include <pwd.h>
  5. #include <sys/types.h>
  6. #include <sys/stat.h>
  7. #ifdef BSD
  8. #include <sys/dir.h>        /* accessing the directory structure    */
  9. #include <sgtty.h>        /* struct for terminal attributes       */
  10. #endif
  11. #ifdef SYSV
  12. #define index    strchr
  13. #define rindex    strrchr
  14. /* #include <termio.h>        /* do this if curses.h doesn't */
  15. #endif
  16. #include "dl.h"
  17.  
  18. #define  BLANK           ' '
  19. #define  COLUMNS         256
  20. #define  DESCLEN         128
  21. #define  EOS             '\0'
  22. #define  EXCLAIM         '!'
  23. #define  LINES           80
  24. #define  MAXARGS         10
  25. #define  MAXLEN          256
  26. #define  NULLSTR         ""
  27. #define  MAIL_MESSAGE    "    [You have new mail]"
  28. #define  OPTLEN          16
  29. #define  PIPECHAR        '|'
  30. #define  DELIM_LINE      "*****\n"    /* \n since fgets is used */
  31. #define  SUFFIX          ".men"
  32. #define  TAB             '\t'
  33. #define  HOME_CHAR       "~"
  34. #define  VISIBLE_SPACE   '_'
  35. #define  WORDLEN         64
  36.  
  37. #define  CMDVAL          "cmd="
  38. #define  ARGVAL          "arg="
  39. #define  AARGVAL         "aarg="
  40. #define  HELPVAL         "help="
  41. #define  PROMPTVAL       "prompt="
  42. #define  APROMPTVAL      "aprompt="
  43. #define  HELP            "help"
  44. #define  MAN             "man="
  45. #define  BYE             "bye"
  46. #define  QUIT            "x"
  47. #define  CHANGE_DIR      "cd"
  48. #define  SETENV         "setenv"
  49.  
  50. #ifndef  MAILDIR
  51. #define  MAILDIR         "/usr/spool/mail/"
  52. #endif
  53. #ifndef  MENUDIR
  54. #define  MENUDIR         "/nyx/lib/menus"
  55. #endif
  56. #ifndef  GLOBAL_MACRO_FILE
  57. #define  GLOBAL_MACRO_FILE         "/nyx/lib/menus/macros"
  58. #endif
  59. #ifndef  COMMAND_LIST
  60. #define  COMMAND_LIST         "/nyx/lib/menus/commands"
  61. #endif
  62.  
  63. #ifndef TRUE    /* curses.h may #define */
  64. #define TRUE   1
  65. #define FALSE  0
  66. #endif
  67.  
  68. struct   menu_struct {
  69.     char curr [WORDLEN];
  70.     char prev [WORDLEN];
  71. };
  72.  
  73. #define void    int
  74. int     all_blanks ();
  75. void    change_directory();
  76. void    check_for_new_mail ();
  77. void     helpfile_display ();
  78. void     display_menu ();
  79. void     display_prompts ();
  80. void     execute_command ();
  81. void     extract_actions ();
  82. void     extract_action_word ();
  83. void    filter_leading_trailing_blanks_tabs ();
  84. char *     find_string ();
  85. void    find_user_details ();
  86. char *  in_string ();
  87. void    initialize ();
  88. void     insert_string ();
  89. void    invoke_unix_system ();
  90. void     M_Shell ();
  91. void     read_input_line ();
  92. void     remove_string ();
  93. int     replace_string ();
  94. void     search_menu_array ();
  95. int     strsearch ();
  96. void     set_terminal_attributes ();
  97. int        setenv ();
  98. void     wait_for_user ();
  99.