#include "util.h"
-#ifndef WIN32
+#ifndef _WIN32
#include <termios.h>
#include <sys/ioctl.h>
int ukbhit(void)
AddLogLine(fileName, "\nanticollision: ", buff);
}
-void FillFileNameByUID(char *fileName, uint8_t * uid, char *ext) {
+void FillFileNameByUID(char *fileName, uint8_t * uid, char *ext, int byteCount) {
char * fnameptr = fileName;
memset(fileName, 0x00, 200);
- for (int j = 0; j < 7; j++, fnameptr += 2)
+ for (int j = 0; j < byteCount; j++, fnameptr += 2)
sprintf(fnameptr, "%02x", uid[j]);
sprintf(fnameptr, "%s", ext);
-
- printf("fname:%s", fileName);
}
// printing and converting functions
int bg, en;
if (!param_getptr(line, &bg, &en, paramnum))
- return strtol(&line[bg], NULL, base) & 0xff;
+ return strtoul(&line[bg], NULL, base) & 0xff;
else
return deflt;
}
int bg, en;
if (!param_getptr(line, &bg, &en, paramnum))
- return strtol(&line[bg], NULL, base);
+ return strtoul(&line[bg], NULL, base);
else
return deflt;
}
int bg, en;
if (!param_getptr(line, &bg, &en, paramnum))
- return strtoll(&line[bg], NULL, base);
+ return strtoull(&line[bg], NULL, base);
else
return deflt;