Lệnh này sẽ làm gọn file mã nguồn C.
gcc -fpreprocessed -dD -E -P <file>
Ví dụ đây là 10 dòng đầu của file config.def.h
của dwm.
/* See LICENSE file for copyright and license details. */
/* Helper macros for spawning commands */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
#define CMD(...) { .v = (const char*[]){ __VA_ARGS__, NULL } }
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
Kết quả thu được sau khi dùng lệnh trên:
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
#define CMD(...) { .v = (const char*[]){ __VA_ARGS__, NULL } }
static const unsigned int borderpx = 1;
static const unsigned int snap = 32;
static const int swallowfloating = 0;