From owner-freebsd-questions@FreeBSD.ORG Fri Jul 23 19:08:17 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 798581065687 for ; Fri, 23 Jul 2010 19:08:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 39E778FC15 for ; Fri, 23 Jul 2010 19:08:16 +0000 (UTC) Received: from r55.edvax.de (port-92-195-179-206.dynamic.qsc.de [92.195.179.206]) by mx02.qsc.de (Postfix) with ESMTP id 17ACD1EEFF; Fri, 23 Jul 2010 21:08:16 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o6NJ8F6M004809; Fri, 23 Jul 2010 21:08:15 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 23 Jul 2010 21:08:14 +0200 From: Polytropon To: "A. Wright" Message-Id: <20100723210814.44ff8bd1.freebsd@edvax.de> In-Reply-To: References: <20100723202450.ea80c86f.freebsd@edvax.de> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: Text mode screen size max. compatibility X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 19:08:17 -0000 On Fri, 23 Jul 2010 15:44:27 -0300 (ADT), "A. Wright" wrote: > > On Fri, 23 Jul 2010, Polytropon wrote: > > > Is there a way to easily determine the terminal output size at > > program startup so the program can be preconfigured for certain > > screen sizes, and even refuse to run if it's less than 80x25? > > The "curses" library will do this. The variables LINES and COLS > will tell you what you want. Cool - I planned to use (n)curses anyway. But one question remains: Is there an "interrupt line" (or something functionally similar, a flag or whatever) that will give the chance for a notification if LINES or COLS has recently changed, e. g. through a window size modification? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...