mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
Merge pull request #2377 from kcwu/fix-custom-format
fix in_define in .custom-format.py
This commit is contained in:
@ -86,9 +86,10 @@ def custom_format(filename):
|
|||||||
out = ""
|
out = ""
|
||||||
|
|
||||||
for line in src.split("\n"):
|
for line in src.split("\n"):
|
||||||
|
define_start = False
|
||||||
if line.lstrip().startswith("#"):
|
if line.lstrip().startswith("#"):
|
||||||
if line[line.find("#") + 1:].lstrip().startswith("define"):
|
if line[line.find("#") + 1:].lstrip().startswith("define"):
|
||||||
in_define = True
|
define_start = True
|
||||||
|
|
||||||
if (
|
if (
|
||||||
"/*" in line
|
"/*" in line
|
||||||
@ -126,9 +127,7 @@ def custom_format(filename):
|
|||||||
and last_line.strip() != ""
|
and last_line.strip() != ""
|
||||||
):
|
):
|
||||||
line = (" " * define_padding + "\\" if in_define else "") + "\n" + line
|
line = (" " * define_padding + "\\" if in_define else "") + "\n" + line
|
||||||
|
in_define = (define_start or in_define) and line.endswith("\\")
|
||||||
if not line.endswith("\\"):
|
|
||||||
in_define = False
|
|
||||||
|
|
||||||
out += line + "\n"
|
out += line + "\n"
|
||||||
last_line = line
|
last_line = line
|
||||||
|
@ -3169,7 +3169,7 @@ static xxh_u32 XXH32_avalanche(xxh_u32 hash) {
|
|||||||
*/
|
*/
|
||||||
static XXH_PUREF xxh_u32 XXH32_finalize(xxh_u32 hash, const xxh_u8 *ptr,
|
static XXH_PUREF xxh_u32 XXH32_finalize(xxh_u32 hash, const xxh_u8 *ptr,
|
||||||
size_t len, XXH_alignment align) {
|
size_t len, XXH_alignment align) {
|
||||||
\
|
|
||||||
#define XXH_PROCESS1 \
|
#define XXH_PROCESS1 \
|
||||||
do { \
|
do { \
|
||||||
\
|
\
|
||||||
|
@ -1004,7 +1004,7 @@ inline u64 get_cur_time_us(void) {
|
|||||||
Will return buf for convenience. */
|
Will return buf for convenience. */
|
||||||
|
|
||||||
u8 *stringify_int(u8 *buf, size_t len, u64 val) {
|
u8 *stringify_int(u8 *buf, size_t len, u64 val) {
|
||||||
\
|
|
||||||
#define CHK_FORMAT(_divisor, _limit_mult, _fmt, _cast) \
|
#define CHK_FORMAT(_divisor, _limit_mult, _fmt, _cast) \
|
||||||
do { \
|
do { \
|
||||||
\
|
\
|
||||||
@ -1168,7 +1168,7 @@ u8 *stringify_time_diff(u8 *buf, size_t len, u64 cur_ms, u64 event_ms) {
|
|||||||
Will return buf for convenience. */
|
Will return buf for convenience. */
|
||||||
|
|
||||||
u8 *u_stringify_int(u8 *buf, u64 val) {
|
u8 *u_stringify_int(u8 *buf, u64 val) {
|
||||||
\
|
|
||||||
#define CHK_FORMAT(_divisor, _limit_mult, _fmt, _cast) \
|
#define CHK_FORMAT(_divisor, _limit_mult, _fmt, _cast) \
|
||||||
do { \
|
do { \
|
||||||
\
|
\
|
||||||
|
Reference in New Issue
Block a user