forked from Spencer/math_shell
updating nomorenumbers to override math test
This commit is contained in:
@@ -8,3 +8,8 @@ make
|
||||
make install
|
||||
```
|
||||
|
||||
## Static Build on Rocky 8
|
||||
|
||||
```
|
||||
dnf --enablerepo=devel install -y glibc-static readline-static
|
||||
```
|
||||
|
||||
4
msh.c
4
msh.c
@@ -363,7 +363,11 @@ void startShell() {
|
||||
|
||||
while ((line = readline(getPrompt())) != NULL) {
|
||||
if (strlen(line) != 0) { // Checking if prompt returns empty
|
||||
if (strcmp(line, "nomorenumbers")) {
|
||||
status = mathTest();
|
||||
} else {
|
||||
status = 0;
|
||||
}
|
||||
if (status == 0) { // Passed math test
|
||||
add_history(line);
|
||||
execCommand(line);
|
||||
|
||||
Reference in New Issue
Block a user