#include <ctype.h>
#include "util.h"
-#ifdef __linux__
+#ifndef WIN32
#include <termios.h>
#include <sys/ioctl.h>
int ukbhit(void)
return num;
}
+// -------------------------------------------------------------------------
+// string parameters lib
+// -------------------------------------------------------------------------
+
// -------------------------------------------------------------------------
// line - param line
// bg, en - symbol numbers in param line of beginning an ending parameter
return 0;
}
+
+int param_getstr(const char *line, int paramnum, char * str)
+{
+ int bg, en;
+
+ if (param_getptr(line, &bg, &en, paramnum)) return 0;
+
+ memcpy(str, line + bg, en - bg + 1);
+ str[en - bg + 1] = 0;
+
+ return en - bg + 1;
+}