/contrib/tcsh/tw.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 110 lines · 61 code · 17 blank · 32 comment · 2 complexity · 0c25b723a0e0d968f34f5faddad3fc73 MD5 · raw file

  1. /* $Header: /p/tcsh/cvsroot/tcsh/tw.h,v 3.25 2006/01/12 18:15:25 christos Exp $ */
  2. /*
  3. * tw.h: TwENEX functions headers
  4. */
  5. /*-
  6. * Copyright (c) 1980, 1991 The Regents of the University of California.
  7. * All rights reserved.
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in the
  16. * documentation and/or other materials provided with the distribution.
  17. * 3. Neither the name of the University nor the names of its contributors
  18. * may be used to endorse or promote products derived from this software
  19. * without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. * SUCH DAMAGE.
  32. */
  33. #ifndef _h_tw
  34. #define _h_tw
  35. #define TW_PATH 0x1000
  36. #define TW_ZERO 0x0fff
  37. #define TW_NONE 0x0000
  38. #define TW_COMMAND 0x0001
  39. #define TW_VARIABLE 0x0002
  40. #define TW_LOGNAME 0x0003
  41. #define TW_FILE 0x0004
  42. #define TW_DIRECTORY 0x0005
  43. #define TW_VARLIST 0x0006
  44. #define TW_USER 0x0007
  45. #define TW_COMPLETION 0x0008
  46. #define TW_ALIAS 0x0009
  47. #define TW_SHELLVAR 0x000a
  48. #define TW_ENVVAR 0x000b
  49. #define TW_BINDING 0x000c
  50. #define TW_WORDLIST 0x000d
  51. #define TW_LIMIT 0x000e
  52. #define TW_SIGNAL 0x000f
  53. #define TW_JOB 0x0010
  54. #define TW_EXPLAIN 0x0011
  55. #define TW_TEXT 0x0012
  56. #define TW_GRPNAME 0x0013
  57. #define TW_EXEC_CHK 0x01
  58. #define TW_DIR_CHK 0x02
  59. #define TW_TEXT_CHK 0x04
  60. #define TW_DIR_OK 0x10
  61. #define TW_PAT_OK 0x20
  62. #define TW_IGN_OK 0x40
  63. #ifndef TRUE
  64. # define TRUE 1
  65. #endif
  66. #ifndef FALSE
  67. # define FALSE 0
  68. #endif
  69. #define ON 1
  70. #define OFF 0
  71. #define ESC CTL_ESC('\033')
  72. #define is_set(var) adrof(var)
  73. #define ismetahash(a) (ismeta(a) && (a) != '#')
  74. #define SEARCHLIST "HPATH" /* Env. param for helpfile searchlist */
  75. #define DEFAULTLIST ":/usr/man/cat1:/usr/man/cat8:/usr/man/cat6:/usr/local/man/cat1:/usr/local/man/cat8:/usr/local/man/cat6" /* if no HPATH */
  76. typedef enum {
  77. LIST, LIST_ALL, RECOGNIZE, RECOGNIZE_ALL, RECOGNIZE_SCROLL,
  78. PRINT_HELP, SPELL, GLOB, GLOB_EXPAND, VARS_EXPAND, PATH_NORMALIZE,
  79. COMMAND_NORMALIZE
  80. } COMMAND;
  81. struct scroll_tab_list {
  82. Char *element;
  83. struct scroll_tab_list *next;
  84. } ;
  85. extern struct scroll_tab_list *scroll_tab;
  86. extern int curchoice;
  87. extern int non_unique_match;
  88. extern int match_unique_match;
  89. extern int InsideCompletion;
  90. extern struct varent completions;
  91. extern int color_context_ls;
  92. #include "tw.decls.h"
  93. #endif /* _h_tw */