diff options
author | cy <cy@FreeBSD.org> | 2008-07-25 12:53:02 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2008-07-25 12:53:02 +0800 |
commit | 525562588bf0c28278d24b1c09a6ac38b78b0c51 (patch) | |
tree | 7c6039bc40afcff8bf3a3f0511f35e78269155bf /sysutils | |
parent | e121258e3e15855ffc84cb48f84eca669344a403 (diff) | |
download | freebsd-ports-gnome-525562588bf0c28278d24b1c09a6ac38b78b0c51.tar.gz freebsd-ports-gnome-525562588bf0c28278d24b1c09a6ac38b78b0c51.tar.zst freebsd-ports-gnome-525562588bf0c28278d24b1c09a6ac38b78b0c51.zip |
Implement a new knob WITH_SHOWENC to show the encoding of every window
on status line.
PR: 124492
Submitted by: Yi-Jheng Lin <yzlin@cs.nctu.edu.tw>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/screen/Makefile | 10 | ||||
-rw-r--r-- | sysutils/screen/files/opt-showencoding | 31 |
2 files changed, 39 insertions, 2 deletions
diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index fb3a16072faa..d79a5f3608e8 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -7,7 +7,7 @@ PORTNAME= screen PORTVERSION= 4.0.3 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \ http://komquats.com/distfiles/ \ @@ -23,7 +23,8 @@ OPTIONS= CJK "Treat CJK ambiguous characters as full width" OFF \ MAN "Build and install man pages" ON \ NETHACK "Enable nethack-style messages" ON \ XTERM_256 "Enable support for 256 colour xterm" OFF \ - HOSTINLOCKED "Print user@host in locked message" OFF + HOSTINLOCKED "Print user@host in locked message" OFF \ + SHOWENC "Show encoding on the status line" OFF NO_PACKAGE= Tends to loop using 100% CPU when used from package - perhaps it hard-codes information about the build host @@ -67,6 +68,11 @@ EXTRA_PATCHES+= ${FILESDIR}/opt-cjkwidth EXTRA_PATCHES+= ${FILESDIR}/opt-hostinlocked .endif +# show encoding on the status line via option "showenc" +.if defined(WITH_SHOWENC) +EXTRA_PATCHES+= ${FILESDIR}/opt-showencoding +.endif + post-patch: @${RM} ${WRKSRC}/doc/screen.info* @${REINPLACE_CMD} -e 's|/dev/ptmx|/nonexistent|' ${WRKSRC}/configure diff --git a/sysutils/screen/files/opt-showencoding b/sysutils/screen/files/opt-showencoding new file mode 100644 index 000000000000..dfc2ed4f25cb --- /dev/null +++ b/sysutils/screen/files/opt-showencoding @@ -0,0 +1,31 @@ +--- process.c.orig 2008-05-08 02:37:33.000000000 +0800 ++++ process.c 2008-05-08 02:37:49.000000000 +0800 +@@ -3422,6 +3422,7 @@ + { + WinSwitchEncoding(fore, n); + ResetCharsets(fore); ++ RedisplayDisplays(0); + } + else if (i && display) + D_encoding = n; +--- screen.c.orig 2008-05-08 02:37:22.000000000 +0800 ++++ screen.c 2008-05-20 20:34:37.000000000 +0800 +@@ -2584,6 +2584,18 @@ + } + p += strlen(p) - 1; + 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 '{': + { + char rbuf[128]; |