# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= less VERSION= 590 KEYWORDS= sysutils VARIANTS= standard color SDESC[standard]= Popular open-source file pager SDESC[color]= Popular file pager with color sequence support HOMEPAGE= http://www.greenwoodsoftware.com/less/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= http://www.greenwoodsoftware.com/less/ DISTFILE[1]= less-590.tar.gz:main DF_INDEX= 1 SPKGS[standard]= single SPKGS[color]= single OPTIONS_AVAILABLE= COLOR OPTIONS_STANDARD= none VOPTS[color]= COLOR=ON USES= cpe gmake ncurses:static bdb:static LICENSE= GPLv3:single CUSTOM1:single LICENSE_TERMS= single:{{WRKDIR}}/TERMS LICENSE_NAME= CUSTOM1:"Less License" LICENSE_FILE= GPLv3:{{WRKSRC}}/COPYING CUSTOM1:{{WRKSRC}}/LICENSE LICENSE_SCHEME= dual CPE_VENDOR= gnu FPC_EQUIVALENT= sysutils/less MUST_CONFIGURE= gnu VAR_OPSYS[sunos]= CONFIGURE_ENV=LIBS="-lrt -lsocket" [COLOR].DESCRIPTION= Color support via escape sequences [COLOR].CPPFLAGS_ON= -DCOLOR_LESS post-patch: ${REINPLACE_CMD} -e 's|-lcurses|-lncurses -ltinfo -ldb|' ${WRKSRC}/configure ${HEAD} -n 18 ${WRKSRC}/README > ${WRKDIR}/TERMS [FILE:707:descriptions/desc.single] Less is a pager. A pager is a program that displays text files. Other pagers commonly in use are more and pg. Pagers are often used in command-line environments like the Unix shell and the MS-DOS command prompt to display files. Windowed environments like the Windows and Macintosh desktops don't need pagers as much, since they have other methods for viewing files. Less is not an editor. You can't change the contents of the file you're viewing. Less is not a windowing system. It doesn't have fancy scroll bars or other GUI (graphical user interface) elements. It was designed to work on simple text-only terminals. Less has been used by thousands of people around the world since its release in 1985. [FILE:94:distinfo] 6aadf54be8bf57d0e2999a3c5d67b1de63808bb90deb8f77b028eafae3a08e10 352574 less-590.tar.gz [FILE:86:manifests/plist.single] bin/ less lessecho lesskey share/man/man1/ less.1.gz lessecho.1.gz lesskey.1.gz [FILE:853:patches/patch-charset.c] --- charset.c.orig 2021-06-03 17:45:48 UTC +++ charset.c @@ -432,6 +432,10 @@ binary_char(c) control_char(c) LWCHAR c; { +#ifdef COLOR_LESS + if (c == ESC) + return 0; +#endif c &= 0377; return (chardef[c] & IS_CONTROL_CHAR); } @@ -447,6 +451,20 @@ prchar(c) /* {{ This buffer can be overrun if LESSBINFMT is a long string. }} */ static char buf[32]; +#ifdef COLOR_LESS + if(c == ESC) + sprintf(buf, "%c", ESC); + else + { + c &= 0377; + if (!control_char(c)) + sprintf(buf, "%c", c); + else if (!control_char(c ^ 0100)) + sprintf(buf, "^%c", c ^ 0100); + else + sprintf(buf, binfmt, c); + } +#else c &= 0377; if ((c < 128 || !utf_mode) && !control_char(c)) SNPRINTF1(buf, sizeof(buf), "%c", (int) c); @@ -470,6 +488,7 @@ prchar(c) #endif else SNPRINTF1(buf, sizeof(buf), binfmt, c); +#endif return (buf); }