From owner-freebsd-questions Sat Feb 9 11:15:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from falcon.prod.itd.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id BD50537B417 for ; Sat, 9 Feb 2002 11:15:42 -0800 (PST) Received: from sdn-ar-007dcwashp202.dialsprint.net ([63.178.91.114] helo=moo.holy.cow) by falcon.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16ZcyL-0000oE-00 for freebsd-questions@freebsd.org; Sat, 09 Feb 2002 11:15:42 -0800 Received: by moo.holy.cow (Postfix, from userid 1001) id 16B7750B89; Sat, 9 Feb 2002 14:17:44 -0500 (EST) Date: Sat, 9 Feb 2002 14:17:44 -0500 From: parv To: f-q Subject: less ungetcc overflow when passing a long pattern Message-ID: <20020209191743.GA39154@moo.holy.cow> Mail-Followup-To: f-q Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG when the following regex is passed to less, i get the "ungetcc overflow" error message; after which less quits. # regex (121-characters long minus the "'" ) wrapped for email # change ^I to actual tab (character) # less --pattern='experience|\ ^[ ^I]+[[:alpha:] \/]+\:|\ [[:alnum:]\\.\\-\\+]+@[[:alnum:]\\.\\-]+\\.[[:alpha:]]+|\ http\:\/\/[[:alnum:]\/\\.\\-]+' filename if regex shortened, say, "experience|" is removed, everything goes just fine. is there limit on the length of pattern passed? less(1) doesn't seem to say much on the issue. same thing happens when less is used a mutt pager w/ above regex (thus having no pager at all, until changed). btw, above regex works, w/o passing it on command line, inside the less, specified via search("/") command. so, my inquiry is: is it not possible to mention this limit in less(1)? this may apply to all the options that less takes; --pattern option is most likely to be easily long enough to cause error though, in my not-so-extensive and non-c-programming experience. - parv -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message