{"action":"closed","issue":{"url":"https://api.github.com/repos/bengardner/uncrustify/issues/414","repository_url":"https://api.github.com/repos/bengardner/uncrustify","labels_url":"https://api.github.com/repos/bengardner/uncrustify/issues/414/labels{/name}","comments_url":"https://api.github.com/repos/bengardner/uncrustify/issues/414/comments","events_url":"https://api.github.com/repos/bengardner/uncrustify/issues/414/events","html_url":"https://github.com/bengardner/uncrustify/issues/414","id":123747923,"number":414,"title":"The actual global spacing options must not to be applicated to the preprocessor","user":{"login":"addonszz","id":13953373,"avatar_url":"https://avatars.githubusercontent.com/u/13953373?v=3","gravatar_id":"","url":"https://api.github.com/users/addonszz","html_url":"https://github.com/addonszz","followers_url":"https://api.github.com/users/addonszz/followers","following_url":"https://api.github.com/users/addonszz/following{/other_user}","gists_url":"https://api.github.com/users/addonszz/gists{/gist_id}","starred_url":"https://api.github.com/users/addonszz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addonszz/subscriptions","organizations_url":"https://api.github.com/users/addonszz/orgs","repos_url":"https://api.github.com/users/addonszz/repos","events_url":"https://api.github.com/users/addonszz/events{/privacy}","received_events_url":"https://api.github.com/users/addonszz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-24T02:20:55Z","updated_at":"2016-02-10T19:23:21Z","closed_at":"2016-02-10T19:23:21Z","body":"\r\n[debug.txt](https://github.com/bengardner/uncrustify/files/71412/debug.txt)\r\n\r\n#### Adding bad extra spaces at the preprocessor #define ( % 1, % 2 ) at Amx Mod X Pawn\r\n\r\nYes, the spacing is active and are working fine. Example:\r\n```pawn\r\n        new buffer[ 32 ];\r\n        \r\n        while( !feof( file ) )\r\n        {\r\n            fgets( file, buffer, sizeof( buffer ) - 1 );\r\n            trim( buffer );\r\n            \r\n            if( buffer[ 0 ] )\r\n            {\r\n                if( g_cntRecentMap == get_pcvar_num( cvar_banRecent ) )\r\n                {\r\n                    break;\r\n                }\r\n                copy( g_recentMap[ g_cntRecentMap++ ], sizeof( buffer ) - 1, buffer );\r\n            }\r\n        }\r\n        fclose( file );\r\n```\r\nBut they must not to be present a the Amx Mod X preprocessor macro functions prototype, neither between the number 1 at the % symbol or at the comma \",\" and the number 1, because the compiler do not recognize them. \r\n\r\nAt the below example, is how it is needed to be acceptable:  \r\n```pawn\r\n#define SetTeleType(%1,%2) set_pev( %1, pev_iuser1, %2 )\r\n#define SetTeleMate(%1,%2) set_pev( %1, pev_iuser2, %2 )\r\n```\r\nInstead of this below, which is not recognizable by the compiler preprocessor: \r\n```pawn\r\n#define SetTeleType( % 1, % 2 ) set_pev( % 1, pev_iuser1, % 2 )\r\n#define SetTeleMate( % 1, % 2 ) set_pev( % 1, pev_iuser2, % 2 )\r\n```\r\n\r\nHowever, is correct to put a space between the % and 1, ( and \" \", etc... Because is how it is configured as the global spacing options, but it must not happen at the preprocessor directives. \r\n\r\nHence at first, is needing to deactivate the preprocessor processing to keep current formatting options to the rest of the file. This could be done, using the same strategy as the commentaries:\r\n```java\r\n# If false, disable all multi-line comment changes, including cmt_width. keyword \r\n# substitution, and leading chars.\r\n# Default is true.\r\ncmt_indent_multi                          = false     # false/true\r\n```\r\n\r\nLater on for completeness, could be created preprocessor specific space options, instead of just the actual global spacing options that are not applicable to the preprocessor. "}}