diff options
author | Cy Schubert <cy@FreeBSD.org> | 2024-08-28 20:20:28 -0700 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2024-08-28 20:35:50 -0700 |
commit | d2221ef5ffcf08c73198dd92866c4aa3e2864e70 (patch) | |
tree | eaa5353d0eb201f38499307493a45e77ffbb7081 /sysutils/screen50/files/patch-socket.c | |
parent | sysutils/screen*: Rename screen and introduce a meta port (diff) |
sysutils/screen50: Introduce the new screen 5.0.0
Screen 5.0.0 is the next major release of GNU Screen. Unfortunatly
while testing sysutils/screen-devel I discovered bugs with its
hardstatus implementation. Existing hardstatus failed to work
correctly. I had opened a bug with the GNU Screen upstream. They
had fixed one of the bugs however the last time I tested screen-devel,
some status strings were still unavailable, not to mention that the
hardstatus string syntax has changed.
Therefore I don't believe screen50 should replace screen49 as our
default GNU screen until a) some of the issues are resolved and
b) we the FreeBSD community have had a little more experience with
it.
People who wish to use screen50 will need to uninstall screen
(currently a meta port pointing to screen49) and install screen50.
Any bugzilla bugs will likely spawn an upstream bug report by
myself.
Diffstat (limited to 'sysutils/screen50/files/patch-socket.c')
-rw-r--r-- | sysutils/screen50/files/patch-socket.c | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/sysutils/screen50/files/patch-socket.c b/sysutils/screen50/files/patch-socket.c new file mode 100644 index 000000000000..abd96ac9cb49 --- /dev/null +++ b/sysutils/screen50/files/patch-socket.c @@ -0,0 +1,76 @@ +--- socket.c.orig 2024-03-26 16:41:57.000000000 -0700 ++++ socket.c 2024-04-03 07:52:07.474617000 -0700 +@@ -122,11 +122,13 @@ + char *firstn = NULL; + int nfound = 0, ngood = 0, ndead = 0, nwipe = 0, npriv = 0; + int nperfect = 0; ++ char timestr[64]; + struct sent { + struct sent *next; + int mode; + char *name; +- } *slist, **slisttail, *sent, *nsent; ++ time_t time_created; ++ } *slist, **slisttail, *sent, *nsent, *schosen; + + if (match) { + matchlen = strlen(match); +@@ -203,8 +205,12 @@ + sent->next = NULL; + sent->name = SaveStr(name); + sent->mode = mode; ++ sent->time_created = SessionCreationTime(name); ++ for (slisttail = &slist; *slisttail; slisttail = &((*slisttail)->next)) { ++ if ((*slisttail)->time_created < sent->time_created) break; ++ } ++ sent->next = *slisttail; + *slisttail = sent; +- slisttail = &sent->next; + nfound++; + sockfd = MakeClientSocket(0); + /* MakeClientSocket sets ids back to eff */ +@@ -283,31 +289,36 @@ + break; + } + for (sent = slist; sent; sent = sent->next) { ++ if (sent->time_created == 0) { ++ sprintf(timestr, "??" "?"); ++ } else { ++ strftime(timestr, 64, "%x %X", localtime(&sent->time_created)); ++ } + switch (sent->mode) { + case 0700: +- printf("\t%s\t(Attached)\n", sent->name); ++ printf("\t%s\t(%s)\t(Attached)\n", sent->name, timestr); + break; + case 0600: +- printf("\t%s\t(Detached)\n", sent->name); ++ printf("\t%s\t(%s)\t(Detached)\n", sent->name, timestr); + break; + case 0701: +- printf("\t%s\t(Multi, attached)\n", sent->name); ++ printf("\t%s\t(%s)\t(Multi, attached)\n", sent->name, timestr); + break; + case 0601: +- printf("\t%s\t(Multi, detached)\n", sent->name); ++ printf("\t%s\t(%s)\t(Multi, detached)\n", sent->name, timestr); + break; + case -1: + /* No trigraphs here! */ +- printf("\t%s\t(Dead ?%c?)\n", sent->name, '?'); ++ printf("\t%s\t(%s)\t(Dead ?%c?)\n", sent->name, timestr, '?'); + break; + case -2: +- printf("\t%s\t(Removed)\n", sent->name); ++ printf("\t%s\t(%s)\t(Removed)\n", sent->name, timestr); + break; + case -3: +- printf("\t%s\t(Remote or dead)\n", sent->name); ++ printf("\t%s\t(%s)\t(Remote or dead)\n", sent->name, timestr); + break; + case -4: +- printf("\t%s\t(Private)\n", sent->name); ++ printf("\t%s\t(%s)\t(Private)\n", sent->name, timestr); + break; + } + } |