Loading ...
Sorry, an error occurred while loading the content.

Re: change-font fatal when running under termcap

Expand Messages
  • Steven Phillips
    Thomas, ... Good find, this one slipped through the net, the following changeFont function can be found in unixterm.c, add the extra test and it wont hurt
    Message 1 of 1 , Jun 21, 2000
    • 0 Attachment
      Thomas,

      > Subject: [jasspa] change-font fatal when running under termcap
      > From: Thomas Hundt <thundt@...>
      > Date: Wed, 21 Jun 2000 14:26:30 -0700
      > To: jasspa@egroups.com
      >
      > It seems the change-font command crashes ME when running under termcap mode
      > (i.e., 'me -n'). I've seen this behavior under solaris and linux.
      >
      > (It also seems to leave a zombie process that sucks up all available CPU time
      > :-)

      Good find, this one slipped through the net, the following changeFont function
      can be found in unixterm.c, add the extra test and it wont hurt again. Sorry
      no line numbers cos I haven't got a clue what version you're running. For
      other users it may be worth checking that this bug is a problem first as I
      think it a relatively new bug (since the xterm font support??):

      int
      changeFont(int f, int n)
      {
      uint8 buff[MAXBUF] ; /* Input buffer */

      + if(meSystemCfg & meSYSTEM_CONSOLE)
      + /* change-font not supported on termcap */
      + return TRUE ;
      +
      /* Get the name of the font. If it is specified as default then
      * do not collect the remaining arguments */
      if(mlreply((uint8 *)"Font Name", 0, 0, buff, MAXBUF) == ABORT)
      return FALSE ;

      >
      > Workaround: "Doctor, it hurts when I do this." "So, don't do that!" :-) I've
      > protected the change-font commands in my startup scripts by first looking at
      > $mouse to (try to) determine whether I'm running under X or not. (I already
      > look at $platform to find out the underlying os, to determine MSWin/DOS.)

      Note that the $mouse test should work for unix but wont on windows because the
      mouse is also supported on the console. So the official way to check if you're
      running a console version, e.g. termcap, is to check if the first bit of
      $system variable is set, e.g.

      !if &band $system 1
      ; running a console version

      Steve

      >
      > Footnote: I love ME. (That sounds pretty narcissistic, doesn't it :-)

      You aught to try describing changes you've made to ME then, the number of I's
      and ME's gets ridiculous.

      >
      >
      > -Th
      >
      >
      > ------------------------------------------------------------------------
      > SALESFORCE.COM MAKES SOFTWARE OBSOLETE
      > Secure, online sales force automation with 5 users FREE for 1 year!
      > http://click.egroups.com/1/2658/11/_/6009/_/961623257/
      > ------------------------------------------------------------------------
      >
      > __________________________________________________________________________
      >
      >
      >
      > This is an unmoderated list. JASSPA is not responsible for the content of
      >
      > any material posted to this list.
      >
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.