screen.c (screen-4.8.0) | : | screen.c (screen-4.9.0) | ||
---|---|---|---|---|
skipping to change at line 780 | skipping to change at line 780 | |||
free(ShellProg); | free(ShellProg); | |||
ShellProg = SaveStr(*++av); | ShellProg = SaveStr(*++av); | |||
debug1("ShellProg: '%s'\n", ShellProg); | debug1("ShellProg: '%s'\n", ShellProg); | |||
break; | break; | |||
case 'S': | case 'S': | |||
if (!SockMatch) { | if (!SockMatch) { | |||
if (--ac == 0) | if (--ac == 0) | |||
exit_with_usage(myname, "Specify session-name with -S", NULL); | exit_with_usage(myname, "Specify session-name with -S", NULL); | |||
SockMatch = *++av; | SockMatch = *++av; | |||
debug1("SockMatch: '%s'\n", SockMatch); | ||||
debug1("SockMatch len: '%d'\n", (int)strlen(SockMatch)); | ||||
if (strlen(SockMatch) > 80) | ||||
exit_with_usage(myname, "Session-name is too long (max length is | ||||
80 symbols)", NULL); | ||||
} | } | |||
if (!*SockMatch) | if (!*SockMatch) | |||
exit_with_usage(myname, "Empty session-name?", NULL); | exit_with_usage(myname, "Empty session-name?", NULL); | |||
break; | break; | |||
case 'X': | case 'X': | |||
cmdflag = 1; | cmdflag = 1; | |||
break; | break; | |||
case 'v': | case 'v': | |||
skipping to change at line 1191 | skipping to change at line 1195 | |||
exit(10 + i); | exit(10 + i); | |||
else | else | |||
exit(9 + (fo || oth ? 1 : 0) + fo); | exit(9 + (fo || oth ? 1 : 0) + fo); | |||
} | } | |||
if (fo == 0) | if (fo == 0) | |||
Panic(0, "No Sockets found in %s.\n", SockPath); | Panic(0, "No Sockets found in %s.\n", SockPath); | |||
Msg(0, "%d Socket%s in %s.", fo, fo > 1 ? "s" : "", SockPath); | Msg(0, "%d Socket%s in %s.", fo, fo > 1 ? "s" : "", SockPath); | |||
eexit(0); | eexit(0); | |||
} | } | |||
signal(SIG_BYE, AttacherFinit); /* prevent races */ | signal(SIG_BYE, AttacherFinit); /* prevent races */ | |||
if (cmdflag) { | if (cmdflag) { | |||
#ifdef MULTIUSER | ||||
if (multi) | ||||
real_uid = multi_uid; | ||||
#endif | ||||
/* attach_tty is not mandatory */ | /* attach_tty is not mandatory */ | |||
SetTtyname(false, &st); | SetTtyname(false, &st); | |||
if (!*av) | if (!*av) | |||
Panic(0, "Please specify a command."); | Panic(0, "Please specify a command."); | |||
if (!strncmp("sessionname", *av, 11)) { | ||||
if (!*++av) | ||||
Panic(0, "Please specify a parameter."); | ||||
if (strlen(*av) > 80) | ||||
Panic(0, "Parameter of command 'sessionname' is too long."); | ||||
*--av; | ||||
} | ||||
SET_GUID(); | SET_GUID(); | |||
SendCmdMessage(sty, SockMatch, av, queryflag >= 0); | SendCmdMessage(sty, SockMatch, av, queryflag >= 0); | |||
exit(0); | exit(0); | |||
} | } | |||
else if (rflag || xflag) { | else if (rflag || xflag) { | |||
debug("screen -r: - is there anybody out there?\n"); | debug("screen -r: - is there anybody out there?\n"); | |||
if (Attach(MSG_ATTACH)) { | if (Attach(MSG_ATTACH)) { | |||
Attacher(); | Attacher(); | |||
/* NOTREACHED */ | /* NOTREACHED */ | |||
} | } | |||
skipping to change at line 2753 | skipping to change at line 2771 | |||
case 't': | case 't': | |||
*p = 0; | *p = 0; | |||
if (win && (int)strlen(win->w_title) < l) { | if (win && (int)strlen(win->w_title) < l) { | |||
strcpy(p, win->w_title); | strcpy(p, win->w_title); | |||
if (*p) | if (*p) | |||
qmflag = 1; | qmflag = 1; | |||
} | } | |||
p += strlen(p) - 1; | p += strlen(p) - 1; | |||
break; | break; | |||
#ifdef ENCODINGS | ||||
case 'e': | ||||
*p = 0; | ||||
D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; | ||||
if (win && win->w_encoding) { | ||||
*p++ = ' '; | ||||
strcpy(p, EncodingName(win->w_encoding)); | ||||
} | ||||
p += strlen(p) - 1; | ||||
break; | ||||
#endif | ||||
case '{': | case '{': | |||
{ | { | |||
char rbuf[128]; | char rbuf[128]; | |||
s++; | s++; | |||
for (i = 0; i < 127; i++) | for (i = 0; i < 127; i++) | |||
if (s[i] && s[i] != '}') | if (s[i] && s[i] != '}') | |||
rbuf[i] = s[i]; | rbuf[i] = s[i]; | |||
else | else | |||
break; | break; | |||
End of changes. 5 change blocks. | ||||
0 lines changed or deleted | 31 lines changed or added |