.indent.pro 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. //GNU (default) style:
  2. //
  3. //-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
  4. //-ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -nprs -psl -saf -sai
  5. //-saw -nsc -nsob
  6. //
  7. // -------
  8. // int foo;
  9. // char *bar;
  10. // bar = strdup ("whe-e-e");
  11. // -------
  12. // int foo;
  13. // char *bar;
  14. //
  15. // bar = strdup ("whe-e-e");
  16. // -------
  17. // Broken in indent-2.2.10
  18. --blank-lines-after-declarations
  19. //--no-blank-lines-after-declarations
  20. //
  21. // -------
  22. // int foo (...) {
  23. // ...
  24. // }
  25. // void bar (...) {
  26. // ...
  27. // }
  28. // -------
  29. // int foo (...) {
  30. // ...
  31. // }
  32. //
  33. // void bar (...) {
  34. // ...
  35. // }
  36. // -------
  37. --blank-lines-after-procedures
  38. //
  39. // -------
  40. // /*
  41. // blah
  42. // */
  43. // -------
  44. // /*
  45. // * blah
  46. // */
  47. // -------
  48. // WARNING: tends to turn commented-out code chunks into star-walled comment blocks
  49. --start-left-side-of-comments
  50. //
  51. // -------
  52. // if (foo) { bar }
  53. // -------
  54. // if (foo)
  55. // {
  56. // bar
  57. // }
  58. // -------
  59. --braces-after-if-line
  60. //
  61. // -------
  62. // if (foo)
  63. // {
  64. // bar
  65. // } else {
  66. // baz
  67. // }
  68. // -------
  69. // if (foo)
  70. // {
  71. // bar
  72. // }
  73. // else
  74. // {
  75. // baz
  76. // }
  77. // -------
  78. --dont-cuddle-else
  79. //
  80. // -------
  81. // do
  82. // {
  83. // foo
  84. // }
  85. // while (bar)
  86. // -------
  87. // do
  88. // {
  89. // foo
  90. // } while (bar)
  91. // -------
  92. --dont-cuddle-do-while
  93. //
  94. // -------
  95. // switch (foo)
  96. // {
  97. // case bar:
  98. // baz
  99. // }
  100. // -------
  101. // switch (foo)
  102. // {
  103. // case bar:
  104. // baz
  105. // }
  106. // -------
  107. --case-indentation0
  108. //
  109. // -------
  110. // switch (foo)
  111. // {
  112. // case bar:
  113. // {
  114. // baz
  115. // }
  116. // }
  117. // -------
  118. // switch (foo)
  119. // {
  120. // case bar:
  121. // {
  122. // baz
  123. // }
  124. // }
  125. // -------
  126. // Yes, it looks wrong. However, braces inside cases should not be used like this anyway.
  127. --case-brace-indentation0
  128. //
  129. // -------
  130. // for (i = 0; foobar(i); i++);
  131. // -------
  132. // for (i = 0; foobar(i); i++) ;
  133. // -------
  134. --space-special-semicolon
  135. //
  136. // -------
  137. // foo(bar)
  138. // -------
  139. // foo (bar)
  140. // -------
  141. --space-after-procedure-calls
  142. //
  143. // -------
  144. // (int *)foo;
  145. // (my_custom_type_that_was_not_passed_with_T_argument_see_below *)bar;
  146. // -------
  147. // (int *) foo;
  148. // (my_custom_type_that_was_not_passed_with_T_argument_see_below *)bar;
  149. // -------
  150. --space-after-cast
  151. //
  152. // -------
  153. // sizeof(foobar)
  154. // -------
  155. // sizeof (foobar)
  156. // -------
  157. -bs
  158. //
  159. // -------
  160. // for(foo;bar;baz)
  161. // -------
  162. // for (foo;bar;baz)
  163. // -------
  164. --space-after-for
  165. //
  166. // -------
  167. // if(foo)
  168. // -------
  169. // if (foo)
  170. // -------
  171. --space-after-if
  172. //
  173. // -------
  174. // while(foo)
  175. // -------
  176. // while (foo)
  177. // -------
  178. --space-after-while
  179. //
  180. // -------
  181. // if ( foo ( a > b ) | ( bar ( baz ) ) )
  182. // -------
  183. // if (foo (a > b) | (bar (baz)))
  184. // -------
  185. --no-space-after-parentheses
  186. //
  187. // -------
  188. // int a;
  189. // char b;
  190. // -------
  191. // int a;
  192. // char b;
  193. // -------
  194. --declaration-indentation0
  195. //
  196. // -------
  197. // int a,
  198. // b,
  199. // c;
  200. // -------
  201. // int a, b, c;
  202. // -------
  203. --no-blank-lines-after-commas
  204. //
  205. // -------
  206. // int foo (int bar, char *baz, long wheee, intptr_t zool);
  207. // -------
  208. // int foo (
  209. // int bar,
  210. // char *baz,
  211. // long wheee,
  212. // intptr_t zool);
  213. // -------
  214. --break-function-decl-args
  215. //
  216. // -------
  217. // int foo (
  218. // int bar,
  219. // char *baz,
  220. // long wheee,
  221. // intptr_t zool
  222. // );
  223. // -------
  224. // int foo (
  225. // int bar,
  226. // char *baz,
  227. // long wheee,
  228. // intptr_t zool);
  229. // -------
  230. --dont-break-function-decl-args-end
  231. //
  232. // -------
  233. // int foo (bar);
  234. // -------
  235. // int
  236. // foo (bar);
  237. // -------
  238. --procnames-start-lines
  239. //
  240. // -------
  241. // struct foo { int a; };
  242. // -------
  243. // struct foo
  244. // {
  245. // int a;
  246. // };
  247. // -------
  248. --braces-after-struct-decl-line
  249. //
  250. // -------
  251. // int foo (bar) {
  252. // baz
  253. // }
  254. // -------
  255. // int foo (bar)
  256. // {
  257. // baz
  258. // }
  259. // -------
  260. --braces-after-func-def-line
  261. //
  262. // -------
  263. // if (foo)
  264. // {
  265. // while (bar)
  266. // {
  267. // baz;
  268. // }
  269. // }
  270. // -------
  271. // if (foo)
  272. // {
  273. // while (bar)
  274. // {
  275. // baz;
  276. // }
  277. // }
  278. // -------
  279. --indent-level2
  280. //
  281. // -------
  282. // if (foo)
  283. // {
  284. // bar;
  285. // }
  286. // -------
  287. // if (foo)
  288. // {
  289. // bar;
  290. // }
  291. // -------
  292. --brace-indent0
  293. //
  294. // -------
  295. // boom = foo (bar) - baz +
  296. // whee (zool);
  297. // rules = power (mono, mwahahahahahahahaahahahahahahahahahahhahahahahaha,
  298. // stereo);
  299. // -------
  300. // boom = foo (bar) - baz +
  301. // whee (zool);
  302. // rules = power (mono, mwahahahahahahahaahahahahahahahahahahhahahahahaha,
  303. // stereo);
  304. // -------
  305. --continuation-indentation4
  306. //
  307. // -------
  308. // rules = power (mono, mwahahahahahahahaahahahahahahahahahahhahahahahaha,
  309. // stereo);
  310. // -------
  311. // rules = power (mono, mwahahahahahahahaahahahahahahahahahahhahahahahaha,
  312. // stereo);
  313. // -------
  314. --continue-at-parentheses
  315. //--dont-line-up-parentheses
  316. //
  317. // -------
  318. // while ((((i < 2 &&
  319. // k > 0) || p == 0) &&
  320. // q == 1) ||
  321. // n = 0)
  322. // -------
  323. // while ((((i < 2 &&
  324. // k > 0) || p == 0) &&
  325. // q == 1) ||
  326. // n = 0)
  327. // -------
  328. --paren-indentation2
  329. //
  330. // -------
  331. // char *
  332. // create_world (x, y, scale)
  333. // int x;
  334. // int y;
  335. // float scale;
  336. // {
  337. // ...
  338. // }
  339. // -------
  340. // char *
  341. // create_world (x, y, scale)
  342. // int x;
  343. // int y;
  344. // float scale;
  345. // {
  346. // ...
  347. // }
  348. // -------
  349. --parameter-indentation2
  350. //
  351. // -------
  352. // if (longlonglonglonglonglonglong
  353. // <tab character>short)
  354. // -------
  355. // if (longlonglonglonglonglonglong
  356. // short)
  357. // -------
  358. --no-tabs
  359. //
  360. // -------
  361. // #if WINDOWS
  362. // #if ZOOL
  363. // #define WHEE GNUNET_NO
  364. // #else
  365. // #define WHEE GNUNET_YES
  366. // #endif
  367. // #endif
  368. // -------
  369. // #if WINDOWS
  370. // # if ZOOL
  371. // # define WHEE GNUNET_NO
  372. // # else
  373. // # define WHEE GNUNET_YES
  374. // # endif
  375. // #endif
  376. // -------
  377. --preprocessor-indentation0
  378. //
  379. // -------
  380. // int foo (bar)
  381. // {
  382. // if (c)
  383. // goto end;
  384. // if (a > 0)
  385. // {
  386. // begin:
  387. // a = 0;
  388. // if (b != 0)
  389. // goto begin;
  390. // }
  391. // end:
  392. // return 0;
  393. // }
  394. // -------
  395. // int foo (bar)
  396. // {
  397. // if (c)
  398. // goto end;
  399. // if (a > 0)
  400. // {
  401. // begin:
  402. // a = 0;
  403. // if (b != 0)
  404. // goto begin;
  405. // }
  406. // end:
  407. // return 0;
  408. // }
  409. // -------
  410. --indent-label0
  411. //
  412. // -------
  413. // line-longer-than-80-chars /* some comment, not counted */
  414. // -------
  415. // 80-chars-long-line /* some comment, not counted */
  416. // rest-of-the-line
  417. // -------
  418. --line-length80
  419. //
  420. // -------
  421. // /* comment-line-longer-than-80-chars */
  422. // -------
  423. // /* 80-chars-long-comment-line
  424. // rest-of-the-line */
  425. // -------
  426. --comment-line-length80
  427. //
  428. // -------
  429. // if (mask
  430. // && ((mask[0] == '\0')
  431. // || (mask[1] == '\0'
  432. // && ((mask[0] == '0') || (mask[0] == '*')))))
  433. // -------
  434. // if (mask &&
  435. // ((mask[0] == '\0') ||
  436. // (mask[1] == '\0' &&
  437. // ((mask[0] == '0') || (mask[0] == '*')))))
  438. // -------
  439. --break-after-boolean-operator
  440. //
  441. // -------
  442. // if (mask
  443. // && ((mask[0] == '\0')
  444. // || (mask[1] == '\0' && ((mask[0] == '0') || (mask[0] == '*')))))
  445. // -------
  446. // if (mask /* this newline is preserved, override it with --ignore-newlines */
  447. // && ((mask[0] == '\0')
  448. // || (mask[1] == '\0' &&
  449. // ((mask[0] == '0') || (mask[0] == '*')))))
  450. // -------
  451. // For now just keep ignoring. After everything settles down, we might want to start putting custom newlines where it is appropriate
  452. --honour-newlines
  453. //--ignore-newlines
  454. //
  455. //
  456. //
  457. // Also add a list of typedefed types here, like this:
  458. // -T <typedefedtype1>
  459. // -T <typedefedtype2>
  460. // for this:
  461. // typedef int typedefedtype1;
  462. // typedef char *typedefedtype2;
  463. // The following is obtained by running a Python script i wrote on src subdir:
  464. -T GNUNET_MysqlDataProcessor
  465. -T GNUNET_DHT_MessageReceivedHandler
  466. -T DHTLOG_MESSAGE_TYPES
  467. -T GNUNET_MysqlDataProcessor
  468. -T GNUNET_DV_MessageReceivedHandler
  469. -T p2p_dv_MESSAGE_NeighborInfo
  470. -T p2p_dv_MESSAGE_Data
  471. -T p2p_dv_MESSAGE_Disconnect
  472. -T GNUNET_FS_QueueStart
  473. -T GNUNET_FS_QueueStop
  474. -T SuspendSignalFunction
  475. -T GNUNET_FS_TEST_UriContinuation
  476. -T GNUNET_FS_TreeBlockProcessor
  477. -T GNUNET_FS_TreeProgressCallback
  478. -T GSF_ConnectedPeerIterator
  479. -T GSF_GetMessageCallback
  480. -T GSF_PeerReserveCallback
  481. -T GSF_PendingRequestReplyHandler
  482. -T GSF_PendingRequestIterator
  483. -T GSF_LocalLookupContinuation
  484. -T GNUNET_ARM_Callback
  485. -T GNUNET_TRANSPORT_ATS_AllocationNotification
  486. -T GNUNET_ATS_AddressSuggestionCallback
  487. -T GNUNET_BLOCK_GetKeyFunction
  488. -T GNUNET_CHAT_JoinCallback
  489. -T GNUNET_CHAT_MessageCallback
  490. -T GNUNET_CHAT_MemberListCallback
  491. -T GNUNET_CHAT_MessageConfirmation
  492. -T GNUNET_CHAT_RoomIterator
  493. -T GNUNET_CLIENT_MessageHandler
  494. -T GNUNET_CLIENT_ShutdownTask
  495. -T GNUNET_FileNameCallback
  496. -T GNUNET_CONFIGURATION_Iterator
  497. -T GNUNET_CONFIGURATION_Section_Iterator
  498. -T GNUNET_CONNECTION_AccessCheck
  499. -T GNUNET_CONNECTION_Receiver
  500. -T GNUNET_CONNECTION_TransmitReadyNotify
  501. -T GNUNET_HashCodeIterator
  502. -T GNUNET_CONTAINER_HashMapIterator
  503. -T GNUNET_CONTAINER_HeapCostType
  504. -T GNUNET_CONTAINER_HeapIterator
  505. -T GNUNET_CORE_ConnectEventHandler
  506. -T GNUNET_CORE_PeerStatusEventHandler
  507. -T GNUNET_CORE_DisconnectEventHandler
  508. -T GNUNET_CORE_MessageCallback
  509. -T GNUNET_CORE_StartupCallback
  510. -T GNUNET_CORE_ControlContinuation
  511. -T GNUNET_CORE_PeerConfigurationInfoCallback
  512. -T GNUNET_CRYPTO_HashCompletedCallback
  513. -T GNUNET_DATACACHE_Iterator
  514. -T GNUNET_DATACACHE_DeleteNotifyCallback
  515. -T DiskUtilizationChange
  516. -T PluginDatumProcessor
  517. -T PluginGetRandom
  518. -T GNUNET_DATASTORE_ContinuationWithStatus
  519. -T GNUNET_DATASTORE_DatumProcessor
  520. -T GNUNET_DHT_GetIterator
  521. -T GNUNET_DHT_FindPeerProcessor
  522. -T GNUNET_DHT_ReplyProcessor
  523. -T GNUNET_DISK_DirectoryIteratorCallback
  524. -T GNUNET_FRAGMENT_MessageProcessor
  525. -T GNUNET_DEFRAGMENT_AckProcessor
  526. -T GNUNET_FS_KeywordIterator
  527. -T GNUNET_FS_ProgressCallback
  528. -T GNUNET_FS_FileInformationProcessor
  529. -T GNUNET_FS_DataReader
  530. -T GNUNET_FS_FileProcessor
  531. -T GNUNET_FS_DirectoryScanner
  532. -T GNUNET_FS_PublishContinuation
  533. -T GNUNET_FS_IndexedFileProcessor
  534. -T GNUNET_FS_NamespaceInfoProcessor
  535. -T GNUNET_FS_IdentifierProcessor
  536. -T GNUNET_FS_DirectoryEntryProcessor
  537. -T GNUNET_HELLO_GenerateAddressListCallback
  538. -T GNUNET_HELLO_AddressIterator
  539. -T GNUNET_MESH_MessageCallback
  540. -T GNUNET_MESH_TunnelEndHandler
  541. -T GNUNET_MESH_ApplicationType
  542. -T GNUNET_MESH_TunnelDisconnectHandler
  543. -T GNUNET_MESH_TunnelConnectHandler
  544. -T GNUNET_MESH_MessageCallback
  545. -T GNUNET_MESH_TunnelEndHandler
  546. -T GNUNET_MESH_ApplicationType
  547. -T GNUNET_MESH_TunnelDisconnectHandler
  548. -T GNUNET_MESH_TunnelConnectHandler
  549. -T GNUNET_NAT_AddressCallback
  550. -T GNUNET_NAT_ReversalCallback
  551. -T GNUNET_NAT_TestCallback
  552. -T GNUNET_NSE_Callback
  553. -T GNUNET_OS_NetworkInterfaceProcessor
  554. -T GNUNET_OS_LineProcessor
  555. -T GNUNET_PEERINFO_Processor
  556. -T GNUNET_PEER_Id
  557. -T GNUNET_PLUGIN_Callback
  558. -T GNUNET_PROGRAM_Main
  559. -T GNUNET_PSEUDONYM_Iterator
  560. -T GNUNET_RESOLVER_AddressCallback
  561. -T GNUNET_RESOLVER_HostnameCallback
  562. -T GNUNET_SCHEDULER_TaskIdentifier
  563. -T GNUNET_SCHEDULER_Task
  564. -T GNUNET_SCHEDULER_select
  565. -T GNUNET_SERVER_MessageCallback
  566. -T GNUNET_SERVER_DisconnectCallback
  567. -T GNUNET_SERVER_MessageTokenizerCallback
  568. -T GNUNET_SERVICE_Main
  569. -T GNUNET_SIGNAL_Handler
  570. -T GNUNET_STATISTICS_Iterator
  571. -T GNUNET_STATISTICS_Callback
  572. -T GNUNET_TESTING_NotifyHostkeyCreated
  573. -T GNUNET_TESTING_NotifyDaemonRunning
  574. -T GNUNET_TESTING_NotifyCompletion
  575. -T GNUNET_TESTING_NotifyConnections
  576. -T GNUNET_TESTING_NotifyConnection
  577. -T GNUNET_TESTING_NotifyTopology
  578. -T GNUNET_TESTING_STATISTICS_Iterator
  579. -T GNUNET_TRANSPORT_SessionEnd
  580. -T GNUNET_TRANSPORT_AddressNotification
  581. -T GNUNET_TRANSPORT_TransmitContinuation
  582. -T GNUNET_TRANSPORT_TransmitFunction
  583. -T GNUNET_TRANSPORT_DisconnectFunction
  584. -T GNUNET_TRANSPORT_AddressStringCallback
  585. -T GNUNET_TRANSPORT_AddressPrettyPrinter
  586. -T GNUNET_TRANSPORT_CheckAddress
  587. -T GNUNET_TRANSPORT_AddressToString
  588. -T GNUNET_TRANSPORT_ReceiveCallback
  589. -T GNUNET_TRANSPORT_NotifyConnect
  590. -T GNUNET_TRANSPORT_NotifyDisconnect
  591. -T GNUNET_TRANSPORT_AddressLookUpCallback
  592. -T GNUNET_TRANSPORT_HelloUpdateCallback
  593. -T GNUNET_TRANSPORT_BlacklistCallback
  594. -T sa_family_t
  595. -T SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
  596. -T PLIBC_SEARCH__compar_fn_t
  597. -T _win_comparison_fn_t
  598. -T PLIBC_SEARCH_ACTION
  599. -T PLIBC_SEARCH_VISIT
  600. -T PLIBC_SEARCH__action_fn_t
  601. -T PLIBC_SEARCH__free_fn_t
  602. -T MESH_TunnelNumber
  603. -T TransmissionContinuation
  604. -T GNUNET_TESTING_ConnectionProcessor
  605. -T SetupContinuation
  606. -T glp_prob
  607. -T glp_iocp
  608. -T glp_smcp
  609. -T GNUNET_TRANSPORT_ATS_AddressNotification
  610. -T GNUNET_TRANSPORT_ATS_ResultCallback
  611. -T GST_BlacklistTestContinuation
  612. -T GST_HelloCallback
  613. -T GST_NeighbourSendContinuation
  614. -T GST_NeighbourIterator
  615. -T GST_ValidationAddressCallback
  616. -T u32
  617. -T u16
  618. -T u8
  619. -T __le32
  620. -T EmailAddress
  621. -T SMTPMessage
  622. -T GNUNET_TRANSPORT_TESTING_connect_cb
  623. -T ieee80211_mgt_beacon_t
  624. -T ieee80211_mgt_auth_t
  625. -T u64
  626. -T u32
  627. -T u16
  628. -T u8
  629. -T uLong
  630. -T uLong
  631. -T KBlock_secret_key
  632. -T MyNSGetExecutablePathProto