Index: head/net/omnitty/Makefile =================================================================== --- head/net/omnitty/Makefile (revision 476741) +++ head/net/omnitty/Makefile (revision 476742) @@ -1,29 +1,26 @@ # Created by: Rong-En Fan # $FreeBSD$ PORTNAME= omnitty PORTVERSION= 0.3.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net MASTER_SITES= SF/omnitty/omnitty/omnitty-${PORTVERSION} MAINTAINER= david@catwhisker.org COMMENT= Curses-based SSH multiplexer LIB_DEPENDS= librote.so:devel/rote USES= gmake ncurses GNU_CONFIGURE= yes LIBS+= -lncurses ALL_TARGET= omnitty PLIST_FILES= bin/omnitty man/man1/omnitty.1.gz - -post-patch: - ${REINPLACE_CMD} 's|||' ${WRKSRC}/machmgr.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/omnitty ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/omnitty.1 ${STAGEDIR}${MANPREFIX}/man/man1 .include Index: head/net/omnitty/files/patch-machmgr.c =================================================================== --- head/net/omnitty/files/patch-machmgr.c (nonexistent) +++ head/net/omnitty/files/patch-machmgr.c (revision 476742) @@ -0,0 +1,25 @@ +--- machmgr.c.orig 2005-10-25 22:04:01 UTC ++++ machmgr.c +@@ -26,7 +26,7 @@ + #include "machine.h" + #include "minibuf.h" + #include +-#include ++#include + + #define MACHINE_MAX 256 + +@@ -261,5 +261,13 @@ void machmgr_delete_dead() { + int i; + for (i = machcount - 1; i >= 0; i--) + if (!machs[i]->alive) machmgr_delete(i); ++} ++ ++void machmgr_toggle_tag_all(bool ignore_dead) { ++ int i; ++ for (i = 0; i < machcount; i++) { ++ if (!ignore_dead || machs[i]->alive) ++ machs[i]->tag = !machs[i]->tag; ++ } + } + Property changes on: head/net/omnitty/files/patch-machmgr.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/omnitty/files/patch-machmgr.h =================================================================== --- head/net/omnitty/files/patch-machmgr.h (nonexistent) +++ head/net/omnitty/files/patch-machmgr.h (revision 476742) @@ -0,0 +1,13 @@ +--- machmgr.h.orig 2005-10-25 22:04:01 UTC ++++ machmgr.h +@@ -106,6 +106,10 @@ void machmgr_delete_dead(); + /* Deletes all tagged machines */ + void machmgr_delete_tagged(); + ++/* Toggles tagged status of all machines. If ignore_dead, does not ++ * tag dead machines (i.e. machines whose alive flag is down). */ ++void machmgr_toggle_tag_all(bool ignore_dead); ++ + /* Tags all machines. If ignore_dead, does not tag dead machines (i.e. machines + * whose alive flag is down). */ + void machmgr_tag_all(bool ignore_dead); Property changes on: head/net/omnitty/files/patch-machmgr.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/omnitty/files/patch-main.c =================================================================== --- head/net/omnitty/files/patch-main.c (revision 476741) +++ head/net/omnitty/files/patch-main.c (revision 476742) @@ -1,50 +1,50 @@ ---- main.c.orig 2005-10-26 06:08:25.000000000 +0800 -+++ main.c 2011-04-22 23:14:33.000000000 +0800 +--- main.c.orig 2005-10-25 22:08:25 UTC ++++ main.c @@ -36,6 +36,7 @@ /* minimum terminal dimensions to run program */ #define MIN_REQUIRED_WIDTH 80 #define MIN_REQUIRED_HEIGHT 25 +#define MAX_HOSTNAME_LENGTH 64 #define REMINDER_LINE "OmNiTTY-R v" OMNITTY_VERSION \ " \007F1\007:menu \006F2/3\007:sel \003F4\007:tag" \ -@@ -88,6 +88,12 @@ +@@ -88,6 +89,12 @@ void curses_init() { define_key("\e[15~", KEY_F(5)); define_key("\e[17~", KEY_F(6)); define_key("\e[18~", KEY_F(7)); define_key("\e[19~", KEY_F(8)); define_key("\e[20~", KEY_F(9)); define_key("\e[21~", KEY_F(10)); + /* If "Sun Function-Keys" is enabled in your Xterm: */ + define_key("\e[224z", KEY_F(1)); define_key("\e[225z", KEY_F(2)); + define_key("\e[226z", KEY_F(3)); define_key("\e[227z", KEY_F(4)); + define_key("\e[228z", KEY_F(5)); define_key("\e[229z", KEY_F(6)); + define_key("\e[230z", KEY_F(7)); define_key("\e[231z", KEY_F(8)); + define_key("\e[232z", KEY_F(9)); define_key("\e[233z", KEY_F(10)); getmaxyx(stdscr, h, w); if (h < MIN_REQUIRED_HEIGHT || w < MIN_REQUIRED_WIDTH) { -@@ -288,10 +289,10 @@ +@@ -288,10 +295,10 @@ static void add_machines_from_file(const char *file) { } static void add_machine() { - static char buf[32]; + static char buf[MAX_HOSTNAME_LENGTH]; *buf = 0; - if (minibuf_prompt(minibuf, "Add: ", 0xE0, buf, 32)) { + if (minibuf_prompt(minibuf, "Add: ", 0xE0, buf, sizeof(buf))) { if (*buf == '@') add_machines_from_file(buf+1); else machmgr_add(buf); } -@@ -335,9 +341,10 @@ +@@ -335,9 +342,10 @@ int main(int argc, char **argv) { while (!quit) { if (zombie_count) { - zombie_count--; - chldpid = wait(NULL); - machmgr_handle_death(chldpid); + if ((chldpid = waitpid(-1, NULL, WNOHANG)) > 0) { + zombie_count--; + machmgr_handle_death(chldpid); + } } machmgr_update(); Index: head/net/omnitty/files/patch-menu.c =================================================================== --- head/net/omnitty/files/patch-menu.c (nonexistent) +++ head/net/omnitty/files/patch-menu.c (revision 476742) @@ -0,0 +1,26 @@ +--- menu.c.orig 2005-10-25 22:04:01 UTC ++++ menu.c +@@ -29,11 +29,13 @@ + #include "help.h" + + #define MENU_LINES 12 +-#define MENU_COLS 38 ++#define MENU_COLS 45 + + #define MENU_CONTENTS \ + "{[h]} online help\n" \ + "{[r]} rename machine\n" \ ++ "{[o]} toggle tag all machines (live only)\n" \ ++ "{[O]} toggle tag all machines (live & dead)\n" \ + "{[t]} tag all machines (live only)\n" \ + "{[T]} tag all machines (live & dead)\n" \ + "{[u]} untag all machines\n" \ +@@ -100,6 +102,8 @@ void menu_show() { + } + + break; ++ case 'o': machmgr_toggle_tag_all(true); break; ++ case 'O': machmgr_toggle_tag_all(false); break; + case 't': machmgr_tag_all(true); break; + case 'T': machmgr_tag_all(false); break; + case 'u': machmgr_untag_all(); break; Property changes on: head/net/omnitty/files/patch-menu.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property