projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
syntax suger, some tabs fixed
[proxmark3-svn]
/
client
/
util.c
diff --git
a/client/util.c
b/client/util.c
index b2ac82ae1d9522a58f0d2c6ef9e8a04459930aed..f70b5aed8600a9c0d510d529ae7dd28a56fc28e0 100644
(file)
--- a/
client/util.c
+++ b/
client/util.c
@@
-12,8
+12,7
@@
#define MAX_BIN_BREAK_LENGTH (3072+384+1)
#ifndef _WIN32
#define MAX_BIN_BREAK_LENGTH (3072+384+1)
#ifndef _WIN32
-#include <termios.h>
-#include <sys/ioctl.h>
+#include <sys/ttydefaults.h>
int ukbhit(void) {
int cnt = 0;
int ukbhit(void) {
int cnt = 0;
@@
-38,7
+37,6
@@
int ukbhit(void) {
}
#else
}
#else
-#include <conio.h>
int ukbhit(void) {
return kbhit();
}
int ukbhit(void) {
return kbhit();
}
@@
-63,7
+61,10
@@
void AddLogLine(char *file, char *extData, char *c) {
fprintf(f, "%s", extData);
fprintf(f, "%s\n", c);
fflush(f);
fprintf(f, "%s", extData);
fprintf(f, "%s\n", c);
fflush(f);
- fclose(f);
+ if (f) {
+ fclose(f);
+ f = NULL;
+ }
}
void AddLogHex(char *fileName, char *extData, const uint8_t * data, const size_t len){
}
void AddLogHex(char *fileName, char *extData, const uint8_t * data, const size_t len){
@@
-186,7
+187,7
@@
char *sprint_hex_ascii(const uint8_t *data, const size_t len) {
void num_to_bytes(uint64_t n, size_t len, uint8_t* dest) {
while (len--) {
void num_to_bytes(uint64_t n, size_t len, uint8_t* dest) {
while (len--) {
- dest[len] =
(uint8_t) n
;
+ dest[len] =
n & 0xFF
;
n >>= 8;
}
}
n >>= 8;
}
}
@@
-280,7
+281,6
@@
int param_getptr(const char *line, int *bg, int *en, int paramnum)
return 0;
}
return 0;
}
-
char param_getchar(const char *line, int paramnum)
{
int bg, en;
char param_getchar(const char *line, int paramnum)
{
int bg, en;
Impressum
,
Datenschutz