tioga 1.11 → 1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. data/Tioga_README +58 -35
  2. data/{split/scripts → bin}/tioga +1 -1
  3. data/{split → ext/Dobjects}/Dtable/dtable.c +81 -15
  4. data/{split → ext/Dobjects}/Dtable/dtable_intern.h +0 -0
  5. data/ext/Dobjects/Dtable/extconf.rb +7 -0
  6. data/{split → ext/Dobjects}/Dtable/include/dtable.h +0 -0
  7. data/{split → ext/Dobjects}/Dvector/dvector.c +361 -51
  8. data/{split → ext/Dobjects}/Dvector/dvector_intern.h +0 -0
  9. data/ext/Dobjects/Dvector/extconf.rb +22 -0
  10. data/{split/Dtable → ext/Dobjects/Dvector/include}/dvector.h +0 -0
  11. data/ext/Dobjects/Function/extconf.rb +7 -0
  12. data/{split → ext/Dobjects}/Function/function.c +636 -11
  13. data/{split → ext/Dobjects}/Function/joint_qsort.c +0 -0
  14. data/ext/Flate/extconf.rb +26 -0
  15. data/{split → ext}/Flate/flate.c +7 -3
  16. data/{split → ext}/Flate/flate_intern.h +0 -0
  17. data/{split → ext}/Flate/include/flate.h +0 -0
  18. data/ext/Flate/zlib/adler32.c +149 -0
  19. data/ext/Flate/zlib/compress.c +79 -0
  20. data/ext/Flate/zlib/crc32.c +423 -0
  21. data/ext/Flate/zlib/crc32.h +441 -0
  22. data/ext/Flate/zlib/deflate.c +1736 -0
  23. data/ext/Flate/zlib/deflate.h +331 -0
  24. data/ext/Flate/zlib/gzio.c +1026 -0
  25. data/ext/Flate/zlib/infback.c +623 -0
  26. data/ext/Flate/zlib/inffast.c +318 -0
  27. data/ext/Flate/zlib/inffast.h +11 -0
  28. data/ext/Flate/zlib/inffixed.h +94 -0
  29. data/ext/Flate/zlib/inflate.c +1368 -0
  30. data/ext/Flate/zlib/inflate.h +115 -0
  31. data/ext/Flate/zlib/inftrees.c +329 -0
  32. data/ext/Flate/zlib/inftrees.h +55 -0
  33. data/ext/Flate/zlib/trees.c +1219 -0
  34. data/ext/Flate/zlib/trees.h +128 -0
  35. data/ext/Flate/zlib/uncompr.c +61 -0
  36. data/ext/Flate/zlib/zlib.h +1357 -0
  37. data/ext/Flate/zlib/zutil.c +318 -0
  38. data/ext/Flate/zlib/zutil.h +269 -0
  39. data/ext/Tioga/FigureMaker/__shared_axes.c +1373 -0
  40. data/ext/Tioga/FigureMaker/__shared_makers.c +1303 -0
  41. data/{split/Tioga/pdf_font_dicts.c → ext/Tioga/FigureMaker/__shared_pdf_font_dicts.c} +0 -0
  42. data/{split/Tioga/pdfcolor.c → ext/Tioga/FigureMaker/__shared_pdfcolor.c} +0 -0
  43. data/{split/Tioga/pdfcoords.c → ext/Tioga/FigureMaker/__shared_pdfcoords.c} +0 -0
  44. data/{split/Tioga/pdffile.c → ext/Tioga/FigureMaker/__shared_pdffile.c} +0 -0
  45. data/{split/Tioga/pdfimage.c → ext/Tioga/FigureMaker/__shared_pdfimage.c} +0 -0
  46. data/{split/Tioga/pdfpath.c → ext/Tioga/FigureMaker/__shared_pdfpath.c} +0 -0
  47. data/{split/Tioga/pdftext.c → ext/Tioga/FigureMaker/__shared_pdftext.c} +0 -0
  48. data/{split/Tioga/texout.c → ext/Tioga/FigureMaker/__shared_texout.c} +0 -0
  49. data/ext/Tioga/FigureMaker/extconf.rb +7 -0
  50. data/{split/Tioga → ext/Tioga/FigureMaker}/figures.c +14 -2
  51. data/{split/Tioga → ext/Tioga/FigureMaker}/figures.h +0 -0
  52. data/{split/Tioga → ext/Tioga/FigureMaker}/generic.c +1 -2
  53. data/{split/Tioga → ext/Tioga/FigureMaker}/generic.h +0 -1
  54. data/{split/Tioga → ext/Tioga/FigureMaker}/init.c +0 -0
  55. data/{split/Tioga → ext/Tioga/FigureMaker}/pdfs.h +0 -0
  56. data/{split/Tioga → ext/Tioga/FigureMaker/shared}/axes.c +32 -7
  57. data/{split/Tioga → ext/Tioga/FigureMaker/shared}/makers.c +2 -2
  58. data/ext/Tioga/FigureMaker/shared/pdf_font_dicts.c +18253 -0
  59. data/ext/Tioga/FigureMaker/shared/pdfcolor.c +904 -0
  60. data/ext/Tioga/FigureMaker/shared/pdfcoords.c +518 -0
  61. data/ext/Tioga/FigureMaker/shared/pdffile.c +451 -0
  62. data/ext/Tioga/FigureMaker/shared/pdfimage.c +539 -0
  63. data/ext/Tioga/FigureMaker/shared/pdfpath.c +766 -0
  64. data/ext/Tioga/FigureMaker/shared/pdftext.c +710 -0
  65. data/ext/Tioga/FigureMaker/shared/texout.c +533 -0
  66. data/{split/Tioga → ext/Tioga/FigureMaker}/wrappers.c +5 -5
  67. data/{split/Tioga → ext/Tioga/FigureMaker}/wrappers.h +0 -0
  68. data/{split/Dtable → ext/includes}/defs.h +0 -0
  69. data/{split/Dtable → ext/includes}/namespace.h +0 -0
  70. data/{split/Dtable → ext/includes}/safe_double.h +0 -0
  71. data/{split → ext/includes}/symbols.c +0 -1
  72. data/{split/Dtable → ext/includes}/symbols.h +0 -0
  73. data/{split/Dtable/lib → lib/Dobjects}/Dtable_extras.rb +0 -0
  74. data/{split/Dvector/lib → lib/Dobjects}/Dvector_extras.rb +1 -0
  75. data/{split/Function/lib → lib/Dobjects}/Function_extras.rb +0 -0
  76. data/{split/Dvector/lib → lib/Dobjects}/Numeric_extras.rb +0 -0
  77. data/{split/Tioga/lib → lib/Tioga}/Arcs_and_Circles.rb +0 -0
  78. data/{split/Tioga/lib → lib/Tioga}/ColorConstants.rb +0 -0
  79. data/{split/Tioga/lib → lib/Tioga}/Colorbars.rb +0 -0
  80. data/{split/Tioga/lib → lib/Tioga}/Colormaps.rb +0 -0
  81. data/{split/Tioga/lib → lib/Tioga}/Coordinate_Conversions.rb +0 -0
  82. data/{split/Tioga/lib → lib/Tioga}/Creating_Paths.rb +0 -0
  83. data/{split/Tioga/lib → lib/Tioga}/Doc.rb +0 -0
  84. data/{split/Tioga/lib → lib/Tioga}/Executive.rb +0 -0
  85. data/{split/Tioga/lib → lib/Tioga}/FigMkr.rb +13 -70
  86. data/{split/Tioga/lib → lib/Tioga}/FigureConstants.rb +0 -0
  87. data/{split/Tioga/lib → lib/Tioga}/Figures_and_Plots.rb +0 -0
  88. data/{split/Tioga/lib → lib/Tioga}/Images.rb +0 -0
  89. data/{split/Tioga/lib → lib/Tioga}/Legends.rb +0 -0
  90. data/{split/Tioga/lib → lib/Tioga}/MarkerConstants.rb +0 -0
  91. data/{split/Tioga/lib → lib/Tioga}/Markers.rb +0 -0
  92. data/{split/Tioga/lib → lib/Tioga}/Page_Frame_Bounds.rb +0 -0
  93. data/{split/Tioga/lib → lib/Tioga}/Rectangles.rb +0 -0
  94. data/{split/Tioga/lib → lib/Tioga}/Shading.rb +0 -0
  95. data/{split/Tioga/lib → lib/Tioga}/Special_Paths.rb +0 -0
  96. data/{split/Tioga/lib → lib/Tioga}/Strokes.rb +0 -0
  97. data/{split/Tioga/lib → lib/Tioga}/TeX_Text.rb +0 -0
  98. data/{split/Tioga/lib → lib/Tioga}/TexPreamble.rb +0 -0
  99. data/{split/Tioga/lib → lib/Tioga}/Titles_and_Labels.rb +0 -0
  100. data/{split/Tioga/lib → lib/Tioga}/Transparency.rb +0 -0
  101. data/{split/Tioga/lib → lib/Tioga}/Using_Paths.rb +0 -0
  102. data/{split/Tioga/lib → lib/Tioga}/Utils.rb +74 -0
  103. data/{split/Tioga/lib → lib/Tioga}/X_and_Y_Axes.rb +0 -0
  104. data/{split/Tioga/lib → lib/Tioga}/irb_tioga.rb +0 -0
  105. data/{split/Tioga/lib → lib/Tioga}/maker.rb +0 -0
  106. data/{split/Tioga/lib → lib/Tioga}/tioga.rb +0 -0
  107. data/{split/Tioga/lib → lib/Tioga}/tioga_ui.rb +0 -0
  108. data/{split/Tioga/lib → lib/Tioga}/tioga_ui_cmds.rb +0 -0
  109. data/tests/Icon_Test.pdf +0 -0
  110. data/tests/benchmark_dvector_reads.rb +20 -42
  111. data/tests/tc_Dvector.rb +45 -4
  112. data/tests/tc_Flate.rb +4 -5
  113. data/tests/tc_Function.rb +79 -0
  114. data/tests/vg.log +1453 -0
  115. metadata +141 -122
  116. data/split/Dtable/extconf.rb +0 -4
  117. data/split/Dvector/defs.h +0 -39
  118. data/split/Dvector/extconf.rb +0 -4
  119. data/split/Dvector/include/dvector.h +0 -77
  120. data/split/Dvector/namespace.h +0 -59
  121. data/split/Dvector/safe_double.h +0 -104
  122. data/split/Dvector/symbols.h +0 -52
  123. data/split/Flate/defs.h +0 -39
  124. data/split/Flate/extconf.rb +0 -19
  125. data/split/Flate/namespace.h +0 -59
  126. data/split/Flate/safe_double.h +0 -104
  127. data/split/Flate/symbols.h +0 -52
  128. data/split/Function/defs.h +0 -39
  129. data/split/Function/dvector.h +0 -77
  130. data/split/Function/extconf.rb +0 -4
  131. data/split/Function/namespace.h +0 -59
  132. data/split/Function/safe_double.h +0 -104
  133. data/split/Function/symbols.h +0 -52
  134. data/split/Tioga/defs.h +0 -39
  135. data/split/Tioga/dtable.h +0 -35
  136. data/split/Tioga/dvector.h +0 -77
  137. data/split/Tioga/extconf.rb +0 -4
  138. data/split/Tioga/flate.h +0 -98
  139. data/split/Tioga/mk_tioga_sty.rb +0 -53
  140. data/split/Tioga/namespace.h +0 -59
  141. data/split/Tioga/safe_double.h +0 -104
  142. data/split/Tioga/symbols.h +0 -52
  143. data/split/defs.h +0 -39
  144. data/split/extconf.rb +0 -125
  145. data/split/mkmf2.rb +0 -1623
  146. data/split/namespace.h +0 -59
  147. data/split/safe_double.h +0 -104
  148. data/split/symbols.h +0 -52
