[comp.mail.mush] Help requested...

quennevi@IRO.UMontreal.CA (Charles Quenneville) (06/07/90)

Hello all...

I would like to do a simple thing: instead of having the current message
in reversed video (while being in the main menu in vt100 emulation), I
would like to have it in bold. I've looked thru the source and there are
to many places where there is bold. Could somebody help me and tell me 
which files and line I have to change? 

I am using my friend's account, but you can reply to:

soubyran@MathInfo2.uqam.ca
soubyran@132.208.12.2

Thank you very muSh in advance...

Richard
 

argv@turnpike.Eng.Sun.COM (Dan Heller) (06/07/90)

In article <1990Jun6.232205.3939@IRO.UMontreal.CA> soubyran@MathInfo2.uqam.ca (Richard Soubyran) writes:
> I would like to do a simple thing: instead of having the current message
> in reversed video (while being in the main menu in vt100 emulation), I
> would like to have it in bold. I've looked thru the source and there are
> to many places where there is bold. Could somebody help me and tell me 
> which files and line I have to change? 

For everyone's sake, Mush uses the macro:

#define STANDOUT(y,x,s) standout(), mvaddstr(y,x,s), standend()

This is defined in mush.h.  The function standout() is in the
curses library -- if you don't want to use this, then replace
the macro with a printf() using the escape sequence that prints
the terminal characteristics you want.  don't forget to replace
standend() with a printf to get you out of it :-)

--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.

schaefer@ogicse.ogi.edu (Barton E. Schaefer) (06/07/90)

In article <136801@sun.Eng.Sun.COM> argv@turnpike.Eng.Sun.COM (Dan Heller) writes:
} In article <1990Jun6.232205.3939@IRO.UMontreal.CA> soubyran@MathInfo2.uqam.ca (Richard Soubyran) writes:
} > I would like to do a simple thing: instead of having the current message
} > in reversed video (while being in the main menu in vt100 emulation), I
} > would like to have it in bold. I've looked thru the source and there are
} > to many places where there is bold. Could somebody help me and tell me 
} > which files and line I have to change? 
} 
} This is defined in mush.h.  The function standout() is in the
} curses library -- if you don't want to use this, then replace
} the macro with a printf() using the escape sequence that prints
} the terminal characteristics you want.

Um, I realize that answers the question that was asked, but changing the
source isn't the best way to solve the problem.  Please DON'T convert
code that is generic into code that is specific to one terminal!

A better way to do this is to change the terminal description so that
the standout() function will use the bold attribute instead of the
reverse video attribute.  On systems that use termcap (mostly BSD),
this is fairly straightforward: you reset the TERMCAP environment
variable to either contain the text of a new terminal description or
to refer to a file containing an entry for the terminal named in the
TERM variable.  The two-character codes for standout() and standend()
are (gasp) "so" and "se", so just copy the termcap entry for your
terminal type, change the escape sequences assigned to so and se, and
reset the TERMCAP variable by placing a "setenv TERMCAP ...." command
in your .mushrc file.  This will change reverse-video to bold for
mush and any processes that it creates, but not for other jobs you
run from your shell.

On terminfo systems (SystemV, some Xenix) the process is a bit more
complicated, because the new description must be compiled and installed
in a library directory, access to which may be restricted.  Perhaps
someone more familiar with SysV would like to post the details (or a
way to create personal terminal description files under terminfo)?
-- 
Bart Schaefer						schaefer@cse.ogi.edu