diff --git a/commandline.cpp b/commandline.cpp index 670c9ce9..4f2cd0f2 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -149,7 +149,30 @@ int arg::readCommon() { for(char c: s) { for(int i=0; i= '0' && c <= '9') { + debugflags &= DF_TIME; + if(c >= '1') + debugflags |= DF_INIT | DF_WARN | DF_MSG | DF_ERROR; + if(c >= '2') + debugflags |= DF_GEOM | DF_GP | DF_LOG | DF_FIELD | DF_POLY; + if(c >= '3') + debugflags |= DF_TURN | DF_STEAM; + if(c >= '4') + debugflags |= DF_GRAPH | DF_MEMORY; + } + else if(c == '+') { + if(debugfile) fclose(debugfile); + shift(); + println(hlog, "writing to ", argcs()); + debugfile = fopen(argcs(), "at"); + } + else if(c == '@') { + if(debugfile) fclose(debugfile); + shift(); + println(hlog, "writing to ", argcs()); + debugfile = fopen(argcs(), "wt"); } } }