@@ -1,4 +0,0 @@
1
- # Dtable installation file
2
- require 'mkmf'
3
-
4
- create_makefile 'Tioga/FigureMaker'
data/split/Tioga/flate.h DELETED
@@ -1,98 +0,0 @@
1
- /* flate.h -- c interface for the Ruby Flate extension
2
- */
3
-
4
- /*
5
- Copyright (C) 2005 Bill Paxton
6
-
7
- Flate is free software; you can redistribute it and/or modify
8
- it under the terms of the GNU General Library Public License as published
9
- by the Free Software Foundation; either version 2 of the License, or
10
- (at your option) any later version.
11
-
12
- Flate is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- GNU Library General Public License for more details.
16
-
17
- You should have received a copy of the GNU Library General Public License
18
- along with Flate; if not, write to the Free Software
19
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
- */
21
-
22
-
23
- /* This file has been heavily modified by Vincent Fourmond for the 'RCR330'
24
- symbol export scheme
25
- */
26
- #ifndef __flate_H__
27
- #define __flate_H__
28
-
29
- #include <symbols.h>
30
-
31
- DECLARE_SYMBOL(int, flate_compress,
32
- (unsigned char *new_ptr, unsigned long *new_len_ptr,
33
- unsigned char *ptr, long len));
34
- // source is given by ptr and is len bytes in length.
35
- // new_ptr is destination buffer of size *new_len_ptr.
36
- // NOTE: the destination buffer for flate_compress should be LARGER than the source buffer to be safe.
37
- // The minimal extra is 0.1% larger than the source plus 12 bytes.
38
- // My rule is to use (len * 11)/10 + 100 just to be sure.
39
- DECLARE_SYMBOL(int, flate_expand,
40
- (unsigned char **new_ptr_ptr, unsigned long *new_len_ptr,
41
- unsigned char *ptr, long len));
42
- // source is given by ptr and is len bytes in length.
43
- // *new_ptr_ptr is destination buffer of size *new_len_ptr.
44
- // NOTE: the destination buffer for flate_expand will be reallocated if it isn't large enough.
45
- // So you MUST allocate a buffer rather than using a static one.
46
- // And you MUST be prepared for the buffer to change location and size.
47
-
48
- // Here are the return codes for the compression/expansion functions. Negative
49
- // values are errors, positive values are used for special but normal events.
50
-
51
- #define FLATE_OK 0
52
- #define FLATE_STREAM_END 1
53
- #define FLATE_NEED_DICT 2
54
- #define FLATE_ERRNO (-1)
55
- #define FLATE_STREAM_ERROR (-2)
56
- #define FLATE_DATA_ERROR (-3)
57
- #define FLATE_MEM_ERROR (-4)
58
- #define FLATE_BUF_ERROR (-5)
59
- #define FLATE_VERSION_ERROR (-6)
60
-
61
- // If this simple interface isn't enough for your needs, the next stop is zlib.h
62
- // for the full interface.
63
-
64
- // The internals of this package come from the 'zlib' compression library which
65
- // carries the following copyright:
66
-
67
- /* 'zlib' general purpose compression library
68
- version 1.2.2, October 3rd, 2004
69
-
70
- Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
71
-
72
- This software is provided 'as-is', without any express or implied
73
- warranty. In no event will the authors be held liable for any damages
74
- arising from the use of this software.
75
-
76
- Permission is granted to anyone to use this software for any purpose,
77
- including commercial applications, and to alter it and redistribute it
78
- freely, subject to the following restrictions:
79
-
80
- 1. The origin of this software must not be misrepresented; you must not
81
- claim that you wrote the original software. If you use this software
82
- in a product, an acknowledgment in the product documentation would be
83
- appreciated but is not required.
84
- 2. Altered source versions must be plainly marked as such, and must not be
85
- misrepresented as being the original software.
86
- 3. This notice may not be removed or altered from any source distribution.
87
-
88
- Jean-loup Gailly Mark Adler
89
- jloup@gzip.org madler@alumni.caltech.edu
90
-
91
-
92
- The data format used by the zlib library is described by RFCs (Request for
93
- Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
94
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
95
- */
96
-
97
-
98
- #endif /* __flate_H__ */
@@ -1,53 +0,0 @@
1
- # This small script makes tioga.sty and lib/TexPreamble.rb from
2
- # tioga.sty.in
3
-
4
- require 'date'
5
-
6
- # We make up the color constants from the Tioga file.
7
- require './lib/ColorConstants.rb'
8
-
9
- # Generate colors
10
- color_specs = "% Color constants, generated from ColorConstants.rb\n"
11
- for const in Tioga::ColorConstants.constants
12
- r,g,b = *Tioga::ColorConstants.const_get(const)
13
- color_spec = sprintf "{%0.3f,%0.3f,%0.3f}", r,g,b
14
- color_specs += "\\definecolor{#{const}}{rgb}#{color_spec}\n"
15
- end
16
-
17
- # slurp up the lines from tioga.sty.in
18
- i = File.open("tioga.sty.in")
19
- lines = i.readlines
20
- i.close
21
-
22
- puts "Generating lib/TexPreamble.rb"
23
- out = File.open("lib/TexPreamble.rb", "w")
24
- out.print <<EOCOMMENT
25
- # This file is automatically generated from Tioga/tioga.sty.in
26
- # using the Tioga/mk_tioga_sty.rb script.
27
- #
28
- # Please do not modify this file directly as all changes would
29
- # be lost !!
30
-
31
- EOCOMMENT
32
- out.print "module Tioga
33
- class FigureMaker
34
- TEX_PREAMBLE = <<'End_of_preamble'\n" +
35
- "\\makeatletter\n" +
36
- lines.join +
37
- "\n\\makeatother\nEnd_of_preamble\n" +
38
- " COLOR_PREAMBLE = <<'End_of_preamble'\n" +
39
- color_specs + "\nEnd_of_preamble\n" +
40
- " end\nend"
41
-
42
- out.close
43
-
44
- date = Date::today
45
- str_date = sprintf "%04d/%02d/%02d", date.year, date.month, date.day
46
-
47
-
48
- puts "Generating tioga.sty"
49
- out = File.open("../../tioga.sty", "w")
50
- out.puts "\\ProvidesPackage{tioga}[#{str_date}]"
51
- out.puts lines.join
52
- out.puts color_specs
53
- out.close
@@ -1,59 +0,0 @@
1
- /* namespace.h: an attempt at rationalizing shared objects
2
- namespace use.
3
-
4
- Copyright (C) 2006 Vincent Fourmond
5
-
6
- This program is free software; you can redistribute it and/or modify
7
- it under the terms of the GNU General Library Public License as published
8
- by the Free Software Foundation; either version 2 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU Library General Public License for more details.
15
-
16
- You should have received a copy of the GNU Library General Public License
17
- along with this program; if not, write to the Free Software
18
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
- */
20
-
21
- #ifndef _NAMESPACE_H
22
- #define _NAMESPACE_H
23
-
24
- /* This header file provides three OS-specific macros for the definition of
25
- extern (or NOT extern) symbols:
26
-
27
- * PUBLIC, which has to be used to mark objects that will be used
28
- outside the module
29
-
30
- * INTERN, for symbols which are shared among compilation units within a
31
- module, but are NOT exported to other modules.
32
-
33
- * PRIVATE, for symbols which are visible only within the containing
34
- compilation unit (i.e. C source file) and, of course, are not exported to
35
- other modules.
36
-
37
- Please don't add "extern" after the PRIVATE or PUBLIC declaration
38
- as this would break compilation on Darwin.
39
- */
40
-
41
- #if __GNUC__ >= 4 /* we have the visibility attribute */
42
- # define INTERN __attribute__ ((visibility ("hidden")))
43
- # define PUBLIC __attribute__ ((visibility ("default")))
44
- # define INTERN_EXTERN extern
45
- #elif defined __APPLE__
46
- # define INTERN __private_extern__
47
- # define PUBLIC
48
- # define INTERN_EXTERN
49
- #else /* not really good */
50
- # define INTERN
51
- # define PUBLIC
52
- # define INTERN_EXTERN
53
- #endif /* __APPLE__ and __GNU_C_ >= 4*/
54
-
55
- /* In any case, PRIVATE is static */
56
-
57
- #define PRIVATE static
58
-
59
- #endif
@@ -1,104 +0,0 @@
1
- /**********************************************************************
2
-
3
- safe_double.h: small abstraction for storing double without endianess
4
- problems
5
-
6
- Copyright (C) 2006 Vincent Fourmond
7
-
8
- This program is free software; you can redistribute it and/or modify
9
- it under the terms of the GNU General Library Public License as published
10
- by the Free Software Foundation; either version 2 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU Library General Public License for more details.
17
-
18
- You should have received a copy of the GNU Library General Public License
19
- along with this program; if not, write to the Free Software
20
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
-
22
- **********************************************************************/
23
-
24
- /* This file provides two functions: store_double and get_double, which
25
- can be used in a 'safe' way to store doubles and retrive them
26
- in a hopefully platform-independent form. However, it just
27
- stores it without regards to that if ieee754.h isn't found...
28
- */
29
-
30
- #ifndef _DOUBLE_H
31
- #define _DOUBLE_H
32
-
33
- #define STORE_LOWER_BYTE(a,p) do {\
34
- *(p++) = (a) & 0xFF; (a) >>= 8; }\
35
- while(0)
36
- #define STORE_UNSIGNED(a,p) for(i = 0; i < 4; i++) STORE_LOWER_BYTE(a,p);
37
- #define GET_UNSIGNED(a,p) do { a = 0; for(i = 0; i < 4; i++) \
38
- (a) |= *(p++) << (i * 8); } while (0)
39
-
40
- #ifdef HAVE_IEEE754_H
41
- #include <ieee754.h>
42
-
43
-
44
- static inline void store_double(double a, unsigned char * p)
45
- {
46
- unsigned int tmp;
47
- int i;
48
- union ieee754_double d;
49
- d.d = a;
50
- /* we store it with lower bytes firts */
51
- tmp = d.ieee.mantissa1;
52
- STORE_UNSIGNED(tmp, p);
53
- tmp = d.ieee.negative << 31 |
54
- d.ieee.exponent << 20 |
55
- d.ieee.mantissa0;
56
- STORE_UNSIGNED(tmp, p);
57
- }
58
-
59
-
60
- static inline double get_double(const unsigned char * p)
61
- {
62
- unsigned int tmp;
63
- int i;
64
- union ieee754_double d;
65
- GET_UNSIGNED(tmp, p);
66
- d.ieee.mantissa1 = tmp;
67
- GET_UNSIGNED(tmp, p);
68
- d.ieee.mantissa0 = tmp & 0xFFFFF;
69
- d.ieee.exponent = (tmp >> 20) & 0x7FF;
70
- d.ieee.negative = (tmp >> 31) & 0x1;
71
- return d.d;
72
- }
73
-
74
- #else
75
-
76
- union basic_double{
77
- double d;
78
- struct {
79
- unsigned int a:32;
80
- unsigned int b:32;
81
- } i;
82
- };
83
-
84
- static inline void store_double(double a, unsigned char * p)
85
- {
86
- union basic_double d;
87
- int i;
88
- d.d = a;
89
- STORE_UNSIGNED(d.i.a, p);
90
- STORE_UNSIGNED(d.i.b, p);
91
- }
92
-
93
- static inline double get_double(const unsigned char * p)
94
- {
95
- union basic_double d;
96
- int i;
97
- GET_UNSIGNED(d.i.a, p);
98
- GET_UNSIGNED(d.i.b, p);
99
- return d.d;
100
- }
101
-
102
- #endif /* HAVE_IEEE754_H */
103
-
104
- #endif /* _DOUBLE_H */
@@ -1,52 +0,0 @@
1
- #ifndef _SYMBOLS_H
2
- #define _SYMBOLS_H
3
-
4
- #include <ruby.h>
5
- /* A small layer for exporting and importing symbols from
6
- a compiled module */
7
-
8
- #include <namespace.h>
9
-
10
-
11
- PRIVATE void rb_export_symbol(VALUE module, const char * symbol_name,
12
- void * symbol);
13
- PRIVATE void * rb_import_symbol(VALUE module, const char * symbol_name);
14
- PRIVATE void * rb_import_symbol_no_raise(VALUE module,
15
- const char * symbol_name);
16
-
17
- /* a shortcut for exporting something with the same name */
18
- #define RB_EXPORT_SYMBOL(module, name) \
19
- rb_export_symbol(module, #name, name)
20
-
21
- /* A shortcut for getting a symbol */
22
-
23
- #define DECLARE_SYMBOL(ret_type,name,args) \
24
- typedef ret_type (*rb_export_##name##_type) args;\
25
- INTERN INTERN_EXTERN rb_export_##name##_type name
26
-
27
- #define IMPLEMENT_SYMBOL(name)\
28
- INTERN rb_export_##name##_type name = 0;
29
-
30
- #define RB_IMPORT_SYMBOL(module, name) \
31
- name = (rb_export_##name##_type) rb_import_symbol(module, #name)
32
-
33
-
34
- /* These three macro enable a simple use of function declaration: this way,
35
- you can type in a header file that is used by the importer:
36
-
37
- DECLARE_SYMBOL(int, biniou, (int, int));
38
-
39
- in one file of the importer code, you write
40
-
41
- IMPLEMENT_SYMBOL(biniou);
42
-
43
- and in the Init_... function, you write:
44
-
45
- RB_IMPORT_SYMBOL(module, biniou);
46
-
47
- and you can just use biniou as if it was a function declared as
48
- usual in the header file
49
- */
50
- #endif
51
-
52
-
data/split/defs.h DELETED
@@ -1,39 +0,0 @@
1
- /**********************************************************************
2
-
3
- defs.h:
4
- some definitions that are used everywhere and that depend on some
5
- HAVE_* macros.
6
-
7
- Copyright (C) 2006 Vincent Fourmond
8
-
9
- This program is free software; you can redistribute it and/or modify
10
- it under the terms of the GNU General Library Public License as published
11
- by the Free Software Foundation; either version 2 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU Library General Public License for more details.
18
-
19
- You should have received a copy of the GNU Library General Public License
20
- along with this program; if not, write to the Free Software
21
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
-
23
- **********************************************************************/
24
-
25
-
26
- #ifdef HAVE_ISNAN
27
- /* we use isnan and isinf, which are much faster than the workaround */
28
- #define is_okay_number(x) (! isnan(x) && ! isinf(x))
29
- #else
30
- #define is_okay_number(x) ((x) - (x) == 0.0)
31
- #define isnan(x) ((x) != (x))
32
- /* yes, as funny as it may look NaN != NaN, and that's the only one */
33
- #endif
34
-
35
- /* Fix old versions of ruby.h */
36
- #ifndef RSTRING_PTR
37
- # define RSTRING_PTR(x) (RSTRING(x)->ptr)
38
- # define RSTRING_LEN(x) (RSTRING(x)->len)
39
- #endif
data/split/extconf.rb DELETED
@@ -1,125 +0,0 @@
1
- # main Tioga installation file
2
-
3
- require './mkmf2.rb'
4
-
5
- $CFLAGS += " -O2 -g -Wall"
6
-
7
- # Now, if you want to install the include file, you need to
8
- # set the EXTCONF_RB_INCLUDE
9
- if ENV.key?("EXTCONF_RB_INCLUDE")
10
- include = ENV["EXTCONF_RB_INCLUDE"]
11
- else
12
- include = nil
13
- end
14
-
15
- # install Dvector include and library files into base dirs,
16
- # and builds Dvector.so
17
- setup_dir("Dvector", "Dobjects",
18
- "Dobjects/Dvector", include) do |l,b,i|
19
- # b.add_sources("symbols.c")
20
- end
21
- # the same for Dtable
22
- setup_dir("Dtable", "Dobjects",
23
- "Dobjects/Dtable", include) do |l,b,i|
24
- # b.add_sources("symbols.c")
25
- end
26
-
27
-
28
- # setup_dir("Flate", "", "Flate", include) do |l,b,i|
29
- # # b.add_sources("symbols.c")
30
- # end
31
-
32
-
33
- setup_dir("Function", "Dobjects",
34
- "Dobjects/Function", include) do |l,b,i|
35
- # b.add_sources("symbols.c")
36
- end
37
-
38
-
39
- # We declare Tioga by hand, as an automatic generation would not
40
- # take lib/TexPreamble.rb into accound (missing).
41
- declare_library("Tioga",
42
- "Tioga/lib/tioga.rb",
43
- "Tioga/lib/ColorConstants.rb",
44
- "Tioga/lib/FigMkr.rb",
45
- "Tioga/lib/FigureConstants.rb",
46
- "Tioga/lib/MarkerConstants.rb",
47
- "Tioga/lib/maker.rb",
48
- "Tioga/lib/irb_tioga.rb",
49
- "Tioga/lib/tioga_ui_cmds.rb",
50
- "Tioga/lib/tioga_ui.rb",
51
- "Tioga/lib/Utils.rb",
52
- "Tioga/lib/TexPreamble.rb")
53
-
54
- declare_binary_library("Tioga/FigureMaker",
55
- "Tioga/**/*.c")
56
-
57
- # The preamble stuff:
58
- custom_rule("Tioga/lib/TexPreamble.rb",
59
- [ "cd Tioga; " + Mkmf2.config_var("RUBY_INSTALL_NAME") +
60
- " mk_tioga_sty.rb"],
61
- ["Tioga/lib/ColorConstants.rb",
62
- "Tioga/tioga.sty.in", "Tioga/mk_tioga_sty.rb"]
63
- )
64
-
65
-
66
- # Conditional use of embedded zlib
67
- if have_header("zlib.h") and have_library("z", "compress", "zlib.h")
68
- declare_binary_library('Flate', "Flate/*.c")
69
- else
70
- puts "zlib was not found or could not be linked against, using private copy"
71
- declare_binary_library('Flate', "Flate/**/*.c")
72
- end
73
-
74
- add_include_path("Flate/include")
75
-
76
- # # we check the presence of zlib library
77
- # unless have_header("zlib.h") and have_library("z", "compress", "zlib.h")
78
- # puts <<"EON"
79
- # Error: you should have zlib (including development files) installed to
80
- # build and run Tioga. You can get it there:
81
-
82
- # http://www.zlib.net/
83
-
84
- # If that doesn't solve your problem, please report it on the Tioga tracker:
85
-
86
- # http://rubyforge.org/tracker/?group_id=701
87
-
88
- # EON
89
- # exit 1
90
- # end
91
-
92
- unless have_header("ieee754.h")
93
- puts "You lack the ieee754.h header file, which might mean lower " +
94
- "reliability when Marshalling Dvectors and Dtables"
95
- end
96
-
97
- # Looking for the presence of the is_nan (implies the rest -- isfinite)
98
- have_func("isnan","math.h")
99
-
100
- # Installing scripts
101
- declare_exec 'scripts/tioga'
102
- declare_exec 'scripts/irb_tioga'
103
-
104
-
105
- if Config::CONFIG["target"] =~ /darwin/i
106
- # Installing MacOS specific scripts:
107
- # Creating the script
108
- puts "MacOS specific installation"
109
- custom_rule("repreview",
110
- [ "echo '#!/bin/sh' > repreview",
111
- "echo \"osascript '$(EXEC_INSTALL_DIR)/Reload_Preview_Document.scpt'\" '$$*' >> repreview"
112
- ])
113
- declare_exec 'repreview'
114
- declare_exec 'scripts/Reload_Preview_Document.scpt'
115
- else
116
- puts "Skipping MacOS-specific files"
117
- end
118
-
119
- # Adding the Tioga directory to search for include files
120
- add_include_path 'Tioga'
121
-
122
- write_makefile
123
-
124
-
125
-