Skip to content

Commit

Permalink
Fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Tkachev committed Sep 20, 2023
1 parent 53aa37c commit 3ff91ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
with pkgs;
gcc12Stdenv.mkDerivation {
name = "tab";
version = "9.2";
version = "9.3";
src = ./.;
nativeBuildInputs = [ python3 ];
buildPhase = ''
make
STATIC_LIBS=-L${glibc.static}/lib make tab-static
make -B
STATIC_LIBS=-L${glibc.static}/lib make -B tab-static
'';
installPhase = ''
mkdir -p $out/bin
Expand Down
7 changes: 6 additions & 1 deletion tab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ std::istream& file_or_stdin(const std::string& file) {
throw std::runtime_error("Could not open input file: " + file);

return ret;
}
}

#ifdef _REENTRANT
#include "threaded.h"
Expand Down Expand Up @@ -61,6 +61,7 @@ void show_help(const std::string& help_section) {
"Usage: tab [-i inputdata_file] [-f expression_file] [-t N] [-r random seed] [-s] [-v|-vv|-vvv] [-h section] "
<< "<expressions...>"
<< std::endl
<< " -V, --version: show version." << std::endl
<< " -i: read data from this file instead of stdin." << std::endl
<< " -f: prepend code from this file to <expressions...>" << std::endl
<< " -p: use this code as the prelude; this code will be prepended to code from file and command line args." << std::endl
Expand Down Expand Up @@ -175,6 +176,10 @@ int main(int argc, char** argv) {

nthreads = std::stoul(out);
#endif
} else if (arg == "-V" || arg == "--version") {
std::cout << "tab 9.3" << std::endl << " →→→ https://github.com/ivan-tkatchev/tab/" << std::endl;
return 0;

} else {
has_program = true;

Expand Down

0 comments on commit 3ff91ed

Please sign in to comment.