Adding upstream version 3.20.
[syslinux-debian/hramrach.git] / com32 / modules / menu.h
blobcb2eb6e3e21967c1a3f0d4ed4c2b22b2e51a4dbd
1 /* ----------------------------------------------------------------------- *
3 * Copyright 2004-2005 H. Peter Anvin - All Rights Reserved
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, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
14 * menu.h
16 * Header file for the simple menu system
19 #ifndef MENU_H
20 #define MENU_H
22 #include <time.h>
23 #include <sys/time.h>
24 #include <sys/times.h>
25 #include <inttypes.h>
26 #include <unistd.h>
28 #ifndef CLK_TCK
29 # define CLK_TCK sysconf(_SC_CLK_TCK)
30 #endif
32 struct menu_entry {
33 char *displayname;
34 char *label;
35 char *cmdline;
36 char *passwd;
37 unsigned char hotkey;
40 /* 512 is the current definition inside syslinux */
41 #define MAX_CMDLINE_LEN 512
43 #define MAX_ENTRIES 4096 /* Oughta be enough for anybody */
44 extern struct menu_entry menu_entries[];
45 extern struct menu_entry *menu_hotkeys[256];
47 struct menu_parameter {
48 const char *name;
49 int value;
52 extern struct menu_parameter mparm[];
54 extern int nentries;
55 extern int defentry;
56 extern int allowedit;
57 extern int timeout;
58 extern int shiftkey;
59 extern long long totaltimeout;
61 extern char *menu_title;
62 extern char *ontimeout;
63 extern char *menu_master_passwd;
65 void parse_config(const char *filename);
67 static inline int my_isspace(char c)
69 return (unsigned char)c <= ' ';
72 #endif /* MENU_H */