Stating license GPLv3+ if header of libreadline >= 6.x is included

This commit is contained in:
Thomas Schmitt 2014-06-15 09:44:08 +00:00
parent d327430f98
commit 8b236d1632
4 changed files with 44 additions and 5 deletions

View File

@ -1891,6 +1891,8 @@ int Xorriso_option_use_readline(struct XorrisO *xorriso, char *mode, int flag)
/* Option -version */
int Xorriso_option_version(struct XorrisO *xorriso, int flag)
{
const char *license_text;
sprintf(xorriso->result_line, "%sxorriso %d.%d.%d%s\n",
#ifdef Xorriso_GNU_xorrisO
"GNU ",
@ -1918,14 +1920,29 @@ int Xorriso_option_version(struct XorrisO *xorriso, int flag)
Xorriso_report_lib_versions(xorriso, 0);
#ifdef Xorriso_GNU_xorrisO
sprintf(xorriso->result_line,
"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n");
license_text= "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.";
sprintf(xorriso->result_line, "%s\n", license_text);
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line,
"This is free software: you are free to change and redistribute it.\n");
Xorriso_result(xorriso, 0);
#else
sprintf(xorriso->result_line, "Provided under GNU GPL version 2 or later.\n");
license_text= "Provided under GNU GPL version 2 or later.";
#ifdef Xorriso_with_readlinE
{
const char *readline_license;
readline_license= Xorriso__readline_license(0);
if(strcmp(readline_license, "GPLv3+") == 0)
license_text=
"Provided under GNU GPL version 3 or later, due to libreadline license.";
}
#endif /* Xorriso_with_readlinE */
sprintf(xorriso->result_line, "%s\n", license_text);
Xorriso_result(xorriso, 0);
#endif /* ! Xorriso_GNU_xorrisO */

View File

@ -121,6 +121,24 @@ int Xorriso__shutdown_editline(int flag)
#endif /* Xorriso_with_editlinE */
#ifdef Xorriso_with_readlinE
/* http://lists.gnu.org/archive/html/bug-readline/2014-06/msg00005.html */
const char *Xorriso__readline_license(int flag)
{
#ifdef RL_VERSION_MAJOR
#if RL_VERSION_MAJOR > 5
return("GPLv3+");
#endif
#endif
return("GPLv2+");
}
#endif /* Xorriso_with_readlinE */
#ifdef Xorriso_with_line_editoR
char *Xorriso_emul_readline(struct XorrisO *xorriso, int flag)

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -109,5 +109,9 @@ char *Xorriso_esc_filepath(struct XorrisO *xorriso,
int Xorriso__shutdown_editline(int flag);
#endif
#ifdef Xorriso_with_readlinE
const char *Xorriso__readline_license(int flag);
#endif
#endif /* ! Xorriso_pvt_textio_includeD */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2014.06.15.090324"
#define Xorriso_timestamP "2014.06.15.094311"