Hi all,
Please review this patch, I'm missing something. I can't bind stuff to
(i.e. s). When I try to "bind s stuff" screen freezes.
This feature is usefull when using a very slow remote shell session (SSH
over a bad GPRS connection). By locally preparing a command you can
enter a command and send it as bulk (without typos ;-)).
And, it might be handy to support the (undocumented) -k parameter
without parameter. I haven't added it yet.
TIA,
Dick
diff -udr screen-4.0.2.orig/comm.c screen-4.0.2/comm.c
--- screen-4.0.2.orig/comm.c 2003-09-08 16:25:08.000000000 +0200
+++ screen-4.0.2/comm.c 2008-08-06 17:06:04.000000000 +0200
@@ -286,7 +286,7 @@
{ "source", ARGS_1 },
{ "split", NEED_DISPLAY|ARGS_0 },
{ "startup_message", ARGS_1 },
- { "stuff", NEED_LAYER|ARGS_12 },
+ { "stuff", NEED_LAYER|ARGS_012 },
#ifdef MULTIUSER
{ "su", NEED_DISPLAY|ARGS_012 },
#endif
diff -udr screen-4.0.2.orig/process.c screen-4.0.2/process.c
--- screen-4.0.2.orig/process.c 2003-09-18 14:53:54.000000000 +0200
+++ screen-4.0.2/process.c 2008-08-06 18:07:58.000000000 +0200
@@ -1018,6 +1018,18 @@
return i;
}
+static void
+StuffFin(buf, len, data)
+char *buf;
+int len;
+char *data;
+{
+ if (!len || !display)
+ return;
+ while(len)
+ LayProcess(&buf, &len);
+}
+
/*ARGSUSED*/
void
DoAction(act, key)
@@ -1616,6 +1628,11 @@
case RC_STUFF:
s = *args;
n = *argl;
+ if (!args[0])
+ {
+ Input("Stuff:", 7, INP_COOKED, StuffFin, NULL);
+ break;
+ }
if (args[1])
{
if (strcmp(s, "-k"))