acpc_dealer 2.0.6 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -2
  3. data/lib/acpc_dealer.rb +6 -2
  4. data/lib/acpc_dealer/version.rb +1 -1
  5. data/vendor/project_acpc_server/Makefile +12 -2
  6. data/vendor/project_acpc_server/README +1 -0
  7. data/vendor/project_acpc_server/example_player.limit.2p.sh +2 -1
  8. data/vendor/project_acpc_server/example_player.limit.3p.sh +2 -1
  9. data/vendor/project_acpc_server/example_player.nolimit.2p.sh +2 -1
  10. data/vendor/project_acpc_server/example_player.nolimit.3p.sh +2 -1
  11. data/vendor/project_acpc_server/kuhn.limit.3p.game +14 -0
  12. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player.sf1.sh +3 -0
  13. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player.sf2.sh +3 -0
  14. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player.sf3.sh +3 -0
  15. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/LICENCE +23 -0
  16. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/Makefile +128 -0
  17. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/README.md +35 -0
  18. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/CExceptionConfig.h +12 -0
  19. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/dealer_connection.c +49 -0
  20. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/dealer_connection.h +22 -0
  21. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/kuhn_3p_equilibrium_player.c +483 -0
  22. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/kuhn_3p_equilibrium_player.h +107 -0
  23. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/main.c +84 -0
  24. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/player_config.c +252 -0
  25. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/player_config.h +21 -0
  26. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/support/test_helper.c +45 -0
  27. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/support/test_helper.h +27 -0
  28. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player.c +698 -0
  29. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player_sub_family_1.c +324 -0
  30. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player_sub_family_2.c +262 -0
  31. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player_sub_family_3.c +177 -0
  32. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/CExceptionSummary.odt +0 -0
  33. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/CExceptionSummary.pdf +0 -0
  34. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/license.txt +30 -0
  35. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/readme.txt +242 -0
  36. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/lib/CException.c +43 -0
  37. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/lib/CException.h +86 -0
  38. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/release/build.info +2 -0
  39. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/release/version.info +2 -0
  40. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/config/production_environment.rb +14 -0
  41. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/config/test_environment.rb +16 -0
  42. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/CMock Summary.odt +0 -0
  43. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/CMock Summary.pdf +0 -0
  44. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/CMock_Summary.md +356 -0
  45. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/license.txt +31 -0
  46. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/SAM7_FLASH.mac +71 -0
  47. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/SAM7_RAM.mac +94 -0
  48. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/SAM7_SIM.mac +67 -0
  49. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -0
  50. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -0
  51. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -0
  52. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.dep +3691 -0
  53. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.ewd +1696 -0
  54. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.ewp +2581 -0
  55. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.eww +10 -0
  56. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X-EK.h +61 -0
  57. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -0
  58. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -0
  59. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -0
  60. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2268 -0
  61. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/ioat91sam7x256.h +4380 -0
  62. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -0
  63. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -0
  64. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.dbgdt +86 -0
  65. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.dni +42 -0
  66. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.wsdt +76 -0
  67. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/srcIAR/Cstartup.s79 +266 -0
  68. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/srcIAR/Cstartup_SAM7.c +98 -0
  69. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/SAM7_FLASH.mac +71 -0
  70. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/SAM7_RAM.mac +94 -0
  71. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/SAM7_SIM.mac +67 -0
  72. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -0
  73. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -0
  74. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.dep +4204 -0
  75. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.ewd +1906 -0
  76. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.ewp +2426 -0
  77. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.eww +26 -0
  78. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X-EK.h +61 -0
  79. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2268 -0
  80. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -0
  81. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/project.h +30 -0
  82. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -0
  83. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +5 -0
  84. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dni +18 -0
  85. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +74 -0
  86. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -0
  87. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -0
  88. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.dbgdt +85 -0
  89. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.dni +44 -0
  90. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.wsdt +73 -0
  91. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -0
  92. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -0
  93. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -0
  94. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/srcIAR/Cstartup.s +299 -0
  95. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/srcIAR/Cstartup_SAM7.c +98 -0
  96. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock.rb +65 -0
  97. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_config.rb +129 -0
  98. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_file_writer.rb +33 -0
  99. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator.rb +195 -0
  100. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_array.rb +57 -0
  101. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_callback.rb +78 -0
  102. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +51 -0
  103. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_expect.rb +86 -0
  104. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +95 -0
  105. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +44 -0
  106. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +74 -0
  107. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_utils.rb +202 -0
  108. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_header_parser.rb +277 -0
  109. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_plugin_manager.rb +40 -0
  110. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_unityhelper_parser.rb +75 -0
  111. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/release/build.info +2 -0
  112. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/release/version.info +2 -0
  113. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/src/cmock.c +176 -0
  114. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/src/cmock.h +31 -0
  115. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/src/cmock_internals.h +43 -0
  116. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/targets/gcc.yml +53 -0
  117. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/targets/iar_arm_v4.yml +108 -0
  118. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/targets/iar_arm_v5.yml +93 -0
  119. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/History.md +27 -0
  120. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/Makefile +8 -0
  121. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/Readme.md +103 -0
  122. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/package.json +9 -0
  123. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/src/commander.c +250 -0
  124. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/src/commander.h +88 -0
  125. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/test.c +34 -0
  126. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_prompt.rb +94 -0
  127. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb +39 -0
  128. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/generate_config.yml +36 -0
  129. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/generate_module.rb +202 -0
  130. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/generate_test_runner.rb +316 -0
  131. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/test_file_filter.rb +23 -0
  132. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/unity_test_summary.rb +139 -0
  133. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/Unity Summary.odt +0 -0
  134. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/Unity Summary.pdf +0 -0
  135. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/Unity Summary.txt +216 -0
  136. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/license.txt +31 -0
  137. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/release/build.info +2 -0
  138. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/release/version.info +2 -0
  139. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/src/unity.c +1146 -0
  140. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/src/unity.h +245 -0
  141. data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/src/unity_internals.h +546 -0
  142. data/vendor/project_acpc_server/net.c +0 -0
  143. data/vendor/project_acpc_server/net.h +1 -0
  144. data/vendor/project_acpc_server/tags +298 -0
  145. metadata +158 -26
