Hi,

I patched 2 files for net/swirc 3.2.6 and I wrote at top what they do/their purpose are... (I hope that is ok)
I attach the diff.

Yours faithfully
Markus Uhlin

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/swirc/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile	23 Feb 2021 08:10:37 -0000	1.10
+++ Makefile	2 Mar 2021 20:48:35 -0000
@@ -4,6 +4,7 @@ COMMENT =	curses icb and irc client
 DISTNAME =	swirc-3.2.6
 CATEGORIES =	net
 HOMEPAGE =	https://www.nifty-networks.net/swirc/
+REVISION =	0
 
 MAINTAINER =		Markus Uhlin <markus.uh...@bredband.net>
 
Index: patches/patch-posixshell_os_BSD_sh
===================================================================
RCS file: patches/patch-posixshell_os_BSD_sh
diff -N patches/patch-posixshell_os_BSD_sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-posixshell_os_BSD_sh	2 Mar 2021 20:48:35 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+NDEBUG=1 makes sw_assert() and sw_assert_perror() no-ops resulting in
+faster code execution.
+
+Further tweak the speed by compiling with optimization level 2.
+
+Index: posixshell/os_BSD.sh
+--- posixshell/os_BSD.sh.orig
++++ posixshell/os_BSD.sh
+@@ -5,10 +5,13 @@
+ os_BSD () {
+ 	cat <<EOF >>$MAKE_DEF_FILE
+ SHARED_FLAGS=-DBSD=1\\
++	-DNDEBUG=1\\
+ 	-DUNIX=1\\
+ 	-D_XOPEN_SOURCE_EXTENDED=1\\
+ 	-I/usr/local/include\\
+-	-Wall
++	-O2\\
++	-Wall\\
++	-pipe
+ CC=cc
+ CFLAGS=\$(SHARED_FLAGS) -std=c17
+ CXX=c++
Index: patches/patch-src_readline_c
===================================================================
RCS file: patches/patch-src_readline_c
diff -N patches/patch-src_readline_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_readline_c	2 Mar 2021 20:48:35 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+This patch changes the readline behavior so that readline blocks read
+only for a fixed amount of time (at no CPU cost). By doing this Swirc
+shall ALWAYS automatically resize as the terminal window changes
+dimensions.
+
+Index: src/readline.c
+--- src/readline.c.orig
++++ src/readline.c
+@@ -101,6 +101,9 @@ apply_readline_options(WINDOW *win)
+     if (is_scrollok(win)) {
+ 	SCROLLOK(win, 0);
+     }
++
++    const int wait_time_millisec = 270;
++    wtimeout(win, wait_time_millisec);
+ }
+ 
+ /**

Reply via email to