this add's slightly less confusion for cross platform use...
--- client_interface.c 2008-06-12 14:27:04.000000000 -0400
+++ client_interface.new 2009-04-21 11:13:47.769102600 -0400
@@ -20,7 +20,7 @@
/*here are the functions that actually do the work*/
int com_get(), com_put(), com_command(), com_cwd(), com_setenv();
int com_help(), com_pf_otcp(), com_pf_itcp(), com_bg(),com_pf_oudp();
-int com_pf_iudp(),com_setwrap();
+int com_pf_iudp(),com_setwrap(),com_setunixshell(),com_setwinshell();
int com_setlistenip();
@@ -41,12 +41,15 @@
{ "?", com_help, "print some help information" },
/*some real commands*/
- { "cwd", com_cwd, "Change to directory DIR" },
- { "setenv", com_setenv, "Set an environment variable" },
- { "setwrap", com_setwrap, "Set the command wrapper (for windows)" },
- { "get", com_get, "get file" },
- { "put", com_put, "put file" },
- { "setlistenip", com_setlistenip, "set the local listening ip address"},
+{ "cwd", com_cwd, "Change to directory DIR" },
+{ "setenv", com_setenv, "Set an environment variable" },
+{ "setwrap", com_setwrap, "Set the command wrapper " },
+{ "setwinshell", com_setwinshell, "Set the command wrapper (for windows)" },
+{ "setunixshell", com_setunixshell, "Set the command wrapper (for unix)" },
+{ "get", com_get, "get file" },
+{ "put", com_put, "put file" },
+{ "setlistenip", com_setlistenip, "set the local listening ip address"},
+
{ "pf_otcp",com_pf_otcp,"portforward - set up an outbound tcp connection"},
{ "pf_itcp",com_pf_itcp,"portforward - set up an inbound tcp connection"},
@@ -361,6 +364,24 @@
return 1;
}
+ com_setwinshell()
+ {
+ char *wrapper;
+ wrapper="cmd.exe /c \"%s\"";
+ set_wrapformat(wrapper);
+ return 1;
+ }
+
+ com_setunixshell()
+ {
+ char *wrapper;
+ wrapper="sh -c \"( %s ) 2>&1\"";
+ set_wrapformat(wrapper);
+ return 1;
+ }
+
+
+
int
com_setenv(char * line)
{
@@ -525,7 +546,7 @@
char *line,*s;
/*the \r cleans up the first letter typed.*/
- line = readline ("\rCommand: ");
+ line = readline ("\rhydrogen> ");
if (!line)
return;
-
No comments:
Post a Comment