updated readme
This commit is contained in:
@@ -34,7 +34,7 @@ int help() {
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
string input, inputfile, outputfile;
|
||||
bool stdin = false;
|
||||
bool _stdin = false;
|
||||
|
||||
if (argc < 2) {
|
||||
cout << owo("No text provided") << endl << endl;
|
||||
@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) {
|
||||
outputfile = string(argv[i+1]);
|
||||
i++;
|
||||
} else if (string(argv[i]) == "-p") {
|
||||
stdin = true;
|
||||
_stdin = true;
|
||||
} else if (string(argv[i]) == "-h") {
|
||||
return help();
|
||||
} else if (i == argc-1) {
|
||||
@@ -62,7 +62,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if (stdin && inputfile != "" || stdin && input != "" || inputfile != "" && input != "") {
|
||||
if (_stdin && inputfile != "" || _stdin && input != "" || inputfile != "" && input != "") {
|
||||
cout << owo("Cannot use multiple input methods at once") << endl << endl;
|
||||
help();
|
||||
return 1;
|
||||
@@ -78,7 +78,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if (stdin) {
|
||||
if (_stdin) {
|
||||
while (getline(cin, input)) {
|
||||
if (outputfile != "") {
|
||||
*output << owo(input) << endl;
|
||||
|
||||
Reference in New Issue
Block a user