defs.h revision a5a2a776
1/* 2 3Copyright (c) 1987, 1988 X Consortium 4 5Permission is hereby granted, free of charge, to any person obtaining 6a copy of this software and associated documentation files (the 7"Software"), to deal in the Software without restriction, including 8without limitation the rights to use, copy, modify, merge, publish, 9distribute, sublicense, and/or sell copies of the Software, and to 10permit persons to whom the Software is furnished to do so, subject to 11the following conditions: 12 13The above copyright notice and this permission notice shall be included 14in all copies or substantial portions of the Software. 15 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR 20OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22OTHER DEALINGS IN THE SOFTWARE. 23 24Except as contained in this notice, the name of the X Consortium shall 25not be used in advertising or otherwise to promote the sale, use or 26other dealings in this Software without prior written authorization 27from the X Consortium. 28 29*/ 30 31/* 32 * xman - X window system manual page display program. 33 * Author: Chris D. Peterson, MIT Project Athena 34 * Created: October 22, 1987 35 */ 36 37#ifdef HAVE_CONFIG_H 38# include "config.h" 39#endif 40 41#ifndef HELPFILE 42#define HELPFILE "/usr/lib/X11/xman.help" /* name of the default helpfile. */ 43#endif 44 45/* The default cursors */ 46 47#define XMAN_CURSOR "left_ptr" /* Top level cursor. */ 48#define HELP_CURSOR "left_ptr" /* The help cursor. */ 49#define MANPAGE_CURSOR "left_ptr" /* The manpage cursor. */ 50#define SEARCH_ENTRY_CURSOR "question_arrow" /* The search text widget 51 cursor. */ 52#define DIRECTORY_NORMAL "fixed" /* The default dir font */ 53 54#define OPTION_MENU "optionMenu" /* Name of the Option Menu. */ 55#define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */ 56 57#define HELP_BUTTON "helpButton" /* Name of top help button */ 58#define QUIT_BUTTON "quitButton" /* Name of top quit button */ 59#define MANPAGE_BUTTON "manpageButton" /* Name of top manpage button */ 60 61#define TOPBOXNAME "topBox" /* Name of the Top Box. */ 62#define MANNAME "manualBrowser" /* name for each manual page widget. */ 63#define SEARCHNAME "search" /* The name for the search widget. */ 64#define HELPNAME "help" /* The name of the help widget. */ 65#define DIRECTORY_NAME "directory" /* name of the directory widget. */ 66#define MANUALPAGE "manualPage" /* name of the Scrollbyline widget that 67 contains the man page. */ 68#define DIALOG "dialog" 69 70/* Names of the menu buttons */ 71 72#define NUM_OPTIONS 9 /* Number of menu options. */ 73 74#define DIRECTORY "displayDirectory" 75#define MANPAGE "displayManualPage" 76#define HELP "help" 77#define SEARCH "search" 78#define BOTH_SCREENS "showBothScreens" 79#define REMOVE_MANPAGE "removeThisManpage" 80#define OPEN_MANPAGE "openNewManpage" 81#define SHOW_VERSION "showVersion" 82#define QUIT "quit" 83 84/* definitions of string to use for show both and show one. */ 85 86#define SHOW_BOTH "Show Both Screens" 87#define SHOW_ONE "Show One Screen" 88 89/* 90 * Things will not look right if you change these names to make 91 * MANUALSEARCH longer APROPOSSEARCH, see search.c for details. 92 */ 93 94#define MANUALSEARCH "manualPage" 95#define APROPOSSEARCH "apropos" 96#define CANCEL "cancel" 97 98#define MANUAL 0 99#define APROPOS 1 100 101#define NO_SECTION_DEFAULTS ("no default sections") 102 103/* 104 * Define HANDLE_ROFFSEQ to enable parsing of '\" <string> 105 * sequences in source files to set the format pipeline. 106 * This is necessary because the default pipeline causes incorrect 107 * display of ascii(7) on Linux. 108 * This depends on GNU roff. 109 */ 110#ifdef HAS_GROFF 111#define HANDLE_ROFFSEQ 112#endif 113 114#define DEFAULT_WIDTH 500 /* The default width of xman. */ 115#define SECTALLOC 8 /* The number of entries allocated 116 at a time for the manual structures. */ 117#define ENTRYALLOC 100 /* The number of entries allocated 118 at a time for a section. */ 119 120#define INITIAL_DIR 0 /* The Initial Directory displayed. */ 121 122#define COPY "cp" /* copy command */ 123#define CHMOD_MODE 00666 /* permissions set on saved formatted files */ 124#define MANDESC "mandesc" /* name of the mandesc files */ 125 126#define INDENT 15 127#define TYP20STR "MMMMMMMMMMMMMMMMMMMM" 128 129#define FILE_SAVE "yes" 130#define CANCEL_FILE_SAVE "no" 131#define MANTEMP "/tmp/xmanXXXXXX" 132 133/* 134 * Macro Definitions. 135 */ 136 137#define streq(a, b) ( strcmp((a), (b)) == 0 ) 138 139/* 140 * Function definitions moved to man.h 141 */ 142