emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Device 0 is not a termcap terminal device


From: Alan Mackenzie
Subject: Re: Device 0 is not a termcap terminal device
Date: Tue, 1 Sep 2009 20:08:26 +0000
User-agent: Mutt/1.5.9i

Hi Emacs!

A little less that a year ago, I supplied a "me too" to this bug in which
batch programs would crash with the error message

    Device 0 is not a termcap terminal device

I have now tracked this bug down: `send-string-to-terminal' crashes in
-batch.  To see this, compare the following:

$ emacs-23.1 -Q -batch -eval '(send-string-to-terminal "Hello, world!\n")'
Device 0 is not a termcap terminal device

$ emacs-22.3 -Q -batch -eval '(send-string-to-terminal "Hello, world!\n")'
Hello, world!

Comparing the old and new versions of dispnew.c, Fsend_string_to_terminal
has been extensively modified.  Emacs-22 just did this:

    fwrite (SDATA (string), 1, SBYTES (string), stdout);

, Emacs-23 has tarted this up (for multi-tty, maybe?) with code including
this:

    tty = t->display_info.tty;

.  It is this function with throws the error.  It seems that batch mode
was overlooked when this change was made.

The CC Mode test suite uses `send-string-to-terminal' in batch mode to
display the names of test files on a single line without scrolling.  It
is of some inconvenience to me not being able to run the test suite in
Emacs-23.

Would somebody who knows this code (Dan N?) please fix this soon.  I
WOULD APPRECIATE A PATCH VERY QUICKLY!!!!

Thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]