-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: multiple dots in a number now detected
- Loading branch information
Showing
6 changed files
with
71 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,37 @@ | ||
#include "calc.h" | ||
#include "../../libvarious/src/strings.h" | ||
#include <stdlib.h> | ||
|
||
int main() | ||
static void printHelp() | ||
{ | ||
puts("Scientific Calc v0.9"); | ||
puts("Use 'q' or 'quit' to close the program"); | ||
} | ||
|
||
static void analyze(int argc, char *argv[]) | ||
{ | ||
int i; | ||
for(i=1; i<argc; i++) | ||
{ | ||
if(!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) | ||
{ | ||
printHelp(); | ||
} | ||
else | ||
{ | ||
printf("Invalid argument '%s'\n", argv[i]); | ||
exit(1); | ||
} | ||
} | ||
exit(0); | ||
} | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
if(argc != 1) { | ||
analyze(argc,argv); | ||
} | ||
|
||
consoleCalc(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters