mathematical 1.6.7 → 1.6.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/ext/mathematical/CMakeLists.txt +0 -8
  4. data/ext/mathematical/extconf.rb +0 -7
  5. data/ext/mathematical/lasem_overrides.c +0 -3
  6. data/ext/mathematical/lib/liblasem.dylib +0 -0
  7. data/ext/mathematical/lib/libmtex2MML.a +0 -0
  8. data/ext/mathematical/mtex2MML/CMakeLists.txt +1 -1
  9. data/ext/mathematical/mtex2MML/build/CMakeCache.txt +28 -28
  10. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CMakeCCompiler.cmake +7 -6
  11. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CMakeCXXCompiler.cmake +9 -8
  12. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CMakeDetermineCompilerABI_C.bin +0 -0
  13. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CMakeDetermineCompilerABI_CXX.bin +0 -0
  14. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CMakeSystem.cmake +4 -4
  15. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CompilerIdC/CMakeCCompilerId.c +0 -0
  16. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CompilerIdC/a.out +0 -0
  17. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CompilerIdCXX/CMakeCXXCompilerId.cpp +0 -0
  18. data/ext/mathematical/mtex2MML/build/CMakeFiles/{3.6.1 → 3.7.2}/CompilerIdCXX/a.out +0 -0
  19. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake +3 -3
  20. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log +163 -163
  21. data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt +33 -33
  22. data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/build.make +7 -7
  23. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/build.make +7 -7
  24. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/build.make +7 -7
  25. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/build.make +7 -7
  26. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/build.make +7 -7
  27. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/build.make +7 -7
  28. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/build.make +7 -7
  29. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/build.make +7 -7
  30. data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/build.make +7 -7
  31. data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/build.make +7 -7
  32. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/build.make +7 -7
  33. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/build.make +7 -7
  34. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/build.make +7 -7
  35. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/build.make +7 -7
  36. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/build.make +7 -7
  37. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/build.make +7 -7
  38. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/build.make +7 -7
  39. data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/build.make +7 -7
  40. data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile.cmake +109 -39
  41. data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile2 +107 -107
  42. data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/build.make +7 -7
  43. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/build.make +7 -7
  44. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/build.make +7 -7
  45. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/build.make +7 -7
  46. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/build.make +7 -7
  47. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/build.make +7 -7
  48. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/build.make +7 -7
  49. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/build.make +7 -7
  50. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/build.make +7 -7
  51. data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/build.make +7 -7
  52. data/ext/mathematical/mtex2MML/build/CMakeFiles/TargetDirectories.txt +41 -41
  53. data/ext/mathematical/mtex2MML/build/CMakeFiles/feature_tests.bin +0 -0
  54. data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/build.make +7 -7
  55. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/DependInfo.cmake +10 -9
  56. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/build.make +72 -45
  57. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/cmake_clean.cmake +2 -1
  58. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/flags.make +4 -4
  59. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/link.txt +1 -1
  60. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/progress.make +1 -0
  61. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/C.includecache +58 -50
  62. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/DependInfo.cmake +9 -8
  63. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/build.make +62 -35
  64. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/cmake_clean.cmake +1 -0
  65. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.internal +28 -26
  66. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.make +9 -7
  67. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/flags.make +4 -4
  68. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/link.txt +2 -2
  69. data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/progress.make +10 -9
  70. data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/build.make +6 -6
  71. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/DependInfo.cmake +10 -9
  72. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/build.make +66 -39
  73. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/cmake_clean.cmake +1 -0
  74. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/flags.make +4 -4
  75. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/link.txt +1 -1
  76. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/progress.make +11 -10
  77. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/DependInfo.cmake +26 -25
  78. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/build.make +133 -106
  79. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/cmake_clean.cmake +1 -0
  80. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/flags.make +4 -4
  81. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/link.txt +1 -1
  82. data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/progress.make +28 -27
  83. data/ext/mathematical/mtex2MML/build/CMakeFiles/progress.marks +1 -1
  84. data/ext/mathematical/mtex2MML/build/CTestTestfile.cmake +2 -2
  85. data/ext/mathematical/mtex2MML/build/DartConfiguration.tcl +10 -10
  86. data/ext/mathematical/mtex2MML/build/Makefile +72 -33
  87. data/ext/mathematical/mtex2MML/build/cmake_install.cmake +3 -3
  88. data/ext/mathematical/mtex2MML/build/lexer.c +1099 -1099
  89. data/ext/mathematical/mtex2MML/build/libmtex2MML.a +0 -0
  90. data/ext/mathematical/mtex2MML/build/parser.c +3776 -3842
  91. data/ext/mathematical/mtex2MML/build/parser.h +310 -317
  92. data/ext/mathematical/mtex2MML/build/parser.output +3089 -3089
  93. data/ext/mathematical/mtex2MML/deps/uthash/utarray.h +2 -2
  94. data/ext/mathematical/mtex2MML/src/em.c +5 -5
  95. data/ext/mathematical/mtex2MML/src/environment.c +8 -8
  96. data/ext/mathematical/mtex2MML/src/mtex2MML.h +1 -1
  97. data/ext/mathematical/mtex2MML/src/parser.y +3 -3
  98. data/ext/mathematical/mtex2MML/{deps/strdup/strdup.c → src/string_dup.c} +5 -10
  99. data/ext/mathematical/mtex2MML/src/string_dup.h +23 -0
  100. data/ext/mathematical/mtex2MML/src/string_extras.c +2 -2
  101. data/ext/mathematical/mtex2MML/tests/clar.c +2 -2
  102. data/ext/mathematical/mtex2MML/tests/clar/fs.h +2 -2
  103. data/ext/mathematical/mtex2MML/tests/clar/sandbox.h +1 -1
  104. data/lib/mathematical.rb +1 -1
  105. data/lib/mathematical/configuration.rb +6 -6
  106. data/lib/mathematical/version.rb +1 -1
  107. data/test/mathematical/delimiters_test.rb +6 -6
  108. metadata +13 -14
  109. data/ext/mathematical/mtex2MML/deps/strdup/package.json +0 -12
  110. data/ext/mathematical/mtex2MML/deps/strdup/strdup.h +0 -30
@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
37
  #include <stddef.h> /* size_t */
38
38
  #include <string.h> /* memset, etc */
39
39
  #include <stdlib.h> /* exit */
40
- #include "../strdup/strdup.h"
40
+ #include "../../src/string_dup.h"
41
41
 
42
42
  #ifndef oom
43
43
  #define oom() exit(-1)
@@ -225,7 +225,7 @@ typedef struct {
225
225
  /* last we pre-define a few icd for common utarrays of ints and strings */
226
226
  static void utarray_str_cpy(void *dst, const void *src) {
227
227
  char **_src = (char**)src, **_dst = (char**)dst;
228
- *_dst = (*_src == NULL) ? NULL : strdup(*_src);
228
+ *_dst = (*_src == NULL) ? NULL : string_dup(*_src);
229
229
  }
230
230
  static void utarray_str_dtor(void *elt) {
231
231
  char **eltc = (char**)elt;
@@ -1,7 +1,7 @@
1
1
  #include "em.h"
2
2
  #include <stdio.h>
3
3
  #include <stdlib.h>
4
- #include "../deps/strdup/strdup.h"
4
+ #include "string_dup.h"
5
5
  #include "../deps/uthash/utstring.h"
6
6
 
7
7
  float mtex2MML_extract_number_from_pxstring(char * str)
@@ -39,7 +39,7 @@ char *mtex2MML_dbl2em(char *str)
39
39
  dbl *= 0.056f;
40
40
 
41
41
  utstring_printf(em, "%.3fem", dbl);
42
- em_str = strdup(utstring_body(em));
42
+ em_str = string_dup(utstring_body(em));
43
43
 
44
44
  utstring_free(em);
45
45
 
@@ -55,7 +55,7 @@ char *mtex2MML_double_pixel(float f, char *pixel)
55
55
 
56
56
  dbl = f * 2;
57
57
  utstring_printf(em, "%.3f%s", dbl, pixel);
58
- em_str = strdup(utstring_body(em));
58
+ em_str = string_dup(utstring_body(em));
59
59
 
60
60
  utstring_free(em);
61
61
 
@@ -73,7 +73,7 @@ char *mtex2MML_implement_skew(char *base_str, char *em_skew, char *pattern)
73
73
  utstring_printf(skew_mathml, "%s%s%s", pattern, "</mo></mover></mrow><mspace width=\"-", em_skew);
74
74
  utstring_printf(skew_mathml, "%s", "\" /></mrow><mrow></mrow></mrow>");
75
75
 
76
- skew_mathml_str = strdup(utstring_body(skew_mathml));
76
+ skew_mathml_str = string_dup(utstring_body(skew_mathml));
77
77
 
78
78
  utstring_free(skew_mathml);
79
79
 
@@ -91,7 +91,7 @@ char *mtex2MML_root_pos_to_em(char * str)
91
91
  dbl /= 15;
92
92
 
93
93
  utstring_printf(em, "%.3fem", dbl);
94
- em_str = strdup(utstring_body(em));
94
+ em_str = string_dup(utstring_body(em));
95
95
 
96
96
  utstring_free(em);
97
97
 
@@ -3,7 +3,7 @@
3
3
  #include <string.h>
4
4
  #include <math.h>
5
5
 
6
- #include "../deps/strdup/strdup.h"
6
+ #include "string_dup.h"
7
7
  #include "environment.h"
8
8
  #include "string_extras.h"
9
9
 
@@ -141,7 +141,7 @@ void mtex2MML_env_replacements(UT_array **environment_data_stack, encaseType **e
141
141
 
142
142
  unsigned int rowlines_stack_len = 0, eqn = 0, i = 0, insertion_idx = 0;
143
143
 
144
- char *dupe_environment = strdup(environment);
144
+ char *dupe_environment = string_dup(environment);
145
145
  char *line = strtok(dupe_environment, "\n");
146
146
 
147
147
  /* set up the array stack */
@@ -219,7 +219,7 @@ void mtex2MML_env_replacements(UT_array **environment_data_stack, encaseType **e
219
219
  temp = tok + 2; /* skip the first part ("\[") */
220
220
  if ( (tok = strstr(temp, EM_PATTERN_END)) != NULL) {
221
221
  mtex2MML_remove_last_char(temp);
222
- char *s = strdup(temp);
222
+ char *s = string_dup(temp);
223
223
  utarray_push_back(row_spacing_stack, &s);
224
224
  free(s);
225
225
  }
@@ -356,7 +356,7 @@ void mtex2MML_perform_replacement(UT_array **environment_data_stack, UT_array *r
356
356
 
357
357
  char *mtex2MML_vertical_pipe_extract(char *string)
358
358
  {
359
- char *dupe = strdup(string);
359
+ char *dupe = string_dup(string);
360
360
  UT_string *columnlines, *border;
361
361
  char *previous_column = "", *attr_columnlines, *attr_border;
362
362
  unsigned int i = 0;
@@ -410,7 +410,7 @@ char *mtex2MML_vertical_pipe_extract(char *string)
410
410
  utstring_printf(columnlines, "%s", "none");
411
411
  }
412
412
 
413
- attr_columnlines = strdup(utstring_body(columnlines));
413
+ attr_columnlines = string_dup(utstring_body(columnlines));
414
414
  free(dupe);
415
415
  utstring_free(border);
416
416
  utstring_free(columnlines);
@@ -423,7 +423,7 @@ char *mtex2MML_remove_excess_pipe_chars(char *string)
423
423
  UT_string *columnalign;
424
424
  utstring_new(columnalign);
425
425
 
426
- char *dupe = strdup(string);
426
+ char *dupe = string_dup(string);
427
427
  char *token = strtok(dupe, " ");
428
428
  char *attr_columnalign;
429
429
 
@@ -434,7 +434,7 @@ char *mtex2MML_remove_excess_pipe_chars(char *string)
434
434
  token = strtok(NULL, " ");
435
435
  }
436
436
 
437
- attr_columnalign = strdup(utstring_body(columnalign));
437
+ attr_columnalign = string_dup(utstring_body(columnalign));
438
438
  free(dupe);
439
439
  utstring_free(columnalign);
440
440
 
@@ -466,7 +466,7 @@ char *mtex2MML_combine_row_data(UT_array **environment_data_stack)
466
466
  /* combine the row spacing and row lines data */
467
467
  utstring_printf(row_attr_data, "%s%s\" %s\"", "rowspacing=\"", row_spacing_data, row_lines_data);
468
468
 
469
- row_attr = strdup(utstring_body(row_attr_data));
469
+ row_attr = string_dup(utstring_body(row_attr_data));
470
470
  utarray_erase(*environment_data_stack, 0, 1);
471
471
 
472
472
  utstring_free(row_attr_data);
@@ -1,7 +1,7 @@
1
1
  #ifndef MTEX2MML_H
2
2
  #define MTEX2MML_H
3
3
 
4
- #define MTEX2MML_VERSION "1.3.0"
4
+ #define MTEX2MML_VERSION "1.3.1"
5
5
 
6
6
  #ifdef __cplusplus
7
7
  extern "C" {
@@ -12,7 +12,7 @@
12
12
  #include "environment.h"
13
13
  #include "string_extras.h"
14
14
 
15
- #include "../deps/strdup/strdup.h"
15
+ #include "string_dup.h"
16
16
  #include "../deps/uthash/uthash.h"
17
17
 
18
18
  struct css_colors *colors = NULL;
@@ -3459,8 +3459,8 @@ colspan: COLSPAN ATTRLIST {
3459
3459
  void envdata_copy(void *_dst, const void *_src)
3460
3460
  {
3461
3461
  envdata_t *dst = (envdata_t*)_dst, *src = (envdata_t*)_src;
3462
- dst->rowspacing = src->rowspacing ? strdup(src->rowspacing) : NULL;
3463
- dst->rowlines = src->rowlines ? strdup(src->rowlines) : NULL;
3462
+ dst->rowspacing = src->rowspacing ? string_dup(src->rowspacing) : NULL;
3463
+ dst->rowlines = src->rowlines ? string_dup(src->rowlines) : NULL;
3464
3464
  dst->environment_type = src->environment_type;
3465
3465
  utarray_new(dst->eqn_numbers, &ut_int_icd);
3466
3466
  utarray_concat(dst->eqn_numbers, src->eqn_numbers);
@@ -1,21 +1,18 @@
1
-
2
1
  //
3
- // strdup.c
2
+ // string_dup.c
4
3
  //
5
4
  // Copyright (c) 2014 Stephen Mathieson
6
5
  // MIT licensed
7
6
  //
8
7
 
9
- #ifndef _WIN32
10
- #ifndef IS_TRAVISCI
11
- #ifndef HAVE_STRDUP
8
+ #ifndef HAVE_STRINGDUP
12
9
 
13
10
  #include <stdlib.h>
14
11
  #include <string.h>
15
- #include "strdup.h"
12
+ #include "string_dup.h"
16
13
 
17
14
  char *
18
- strdup(const char *str) {
15
+ string_dup(const char *str) {
19
16
  if (!str) return NULL;
20
17
  int len = strlen(str) + 1;
21
18
  char *buf = malloc(len);
@@ -23,6 +20,4 @@ strdup(const char *str) {
23
20
  return buf;
24
21
  }
25
22
 
26
- #endif /* HAVE_STRDUP */
27
- #endif
28
- #endif
23
+ #endif /* HAVE_STRINGDUP */
@@ -0,0 +1,23 @@
1
+ //
2
+ // string_dup.h
3
+ //
4
+ // Copyright (c) 2014 Stephen Mathieson
5
+ // MIT licensed
6
+ //
7
+
8
+ #ifndef HAVE_STRINGDUP
9
+ #define HAVE_STRINGDUP
10
+
11
+ /**
12
+ * Drop-in replacement for string_dup(3) from libc.
13
+ *
14
+ * Creates a copy of `str`. Free when done.
15
+ *
16
+ * Returns a pointer to the newly allocated
17
+ * copy of `str`, or `NULL` on failure.
18
+ */
19
+
20
+ char *
21
+ string_dup(const char *str);
22
+
23
+ #endif /* HAVE_STRINGDUP */
@@ -2,7 +2,7 @@
2
2
  #include <stdlib.h>
3
3
  #include <string.h>
4
4
  #include "string_extras.h"
5
- #include "../deps/strdup/strdup.h"
5
+ #include "string_dup.h"
6
6
 
7
7
  void mtex2MML_remove_last_char(char* str)
8
8
  {
@@ -22,7 +22,7 @@ char * mtex2MML_str_replace (char *string, const char *substr, const char *repla
22
22
  char *newstr = NULL;
23
23
  char *oldstr = NULL;
24
24
 
25
- newstr = strdup(string);
25
+ newstr = string_dup(string);
26
26
 
27
27
  while ( ( tok = strstr( newstr, substr ) ) ) {
28
28
 
@@ -13,7 +13,7 @@
13
13
  #include <stdarg.h>
14
14
  #include <wchar.h>
15
15
 
16
- #include "../deps/strdup/strdup.h"
16
+ #include "../src/string_dup.h"
17
17
 
18
18
  /* required for sandboxing */
19
19
  #include <sys/types.h>
@@ -494,7 +494,7 @@ void clar__fail(
494
494
  error->error_msg = error_msg;
495
495
 
496
496
  if (description != NULL)
497
- error->description = strdup(description);
497
+ error->description = string_dup(description);
498
498
 
499
499
  _clar.total_errors++;
500
500
  _clar.test_status = CL_TEST_FAILURE;
@@ -1,4 +1,4 @@
1
- #include "../../deps/strdup/strdup.h"
1
+ #include "../../src/string_dup.h"
2
2
 
3
3
  #ifdef _WIN32
4
4
 
@@ -290,7 +290,7 @@ fs_copy(const char *_source, const char *dest)
290
290
  char *source;
291
291
  size_t source_len;
292
292
 
293
- source = strdup(_source);
293
+ source = string_dup(_source);
294
294
  source_len = strlen(source);
295
295
 
296
296
  if (source[source_len - 1] == '/')
@@ -1,4 +1,4 @@
1
- #include "../../deps/strdup/strdup.h"
1
+ #include "../../src/string_dup.h"
2
2
  #include "../deps/mkdtemp/mkdtemp.h"
3
3
 
4
4
  static char _clar_path[4096];
@@ -17,7 +17,7 @@ class Mathematical
17
17
  :base64 => false,
18
18
  :maxsize => 0,
19
19
  :format => :svg,
20
- :delimiter => [:dollar, :double]
20
+ :delimiter => [:DOLLAR, :DOUBLE]
21
21
  }
22
22
 
23
23
  XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -4,12 +4,12 @@ class Configuration
4
4
  class Delimiters
5
5
  include Ruby::Enum
6
6
 
7
- define :default, 0
8
- define :dollar, 1
9
- define :double, 2
10
- define :parens, 4
11
- define :brackets, 8
12
- define :environments, 16
7
+ define :DEFAULT, 0
8
+ define :DOLLAR, 1
9
+ define :DOUBLE, 2
10
+ define :PARENS, 4
11
+ define :BRACKETS, 8
12
+ define :ENVIRONMENTS, 16
13
13
 
14
14
  def self.option_exists?(option)
15
15
  unless Delimiters.keys.include?(option)
@@ -1,3 +1,3 @@
1
1
  class Mathematical
2
- VERSION = '1.6.7'.freeze
2
+ VERSION = '1.6.8'.freeze
3
3
  end
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class Mathematical::BasicTest < MiniTest::Test
4
4
  def test_single_dollar
5
- render = Mathematical.new(:delimiter => :dollar, :format => :mathml)
5
+ render = Mathematical.new(:delimiter => :DOLLAR, :format => :mathml)
6
6
 
7
7
  fixture_tex = "$\\pi$"
8
8
  fixture_mml = File.read(File.join(MTEX2MML_FIXTURES_DIR, 'delimiters', 'single_dollar.html')).strip
@@ -13,7 +13,7 @@ class Mathematical::BasicTest < MiniTest::Test
13
13
  end
14
14
 
15
15
  def test_double_dollar
16
- render = Mathematical.new(:delimiter => :double, :format => :mathml)
16
+ render = Mathematical.new(:delimiter => :DOUBLE, :format => :mathml)
17
17
 
18
18
  fixture_tex = "$$\\pi$$"
19
19
  fixture_mml = File.read(File.join(MTEX2MML_FIXTURES_DIR, 'delimiters', 'double_dollar.html')).strip
@@ -24,7 +24,7 @@ class Mathematical::BasicTest < MiniTest::Test
24
24
  end
25
25
 
26
26
  def test_parens
27
- render = Mathematical.new(:delimiter => :parens, :format => :mathml)
27
+ render = Mathematical.new(:delimiter => :PARENS, :format => :mathml)
28
28
 
29
29
  fixture_tex = "\\(\\pi\\)"
30
30
  fixture_mml = File.read(File.join(MTEX2MML_FIXTURES_DIR, 'delimiters', 'parens.html')).strip
@@ -35,7 +35,7 @@ class Mathematical::BasicTest < MiniTest::Test
35
35
  end
36
36
 
37
37
  def test_brackets
38
- render = Mathematical.new(:delimiter => :brackets, :format => :mathml)
38
+ render = Mathematical.new(:delimiter => :BRACKETS, :format => :mathml)
39
39
 
40
40
  fixture_tex = "\\[\\pi\\]"
41
41
  fixture_mml = File.read(File.join(MTEX2MML_FIXTURES_DIR, 'delimiters', 'brackets.html')).strip
@@ -46,7 +46,7 @@ class Mathematical::BasicTest < MiniTest::Test
46
46
  end
47
47
 
48
48
  def test_environments
49
- render = Mathematical.new(:delimiter => :environments, :format => :mathml)
49
+ render = Mathematical.new(:delimiter => :ENVIRONMENTS, :format => :mathml)
50
50
 
51
51
  fixture_tex = "\\begin{equation}f(x)=(x+a)(x+b)\\end{equation}"
52
52
  fixture_mml = File.read(File.join(MTEX2MML_FIXTURES_DIR, 'delimiters', 'single_equation.html')).strip
@@ -57,7 +57,7 @@ class Mathematical::BasicTest < MiniTest::Test
57
57
  end
58
58
 
59
59
  def test_mixed
60
- render = Mathematical.new(:delimiter => [:brackets, :double], :format => :mathml)
60
+ render = Mathematical.new(:delimiter => [:BRACKETS, :DOUBLE], :format => :mathml)
61
61
 
62
62
  fixture_tex = "\\[\\alpha\\] $$\\beta$$"
63
63
  fixture_mml = File.read(File.join(MTEX2MML_FIXTURES_DIR, 'delimiters', 'mixed.html')).strip
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mathematical
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-27 00:00:00.000000000 Z
11
+ date: 2017-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-enum
@@ -570,15 +570,15 @@ files:
570
570
  - ext/mathematical/mtex2MML/SUPPORTED.md
571
571
  - ext/mathematical/mtex2MML/appveyor.yml
572
572
  - ext/mathematical/mtex2MML/build/CMakeCache.txt
573
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeCCompiler.cmake
574
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeCXXCompiler.cmake
575
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeDetermineCompilerABI_C.bin
576
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeDetermineCompilerABI_CXX.bin
577
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CMakeSystem.cmake
578
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CompilerIdC/CMakeCCompilerId.c
579
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CompilerIdC/a.out
580
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CompilerIdCXX/CMakeCXXCompilerId.cpp
581
- - ext/mathematical/mtex2MML/build/CMakeFiles/3.6.1/CompilerIdCXX/a.out
573
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CMakeCCompiler.cmake
574
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CMakeCXXCompiler.cmake
575
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_C.bin
576
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_CXX.bin
577
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CMakeSystem.cmake
578
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CompilerIdC/CMakeCCompilerId.c
579
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CompilerIdC/a.out
580
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
581
+ - ext/mathematical/mtex2MML/build/CMakeFiles/3.7.2/CompilerIdCXX/a.out
582
582
  - ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake
583
583
  - ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log
584
584
  - ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt
@@ -753,9 +753,6 @@ files:
753
753
  - ext/mathematical/mtex2MML/build/parser.h
754
754
  - ext/mathematical/mtex2MML/build/parser.output
755
755
  - ext/mathematical/mtex2MML/cmake/Modules/astyle.cmake
756
- - ext/mathematical/mtex2MML/deps/strdup/package.json
757
- - ext/mathematical/mtex2MML/deps/strdup/strdup.c
758
- - ext/mathematical/mtex2MML/deps/strdup/strdup.h
759
756
  - ext/mathematical/mtex2MML/deps/uthash/package.json
760
757
  - ext/mathematical/mtex2MML/deps/uthash/utarray.h
761
758
  - ext/mathematical/mtex2MML/deps/uthash/uthash.h
@@ -776,6 +773,8 @@ files:
776
773
  - ext/mathematical/mtex2MML/src/main.c
777
774
  - ext/mathematical/mtex2MML/src/mtex2MML.h
778
775
  - ext/mathematical/mtex2MML/src/parser.y
776
+ - ext/mathematical/mtex2MML/src/string_dup.c
777
+ - ext/mathematical/mtex2MML/src/string_dup.h
779
778
  - ext/mathematical/mtex2MML/src/string_extras.c
780
779
  - ext/mathematical/mtex2MML/src/string_extras.h
781
780
  - ext/mathematical/mtex2MML/src/win32-shims/unistd.h
@@ -1,12 +0,0 @@
1
- {
2
- "name": "strdup",
3
- "version": "0.0.2",
4
- "repo": "clibs/strdup",
5
- "description": "drop-in replacement for strdup(3) from libc",
6
- "keywords": [ "string", "copy" ],
7
- "license": "Expat",
8
- "src": [
9
- "strdup.c",
10
- "strdup.h"
11
- ]
12
- }
@@ -1,30 +0,0 @@
1
-
2
- //
3
- // strdup.h
4
- //
5
- // Copyright (c) 2014 Stephen Mathieson
6
- // MIT licensed
7
- //
8
-
9
- #ifndef _WIN32
10
- #ifndef IS_TRAVISCI
11
- #ifndef HAVE_STRDUP
12
- #define HAVE_STRDUP
13
-
14
- /**
15
- * Drop-in replacement for strdup(3) from libc.
16
- *
17
- * Creates a copy of `str`. Free when done.
18
- *
19
- * Returns a pointer to the newly allocated
20
- * copy of `str`, or `NULL` on failure.
21
- */
22
-
23
- char *
24
- strdup(const char *str);
25
-
26
- #endif /* HAVE_STRDUP */
27
- #else
28
- #define strdup _strdup
29
- #endif
30
- #endif