bug-ncurses
[Top][All Lists]
Advanced

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

output capability names, Cap name or Tcap code instead of character stri


From: songbird
Subject: output capability names, Cap name or Tcap code instead of character strings?
Date: Thu, 17 May 2012 01:05:17 -0400
User-agent: slrn/pre1.0.0-18 (Linux)

  hello and thank you so much folks for your work on 
curses/ncurses.  Thomas, Sven, many others too.

  my question is if there is a flag for compiling that 
would tell ncurses to output the token code, capability 
name string, Cap name or Tcap code instead of the 
characters?  preferably in an easily parsed format,
i use "{" and "}" around them, but it can be any
enclosure.

  this would save me a lot of time and let me write code 
that is more portable when capturing/scanning/processing
output from a ncurses using source code project of any 
kind.  and it would seem that there must be some way to 
generate a token name for purposes of debugging ncurses, 
but i've not dug into the source code yet.

  my current use is in processing the output of Rogue and
Rog-O-Matic, but I can see the wider use case for having
the tokens returned instead of the characters.  and yes,
i do know about trace mode, but i suspect that puts out
too much.

  it would mean i wouldn't have to write a scanner for all
of these obscure character strings i don't understand well 
and could support things much more easily.  writing a 
scanner instead that parses based upon the names or codes 
would be much easier.

  currently i'm writing scanners for xterm just to see what 
Rogue/Rog-O-Matic produce in the course of tracking down bugs.
my scanners output the codes recognized enclosed in braces
and anything not seen is passed through as text.  works well 
but is by no means as complete or correct as what would 
actually come out of ncurses itself.

  as an aside, it is funny how some things come around, ages 
ago i enjoyed playing rogue and always wanted to see rog-o-
matic run.  now i have time to tinker and figure some of 
this out so i get to see how it all works together.

  cheers and thanks again,


  songbird




reply via email to

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