Ticket #29 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

WinHugs: $$ last value doesn't work

Reported by: neil Owned by: neil
Priority: critical Milestone: next release
Component: winhugs Version: 200605
Keywords: Cc:

Description

I just installed the May 2006 release of Hugs. When I use the command-line version, the '$$' symbol to reference the last expression works fine. It does not work in WinHugs?, but yields 'ERROR - Syntax error in expression (unexpected symbol "$$")'. I typed ':set' to verify the '-r$$' option was set properly.

It works with hugs on Windows, and with Hugs on Linux, just not winhugs.

Change History

Changed 7 years ago by neil

  • priority changed from major to critical

Changed 7 years ago by neil

The problem is in input.c, all the tests for $$ are written as: if (it==textRepeat && reading==KEYBOARD) ...

The problem is that WinHugs? doesn't pipe directly from the keyboard, its from a string buffer, i.e. reading == STRING.

The possible values of reading are:

#define NOTHING 0 /* what kind of input is being read?*/ #define KEYBOARD 1 /* - keyboard/console? */ #define SCRIPTFILE 2 /* - script file */ #define STRING 3 /* - string buffer? */ #define NOKEYBOARD 4 /* - standard input, but not a tty */

Without knowing the exact purpose of this check, its hard to know how

to modify it for WinHugs?. Can I just do reading == KEYBOARD reading == STRING? Is there a particular reason that you can't use $$ in a SCRIPTFILE? Is reading == KEYBOARD required?

Changed 7 years ago by ross

In the case of SCRIPTFILE it's not clear what it should mean, and it would steal an identifier. For example, with the default setting ($$), Text.PrettyPrint.HughesPJ would fail to load.

It looks like doing it for STRING should be OK, though.

Changed 7 years ago by neil

  • status changed from new to closed
  • resolution set to fixed

Now reading==KEYBOARD or reading==STRING detects the repeat string, plus HughesPJ still works fine.

Changed 6 years ago by guest

Test Trac email again.  seduction  pickup

Note: See TracTickets for help on using tickets.