I m trying to use uncrustify on a large inherited C++ codebase and I can t figure out how to get it to indent the following code segment like the example here.
BEGIN_MSG_MAP(CMyDlg)
MESSAGE_HANDLER(WM_TIMER, OnTimer)
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
COMMAND_HANDLER(IDC_TABLE_BTN_ONE, BN_CLICKED, OnBnClickedBtnOne)
COMMAND_HANDLER(IDC_TABLE_BTN_TWO, BN_CLICKED, OnBnClickedBtnTwo)
CHAIN_MSG_MAP( CDlgBase )
END_MSG_MAP()
I ve tried using the UniversalIndentGUI to generate my config file and then added the following two lines, but I must have something wrong.
macro-open BEGIN_MSG_MAP
macro-close END_MSG_MAP
Or should I be using Astyle instead of uncrustify?
Update: It works fine. I mistakenly typed "BEGIN_MESSAGE_MAP" which is a misspelling. I ll leave the question here, though, for others.