From: "Steven Levine" Received: from [192.168.100.201] (HELO mail.2rosenthals.com) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTPS id 3690824 for gnuports@2rosenthals.com; Sun, 15 May 2022 02:06:52 -0400 Received: from [192.168.200.201] (port=49818 helo=mail2.2rosenthals.com) by mail.2rosenthals.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nq7Oq-000509-2l for gnuports@2rosenthals.com; Sun, 15 May 2022 02:06:40 -0400 Received: from mta-102b.oxsus-vadesecure.net ([51.81.61.67]:53501 helo=nmtao102.oxsus-vadesecure.net) by mail2.2rosenthals.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nq7Ol-0005d2-3B for gnuports@2rosenthals.com; Sun, 15 May 2022 02:06:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; bh=ikqNs8ORAfMTgEtzk50pRYd+YkzuogdpFt3cUJ pYmXo=; c=relaxed/relaxed; d=earthlink.net; h=from:reply-to:subject: date:to:cc:resent-date:resent-from:resent-to:resent-cc:in-reply-to: references:list-id:list-help:list-unsubscribe:list-subscribe:list-post: list-owner:list-archive; q=dns/txt; s=dk12062016; t=1652594795; x=1653199595; b=pyZ05GaRL2+c28P1k16SDN/gwC0rxWm8u3lFJETqfirS1Jb3OMhteGM CQEK95YBHneM/yRilX3OwENpcYloIFcZuEfmkUNByuSt+Uj0cjtMHKiP5ENOk0EzgfNrXGw GbVbdgX1JUZBdfjQLwD+nQpi1hsUvVGUDk5ISnLOrmJ7g/AiZOBR9W60Xddey/42p/s/ywW XKei7Sa7F6gAoWmcUPp/rVS1g+7I4Zo8fK/x98abnehXa5nj9DC96Ulshuqq4rF08l7k/59 p5neH3KL/9zuM1hLM2lQ51z2nGloxZhUfTg9PO6Moyr5YsbNyWz1JgLjOMgwypdGX824KOV wIw== Received: from slamain ([108.193.254.223]) by smtp.oxsus-vadesecure.net ESMTP oxsus1nmtao02p with ngmta id 4d3ddd6d-16ef3235d8b4813b; Sun, 15 May 2022 06:06:35 +0000 Message-ID: <628096e1.9.mr2ice.fgrirsq@earthlink.net> Date: Sat, 14 May 2022 23:00:01 -0700 To: "GNU Ports for eCS Mailing List" In-Reply-To: Subject: Re: [GNU Ports] Terminal width? X-Mailer: MR/2 Internet Cruiser Edition for OS/2 v3.00.11.23/60 In , on 05/14/22 at 06:52 PM, "Dave Yeo" said: Hi Dave, >void _scrsize (int *dst); And for reference the actual source at src\emx\src\lib\sys\scrsize.c >Does this code make sense? You have the right idea, but what you have written is probably going to trap. >int term_width(int fd) >{ > int dst[1]; > void _scrsize (int *dst); > return dst[0]; >} What you want is: int term_width(int fd) { int dst[2]; void _scrsize (dst); /* Get columns and rows */ return dst[0]; /* Return columns */ } For your needs, _srcsize is better than using VioGetMode directly because it deals with the 16-bit code issues. Steven -- ---------------------------------------------------------------------- "Steven Levine" Warp/DIY/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com ----------------------------------------------------------------------