diff -Naur ../Original/input/input.c ./input/input.c --- ../Original/input/input.c Sat Aug 16 11:51:06 2003 +++ ./input/input.c Mon Aug 25 15:37:36 2003 @@ -125,7 +125,9 @@ { MP_CMD_CHELP, "help", 0, { {-1,{0}} } }, { MP_CMD_CEXIT, "exit", 0, { {-1,{0}} } }, { MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } }, +#ifndef __MINGW32__ { MP_CMD_CRUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } }, +#endif #endif { 0, NULL, 0, {} } diff -Naur ../Original/libmenu/menu_console.c ./libmenu/menu_console.c --- ../Original/libmenu/menu_console.c Tue Jun 24 21:59:14 2003 +++ ./libmenu/menu_console.c Mon Aug 25 15:13:04 2003 @@ -7,7 +7,13 @@ #include #include #include + +#ifndef __MINGW32__ #include +#else +#define WNOHANG 1 +#endif + #include #include @@ -103,7 +109,9 @@ #define mpriv (menu->priv) +#ifndef __MINGW32__ static void check_child(menu_t* menu); +#endif static void add_line(struct menu_priv_s* priv, char* l) { char* eol = strchr(l,'\n'); @@ -158,7 +166,9 @@ int x = mpriv->minb, y; int lw,lh,i, ll; + #ifndef __MINGW32__ if(mpriv->child) check_child(menu); + #endif ll = mpriv->last_line - 1; @@ -222,6 +232,7 @@ } } +#ifndef __MINGW32__ static void check_child(menu_t* menu) { fd_set rfd; struct timeval tv; @@ -268,12 +279,13 @@ w = 1; } } - } +#endif #define close_pipe(pipe) close(pipe[0]); close(pipe[1]) static int run_shell_cmd(menu_t* menu, char* cmd) { +#ifndef __MINGW32__ int in[2],out[2],err[2]; printf("Console run %s ...\n",cmd); @@ -311,6 +323,7 @@ mpriv->child_fd[2] = err[0]; mpriv->prompt = mpriv->child_prompt; //add_line(mpriv,"Child process started"); +#endif return 1; } @@ -439,7 +452,11 @@ } +#ifndef __MINGW32__ static int open(menu_t* menu, char* args) { +#else +static int openMenu(menu_t* menu, char* args) { +#endif menu->draw = draw; @@ -469,5 +486,9 @@ &cfg_dflt, cfg_fields }, +#ifndef __MINGW32__ open, +#else + openMenu, +#endif }; diff -Naur ../Original/libmenu/menu_param.c ./libmenu/menu_param.c --- ../Original/libmenu/menu_param.c Sun Feb 9 21:18:20 2003 +++ ./libmenu/menu_param.c Mon Aug 25 09:53:14 2003 @@ -103,20 +103,31 @@ free(entry); } +#ifndef __MINGW32__ static void close(menu_t* menu) { +#else +static void closeMenu(menu_t* menu) { +#endif menu_list_uninit(menu,free_entry); if(mpriv->edit) free(mpriv->edit); } +#ifndef __MINGW32__ static int open(menu_t* menu, char* args) { +#else +static int openMenu(menu_t* menu, char* args) { +#endif list_entry_t* e; menu->draw = menu_list_draw; menu->read_cmd = menu_list_read_cmd; menu->read_key = read_key; +#ifndef __MINGW32__ menu->close = close; - +#else + menu->close = closeMenu; +#endif if(!args) { printf("Pref menu need an argument\n"); @@ -155,5 +166,9 @@ &cfg_dflt, cfg_fields }, +#ifndef __MINGW32__ open +#else + openMenu +#endif }; diff -Naur ../Original/patch-OSD-Menu.txt ./patch-OSD-Menu.txt --- ../Original/patch-OSD-Menu.txt Thu Jan 1 01:00:00 1970 +++ ./patch-OSD-Menu.txt Tue Aug 26 10:02:20 2003 @@ -0,0 +1,149 @@ +diff -Naur ../Original/input/input.c ./input/input.c +--- ../Original/input/input.c Sat Aug 16 11:51:06 2003 ++++ ./input/input.c Mon Aug 25 15:37:36 2003 +@@ -125,7 +125,9 @@ + { MP_CMD_CHELP, "help", 0, { {-1,{0}} } }, + { MP_CMD_CEXIT, "exit", 0, { {-1,{0}} } }, + { MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } }, ++#ifndef __MINGW32__ + { MP_CMD_CRUN, "run", 1, { {MP_CMD_ARG_STRING,{0}}, {-1,{0}} } }, ++#endif + #endif + + { 0, NULL, 0, {} } +diff -Naur ../Original/libmenu/menu_console.c ./libmenu/menu_console.c +--- ../Original/libmenu/menu_console.c Tue Jun 24 21:59:14 2003 ++++ ./libmenu/menu_console.c Mon Aug 25 15:13:04 2003 +@@ -7,7 +7,13 @@ + #include + #include + #include ++ ++#ifndef __MINGW32__ + #include ++#else ++#define WNOHANG 1 ++#endif ++ + #include + #include + +@@ -103,7 +109,9 @@ + + #define mpriv (menu->priv) + ++#ifndef __MINGW32__ + static void check_child(menu_t* menu); ++#endif + + static void add_line(struct menu_priv_s* priv, char* l) { + char* eol = strchr(l,'\n'); +@@ -158,7 +166,9 @@ + int x = mpriv->minb, y; + int lw,lh,i, ll; + ++ #ifndef __MINGW32__ + if(mpriv->child) check_child(menu); ++ #endif + + ll = mpriv->last_line - 1; + +@@ -222,6 +232,7 @@ + } + } + ++#ifndef __MINGW32__ + static void check_child(menu_t* menu) { + fd_set rfd; + struct timeval tv; +@@ -268,12 +279,13 @@ + w = 1; + } + } +- + } ++#endif + + #define close_pipe(pipe) close(pipe[0]); close(pipe[1]) + + static int run_shell_cmd(menu_t* menu, char* cmd) { ++#ifndef __MINGW32__ + int in[2],out[2],err[2]; + + printf("Console run %s ...\n",cmd); +@@ -311,6 +323,7 @@ + mpriv->child_fd[2] = err[0]; + mpriv->prompt = mpriv->child_prompt; + //add_line(mpriv,"Child process started"); ++#endif + return 1; + } + +@@ -439,7 +452,11 @@ + } + + ++#ifndef __MINGW32__ + static int open(menu_t* menu, char* args) { ++#else ++static int openMenu(menu_t* menu, char* args) { ++#endif + + + menu->draw = draw; +@@ -469,5 +486,9 @@ + &cfg_dflt, + cfg_fields + }, ++#ifndef __MINGW32__ + open, ++#else ++ openMenu, ++#endif + }; +diff -Naur ../Original/libmenu/menu_param.c ./libmenu/menu_param.c +--- ../Original/libmenu/menu_param.c Sun Feb 9 21:18:20 2003 ++++ ./libmenu/menu_param.c Mon Aug 25 09:53:14 2003 +@@ -103,20 +103,31 @@ + free(entry); + } + ++#ifndef __MINGW32__ + static void close(menu_t* menu) { ++#else ++static void closeMenu(menu_t* menu) { ++#endif + menu_list_uninit(menu,free_entry); + if(mpriv->edit) + free(mpriv->edit); + } + ++#ifndef __MINGW32__ + static int open(menu_t* menu, char* args) { ++#else ++static int openMenu(menu_t* menu, char* args) { ++#endif + list_entry_t* e; + + menu->draw = menu_list_draw; + menu->read_cmd = menu_list_read_cmd; + menu->read_key = read_key; ++#ifndef __MINGW32__ + menu->close = close; +- ++#else ++ menu->close = closeMenu; ++#endif + + if(!args) { + printf("Pref menu need an argument\n"); +@@ -155,5 +166,9 @@ + &cfg_dflt, + cfg_fields + }, ++#ifndef __MINGW32__ + open ++#else ++ openMenu ++#endif + };