mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 15:26:13 +08:00
make style: don't indent preprocessor directives
This commit is contained in:
parent
c4920d7179
commit
a7448f802f
2
Makefile
2
Makefile
|
@ -136,7 +136,7 @@ style:
|
||||||
-exec sh -c "echo >> {}" \;
|
-exec sh -c "echo >> {}" \;
|
||||||
# Apply astyle on *.c, *.h, *.cpp
|
# Apply astyle on *.c, *.h, *.cpp
|
||||||
find . \( -name "*.[ch]" -or -name "*.cpp" \) -exec astyle --formatted --mode=c --suffix=none \
|
find . \( -name "*.[ch]" -or -name "*.cpp" \) -exec astyle --formatted --mode=c --suffix=none \
|
||||||
--indent=spaces=4 --indent-switches --indent-preprocessor \
|
--indent=spaces=4 --indent-switches \
|
||||||
--keep-one-line-blocks --max-instatement-indent=60 \
|
--keep-one-line-blocks --max-instatement-indent=60 \
|
||||||
--style=google --pad-oper --unpad-paren --pad-header \
|
--style=google --pad-oper --unpad-paren --pad-header \
|
||||||
--align-pointer=name {} \;
|
--align-pointer=name {} \;
|
||||||
|
|
|
@ -614,13 +614,13 @@ failtag:
|
||||||
for (uint16_t s = 0; s < sectorsCnt; s++) {
|
for (uint16_t s = 0; s < sectorsCnt; s++) {
|
||||||
num_to_bytes(key64, 6, foundKey[i][s]);
|
num_to_bytes(key64, 6, foundKey[i][s]);
|
||||||
sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x",
|
sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x",
|
||||||
foundKey[i][s][0],
|
foundKey[i][s][0],
|
||||||
foundKey[i][s][1],
|
foundKey[i][s][1],
|
||||||
foundKey[i][s][2],
|
foundKey[i][s][2],
|
||||||
foundKey[i][s][3],
|
foundKey[i][s][3],
|
||||||
foundKey[i][s][4],
|
foundKey[i][s][4],
|
||||||
foundKey[i][s][5]
|
foundKey[i][s][5]
|
||||||
);
|
);
|
||||||
cjSetCursRight();
|
cjSetCursRight();
|
||||||
DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, i);
|
DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, i);
|
||||||
}
|
}
|
||||||
|
@ -653,26 +653,26 @@ failtag:
|
||||||
for (uint16_t s = 0; s < sectorsCnt; s++) {
|
for (uint16_t s = 0; s < sectorsCnt; s++) {
|
||||||
num_to_bytes(0x414c41524f4e, 6, foundKey[t][s]);
|
num_to_bytes(0x414c41524f4e, 6, foundKey[t][s]);
|
||||||
sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x",
|
sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x",
|
||||||
foundKey[t][s][0],
|
foundKey[t][s][0],
|
||||||
foundKey[t][s][1],
|
foundKey[t][s][1],
|
||||||
foundKey[t][s][2],
|
foundKey[t][s][2],
|
||||||
foundKey[t][s][3],
|
foundKey[t][s][3],
|
||||||
foundKey[t][s][4],
|
foundKey[t][s][4],
|
||||||
foundKey[t][s][5]);
|
foundKey[t][s][5]);
|
||||||
cjSetCursRight();
|
cjSetCursRight();
|
||||||
DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, t);
|
DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
t = 1;
|
t = 1;
|
||||||
for (uint16_t s = 0; s < sectorsCnt; s++) {
|
for (uint16_t s = 0; s < sectorsCnt; s++) {
|
||||||
num_to_bytes(0x424c41524f4e, 6, foundKey[t][s]);
|
num_to_bytes(0x424c41524f4e, 6, foundKey[t][s]);
|
||||||
sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x",
|
sprintf(tosendkey, "%02x%02x%02x%02x%02x%02x",
|
||||||
foundKey[t][s][0],
|
foundKey[t][s][0],
|
||||||
foundKey[t][s][1],
|
foundKey[t][s][1],
|
||||||
foundKey[t][s][2],
|
foundKey[t][s][2],
|
||||||
foundKey[t][s][3],
|
foundKey[t][s][3],
|
||||||
foundKey[t][s][4],
|
foundKey[t][s][4],
|
||||||
foundKey[t][s][5]);
|
foundKey[t][s][5]);
|
||||||
cjSetCursRight();
|
cjSetCursRight();
|
||||||
DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, t);
|
DbprintfEx(FLAG_NOLOG, "SEC: %02x ; KEY : %s ; TYP: %d", s, tosendkey, t);
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,15 +268,15 @@ int CmdIndalaDemod(const char *Cmd) {
|
||||||
PrintAndLogEx(
|
PrintAndLogEx(
|
||||||
SUCCESS
|
SUCCESS
|
||||||
, "Indala Found - bitlength %d, Raw 0x%x%08x%08x%08x%08x%08x%08x"
|
, "Indala Found - bitlength %d, Raw 0x%x%08x%08x%08x%08x%08x%08x"
|
||||||
, DemodBufferLen
|
, DemodBufferLen
|
||||||
, uid1
|
, uid1
|
||||||
, uid2
|
, uid2
|
||||||
, uid3
|
, uid3
|
||||||
, uid4
|
, uid4
|
||||||
, uid5
|
, uid5
|
||||||
, uid6
|
, uid6
|
||||||
, uid7
|
, uid7
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_debugMode) {
|
if (g_debugMode) {
|
||||||
|
|
18
common/crc.h
18
common/crc.h
|
@ -64,14 +64,14 @@ uint32_t CRC8Legic(uint8_t *buff, size_t size);
|
||||||
|
|
||||||
/* Static initialization of a crc structure */
|
/* Static initialization of a crc structure */
|
||||||
#define CRC_INITIALIZER(_order, _polynom, _initial_value, _final_xor) { \
|
#define CRC_INITIALIZER(_order, _polynom, _initial_value, _final_xor) { \
|
||||||
.state = ((_initial_value) & ((1L<<(_order))-1)), \
|
.state = ((_initial_value) & ((1L<<(_order))-1)), \
|
||||||
.order = (_order), \
|
.order = (_order), \
|
||||||
.polynom = (_polynom), \
|
.polynom = (_polynom), \
|
||||||
.initial_value = (_initial_value), \
|
.initial_value = (_initial_value), \
|
||||||
.final_xor = (_final_xor), \
|
.final_xor = (_final_xor), \
|
||||||
.mask = ((1L<<(_order))-1) \
|
.mask = ((1L<<(_order))-1) \
|
||||||
.refin = false, \
|
.refin = false, \
|
||||||
.refout = false \
|
.refout = false \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __CRC_H */
|
#endif /* __CRC_H */
|
||||||
|
|
Loading…
Reference in a new issue