int bg, en;
if (!param_getptr(line, &bg, &en, paramnum))
- return strtol(&line[bg], NULL, base);
+ return strtoll(&line[bg], NULL, base);
else
return deflt;
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;
+}