@@ -0,0 +1,31 @@
1
+ /* ==========================================
2
+ CMock Project - Automatic Mock Generation for C
3
+ Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
4
+ [Released under MIT License. Please refer to license.txt for details]
5
+ ========================================== */
6
+
7
+ #ifndef CMOCK_FRAMEWORK_H
8
+ #define CMOCK_FRAMEWORK_H
9
+
10
+ //should be big enough to index full range of CMOCK_MEM_MAX
11
+ #ifndef CMOCK_MEM_INDEX_TYPE
12
+ #define CMOCK_MEM_INDEX_TYPE unsigned int
13
+ #endif
14
+
15
+ #define CMOCK_GUTS_NONE (0)
16
+
17
+ //-------------------------------------------------------
18
+ // Memory API
19
+ //-------------------------------------------------------
20
+ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNew(CMOCK_MEM_INDEX_TYPE size);
21
+ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemChain(CMOCK_MEM_INDEX_TYPE root_index, CMOCK_MEM_INDEX_TYPE obj_index);
22
+ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNext(CMOCK_MEM_INDEX_TYPE previous_item_index);
23
+ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemEndOfChain(CMOCK_MEM_INDEX_TYPE root_index);
24
+
25
+ void* CMock_Guts_GetAddressFor(CMOCK_MEM_INDEX_TYPE index);
26
+
27
+ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesFree(void);
28
+ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesUsed(void);
29
+ void CMock_Guts_MemFreeAll(void);
30
+
31
+ #endif //CMOCK_FRAMEWORK
@@ -0,0 +1,43 @@
1
+ /* ==========================================
2
+ CMock Project - Automatic Mock Generation for C
3
+ Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
4
+ [Released under MIT License. Please refer to license.txt for details]
5
+ ========================================== */
6
+
7
+ #ifndef CMOCK_FRAMEWORK_INTERNALS_H
8
+ #define CMOCK_FRAMEWORK_INTERNALS_H
9
+
10
+ #include "cmock.h"
11
+
12
+ //define CMOCK_MEM_DYNAMIC to grab memory as needed with malloc
13
+ //when you do that, CMOCK_MEM_SIZE is used for incremental size instead of total
14
+ #ifdef CMOCK_MEM_STATIC
15
+ #undef CMOCK_MEM_DYNAMIC
16
+ #endif
17
+
18
+ #ifdef CMOCK_MEM_DYNAMIC
19
+ #include <stdlib.h>
20
+ #endif
21
+
22
+ //this is used internally during pointer arithmetic. make sure this type is the same size as the target's pointer type
23
+ #ifndef CMOCK_MEM_PTR_AS_INT
24
+ #define CMOCK_MEM_PTR_AS_INT unsigned long
25
+ #endif
26
+
27
+ //0 for no alignment, 1 for 16-bit, 2 for 32-bit, 3 for 64-bit
28
+ #ifndef CMOCK_MEM_ALIGN
29
+ #define CMOCK_MEM_ALIGN (2)
30
+ #endif
31
+
32
+ //amount of memory to allow cmock to use in its internal heap
33
+ #ifndef CMOCK_MEM_SIZE
34
+ #define CMOCK_MEM_SIZE (32768)
35
+ #endif
36
+
37
+ //automatically calculated defs for easier reading
38
+ #define CMOCK_MEM_ALIGN_SIZE (1u << CMOCK_MEM_ALIGN)
39
+ #define CMOCK_MEM_ALIGN_MASK (CMOCK_MEM_ALIGN_SIZE - 1)
40
+ #define CMOCK_MEM_INDEX_SIZE (CMOCK_MEM_PTR_AS_INT)((sizeof(CMOCK_MEM_INDEX_TYPE) > CMOCK_MEM_ALIGN_SIZE) ? sizeof(CMOCK_MEM_INDEX_TYPE) : CMOCK_MEM_ALIGN_SIZE)
41
+
42
+
43
+ #endif //CMOCK_FRAMEWORK_INTERNALS
@@ -0,0 +1,53 @@
1
+ ---
2
+ compiler:
3
+ path: gcc
4
+ source_path: &systest_generated_path 'test/system/generated/'
5
+ unit_tests_path: &unit_tests_path 'examples/test/'
6
+ mocks_path: &systest_mocks_path 'test/system/generated/'
7
+ build_path: &systest_build_path 'test/system/build/'
8
+ options:
9
+ - '-c'
10
+ - '-Wall'
11
+ - '-Wunused-parameter'
12
+ - '-Wno-address'
13
+ - '-std=c99'
14
+ - '-pedantic'
15
+ includes:
16
+ prefix: '-I'
17
+ items:
18
+ - *systest_generated_path
19
+ - *unit_tests_path
20
+ - *systest_mocks_path
21
+ - 'src/'
22
+ - 'vendor/unity/src/'
23
+ - 'vendor/c_exception/lib/'
24
+ - 'test/system/test_compilation/'
25
+ - 'test/'
26
+ defines:
27
+ prefix: '-D'
28
+ items:
29
+ - 'UNITY_SUPPORT_64'
30
+ object_files:
31
+ prefix: '-o'
32
+ extension: '.o'
33
+ destination: *systest_build_path
34
+
35
+ linker:
36
+ path: gcc
37
+ options:
38
+ - -lm
39
+ includes:
40
+ prefix: '-I'
41
+ object_files:
42
+ path: *systest_build_path
43
+ extension: '.o'
44
+ bin_files:
45
+ prefix: '-o'
46
+ extension: '.exe'
47
+ destination: *systest_build_path
48
+
49
+ unsupported:
50
+ - unity_64bit_support
51
+ - callingconv
52
+
53
+ colour: true
@@ -0,0 +1,108 @@
1
+ tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 4.0\'
2
+ compiler:
3
+ path: [*tools_root, 'arm\bin\iccarm.exe']
4
+ source_path: &systest_generated_path 'test/system/generated/'
5
+ unit_tests_path: &unit_tests_path 'examples/test/'
6
+ mocks_path: &systest_mocks_path 'test/system/generated/'
7
+ build_path: &systest_build_path 'test/system/build/'
8
+ options:
9
+ - --dlib_config
10
+ - [*tools_root, 'arm\lib\dl4tptinl8n.h']
11
+ - -z3
12
+ - --no_cse
13
+ - --no_unroll
14
+ - --no_inline
15
+ - --no_code_motion
16
+ - --no_tbaa
17
+ - --no_clustering
18
+ - --no_scheduling
19
+ - --debug
20
+ - --cpu_mode thumb
21
+ - --endian little
22
+ - --cpu ARM7TDMI
23
+ - --stack_align 4
24
+ - --interwork
25
+ - -e
26
+ - --silent
27
+ - --warnings_are_errors
28
+ - --fpu None
29
+ #We are supressing some warnings here because we test CMock against some questionable code to make sure it still works
30
+ - --diag_suppress Pa050
31
+ - --diag_suppress Pe191
32
+ - --diag_suppress=Pe494
33
+ - --diag_suppress=Pe083
34
+ includes:
35
+ prefix: '-I'
36
+ items:
37
+ - [*tools_root, 'arm\inc\']
38
+ - *systest_generated_path
39
+ - *unit_tests_path
40
+ - *systest_mocks_path
41
+ - 'src/'
42
+ - 'vendor/unity/src/'
43
+ - 'vendor/c_exception/lib/'
44
+ - 'test/system/test_compilation/'
45
+ - 'test\'
46
+ defines:
47
+ prefix: '-D'
48
+ items:
49
+ object_files:
50
+ prefix: '-o'
51
+ extension: '.r79'
52
+ destination: *systest_build_path
53
+
54
+ linker:
55
+ path: [*tools_root, 'common\bin\xlink.exe']
56
+ options:
57
+ - -rt
58
+ - [*tools_root, 'arm\lib\dl4tptinl8n.r79']
59
+ - -D_L_EXTMEM_START=0
60
+ - -D_L_EXTMEM_SIZE=0
61
+ - -D_L_HEAP_SIZE=120
62
+ - -D_L_STACK_SIZE=32
63
+ - -e_small_write=_formatted_write
64
+ - -s
65
+ - __program_start
66
+ - '-f iar\iar_v4\Resource\at91SAM7X256_FLASH.xcl'
67
+ includes:
68
+ prefix: '-I'
69
+ items:
70
+ - *systest_generated_path
71
+ - *unit_tests_path
72
+ - *systest_mocks_path
73
+ - 'vendor/unity/src/'
74
+ - [*tools_root, 'arm\config\']
75
+ - [*tools_root, 'arm\lib\']
76
+ object_files:
77
+ path: *systest_build_path
78
+ extension: '.r79'
79
+ bin_files:
80
+ prefix: '-o'
81
+ extension: '.d79'
82
+ destination: *systest_build_path
83
+
84
+ simulator:
85
+ path: [*tools_root, 'common\bin\CSpyBat.exe']
86
+ pre_support:
87
+ - --silent
88
+ - [*tools_root, 'arm\bin\armproc.dll']
89
+ - [*tools_root, 'arm\bin\armsim.dll']
90
+ post_support:
91
+ - --plugin
92
+ - [*tools_root, 'arm\bin\armbat.dll']
93
+ - --macro
94
+ - 'iar\iar_v4\Resource\SAM7_SIM.mac'
95
+ - --backend
96
+ - -B
97
+ - -p
98
+ - [*tools_root, 'arm\config\ioat91sam7X256.ddf']
99
+ - -d
100
+ - sim
101
+
102
+ unsupported:
103
+ - nonstandard_parsed_stuff_1
104
+ - const
105
+ - callingconv
106
+ - unity_64bit_support
107
+
108
+ colour: true
@@ -0,0 +1,93 @@
1
+ tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\'
2
+ compiler:
3
+ path: [*tools_root, 'arm\bin\iccarm.exe']
4
+ source_path: &systest_generated_path 'test/system/generated/'
5
+ unit_tests_path: &unit_tests_path 'examples/test/'
6
+ mocks_path: &systest_mocks_path 'test/system/generated/'
7
+ build_path: &systest_build_path 'test/system/build/'
8
+ options:
9
+ - --dlib_config
10
+ - [*tools_root, 'arm\inc\DLib_Config_Normal.h']
11
+ - --no_cse
12
+ - --no_unroll
13
+ - --no_inline
14
+ - --no_code_motion
15
+ - --no_tbaa
16
+ - --no_clustering
17
+ - --no_scheduling
18
+ - --debug
19
+ - --cpu_mode thumb
20
+ - --endian=little
21
+ - --cpu=ARM7TDMI
22
+ - --interwork
23
+ - --warnings_are_errors
24
+ - --fpu=None
25
+ - -e
26
+ - -On
27
+ #We are supressing some warnings here because we test CMock against some questionable code to make sure it still works
28
+ - --diag_suppress=Pa050
29
+ - --diag_suppress=Pe191
30
+ - --diag_suppress=Pe494
31
+ - --diag_suppress=Pe083
32
+ includes:
33
+ prefix: '-I'
34
+ items:
35
+ - [*tools_root, 'arm\inc\']
36
+ - *systest_generated_path
37
+ - *unit_tests_path
38
+ - *systest_mocks_path
39
+ - 'src/'
40
+ - 'vendor/unity/src/'
41
+ - 'vendor/c_exception/lib/'
42
+ - 'iar\iar_v5\incIAR\'
43
+ - 'test\system\test_compilation\'
44
+ - 'test\'
45
+ defines:
46
+ prefix: '-D'
47
+ items:
48
+ object_files:
49
+ prefix: '-o'
50
+ extension: '.r79'
51
+ destination: *systest_build_path
52
+
53
+ linker:
54
+ path: [*tools_root, 'arm\bin\ilinkarm.exe']
55
+ options:
56
+ - --redirect _Printf=_PrintfLarge
57
+ - --redirect _Scanf=_ScanfSmall
58
+ - --semihosting
59
+ - --entry __iar_program_start
60
+ - --config iar\iar_v5\Resource\at91SAM7X256_RAM.icf
61
+ object_files:
62
+ path: *systest_build_path
63
+ extension: '.o'
64
+ bin_files:
65
+ prefix: '-o'
66
+ extension: '.out'
67
+ destination: *systest_build_path
68
+
69
+ simulator:
70
+ path: [*tools_root, 'common\bin\CSpyBat.exe']
71
+ pre_support:
72
+ - --silent
73
+ - [*tools_root, 'arm\bin\armproc.dll']
74
+ - [*tools_root, 'arm\bin\armsim.dll']
75
+ post_support:
76
+ - --plugin
77
+ - [*tools_root, 'arm\bin\armbat.dll']
78
+ - --macro
79
+ - 'iar\iar_v5\Resource\SAM7_SIM.mac'
80
+ - --backend
81
+ - -B
82
+ - -p
83
+ - [*tools_root, 'arm\config\debugger\Atmel\ioat91sam7X256.ddf']
84
+ - -d
85
+ - sim
86
+
87
+ unsupported:
88
+ - nonstandard_parsed_stuff_1
89
+ - const
90
+ - callingconv
91
+ - unity_64bit_support
92
+
93
+ colour: true
@@ -0,0 +1,27 @@
1
+
2
+ 1.2.1 / 2013-01-08
3
+ ==================
4
+
5
+ * add freeing of normalized argv
6
+ * dont worry about zeroing in command_free()
7
+ * fix docs
8
+
9
+ 1.2.0 / 2013-01-08
10
+ ==================
11
+
12
+ * add command_free()
13
+
14
+ 1.1.0 / 2012-12-18
15
+ ==================
16
+
17
+ * add short flag expansion
18
+
19
+ 1.0.0 / 2012-12-13
20
+ ==================
21
+
22
+ * fix malloc(), add a byte for nul
23
+
24
+ 0.0.1 / 2012-06-16
25
+ ==================
26
+
27
+ * Initial release
@@ -0,0 +1,8 @@
1
+
2
+ test: test.c src/commander.c
3
+ $(CC) $^ -std=c99 -o $@
4
+
5
+ clean:
6
+ rm -f test
7
+
8
+ .PHONY: clean
@@ -0,0 +1,103 @@
1
+
2
+ # commander.c
3
+
4
+ Commander option parser ported to C.
5
+
6
+ ## Automated --help
7
+
8
+ The previous example would produce the following `--help`:
9
+
10
+ ```
11
+
12
+ Usage: example [options]
13
+
14
+ Options:
15
+
16
+ -V, --version output program version
17
+ -h, --help output help information
18
+ -v, --verbose enable verbose stuff
19
+ -r, --required <arg> required arg
20
+ -o, --optional [arg] optional arg
21
+
22
+ ```
23
+
24
+ ## Example
25
+
26
+ ```c
27
+ #include <stdio.h>
28
+ #include "commander.h"
29
+
30
+ static void
31
+ verbose(command_t *self) {
32
+ printf("verbose: enabled\n");
33
+ }
34
+
35
+ static void
36
+ required(command_t *self) {
37
+ printf("required: %s\n", self->arg);
38
+ }
39
+
40
+ static void
41
+ optional(command_t *self) {
42
+ printf("optional: %s\n", self->arg);
43
+ }
44
+
45
+ int
46
+ main(int argc, const char **argv){
47
+ command_t cmd;
48
+ command_init(&cmd, argv[0], "0.0.1");
49
+ command_option(&cmd, "-v", "--verbose", "enable verbose stuff", verbose);
50
+ command_option(&cmd, "-r", "--required <arg>", "required arg", required);
51
+ command_option(&cmd, "-o", "--optional [arg]", "optional arg", optional);
52
+ command_parse(&cmd, argc, argv);
53
+ printf("additional args:\n");
54
+ for (int i = 0; i < cmd.argc; ++i) {
55
+ printf(" - '%s'\n", cmd.argv[i]);
56
+ }
57
+ command_free(&cmd);
58
+ return 0;
59
+ }
60
+ ```
61
+
62
+ ## Closure
63
+
64
+ `cmd.data` is a `void *` so pass along a struct to the callbacks if you want.
65
+
66
+ ## Usage
67
+
68
+ `cmd.usage` defaults to "[options]".
69
+
70
+ ## Links
71
+
72
+ - Used by the [mon(1)](https://github.com/visionmedia/mon/blob/master/src/mon.c) process monitor
73
+
74
+ ## Short flags
75
+
76
+ Compound short flags are automatically expanded to their canonical form. For example `-vLO` would
77
+ become `-v -L -O`.
78
+
79
+ ## License
80
+
81
+ (The MIT License)
82
+
83
+ Copyright (c) 2012 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
84
+
85
+ Permission is hereby granted, free of charge, to any person obtaining
86
+ a copy of this software and associated documentation files (the
87
+ 'Software'), to deal in the Software without restriction, including
88
+ without limitation the rights to use, copy, modify, merge, publish,
89
+ distribute, sublicense, and/or sell copies of the Software, and to
90
+ permit persons to whom the Software is furnished to do so, subject to
91
+ the following conditions:
92
+
93
+ The above copyright notice and this permission notice shall be
94
+ included in all copies or substantial portions of the Software.
95
+
96
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
97
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
98
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
99
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
100
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
101
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
102
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
103
+