mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-25 01:21:52 +08:00
chg: moving around includes
This commit is contained in:
parent
65c1a6b2c1
commit
b279d04c85
6 changed files with 33 additions and 24 deletions
|
@ -22,13 +22,13 @@
|
|||
#include "cmdparser.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "mifare.h" // nonces_t struct
|
||||
#include "mfkey.h" // mfkey32_moebious
|
||||
#include "mifare.h" // nonces_t struct
|
||||
#include "mfkey.h" // mfkey32_moebious
|
||||
#include "cmdhfmfhard.h"
|
||||
#include "mifarehost.h"
|
||||
#include "util_posix.h" // msclock
|
||||
#include "mifarehost.h" // icesector_t, sector_t
|
||||
#include "util_posix.h" // msclock
|
||||
#include "mifaredefault.h" // mifare default key array
|
||||
#include "cmdhf14a.h" // dropfield
|
||||
#include "cmdhf14a.h" // dropfield
|
||||
|
||||
extern int CmdHFMF(const char *Cmd);
|
||||
|
||||
|
|
|
@ -34,15 +34,10 @@
|
|||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef ON_DEVICE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdarg.h>
|
||||
#include "fileutils.h"
|
||||
#include "ui.h"
|
||||
|
||||
#ifndef ON_DEVICE
|
||||
|
||||
/**
|
||||
* @brief checks if a file exists
|
||||
* @param filename
|
||||
|
@ -87,6 +82,7 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si
|
|||
free(fileName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int saveFileEML(const char *preferredName, const char *suffix, uint8_t* data, size_t datalen, size_t blocksize) {
|
||||
|
||||
if ( preferredName == NULL ) return 1;
|
||||
|
@ -146,6 +142,7 @@ out:
|
|||
* write also to a logfile. When doing so, just delete this function.
|
||||
* @param fmt
|
||||
*/
|
||||
/*
|
||||
void PrintAndLogDevice(logLevel_t level, char *fmt, ...) {
|
||||
char buffer[2048] = {0};
|
||||
va_list args;
|
||||
|
@ -154,9 +151,9 @@ void PrintAndLogDevice(logLevel_t level, char *fmt, ...) {
|
|||
va_end(args);
|
||||
PrintAndLogEx(level, buffer);
|
||||
}
|
||||
*/
|
||||
#else //if we're on ARM
|
||||
void PrintAndLogDevice(logLevel_t level, char *fmt, ...) {
|
||||
return;
|
||||
}
|
||||
|
||||
//void PrintAndLogDevice(logLevel_t level, char *fmt, ...) { return; }
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,6 +41,11 @@
|
|||
#ifndef ON_DEVICE
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdarg.h>
|
||||
#include "../ui.h"
|
||||
|
||||
/**
|
||||
|
@ -77,14 +82,23 @@ extern int saveFileEML(const char *preferredName, const char *suffix, uint8_t* d
|
|||
*/
|
||||
|
||||
int fileExists(const char *filename);
|
||||
#endif //ON_DEVICE
|
||||
|
||||
/**
|
||||
#define PrintAndLogDevice(level, format, args...) PrintAndLogEx(level, format , ## args)
|
||||
#else
|
||||
|
||||
/**
|
||||
* Utility function to print to console. This is used consistently within the library instead
|
||||
* of printf, but it actually only calls printf. The reason to have this method is to
|
||||
*make it simple to plug this library into proxmark, which has this function already to
|
||||
* write also to a logfile. When doing so, just point this function to use PrintAndLog
|
||||
* @param fmt
|
||||
*/
|
||||
void PrintAndLogDevice(logLevel_t level, char *fmt, ...);
|
||||
#define PrintAndLogDevice(level, format, args...) { }
|
||||
|
||||
|
||||
#endif //ON_DEVICE
|
||||
|
||||
|
||||
//void PrintAndLogDevice(logLevel_t level, char *fmt, ...);
|
||||
|
||||
#endif // FILEUTILS_H
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
// mifare commands
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "mifarehost.h"
|
||||
#include "cmdmain.h"
|
||||
|
||||
int mfDarkside(uint8_t blockno, uint8_t key_type, uint64_t *key) {
|
||||
uint32_t uid = 0;
|
||||
|
|
|
@ -18,9 +18,8 @@
|
|||
|
||||
#include "proxmark3.h" // time_t
|
||||
#include "common.h"
|
||||
#include "cmdmain.h"
|
||||
#include "ui.h"
|
||||
#include "util.h"
|
||||
#include "util.h" // FILE_PATH_SIZE
|
||||
#include "ui.h" // PrintAndLog...
|
||||
#include "crapto1/crapto1.h"
|
||||
#include "crc16.h"
|
||||
#include "protocols.h"
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
#include <pthread.h>
|
||||
#include <math.h>
|
||||
#include <complex.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "cmdmain.h"
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327
|
||||
|
|
Loading…
Reference in a new issue