Skip to content
Snippets Groups Projects
Commit 859cba4f authored by Andrew Cooks's avatar Andrew Cooks
Browse files

add cleanup step to remove redundant TRACE macros

Remove redundant TN40_FTRACE, FTRACE, FTRACE_ON and FTRACE_OFF macros.

(cherry picked from commit 68c5bf29)
parent 49c0bf4a
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,21 @@ sed -i 's|\(#define DBG1.*\)||g' tn40.h
sed -i 's|^\treturn;.*||g' *.c
# remove unused FTRACE_ON and FTRACE_OFF macros
sed -i 's|#define FTRACE_ON$||g' *.c *.h
sed -i 's|#define FTRACE_OFF$||g' *.c *.h
# For these multi-line matches, it's much simpler to use perl...
# remove empty TN40_FTRACE block
perl -0777 -i -pe 's|#if defined\(TN40_FTRACE\)\s*\n*\s*#endif||g' *.c *.h
# remove empty FTRACE block
perl -0777 -i -pe 's|#if defined\(FTRACE\)\s*\n*\s*#endif||g' *.c *.h
# remove empty FTRACE with empty else block
perl -0777 -i -pe 's|#if defined\(FTRACE\)\s*\n*\s*#else\s*\n*\s*#endif||g' *.c *.h
# finally, remove the unused FTRACE definition
sed -i 's|#define FTRACE||g' *.c *.h
# remove the comment
sed -i 's|/\*\s*F T R A C E\s*\*/||g' *.c *.h
# Insert new cleanup steps above this comment.
# Keep Lindent as the last step.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment