rust-terminfo icon indicating copy to clipboard operation
rust-terminfo copied to clipboard

Termcap capability names are non-unique

Open Stebalien opened this issue 8 years ago • 6 comments

While working on a way to programatically generate the capability list, I ran into a duplicate termcap (legacy) code: ML. It can either be:

variable capname TCap Code Description
set_lr_margin smglr ML Set both left and right margins to #1, #2. (ML is not in BSD termcap).
set_left_margin smgl ML Set left soft margin at current column. See smgl. (ML is not in BSD termcap).

Stebalien avatar Feb 07 '17 01:02 Stebalien

Possible solutions:

  1. Don't include termcap codes (they're for legacy programs so they shouldn't be necessary).
  2. Don't include the SVr4.0 capabilities (that's where the conflict is).

Thoughts?

Stebalien avatar Feb 07 '17 01:02 Stebalien

https://github.com/meh/rust-terminfo/commit/3ade67fba637d6e90fec02c988dc355f17269cf1

There's also IC that was a duplicate of something else, I just removed the bogus duplicates I found.

meh avatar Feb 07 '17 02:02 meh

Ah, so that's why you don't have those. Ok, nevermind (although I couldn't find a duplicate IC mentioned in the manual).

Although, is it really a good idea to remove IC entierly (parm_ich)? I suggested removing support for SVr4.0 because it's non-standard but parm_ich appears to be a standard capability.

Stebalien avatar Feb 07 '17 03:02 Stebalien

@Stebalien honestly I was just like "why are there even duplicates in here, I'll just remove the ones I feel like are some kind of mistake made by someone else in ages unknown".

I'm fine with either solution.

The ALIASES thing is mostly to help while using the raw interface, and when I find the time to implement generating a Vec<Database> from a terminfo source code.

Instead the TERMINFO one is going to be used for generating a terminfo source code from an existing Database.

TERMCAP is just there so aliases could be generated for the old tcap capability names.

meh avatar Feb 07 '17 03:02 meh

@Stebalien the other IC that was in the manual I got my stuff from is for initialize_color, I wasn't entirely sure which one was the best to remove, and since there's also initialize_pair as Ip I went with the other IC.

meh avatar Feb 07 '17 03:02 meh

That should be Ic (lower case c) which shouldn't conflict with IC.

Stebalien avatar Feb 07 '17 17:02 Stebalien