Add --version option to column(1)
This commit is contained in:
parent
238de22ce8
commit
8a2630fbee
|
@ -31,6 +31,10 @@
|
|||
#include <string.h>
|
||||
#include <termios.h>
|
||||
|
||||
#if !defined(VERSIONSTR)
|
||||
#define VERSIONSTR "unknown version"
|
||||
#endif
|
||||
|
||||
int termwidth = 80;
|
||||
|
||||
size_t linesused = 0;
|
||||
|
@ -130,7 +134,11 @@ void help(const char* argv0)
|
|||
|
||||
void version(const char* argv0)
|
||||
{
|
||||
printf("%s (sortix)\n", argv0);
|
||||
FILE* fp = stdout;
|
||||
fprintf(fp, "%s (Sortix) %s\n", argv0, VERSIONSTR);
|
||||
fprintf(fp, "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n");
|
||||
fprintf(fp, "This is free software: you are free to change and redistribute it.\n");
|
||||
fprintf(fp, "There is NO WARRANTY, to the extent permitted by law.\n");
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
|
Loading…
Reference in New Issue