| 1989 | } |
| 1990 | |
| 1991 | static void |
| 1992 | windowing_sanity(void) |
| 1993 | { |
| 1994 | #ifndef DEFAULT_WINDOW_SYS |
| 1995 | /* pre-standard compilers didn't support #error; wait til run-time */ |
| 1996 | Fprintf(stderr, |
| 1997 | "Configuration error: DEFAULT_WINDOW_SYS is not defined.\n"); |
| 1998 | makedefs_exit(EXIT_FAILURE); |
| 1999 | /*NOTREACHED*/ |
| 2000 | |
| 2001 | /* put in a dummy value so that do_options() will compile and makedefs |
| 2002 | will build, otherwise the message above won't ever get delivered */ |
| 2003 | #define DEFAULT_WINDOW_SYS "<undefined>" |
| 2004 | #else /*DEFAULT_WINDOW_SYS*/ |
| 2005 | |
| 2006 | if (!window_opts[0].id) { |
| 2007 | Fprintf(stderr, "Configuration error: no windowing systems " |
| 2008 | "(TTY_GRAPHICS, &c) enabled.\n"); |
| 2009 | makedefs_exit(EXIT_FAILURE); |
| 2010 | /*NOTREACHED*/ |
| 2011 | } |
| 2012 | |
| 2013 | { |
| 2014 | int i; |
| 2015 | |
| 2016 | for (i = 0; window_opts[i].id; ++i) |
| 2017 | if (!strcmp(window_opts[i].id, DEFAULT_WINDOW_SYS)) |
| 2018 | break; |
| 2019 | if (!window_opts[i].id) { /* went through whole list without a match */ |
| 2020 | Fprintf(stderr, "Configuration error: DEFAULT_WINDOW_SYS (%s)\n", |
| 2021 | DEFAULT_WINDOW_SYS); |
| 2022 | Fprintf(stderr, |
| 2023 | " does not match any enabled windowing system (%s%s).\n", |
| 2024 | window_opts[0].id, window_opts[1].id ? ", &c" : ""); |
| 2025 | makedefs_exit(EXIT_FAILURE); |
| 2026 | /*NOTREACHED*/ |
| 2027 | } |
| 2028 | } |
| 2029 | #endif /*DEFAULT_WINDOW_SYS*/ |
| 2030 | return; |
| 2031 | } |
| 2032 | |
| 2033 | /* |
| 2034 | * |
no test coverage detected