1 /* poke.h - Interactive editor for binary files. */ 2 3 /* Copyright (C) 2019, 2020, 2021 Jose E. Marchesi */ 4 5 /* This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef POKE_H 20 #define POKE_H 21 22 #include <config.h> 23 24 #include <stdlib.h> /* EXIT_FAILURE */ 25 #include <gettext.h> 26 #define _(str) dgettext (PACKAGE, str) 27 28 #include "pk-term.h" 29 #include "libpoke.h" 30 31 extern int poke_interactive_p; 32 extern int poke_quiet_p; 33 extern int poke_exit_p; 34 #if HAVE_HSERVER 35 extern int poke_hserver_p; 36 #endif 37 extern int poke_exit_code; 38 extern pk_compiler poke_compiler; 39 extern char *poke_datadir; 40 extern char *poke_infodir; 41 extern char *poke_picklesdir; 42 extern char *poke_mapsdir; 43 extern char *poke_docdir; 44 extern char *poke_cmdsdir; 45 extern char *poke_doc_viewer; 46 extern int poke_auto_map_p; 47 extern int poke_prompt_maps_p; 48 49 void pk_print_version (int hand_p); 50 void pk_fatal (const char *errmsg) __attribute__ ((noreturn)); 51 52 static inline void pk_assert_alloc(const void * m)53pk_assert_alloc (const void *m) 54 { 55 if (!m) 56 pk_fatal (_("out of memory")); 57 } 58 59 #endif /* !POKE_H */ 60