allow very short version information with new options -v and -d
This commit is contained in:
parent
45e2155e57
commit
b27d0e701c
|
|
@ -151,9 +151,9 @@ com_bug(wordlist *wl)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* printout upon startup or 'version' command. options to version are -s (short)
|
/* printout upon startup or 'version' command. options to version are -s (short),
|
||||||
or -f (full). 'version' with options may also be used in ngspice pipe mode. */
|
-f (full), -v (just version), -d (just compile date).
|
||||||
|
'version' with options may also be used in ngspice pipe mode. */
|
||||||
void
|
void
|
||||||
com_version(wordlist *wl)
|
com_version(wordlist *wl)
|
||||||
{
|
{
|
||||||
|
|
@ -193,8 +193,13 @@ com_version(wordlist *wl)
|
||||||
fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date);
|
fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date);
|
||||||
fprintf(cp_out, "******\n");
|
fprintf(cp_out, "******\n");
|
||||||
|
|
||||||
} else if (!strncasecmp(s, "-f", 2)) {
|
} else if (!strncasecmp(s, "-v", 2)) {
|
||||||
|
fprintf(cp_out, "%s-%s\n",ft_sim->simulator, ft_sim->version);
|
||||||
|
} else if (!strncasecmp(s, "-d", 2) && Spice_Build_Date != NULL &&
|
||||||
|
*Spice_Build_Date != '\0'){
|
||||||
|
fprintf(cp_out, "%s\n", Spice_Build_Date);
|
||||||
|
|
||||||
|
} else if (!strncasecmp(s, "-f", 2)) {
|
||||||
fprintf(cp_out,
|
fprintf(cp_out,
|
||||||
"******\n"
|
"******\n"
|
||||||
"** %s-%s : %s\n"
|
"** %s-%s : %s\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue