diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luma/arghandl.cc | 10 | ||||
-rw-r--r-- | src/luma/luma.cc | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/luma/arghandl.cc b/src/luma/arghandl.cc index 70b9ae6..f9f08c0 100644 --- a/src/luma/arghandl.cc +++ b/src/luma/arghandl.cc @@ -1,14 +1,12 @@ # include <cstdio> # include <luma.hh> # include <string> -# include <vector> using namespace std::literals::string_literals; void luma::arghandl(int const argc,char const * * argv) { - std::vector<std::basic_string<char>> args; for(int pos = 0x1;pos < argc; ++pos) { - args.push_back(argv[pos]); - } - for(std::basic_string<char> arg : args) { - std::printf("Got argument \"%s\".\u000A",arg.c_str()); + std::string arg = argv[pos]; + if(pos == 0x1) { + this->lumafile = arg; + } } } diff --git a/src/luma/luma.cc b/src/luma/luma.cc index 18fcdb7..5b72788 100644 --- a/src/luma/luma.cc +++ b/src/luma/luma.cc @@ -6,7 +6,8 @@ # include <unistd.h> [[noreturn]] luma::luma(int const argc,char const * * argv) { this->arghandl(argc,argv); - int file = ::open("test.luma",O_RDONLY); + std::printf("Will open \"%s\".\u000A",this->lumafile.c_str()); + int file = ::open(this->lumafile.c_str(),O_RDONLY); char tok = '\0'; char word[0x1000]; int wordpos = 0x0; |