1 /*************************************************************************** 2 * Pinfo is a ncurses based lynx style info documentation browser 3 * 4 * Copyright (C) 1999 Przemek Borys <pborys@dione.ids.pl> 5 * Copyright (C) 2005 Bas Zoetekouw <bas@debian.org> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of version 2 of the GNU General Public License as 9 * published by the Free Software Foundation. 10 * 11 * This program is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 19 * USA 20 ***************************************************************************/ 21 22 #ifndef __MAINFUNCTION_H 23 #define __MAINFUNCTION_H 24 25 /* 26 * return value type for work(). it is the name of node, where to go, after 27 * viewing of current node ends. (viewing always takes place inside of the 28 * work() function 29 */ 30 typedef struct 31 { 32 char *node; /* name of node */ 33 char *file; /* name of file, where the node is */ 34 } 35 WorkRVal; 36 37 /* this determines whether we are in a position, found after search */ 38 extern int aftersearch; 39 40 /* 41 * this is main function which handles almost all of the work (keyboard 42 * actions while viewing info). Arguments: 43 * message: a pointer to char** node content, stored line by line. 44 * type: a pointer to char*, which holds the header of info node. 45 * lines: pointer to a long, which holds the number of lines in node. 46 * id: file descriptor of current info file 47 * tag_table_pos: position in tag table of the current node (needed for history) 48 */ 49 WorkRVal work (char ***message, char **type, unsigned long *lines, 50 FILE * id, int tag_table_pos); 51 #endif 52