Çreadline的功能 [英] C readline function

查看:122
本文介绍了Çreadline的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在上大学的转让有人建议使用C 的readline 功能锻炼。我已经寻找它的参考,但仍然还没有找到它。它是否真的存在吗?在这头?你能请张贴链接引用?

In an assignment for college it was suggested to use the C readline function in an exercise. I have searched for its reference but still haven't found it. Does it really exist? In which header? Can you please post the link to the reference?

推荐答案

的Readline存在于两个地方, libreadline libedit (又称 libeditline )。两者具有相同的接口。所不同的是libreadline是在GPL下,libedit是3条款BSD。授权是真的不用于分配一个问题,至少我不认为它是。要么许可,您可以自由使用code。如果您对readline的链接,务必使整个程序 GPL 2或更高版本将满足任何的GPL版本支配系统的readline 。它可以是GPL2 +或GPL3 +,这取决于系统的年龄。我不主张任何许可证,这是给你的。

Readline exists in two places, libreadline and libedit (also called libeditline). Both have an identical interface. The difference is libreadline is licensed under the GPL, libedit is 3 clause BSD. Licensing is really not a concern for an assignment, at least I don't think it is. Either license allows you to use the code freely. If you link against readline, be sure to make the whole program GPL 2 or later which will satisfy whatever version of the GPL governs the system readline. It may be GPL2+ or GPL3+, depending on the age of the system. I'm not advocating either license, that's up to you.

请注意,要小心安装任一/或并根据需要调整连接( -lreadline -ledit -leditline )。两者都是图书馆,而不是标准C库的一部分。

Note, take care to install either / or and adjust linking as needed (-lreadline or -ledit or -leditline). Both are libraries and not a part of the standard C library.

修改(事后):

如果释放程序到野外,它是一个很好的姿态,以允许用户使用他们的的readline 选择的配置。例如: - 与-的readline - 与-libedit 等。这允许二进制包符合他们选择的许可,至少就的readline 而言。

If releasing a program to the wild, its a nice gesture to allow the user to configure it with their readline of choice. For instance: --with-readline or --with-libedit, etc. This allows a binary package that conforms to their choice of license, at least as far as readline is concerned.

链接:的Readline 并的编辑/ Editline

这篇关于Çreadline的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