Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use nvi2 without terminfo/termcap library #63

Open
liweitianux opened this issue Jun 25, 2019 · 3 comments
Open

Use nvi2 without terminfo/termcap library #63

liweitianux opened this issue Jun 25, 2019 · 3 comments

Comments

@liweitianux
Copy link

Hello,

First, thank you for developing and maintaining the nvi2 software.

I'm a DragonFly BSD developer. Nvi2 is part of the base system as well as the initrd(7) rescue system in DragonFly BSD. The initrd rescue system is a collection of statically linked utilities. We've included nvi2 in it, but nvi2 cannot really work because it requires the terminfo library. See also the BUGS section of FreeBSD's rescue(8).

So I'm openning this issue to ask: whether or not it is possible to make nvi2 work without depending on terminfo/termcap library? If not, would it be hard to make it work, e.g., by embedding the dumb/ansi term information in the program? I can help work on the patch if you like. Thank you.

Regards,
Aaron

@lichray
Copy link
Owner

lichray commented Jun 25, 2019

I'm not sure what exactly behavior you want. If you don't want nvi2 to link to terminfo library, then you will have to reimplement the "cl" library without relying on term.h, which is lots of work. If you just want nvi2 to work under rescue without accessing termcap files, then env TERM=dumb nvi should do the trick (can you give it a test?).

@liweitianux
Copy link
Author

Thank you for the prompt reply.

I've tried env TERM=dumb nvi in the rescue mode, but it doesn't work either, with error message No terminal database found.

Meanwhile, when I tried to set the TERM variable in the rescue shell, I got messages:

rescue# export TERM=dumb
Cannot read termcap database;
using dumb terminal settings.

In addition, in a normal system (i.e., nvi can access terminfo), using TERM=dumb makes nvi still unusable; the text formatting is wrong (e.g., wrongly placed newlines).

Regards,
Aaron

@zhihaoy
Copy link

zhihaoy commented Jun 25, 2019

That's unfortunate. I forgot how did I get my nvi2 to work in rescue, but since I have a special ~/.termcap, that may explain it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants