unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11432: Application that sets LINES/COLUMNS env vars behaves weird in term and ansi-term
@ 2012-05-08 13:56 Nikos Chantziaras
  0 siblings, 0 replies; only message in thread
From: Nikos Chantziaras @ 2012-05-08 13:56 UTC (permalink / raw)
  To: 11432

I have a curses application (written in C++) that during start-up does:

   static char linesEnv[32];
   static char columnsEnv[32];
   /* Init the above vars */
   putenv(linesEnv);
   putenv(columnsEnv);

linesEnv and columnsEnv contain "LINES=N" and "COLUMNS=N" respectively, 
with N being the current terminal dimensions.

Now this sounds like a totally useless thing to do; why would you set 
these env vars if they're already set.  This is done in order to work 
around a bug in an old Solaris version.  But on other systems, this 
should have no effect.

But with emacs it does have an effect; the application's output is all 
messed up.  Characters appear in wrong places or entirely missing and 
everything is pretty much messed up.  I modified the program to not 
export the env vars when TERM=eterm (or eterm-color).  But in case this 
is a bug in Emacs, I'm reporting it here.

I'm using GNU Emacs 23.4.2 built without X support, with Ncurses 5.9 on 
Gentoo AMD64.  The problem also appears in Emacs 23.1 with X support on 
Ubuntu 10.04 (which is the system of the user who reported the problem 
to me.)






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-08 13:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-08 13:56 bug#11432: Application that sets LINES/COLUMNS env vars behaves weird in term and ansi-term Nikos Chantziaras

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).