Updated to default to 50k digits with no arguments, Makefile updates

This commit is contained in:
A.M. Rowsell 2024-07-23 12:07:02 -04:00
parent ec2a96b0ad
commit 4f738e5609
Signed by: amr
GPG key ID: 0B6E2D8375CF79A9
3 changed files with 4 additions and 3 deletions

View file

@ -24,6 +24,7 @@ depend: .depend
clean: clean:
$(RM) $(OBJS) $(RM) $(OBJS)
$(RM) main
distclean: clean distclean: clean
$(RM) *~ .depend $(RM) *~ .depend

View file

@ -1,7 +1,7 @@
CC=x86_64-w64-mingw32-gcc CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++ CXX=x86_64-w64-mingw32-g++
RM=rm -f RM=rm -f
CPPFLAGS=-Wall CPPFLAGS=-Wall -std=gnu++17
LDFLAGS=-static LDFLAGS=-static
LDLIBS=-lm LDLIBS=-lm

View file

@ -5,8 +5,8 @@
int main(int argc, char **argv) { int main(int argc, char **argv) {
int numDigits = 0; int numDigits = 0;
if(argc < 2) { if(argc < 2) {
std::cout << "Usage: spigot <numDigits>" << std::endl; numDigits = 50000;
return -1; std::cout << "Defaulting to 50000 digits..." << std::endl;
} else { } else {
numDigits = std::atoi((const char *)argv[1]); numDigits = std::atoi((const char *)argv[1]);
} }