ffi 0.5.4-x86-mingw32 → 0.6.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ffi might be problematic. Click here for more details.

Files changed (222) hide show
  1. data/History.txt +102 -0
  2. data/LICENSE +1 -27
  3. data/Rakefile +4 -12
  4. data/ext/ffi_c/AbstractMemory.c +6 -8
  5. data/ext/ffi_c/AbstractMemory.h +23 -21
  6. data/ext/ffi_c/AutoPointer.c +0 -1
  7. data/ext/ffi_c/Buffer.c +23 -8
  8. data/ext/ffi_c/Call.c +31 -3
  9. data/ext/ffi_c/Call.h +5 -1
  10. data/ext/ffi_c/DynamicLibrary.c +0 -1
  11. data/ext/ffi_c/Function.c +22 -4
  12. data/ext/ffi_c/MemoryPointer.c +2 -3
  13. data/ext/ffi_c/Pointer.c +23 -9
  14. data/ext/ffi_c/Struct.c +227 -79
  15. data/ext/ffi_c/Struct.h +16 -7
  16. data/ext/ffi_c/StructLayout.c +92 -55
  17. data/ext/ffi_c/Type.c +5 -22
  18. data/ext/ffi_c/Type.h +1 -1
  19. data/ext/ffi_c/Types.c +9 -3
  20. data/ext/ffi_c/Types.h +2 -0
  21. data/ext/ffi_c/extconf.rb +11 -7
  22. data/ext/ffi_c/libffi.gnu.mk +1 -1
  23. data/ext/ffi_c/libffi.mk +1 -1
  24. data/ext/ffi_c/libffi/ChangeLog +900 -84
  25. data/ext/ffi_c/libffi/ChangeLog.libffi +311 -0
  26. data/ext/ffi_c/libffi/LICENSE +1 -1
  27. data/ext/ffi_c/libffi/Makefile.am +14 -4
  28. data/ext/ffi_c/libffi/Makefile.in +362 -211
  29. data/ext/ffi_c/libffi/README +70 -92
  30. data/ext/ffi_c/libffi/aclocal.m4 +6068 -4586
  31. data/ext/ffi_c/libffi/config.guess +125 -143
  32. data/ext/ffi_c/libffi/config.sub +103 -27
  33. data/ext/ffi_c/libffi/configure +11340 -18473
  34. data/ext/ffi_c/libffi/configure.ac +43 -4
  35. data/ext/ffi_c/libffi/doc/libffi.info +15 -15
  36. data/ext/ffi_c/libffi/doc/libffi.texi +1 -1
  37. data/ext/ffi_c/libffi/doc/stamp-vti +4 -4
  38. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  39. data/ext/ffi_c/libffi/fficonfig.h.in +24 -3
  40. data/ext/ffi_c/libffi/include/Makefile.am +1 -1
  41. data/ext/ffi_c/libffi/include/Makefile.in +97 -50
  42. data/ext/ffi_c/libffi/include/ffi.h.in +8 -2
  43. data/ext/ffi_c/libffi/include/ffi_common.h +24 -0
  44. data/ext/ffi_c/libffi/libtool-version +1 -1
  45. data/ext/ffi_c/libffi/ltmain.sh +7346 -5870
  46. data/ext/ffi_c/libffi/m4/libtool.m4 +7360 -0
  47. data/ext/ffi_c/libffi/m4/ltoptions.m4 +368 -0
  48. data/ext/ffi_c/libffi/m4/ltsugar.m4 +123 -0
  49. data/ext/ffi_c/libffi/m4/ltversion.m4 +23 -0
  50. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +92 -0
  51. data/ext/ffi_c/libffi/man/Makefile.in +115 -62
  52. data/ext/ffi_c/libffi/man/ffi_call.3 +3 -3
  53. data/ext/ffi_c/libffi/missing +15 -8
  54. data/ext/ffi_c/libffi/src/arm/sysv.S +15 -8
  55. data/ext/ffi_c/libffi/src/avr32/ffi.c +421 -0
  56. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +50 -0
  57. data/ext/ffi_c/libffi/src/avr32/sysv.S +208 -0
  58. data/ext/ffi_c/libffi/src/closures.c +47 -10
  59. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  60. data/ext/ffi_c/libffi/src/java_raw_api.c +0 -3
  61. data/ext/ffi_c/libffi/src/mips/ffi.c +135 -32
  62. data/ext/ffi_c/libffi/src/mips/ffitarget.h +37 -4
  63. data/ext/ffi_c/libffi/src/mips/n32.S +67 -10
  64. data/ext/ffi_c/libffi/src/mips/o32.S +8 -8
  65. data/ext/ffi_c/libffi/src/pa/ffi.c +7 -0
  66. data/ext/ffi_c/libffi/src/powerpc/aix.S +163 -64
  67. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +308 -112
  68. data/ext/ffi_c/libffi/src/powerpc/ffi.c +20 -7
  69. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +208 -80
  70. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +11 -3
  71. data/ext/ffi_c/libffi/src/powerpc/sysv.S +12 -23
  72. data/ext/ffi_c/libffi/src/s390/sysv.S +1 -1
  73. data/ext/ffi_c/libffi/src/sh/sysv.S +9 -9
  74. data/ext/ffi_c/libffi/src/sh64/ffi.c +37 -22
  75. data/ext/ffi_c/libffi/src/sh64/sysv.S +23 -14
  76. data/ext/ffi_c/libffi/src/sparc/ffi.c +21 -6
  77. data/ext/ffi_c/libffi/src/sparc/v8.S +55 -14
  78. data/ext/ffi_c/libffi/src/x86/darwin.S +10 -9
  79. data/ext/ffi_c/libffi/src/x86/ffi.c +293 -86
  80. data/ext/ffi_c/libffi/src/x86/ffi64.c +73 -19
  81. data/ext/ffi_c/libffi/src/x86/ffitarget.h +30 -0
  82. data/ext/ffi_c/libffi/src/x86/sysv.S +21 -4
  83. data/ext/ffi_c/libffi/src/x86/unix64.S +8 -4
  84. data/ext/ffi_c/libffi/src/x86/win32.S +633 -147
  85. data/ext/ffi_c/libffi/src/x86/win64.S +460 -0
  86. data/ext/ffi_c/libffi/testsuite/Makefile.am +63 -54
  87. data/ext/ffi_c/libffi/testsuite/Makefile.in +112 -77
  88. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +12 -1
  89. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +4 -4
  90. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn0.c +7 -15
  91. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn1.c +7 -15
  92. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn2.c +7 -15
  93. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn3.c +7 -15
  94. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn4.c +7 -15
  95. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn5.c +7 -14
  96. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn6.c +7 -15
  97. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_loc_fn0.c +95 -0
  98. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_stdcall.c +6 -14
  99. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +4 -12
  100. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +4 -12
  101. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +4 -12
  102. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +4 -12
  103. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +4 -12
  104. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +4 -12
  105. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +4 -12
  106. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +4 -12
  107. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +4 -12
  108. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +4 -12
  109. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +4 -12
  110. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +4 -12
  111. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +4 -12
  112. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +4 -12
  113. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +4 -12
  114. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +4 -12
  115. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +4 -12
  116. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +4 -12
  117. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +4 -12
  118. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +4 -12
  119. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +4 -12
  120. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +4 -12
  121. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +4 -12
  122. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +4 -12
  123. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +4 -12
  124. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +4 -12
  125. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +4 -12
  126. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +134 -0
  127. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +117 -0
  128. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +11 -17
  129. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +4 -12
  130. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +4 -12
  131. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +7 -15
  132. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +4 -12
  133. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +4 -12
  134. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +7 -15
  135. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c +66 -0
  136. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double.c +4 -12
  137. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +57 -0
  138. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_float.c +4 -13
  139. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +105 -0
  140. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +57 -0
  141. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_schar.c +4 -12
  142. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshort.c +4 -12
  143. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshortchar.c +4 -12
  144. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_uchar.c +4 -12
  145. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushort.c +4 -12
  146. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushortchar.c +4 -12
  147. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +74 -0
  148. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +140 -0
  149. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_schar.c +4 -12
  150. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_sint.c +4 -12
  151. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_sshort.c +4 -12
  152. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar.c +4 -12
  153. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint.c +4 -12
  154. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +8 -16
  155. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort.c +4 -12
  156. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_abi.c +37 -0
  157. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +25 -0
  158. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +31 -0
  159. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +2 -1
  160. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +342 -0
  161. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +4 -12
  162. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +4 -12
  163. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +4 -12
  164. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +4 -12
  165. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +4 -12
  166. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +4 -12
  167. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +4 -12
  168. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +4 -12
  169. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +4 -12
  170. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +4 -12
  171. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +4 -12
  172. data/ext/ffi_c/libffi/testsuite/libffi.call/problem1.c +4 -12
  173. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
  174. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +1 -1
  175. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c +145 -0
  176. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c +148 -0
  177. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c +124 -0
  178. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +124 -0
  179. data/ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c +70 -0
  180. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +10 -0
  181. data/ext/ffi_c/libffi/testsuite/libffi.special/special.exp +4 -5
  182. data/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest.cc +17 -16
  183. data/ext/ffi_c/libffi/texinfo.tex +155 -427
  184. data/gen/Rakefile +4 -2
  185. data/lib/1.8/ffi_c.so +0 -0
  186. data/lib/1.9/ffi_c.so +0 -0
  187. data/lib/ffi/autopointer.rb +79 -20
  188. data/lib/ffi/callback.rb +4 -10
  189. data/lib/ffi/enum.rb +28 -0
  190. data/lib/ffi/ffi.rb +1 -0
  191. data/lib/ffi/io.rb +28 -0
  192. data/lib/ffi/library.rb +237 -182
  193. data/lib/ffi/memorypointer.rb +28 -62
  194. data/lib/ffi/platform.rb +27 -0
  195. data/lib/ffi/pointer.rb +28 -0
  196. data/lib/ffi/struct.rb +55 -1
  197. data/lib/ffi/types.rb +29 -0
  198. data/lib/ffi/variadic.rb +29 -0
  199. data/spec/ffi/library_spec.rb +31 -5
  200. data/spec/ffi/rbx/attach_function_spec.rb +2 -1
  201. data/spec/ffi/rbx/memory_pointer_spec.rb +2 -1
  202. data/spec/ffi/spec_helper.rb +5 -1
  203. data/spec/ffi/struct_spec.rb +82 -0
  204. data/tasks/ann.rake +80 -0
  205. data/tasks/extension.rake +25 -0
  206. data/tasks/gem.rake +200 -0
  207. data/tasks/git.rake +41 -0
  208. data/tasks/notes.rake +27 -0
  209. data/tasks/post_load.rake +34 -0
  210. data/tasks/rdoc.rake +50 -0
  211. data/tasks/rubyforge.rake +55 -0
  212. data/tasks/setup.rb +300 -0
  213. data/tasks/spec.rake +54 -0
  214. data/tasks/svn.rake +47 -0
  215. data/tasks/test.rake +40 -0
  216. metadata +312 -279
  217. data/ext/ffi_c/libffi/TODO +0 -1
  218. data/ext/ffi_c/libffi/ltcf-c.sh +0 -861
  219. data/ext/ffi_c/libffi/ltcf-cxx.sh +0 -1069
  220. data/ext/ffi_c/libffi/ltcf-gcj.sh +0 -700
  221. data/ext/ffi_c/libffi/ltconfig +0 -2862
  222. data/ext/ffi_c/libffi/mkinstalldirs +0 -158
@@ -0,0 +1,70 @@
1
+ /* Area: closure_call
2
+ Purpose: Check return value float.
3
+ Limitations: none.
4
+ PR: 41908.
5
+ Originator: <rfm@gnu.org> 20091102 */
6
+
7
+ /* { dg-do run } */
8
+ #include "ffitest.h"
9
+
10
+ typedef struct cls_struct_combined {
11
+ float a;
12
+ float b;
13
+ float c;
14
+ float d;
15
+ } cls_struct_combined;
16
+
17
+ void cls_struct_combined_fn(struct cls_struct_combined arg)
18
+ {
19
+ printf("%g %g %g %g\n",
20
+ arg.a, arg.b,
21
+ arg.c, arg.d);
22
+ fflush(stdout);
23
+ }
24
+
25
+ static void
26
+ cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
27
+ void** args, void* userdata __UNUSED__)
28
+ {
29
+ struct cls_struct_combined a0;
30
+
31
+ a0 = *(struct cls_struct_combined*)(args[0]);
32
+
33
+ cls_struct_combined_fn(a0);
34
+ }
35
+
36
+
37
+ int main (void)
38
+ {
39
+ ffi_cif cif;
40
+ void *code;
41
+ ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
42
+ ffi_type* cls_struct_fields0[5];
43
+ ffi_type cls_struct_type0;
44
+ ffi_type* dbl_arg_types[5];
45
+
46
+ cls_struct_type0.size = 0;
47
+ cls_struct_type0.alignment = 0;
48
+ cls_struct_type0.type = FFI_TYPE_STRUCT;
49
+ cls_struct_type0.elements = cls_struct_fields0;
50
+
51
+ struct cls_struct_combined g_dbl = {4.0, 5.0, 1.0, 8.0};
52
+
53
+ cls_struct_fields0[0] = &ffi_type_float;
54
+ cls_struct_fields0[1] = &ffi_type_float;
55
+ cls_struct_fields0[2] = &ffi_type_float;
56
+ cls_struct_fields0[3] = &ffi_type_float;
57
+ cls_struct_fields0[4] = NULL;
58
+
59
+ dbl_arg_types[0] = &cls_struct_type0;
60
+ dbl_arg_types[1] = NULL;
61
+
62
+ CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ffi_type_void,
63
+ dbl_arg_types) == FFI_OK);
64
+
65
+ CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_combined_gn, NULL, code) == FFI_OK);
66
+
67
+ ((void(*)(cls_struct_combined)) (code))(g_dbl);
68
+ /* { dg-output "4 5 1 8" } */
69
+ exit(0);
70
+ }
@@ -43,6 +43,16 @@
43
43
 
44
44
  #endif
45
45
 
46
+
47
+ /* MinGW kludge. */
48
+ #ifdef _WIN64
49
+ #define PRIdLL "I64d"
50
+ #define PRIuLL "I64u"
51
+ #else
52
+ #define PRIdLL "lld"
53
+ #define PRIuLL "llu"
54
+ #endif
55
+
46
56
  #ifdef USING_MMAP
47
57
  static inline void *
48
58
  allocate_mmap (size_t size)
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
1
+ # Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
2
2
 
3
3
  # This program is free software; you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
5
- # the Free Software Foundation; either version 2 of the License, or
5
+ # the Free Software Foundation; either version 3 of the License, or
6
6
  # (at your option) any later version.
7
7
  #
8
8
  # This program is distributed in the hope that it will be useful,
@@ -11,9 +11,8 @@
11
11
  # GNU General Public License for more details.
12
12
  #
13
13
  # You should have received a copy of the GNU General Public License
14
- # along with this program; if not, write to the Free Software
15
- # Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16
- # libffi testsuite that uses the 'dg.exp' driver.
14
+ # along with this program; see the file COPYING3. If not see
15
+ # <http://www.gnu.org/licenses/>.
17
16
 
18
17
  load_lib libffi-dg.exp
19
18
 
@@ -7,6 +7,14 @@
7
7
  /* { dg-do run } */
8
8
  #include "ffitestcxx.h"
9
9
 
10
+ #if defined HAVE_STDINT_H
11
+ #include <stdint.h>
12
+ #endif
13
+
14
+ #if defined HAVE_INTTYPES_H
15
+ #include <inttypes.h>
16
+ #endif
17
+
10
18
  void
11
19
  closure_test_fn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
12
20
  void** args __UNUSED__, void* userdata __UNUSED__)
@@ -27,7 +35,7 @@ void closure_test_fn1(ffi_cif* cif __UNUSED__, void* resp,
27
35
  (int)(*(double*)args[8]) + (int)*(int *)args[9] +
28
36
  (int)(*(int *)args[10]) + (int)(*(float *)args[11]) +
29
37
  (int)*(int *)args[12] + (int)(*(int *)args[13]) +
30
- (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata;
38
+ (int)(*(int *)args[14]) + *(int *)args[15] + (int)(intptr_t)userdata;
31
39
 
32
40
  printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n",
33
41
  (int)*(float *)args[0], (int)(*(float *)args[1]),
@@ -38,7 +46,7 @@ void closure_test_fn1(ffi_cif* cif __UNUSED__, void* resp,
38
46
  (int)(*(int *)args[10]), (int)(*(float *)args[11]),
39
47
  (int)*(int *)args[12], (int)(*(int *)args[13]),
40
48
  (int)(*(int *)args[14]), *(int *)args[15],
41
- (int)(long)userdata, (int)*(ffi_arg*)resp);
49
+ (int)(intptr_t)userdata, (int)*(ffi_arg*)resp);
42
50
 
43
51
  throw (int)*(ffi_arg*)resp;
44
52
  }
@@ -50,27 +58,20 @@ typedef int (*closure_test_type1)(float, float, float, float, signed short,
50
58
  int main (void)
51
59
  {
52
60
  ffi_cif cif;
53
- #ifndef USING_MMAP
54
- static ffi_closure cl;
55
- #endif
56
- ffi_closure *pcl;
61
+ void *code;
62
+ ffi_closure *pcl = (ffi_closure *)ffi_closure_alloc(sizeof(ffi_closure), &code);
57
63
  ffi_type * cl_arg_types[17];
58
- #ifdef USING_MMAP
59
- pcl = (ffi_closure *) allocate_mmap (sizeof(ffi_closure));
60
- #else
61
- pcl = &cl;
62
- #endif
63
64
 
64
65
  {
65
66
  cl_arg_types[1] = NULL;
66
67
 
67
68
  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0,
68
69
  &ffi_type_void, cl_arg_types) == FFI_OK);
69
- CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn, NULL) == FFI_OK);
70
+ CHECK(ffi_prep_closure_loc(pcl, &cif, closure_test_fn, NULL, code) == FFI_OK);
70
71
 
71
72
  try
72
73
  {
73
- (*((closure_test_type)(pcl)))();
74
+ (*((closure_test_type)(code)))();
74
75
  } catch (int exception_code)
75
76
  {
76
77
  CHECK(exception_code == 9);
@@ -104,11 +105,11 @@ int main (void)
104
105
  CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16,
105
106
  &ffi_type_sint, cl_arg_types) == FFI_OK);
106
107
 
107
- CHECK(ffi_prep_closure(pcl, &cif, closure_test_fn1,
108
- (void *) 3 /* userdata */) == FFI_OK);
108
+ CHECK(ffi_prep_closure_loc(pcl, &cif, closure_test_fn1,
109
+ (void *) 3 /* userdata */, code) == FFI_OK);
109
110
  try
110
111
  {
111
- (*((closure_test_type1)pcl))
112
+ (*((closure_test_type1)code))
112
113
  (1.1, 2.2, 3.3, 4.4, 127, 5.5, 6.6, 8, 9, 10, 11, 12.0, 13,
113
114
  19, 21, 1);
114
115
  /* { dg-output "\n1 2 3 4 127 5 6 8 9 10 11 12 13 19 21 1 3: 255" } */
@@ -3,11 +3,11 @@
3
3
  % Load plain if necessary, i.e., if running under initex.
4
4
  \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5
5
  %
6
- \def\texinfoversion{2006-10-04.17}
6
+ \def\texinfoversion{2005-07-05.19}
7
7
  %
8
8
  % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9
- % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
10
- % Software Foundation, Inc.
9
+ % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
10
+ % Foundation, Inc.
11
11
  %
12
12
  % This texinfo.tex file is free software; you can redistribute it and/or
13
13
  % modify it under the terms of the GNU General Public License as
@@ -153,22 +153,28 @@
153
153
  \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
154
154
  \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
155
155
 
156
- % Since the category of space is not known, we have to be careful.
157
- \chardef\spacecat = 10
158
- \def\spaceisspace{\catcode`\ =\spacecat}
159
-
160
- % sometimes characters are active, so we need control sequences.
156
+ % In some macros, we cannot use the `\? notation---the left quote is
157
+ % in some cases the escape char.
158
+ \chardef\backChar = `\\
161
159
  \chardef\colonChar = `\:
162
160
  \chardef\commaChar = `\,
163
- \chardef\dashChar = `\-
164
161
  \chardef\dotChar = `\.
165
162
  \chardef\exclamChar= `\!
166
- \chardef\lquoteChar= `\`
163
+ \chardef\plusChar = `\+
167
164
  \chardef\questChar = `\?
168
- \chardef\rquoteChar= `\'
169
165
  \chardef\semiChar = `\;
170
166
  \chardef\underChar = `\_
171
167
 
168
+ \chardef\spaceChar = `\ %
169
+ \chardef\spacecat = 10
170
+ \def\spaceisspace{\catcode\spaceChar=\spacecat}
171
+
172
+ {% for help with debugging.
173
+ % example usage: \expandafter\show\activebackslash
174
+ \catcode`\! = 0 \catcode`\\ = \active
175
+ !global!def!activebackslash{\}
176
+ }
177
+
172
178
  % Ignore a token.
173
179
  %
174
180
  \def\gobble#1{}
@@ -305,13 +311,6 @@
305
311
  % before the \shipout runs.
306
312
  %
307
313
  \indexdummies % don't expand commands in the output.
308
- \normalturnoffactive % \ in index entries must not stay \, e.g., if
309
- % the page break happens to be in the middle of an example.
310
- % We don't want .vr (or whatever) entries like this:
311
- % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
312
- % "\acronym" won't work when it's read back in;
313
- % it needs to be
314
- % {\code {{\tt \backslashcurfont }acronym}
315
314
  \shipout\vbox{%
316
315
  % Do this early so pdf references go to the beginning of the page.
317
316
  \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -339,9 +338,9 @@
339
338
  \pagebody{#1}%
340
339
  \ifdim\ht\footlinebox > 0pt
341
340
  % Only leave this space if the footline is nonempty.
342
- % (We lessened \vsize for it in \oddfootingyyy.)
341
+ % (We lessened \vsize for it in \oddfootingxxx.)
343
342
  % The \baselineskip=24pt in plain's \makefootline has no effect.
344
- \vskip 24pt
343
+ \vskip 2\baselineskip
345
344
  \unvbox\footlinebox
346
345
  \fi
347
346
  %
@@ -397,7 +396,7 @@
397
396
  %
398
397
  \def\parsearg{\parseargusing{}}
399
398
  \def\parseargusing#1#2{%
400
- \def\argtorun{#2}%
399
+ \def\next{#2}%
401
400
  \begingroup
402
401
  \obeylines
403
402
  \spaceisspace
@@ -428,7 +427,8 @@
428
427
  \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
429
428
  \def\temp{#3}%
430
429
  \ifx\temp\empty
431
- % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
430
+ % We cannot use \next here, as it holds the macro to run;
431
+ % thus we reuse \temp.
432
432
  \let\temp\finishparsearg
433
433
  \else
434
434
  \let\temp\argcheckspaces
@@ -440,14 +440,14 @@
440
440
  % If a _delimited_ argument is enclosed in braces, they get stripped; so
441
441
  % to get _exactly_ the rest of the line, we had to prevent such situation.
442
442
  % We prepended an \empty token at the very beginning and we expand it now,
443
- % just before passing the control to \argtorun.
443
+ % just before passing the control to \next.
444
444
  % (Similarily, we have to think about #3 of \argcheckspacesY above: it is
445
445
  % either the null string, or it ends with \^^M---thus there is no danger
446
446
  % that a pair of braces would be stripped.
447
447
  %
448
448
  % But first, we have to remove the trailing space token.
449
449
  %
450
- \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
450
+ \def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
451
451
 
452
452
  % \parseargdef\foo{...}
453
453
  % is roughly equivalent to
@@ -1051,9 +1051,9 @@ where each line of input produces a line of output.}
1051
1051
  % _ active, and distinguish by seeing if the current family is \slfam,
1052
1052
  % which is what @var uses.
1053
1053
  {
1054
- \catcode`\_ = \active
1054
+ \catcode\underChar = \active
1055
1055
  \gdef\mathunderscore{%
1056
- \catcode`\_=\active
1056
+ \catcode\underChar=\active
1057
1057
  \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
1058
1058
  }
1059
1059
  }
@@ -1096,24 +1096,15 @@ where each line of input produces a line of output.}
1096
1096
  \def\minus{$-$}
1097
1097
 
1098
1098
  % @dots{} outputs an ellipsis using the current font.
1099
- % We do .5em per period so that it has the same spacing in the cm
1100
- % typewriter fonts as three actual period characters; on the other hand,
1101
- % in other typewriter fonts three periods are wider than 1.5em. So do
1102
- % whichever is larger.
1099
+ % We do .5em per period so that it has the same spacing in a typewriter
1100
+ % font as three actual period characters.
1103
1101
  %
1104
1102
  \def\dots{%
1105
1103
  \leavevmode
1106
- \setbox0=\hbox{...}% get width of three periods
1107
- \ifdim\wd0 > 1.5em
1108
- \dimen0 = \wd0
1109
- \else
1110
- \dimen0 = 1.5em
1111
- \fi
1112
- \hbox to \dimen0{%
1113
- \hskip 0pt plus.25fil
1114
- .\hskip 0pt plus1fil
1115
- .\hskip 0pt plus1fil
1116
- .\hskip 0pt plus.5fil
1104
+ \hbox to 1.5em{%
1105
+ \hskip 0pt plus 0.25fil
1106
+ .\hfil.\hfil.%
1107
+ \hskip 0pt plus 0.5fil
1117
1108
  }%
1118
1109
  }
1119
1110
 
@@ -1206,20 +1197,21 @@ where each line of input produces a line of output.}
1206
1197
  \fi
1207
1198
  \fi
1208
1199
 
1209
- % PDF uses PostScript string constants for the names of xref targets,
1200
+ % PDF uses PostScript string constants for the names of xref targets, to
1210
1201
  % for display in the outlines, and in other places. Thus, we have to
1211
1202
  % double any backslashes. Otherwise, a name like "\node" will be
1212
1203
  % interpreted as a newline (\n), followed by o, d, e. Not good.
1213
1204
  % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
1214
1205
  % (and related messages, the final outcome is that it is up to the TeX
1215
1206
  % user to double the backslashes and otherwise make the string valid, so
1216
- % that's what we do).
1207
+ % that's we do).
1217
1208
 
1218
1209
  % double active backslashes.
1219
1210
  %
1220
1211
  {\catcode`\@=0 \catcode`\\=\active
1212
+ @gdef@activebackslash{@catcode`@\=@active @otherbackslash}
1221
1213
  @gdef@activebackslashdouble{%
1222
- @catcode`@\=@active
1214
+ @catcode@backChar=@active
1223
1215
  @let\=@doublebackslash}
1224
1216
  }
1225
1217
 
@@ -1251,17 +1243,21 @@ where each line of input produces a line of output.}
1251
1243
  \def\backslashparens#1{%
1252
1244
  \xdef#1{#1}% redefine it as its expansion; the definition is simply
1253
1245
  % \lastnode when called from \setref -> \pdfmkdest.
1254
- \HyPsdSubst{(}{\realbackslash(}{#1}%
1255
- \HyPsdSubst{)}{\realbackslash)}{#1}%
1246
+ \HyPsdSubst{(}{\backslashlparen}{#1}%
1247
+ \HyPsdSubst{)}{\backslashrparen}{#1}%
1248
+ }
1249
+
1250
+ {\catcode\exclamChar = 0 \catcode\backChar = \other
1251
+ !gdef!backslashlparen{\(}%
1252
+ !gdef!backslashrparen{\)}%
1256
1253
  }
1257
1254
 
1258
1255
  \ifpdf
1259
1256
  \input pdfcolor
1260
1257
  \pdfcatalog{/PageMode /UseOutlines}%
1261
- % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1262
1258
  \def\dopdfimage#1#2#3{%
1263
- \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1264
- \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1259
+ \def\imagewidth{#2}%
1260
+ \def\imageheight{#3}%
1265
1261
  % without \immediate, pdftex seg faults when the same image is
1266
1262
  % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1267
1263
  \ifnum\pdftexversion < 14
@@ -1269,8 +1265,8 @@ where each line of input produces a line of output.}
1269
1265
  \else
1270
1266
  \immediate\pdfximage
1271
1267
  \fi
1272
- \ifdim \wd0 >0pt width \imagewidth \fi
1273
- \ifdim \wd2 >0pt height \imageheight \fi
1268
+ \ifx\empty\imagewidth\else width \imagewidth \fi
1269
+ \ifx\empty\imageheight\else height \imageheight \fi
1274
1270
  \ifnum\pdftexversion<13
1275
1271
  #1.pdf%
1276
1272
  \else
@@ -1394,7 +1390,7 @@ where each line of input produces a line of output.}
1394
1390
  % now, I guess we'll just let the pdf reader have its way.
1395
1391
  \indexnofonts
1396
1392
  \setupdatafile
1397
- \catcode`\\=\active \otherbackslash
1393
+ \activebackslash
1398
1394
  \input \jobname.toc
1399
1395
  \endgroup
1400
1396
  }
@@ -1413,17 +1409,9 @@ where each line of input produces a line of output.}
1413
1409
  \else
1414
1410
  \let \startlink \pdfstartlink
1415
1411
  \fi
1416
- % make a live url in pdf output.
1417
1412
  \def\pdfurl#1{%
1418
1413
  \begingroup
1419
- % it seems we really need yet another set of dummies; have not
1420
- % tried to figure out what each command should do in the context
1421
- % of @url. for now, just make @/ a no-op, that's the only one
1422
- % people have actually reported a problem with.
1423
- %
1424
- \normalturnoffactive
1425
- \def\@{@}%
1426
- \let\/=\empty
1414
+ \normalturnoffactive\def\@{@}%
1427
1415
  \makevalueexpandable
1428
1416
  \leavevmode\Red
1429
1417
  \startlink attr{/Border [0 0 0]}%
@@ -1493,7 +1481,6 @@ where each line of input produces a line of output.}
1493
1481
  % We don't need math for this font style.
1494
1482
  \def\ttsl{\setfontstyle{ttsl}}
1495
1483
 
1496
-
1497
1484
  % Default leading.
1498
1485
  \newdimen\textleading \textleading = 13.2pt
1499
1486
 
@@ -1515,13 +1502,11 @@ where each line of input produces a line of output.}
1515
1502
  }%
1516
1503
  }
1517
1504
 
1518
-
1519
1505
  % Set the font macro #1 to the font named #2, adding on the
1520
1506
  % specified font prefix (normally `cm').
1521
1507
  % #3 is the font's design size, #4 is a scale factor
1522
1508
  \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
1523
1509
 
1524
-
1525
1510
  % Use cm as the default font prefix.
1526
1511
  % To specify the font prefix, you must define \fontprefix
1527
1512
  % before you read in texinfo.tex.
@@ -1545,10 +1530,6 @@ where each line of input produces a line of output.}
1545
1530
  \def\scshape{csc}
1546
1531
  \def\scbshape{csc}
1547
1532
 
1548
- % Definitions for a main text size of 11pt. This is the default in
1549
- % Texinfo.
1550
- %
1551
- \def\definetextfontsizexi{
1552
1533
  % Text fonts (11.2pt, magstep1).
1553
1534
  \def\textnominalsize{11pt}
1554
1535
  \edef\mainmagstep{\magstephalf}
@@ -1662,165 +1643,6 @@ where each line of input produces a line of output.}
1662
1643
  \font\reducedi=cmmi10
1663
1644
  \font\reducedsy=cmsy10
1664
1645
 
1665
- % reset the current fonts
1666
- \textfonts
1667
- \rm
1668
- } % end of 11pt text font size definitions
1669
-
1670
-
1671
- % Definitions to make the main text be 10pt Computer Modern, with
1672
- % section, chapter, etc., sizes following suit. This is for the GNU
1673
- % Press printing of the Emacs 22 manual. Maybe other manuals in the
1674
- % future. Used with @smallbook, which sets the leading to 12pt.
1675
- %
1676
- \def\definetextfontsizex{%
1677
- % Text fonts (10pt).
1678
- \def\textnominalsize{10pt}
1679
- \edef\mainmagstep{1000}
1680
- \setfont\textrm\rmshape{10}{\mainmagstep}
1681
- \setfont\texttt\ttshape{10}{\mainmagstep}
1682
- \setfont\textbf\bfshape{10}{\mainmagstep}
1683
- \setfont\textit\itshape{10}{\mainmagstep}
1684
- \setfont\textsl\slshape{10}{\mainmagstep}
1685
- \setfont\textsf\sfshape{10}{\mainmagstep}
1686
- \setfont\textsc\scshape{10}{\mainmagstep}
1687
- \setfont\textttsl\ttslshape{10}{\mainmagstep}
1688
- \font\texti=cmmi10 scaled \mainmagstep
1689
- \font\textsy=cmsy10 scaled \mainmagstep
1690
-
1691
- % A few fonts for @defun names and args.
1692
- \setfont\defbf\bfshape{10}{\magstephalf}
1693
- \setfont\deftt\ttshape{10}{\magstephalf}
1694
- \setfont\defttsl\ttslshape{10}{\magstephalf}
1695
- \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1696
-
1697
- % Fonts for indices, footnotes, small examples (9pt).
1698
- \def\smallnominalsize{9pt}
1699
- \setfont\smallrm\rmshape{9}{1000}
1700
- \setfont\smalltt\ttshape{9}{1000}
1701
- \setfont\smallbf\bfshape{10}{900}
1702
- \setfont\smallit\itshape{9}{1000}
1703
- \setfont\smallsl\slshape{9}{1000}
1704
- \setfont\smallsf\sfshape{9}{1000}
1705
- \setfont\smallsc\scshape{10}{900}
1706
- \setfont\smallttsl\ttslshape{10}{900}
1707
- \font\smalli=cmmi9
1708
- \font\smallsy=cmsy9
1709
-
1710
- % Fonts for small examples (8pt).
1711
- \def\smallernominalsize{8pt}
1712
- \setfont\smallerrm\rmshape{8}{1000}
1713
- \setfont\smallertt\ttshape{8}{1000}
1714
- \setfont\smallerbf\bfshape{10}{800}
1715
- \setfont\smallerit\itshape{8}{1000}
1716
- \setfont\smallersl\slshape{8}{1000}
1717
- \setfont\smallersf\sfshape{8}{1000}
1718
- \setfont\smallersc\scshape{10}{800}
1719
- \setfont\smallerttsl\ttslshape{10}{800}
1720
- \font\smalleri=cmmi8
1721
- \font\smallersy=cmsy8
1722
-
1723
- % Fonts for title page (20.4pt):
1724
- \def\titlenominalsize{20pt}
1725
- \setfont\titlerm\rmbshape{12}{\magstep3}
1726
- \setfont\titleit\itbshape{10}{\magstep4}
1727
- \setfont\titlesl\slbshape{10}{\magstep4}
1728
- \setfont\titlett\ttbshape{12}{\magstep3}
1729
- \setfont\titlettsl\ttslshape{10}{\magstep4}
1730
- \setfont\titlesf\sfbshape{17}{\magstep1}
1731
- \let\titlebf=\titlerm
1732
- \setfont\titlesc\scbshape{10}{\magstep4}
1733
- \font\titlei=cmmi12 scaled \magstep3
1734
- \font\titlesy=cmsy10 scaled \magstep4
1735
- \def\authorrm{\secrm}
1736
- \def\authortt{\sectt}
1737
-
1738
- % Chapter fonts (14.4pt).
1739
- \def\chapnominalsize{14pt}
1740
- \setfont\chaprm\rmbshape{12}{\magstep1}
1741
- \setfont\chapit\itbshape{10}{\magstep2}
1742
- \setfont\chapsl\slbshape{10}{\magstep2}
1743
- \setfont\chaptt\ttbshape{12}{\magstep1}
1744
- \setfont\chapttsl\ttslshape{10}{\magstep2}
1745
- \setfont\chapsf\sfbshape{12}{\magstep1}
1746
- \let\chapbf\chaprm
1747
- \setfont\chapsc\scbshape{10}{\magstep2}
1748
- \font\chapi=cmmi12 scaled \magstep1
1749
- \font\chapsy=cmsy10 scaled \magstep2
1750
-
1751
- % Section fonts (12pt).
1752
- \def\secnominalsize{12pt}
1753
- \setfont\secrm\rmbshape{12}{1000}
1754
- \setfont\secit\itbshape{10}{\magstep1}
1755
- \setfont\secsl\slbshape{10}{\magstep1}
1756
- \setfont\sectt\ttbshape{12}{1000}
1757
- \setfont\secttsl\ttslshape{10}{\magstep1}
1758
- \setfont\secsf\sfbshape{12}{1000}
1759
- \let\secbf\secrm
1760
- \setfont\secsc\scbshape{10}{\magstep1}
1761
- \font\seci=cmmi12
1762
- \font\secsy=cmsy10 scaled \magstep1
1763
-
1764
- % Subsection fonts (10pt).
1765
- \def\ssecnominalsize{10pt}
1766
- \setfont\ssecrm\rmbshape{10}{1000}
1767
- \setfont\ssecit\itbshape{10}{1000}
1768
- \setfont\ssecsl\slbshape{10}{1000}
1769
- \setfont\ssectt\ttbshape{10}{1000}
1770
- \setfont\ssecttsl\ttslshape{10}{1000}
1771
- \setfont\ssecsf\sfbshape{10}{1000}
1772
- \let\ssecbf\ssecrm
1773
- \setfont\ssecsc\scbshape{10}{1000}
1774
- \font\sseci=cmmi10
1775
- \font\ssecsy=cmsy10
1776
-
1777
- % Reduced fonts for @acro in text (9pt).
1778
- \def\reducednominalsize{9pt}
1779
- \setfont\reducedrm\rmshape{9}{1000}
1780
- \setfont\reducedtt\ttshape{9}{1000}
1781
- \setfont\reducedbf\bfshape{10}{900}
1782
- \setfont\reducedit\itshape{9}{1000}
1783
- \setfont\reducedsl\slshape{9}{1000}
1784
- \setfont\reducedsf\sfshape{9}{1000}
1785
- \setfont\reducedsc\scshape{10}{900}
1786
- \setfont\reducedttsl\ttslshape{10}{900}
1787
- \font\reducedi=cmmi9
1788
- \font\reducedsy=cmsy9
1789
-
1790
- % reduce space between paragraphs
1791
- \divide\parskip by 2
1792
-
1793
- % reset the current fonts
1794
- \textfonts
1795
- \rm
1796
- } % end of 10pt text font size definitions
1797
-
1798
-
1799
- % We provide the user-level command
1800
- % @fonttextsize 10
1801
- % (or 11) to redefine the text font size. pt is assumed.
1802
- %
1803
- \def\xword{10}
1804
- \def\xiword{11}
1805
- %
1806
- \parseargdef\fonttextsize{%
1807
- \def\textsizearg{#1}%
1808
- \wlog{doing @fonttextsize \textsizearg}%
1809
- %
1810
- % Set \globaldefs so that documents can use this inside @tex, since
1811
- % makeinfo 4.8 does not support it, but we need it nonetheless.
1812
- %
1813
- \begingroup \globaldefs=1
1814
- \ifx\textsizearg\xword \definetextfontsizex
1815
- \else \ifx\textsizearg\xiword \definetextfontsizexi
1816
- \else
1817
- \errhelp=\EMsimple
1818
- \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
1819
- \fi\fi
1820
- \endgroup
1821
- }
1822
-
1823
-
1824
1646
  % In order for the font changes to affect most math symbols and letters,
1825
1647
  % we have to define the \textfont of the standard families. Since
1826
1648
  % texinfo doesn't allow for producing subscripts and superscripts except
@@ -1931,7 +1753,7 @@ where each line of input produces a line of output.}
1931
1753
 
1932
1754
  % Set up the default fonts, so we can use them for creating boxes.
1933
1755
  %
1934
- \definetextfontsizexi
1756
+ \textfonts \rm
1935
1757
 
1936
1758
  % Define these so they can be easily changed for other fonts.
1937
1759
  \def\angleleft{$\langle$}
@@ -2056,14 +1878,11 @@ where each line of input produces a line of output.}
2056
1878
  % and arrange explicitly to hyphenate at a dash.
2057
1879
  % -- rms.
2058
1880
  {
2059
- \catcode`\-=\active \catcode`\_=\active
2060
- \catcode`\'=\active \catcode`\`=\active
1881
+ \catcode`\-=\active
1882
+ \catcode`\_=\active
2061
1883
  %
2062
1884
  \global\def\code{\begingroup
2063
- \catcode\rquoteChar=\active \catcode\lquoteChar=\active
2064
- \let'\codequoteright \let`\codequoteleft
2065
- %
2066
- \catcode\dashChar=\active \catcode\underChar=\active
1885
+ \catcode`\-=\active \catcode`\_=\active
2067
1886
  \ifallowcodebreaks
2068
1887
  \let-\codedash
2069
1888
  \let_\codeunder
@@ -2309,10 +2128,6 @@ where each line of input produces a line of output.}
2309
2128
  }$%
2310
2129
  }
2311
2130
 
2312
- % @textdegree - the normal degrees sign.
2313
- %
2314
- \def\textdegree{$^\circ$}
2315
-
2316
2131
  % Laurent Siebenmann reports \Orb undefined with:
2317
2132
  % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
2318
2133
  % so we'll define it if necessary.
@@ -2484,8 +2299,8 @@ where each line of input produces a line of output.}
2484
2299
  %
2485
2300
  % Leave some space for the footline. Hopefully ok to assume
2486
2301
  % @evenfooting will not be used by itself.
2487
- \global\advance\pageheight by -12pt
2488
- \global\advance\vsize by -12pt
2302
+ \global\advance\pageheight by -\baselineskip
2303
+ \global\advance\vsize by -\baselineskip
2489
2304
  }
2490
2305
 
2491
2306
  \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
@@ -3144,7 +2959,6 @@ where each line of input produces a line of output.}
3144
2959
 
3145
2960
  \def\doignore#1{\begingroup
3146
2961
  % Scan in ``verbatim'' mode:
3147
- \obeylines
3148
2962
  \catcode`\@ = \other
3149
2963
  \catcode`\{ = \other
3150
2964
  \catcode`\} = \other
@@ -3165,16 +2979,16 @@ where each line of input produces a line of output.}
3165
2979
  \gdef\dodoignore#1{%
3166
2980
  % #1 contains the command name as a string, e.g., `ifinfo'.
3167
2981
  %
3168
- % Define a command to find the next `@end #1'.
3169
- \long\def\doignoretext##1^^M@end #1{%
3170
- \doignoretextyyy##1^^M@#1\_STOP_}%
3171
- %
2982
+ % Define a command to find the next `@end #1', which must be on a line
2983
+ % by itself.
2984
+ \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}%
3172
2985
  % And this command to find another #1 command, at the beginning of a
3173
2986
  % line. (Otherwise, we would consider a line `@c @ifset', for
3174
2987
  % example, to count as an @ifset for nesting.)
3175
2988
  \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
3176
2989
  %
3177
2990
  % And now expand that command.
2991
+ \obeylines %
3178
2992
  \doignoretext ^^M%
3179
2993
  }%
3180
2994
  }
@@ -3204,12 +3018,7 @@ where each line of input produces a line of output.}
3204
3018
  }
3205
3019
 
3206
3020
  % Finish off ignored text.
3207
- { \obeylines%
3208
- % Ignore anything after the last `@end #1'; this matters in verbatim
3209
- % environments, where otherwise the newline after an ignored conditional
3210
- % would result in a blank line in the output.
3211
- \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
3212
- }
3021
+ \def\enddoignore{\endgroup\ignorespaces}
3213
3022
 
3214
3023
 
3215
3024
  % @set VAR sets the variable VAR to an empty value.
@@ -3412,39 +3221,12 @@ where each line of input produces a line of output.}
3412
3221
  \escapechar = `\\ % use backslash in output files.
3413
3222
  \def\@{@}% change to @@ when we switch to @ as escape char in index files.
3414
3223
  \def\ {\realbackslash\space }%
3415
- %
3416
3224
  % Need these in case \tex is in effect and \{ is a \delimiter again.
3417
3225
  % But can't use \lbracecmd and \rbracecmd because texindex assumes
3418
3226
  % braces and backslashes are used only as delimiters.
3419
3227
  \let\{ = \mylbrace
3420
3228
  \let\} = \myrbrace
3421
3229
  %
3422
- % I don't entirely understand this, but when an index entry is
3423
- % generated from a macro call, the \endinput which \scanmacro inserts
3424
- % causes processing to be prematurely terminated. This is,
3425
- % apparently, because \indexsorttmp is fully expanded, and \endinput
3426
- % is an expandable command. The redefinition below makes \endinput
3427
- % disappear altogether for that purpose -- although logging shows that
3428
- % processing continues to some further point. On the other hand, it
3429
- % seems \endinput does not hurt in the printed index arg, since that
3430
- % is still getting written without apparent harm.
3431
- %
3432
- % Sample source (mac-idx3.tex, reported by Graham Percival to
3433
- % help-texinfo, 22may06):
3434
- % @macro funindex {WORD}
3435
- % @findex xyz
3436
- % @end macro
3437
- % ...
3438
- % @funindex commtest
3439
- %
3440
- % The above is not enough to reproduce the bug, but it gives the flavor.
3441
- %
3442
- % Sample whatsit resulting:
3443
- % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
3444
- %
3445
- % So:
3446
- \let\endinput = \empty
3447
- %
3448
3230
  % Do the redefinitions.
3449
3231
  \commondummies
3450
3232
  }
@@ -3462,7 +3244,6 @@ where each line of input produces a line of output.}
3462
3244
  %
3463
3245
  % Do the redefinitions.
3464
3246
  \commondummies
3465
- \otherbackslash
3466
3247
  }
3467
3248
 
3468
3249
  % Called from \indexdummies and \atdummies.
@@ -3536,7 +3317,6 @@ where each line of input produces a line of output.}
3536
3317
  \definedummyword\point
3537
3318
  \definedummyword\print
3538
3319
  \definedummyword\result
3539
- \definedummyword\textdegree
3540
3320
  %
3541
3321
  % We want to disable all macros so that they are not expanded by \write.
3542
3322
  \macrolist
@@ -3550,62 +3330,63 @@ where each line of input produces a line of output.}
3550
3330
 
3551
3331
  % \commondummiesnofonts: common to \commondummies and \indexnofonts.
3552
3332
  %
3553
- \def\commondummiesnofonts{%
3554
- % Control letters and accents.
3555
- \definedummyletter\!%
3556
- \definedummyaccent\"%
3557
- \definedummyaccent\'%
3558
- \definedummyletter\*%
3559
- \definedummyaccent\,%
3560
- \definedummyletter\.%
3561
- \definedummyletter\/%
3562
- \definedummyletter\:%
3563
- \definedummyaccent\=%
3564
- \definedummyletter\?%
3565
- \definedummyaccent\^%
3566
- \definedummyaccent\`%
3567
- \definedummyaccent\~%
3568
- \definedummyword\u
3569
- \definedummyword\v
3570
- \definedummyword\H
3571
- \definedummyword\dotaccent
3572
- \definedummyword\ringaccent
3573
- \definedummyword\tieaccent
3574
- \definedummyword\ubaraccent
3575
- \definedummyword\udotaccent
3576
- \definedummyword\dotless
3577
- %
3578
- % Texinfo font commands.
3579
- \definedummyword\b
3580
- \definedummyword\i
3581
- \definedummyword\r
3582
- \definedummyword\sc
3583
- \definedummyword\t
3584
- %
3585
- % Commands that take arguments.
3586
- \definedummyword\acronym
3587
- \definedummyword\cite
3588
- \definedummyword\code
3589
- \definedummyword\command
3590
- \definedummyword\dfn
3591
- \definedummyword\emph
3592
- \definedummyword\env
3593
- \definedummyword\file
3594
- \definedummyword\kbd
3595
- \definedummyword\key
3596
- \definedummyword\math
3597
- \definedummyword\option
3598
- \definedummyword\pxref
3599
- \definedummyword\ref
3600
- \definedummyword\samp
3601
- \definedummyword\strong
3602
- \definedummyword\tie
3603
- \definedummyword\uref
3604
- \definedummyword\url
3605
- \definedummyword\var
3606
- \definedummyword\verb
3607
- \definedummyword\w
3608
- \definedummyword\xref
3333
+ % Better have this without active chars.
3334
+ {
3335
+ \catcode`\~=\other
3336
+ \gdef\commondummiesnofonts{%
3337
+ % Control letters and accents.
3338
+ \definedummyletter\!%
3339
+ \definedummyaccent\"%
3340
+ \definedummyaccent\'%
3341
+ \definedummyletter\*%
3342
+ \definedummyaccent\,%
3343
+ \definedummyletter\.%
3344
+ \definedummyletter\/%
3345
+ \definedummyletter\:%
3346
+ \definedummyaccent\=%
3347
+ \definedummyletter\?%
3348
+ \definedummyaccent\^%
3349
+ \definedummyaccent\`%
3350
+ \definedummyaccent\~%
3351
+ \definedummyword\u
3352
+ \definedummyword\v
3353
+ \definedummyword\H
3354
+ \definedummyword\dotaccent
3355
+ \definedummyword\ringaccent
3356
+ \definedummyword\tieaccent
3357
+ \definedummyword\ubaraccent
3358
+ \definedummyword\udotaccent
3359
+ \definedummyword\dotless
3360
+ %
3361
+ % Texinfo font commands.
3362
+ \definedummyword\b
3363
+ \definedummyword\i
3364
+ \definedummyword\r
3365
+ \definedummyword\sc
3366
+ \definedummyword\t
3367
+ %
3368
+ % Commands that take arguments.
3369
+ \definedummyword\acronym
3370
+ \definedummyword\cite
3371
+ \definedummyword\code
3372
+ \definedummyword\command
3373
+ \definedummyword\dfn
3374
+ \definedummyword\emph
3375
+ \definedummyword\env
3376
+ \definedummyword\file
3377
+ \definedummyword\kbd
3378
+ \definedummyword\key
3379
+ \definedummyword\math
3380
+ \definedummyword\option
3381
+ \definedummyword\samp
3382
+ \definedummyword\strong
3383
+ \definedummyword\tie
3384
+ \definedummyword\uref
3385
+ \definedummyword\url
3386
+ \definedummyword\var
3387
+ \definedummyword\verb
3388
+ \definedummyword\w
3389
+ }
3609
3390
  }
3610
3391
 
3611
3392
  % \indexnofonts is used when outputting the strings to sort the index
@@ -3670,7 +3451,6 @@ where each line of input produces a line of output.}
3670
3451
  \def\point{.}%
3671
3452
  \def\print{-|}%
3672
3453
  \def\result{=>}%
3673
- \def\textdegree{degrees}%
3674
3454
  %
3675
3455
  % We need to get rid of all macros, leaving only the arguments (if present).
3676
3456
  % Of course this is not nearly correct, but it is the best we can do for now.
@@ -4019,9 +3799,9 @@ where each line of input produces a line of output.}
4019
3799
  \endgroup
4020
3800
  }
4021
3801
 
4022
- % Like plain.tex's \dotfill, except uses up at least 1 em.
3802
+ % Like \dotfill except takes at least 1 em.
4023
3803
  \def\indexdotfill{\cleaders
4024
- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
3804
+ \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
4025
3805
 
4026
3806
  \def\primary #1{\line{#1\hfil}}
4027
3807
 
@@ -4595,17 +4375,14 @@ where each line of input produces a line of output.}
4595
4375
  \ifx\temptype\Ynothingkeyword
4596
4376
  \setbox0 = \hbox{}%
4597
4377
  \def\toctype{unnchap}%
4598
- \gdef\thischapternum{}%
4599
4378
  \gdef\thischapter{#1}%
4600
4379
  \else\ifx\temptype\Yomitfromtockeyword
4601
4380
  \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
4602
4381
  \def\toctype{omit}%
4603
- \gdef\thischapternum{}%
4604
4382
  \gdef\thischapter{}%
4605
4383
  \else\ifx\temptype\Yappendixkeyword
4606
4384
  \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
4607
4385
  \def\toctype{app}%
4608
- \xdef\thischapternum{\appendixletter}%
4609
4386
  % We don't substitute the actual chapter name into \thischapter
4610
4387
  % because we don't want its macros evaluated now. And we don't
4611
4388
  % use \thissection because that changes with each section.
@@ -4615,7 +4392,6 @@ where each line of input produces a line of output.}
4615
4392
  \else
4616
4393
  \setbox0 = \hbox{#3\enspace}%
4617
4394
  \def\toctype{numchap}%
4618
- \xdef\thischapternum{\the\chapno}%
4619
4395
  \xdef\thischapter{\putwordChapter{} \the\chapno:
4620
4396
  \noexpand\thischaptername}%
4621
4397
  \fi\fi\fi
@@ -4727,21 +4503,13 @@ where each line of input produces a line of output.}
4727
4503
  \gdef\thissection{#1}%
4728
4504
  \fi\fi\fi
4729
4505
  %
4730
- % Write the toc entry (before \donoderef). See comments in \chapmacro.
4506
+ % Write the toc entry (before \donoderef). See comments in \chfplain.
4731
4507
  \writetocentry{\toctype\sectionlevel}{#1}{#4}%
4732
4508
  %
4733
4509
  % Write the node reference (= pdf destination for pdftex).
4734
- % Again, see comments in \chapmacro.
4510
+ % Again, see comments in \chfplain.
4735
4511
  \donoderef{#3}%
4736
4512
  %
4737
- % Interline glue will be inserted when the vbox is completed.
4738
- % That glue will be a valid breakpoint for the page, since it'll be
4739
- % preceded by a whatsit (usually from the \donoderef, or from the
4740
- % \writetocentry if there was no node). We don't want to allow that
4741
- % break, since then the whatsits could end up on page n while the
4742
- % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
4743
- \nobreak
4744
- %
4745
4513
  % Output the actual section heading.
4746
4514
  \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
4747
4515
  \hangindent=\wd0 % zero if no section number
@@ -4804,7 +4572,7 @@ where each line of input produces a line of output.}
4804
4572
  \edef\temp{%
4805
4573
  \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
4806
4574
  \temp
4807
- }%
4575
+ }
4808
4576
  \fi
4809
4577
  \fi
4810
4578
  %
@@ -5056,7 +4824,7 @@ where each line of input produces a line of output.}
5056
4824
  {\tentt \global\dimen0 = 3em}% Width of the box.
5057
4825
  \dimen2 = .55pt % Thickness of rules
5058
4826
  % The text. (`r' is open on the right, `e' somewhat less so on the left.)
5059
- \setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
4827
+ \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
5060
4828
  %
5061
4829
  \setbox\errorbox=\hbox to \dimen0{\hfil
5062
4830
  \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
@@ -5279,10 +5047,11 @@ where each line of input produces a line of output.}
5279
5047
  %
5280
5048
  \maketwodispenvs {lisp}{example}{%
5281
5049
  \nonfillstart
5282
- \tt\quoteexpand
5050
+ \tt
5283
5051
  \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
5284
5052
  \gobble % eat return
5285
5053
  }
5054
+
5286
5055
  % @display/@smalldisplay: same as @lisp except keep current font.
5287
5056
  %
5288
5057
  \makedispenv {display}{%
@@ -5410,34 +5179,6 @@ where each line of input produces a line of output.}
5410
5179
  \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
5411
5180
  %
5412
5181
  \def\starttabbox{\setbox0=\hbox\bgroup}
5413
-
5414
- % Allow an option to not replace quotes with a regular directed right
5415
- % quote/apostrophe (char 0x27), but instead use the undirected quote
5416
- % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
5417
- % the default, but it works for pasting with more pdf viewers (at least
5418
- % evince), the lilypond developers report. xpdf does work with the
5419
- % regular 0x27.
5420
- %
5421
- \def\codequoteright{%
5422
- \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
5423
- '%
5424
- \else
5425
- \char'15
5426
- \fi
5427
- }
5428
- %
5429
- % and a similar option for the left quote char vs. a grave accent.
5430
- % Modern fonts display ASCII 0x60 as a grave accent, so some people like
5431
- % the code environments to do likewise.
5432
- %
5433
- \def\codequoteleft{%
5434
- \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
5435
- `%
5436
- \else
5437
- \char'22
5438
- \fi
5439
- }
5440
- %
5441
5182
  \begingroup
5442
5183
  \catcode`\^^I=\active
5443
5184
  \gdef\tabexpand{%
@@ -5450,16 +5191,7 @@ where each line of input produces a line of output.}
5450
5191
  \wd0=\dimen0 \box0 \starttabbox
5451
5192
  }%
5452
5193
  }
5453
- \catcode`\'=\active
5454
- \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
5455
- %
5456
- \catcode`\`=\active
5457
- \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
5458
- %
5459
- \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
5460
5194
  \endgroup
5461
-
5462
- % start the verbatim environment.
5463
5195
  \def\setupverbatim{%
5464
5196
  \let\nonarrowing = t%
5465
5197
  \nonfillstart
@@ -5468,7 +5200,6 @@ where each line of input produces a line of output.}
5468
5200
  \def\par{\leavevmode\egroup\box0\endgraf}%
5469
5201
  \catcode`\`=\active
5470
5202
  \tabexpand
5471
- \quoteexpand
5472
5203
  % Respect line breaks,
5473
5204
  % print special symbols as themselves, and
5474
5205
  % make each space count
@@ -5918,6 +5649,7 @@ where each line of input produces a line of output.}
5918
5649
  \spaceisspace
5919
5650
  %
5920
5651
  % Append \endinput to make sure that TeX does not see the ending newline.
5652
+ %
5921
5653
  % I've verified that it is necessary both for e-TeX and for ordinary TeX
5922
5654
  % --kasal, 29nov03
5923
5655
  \scantokens{#1\endinput}%
@@ -6184,11 +5916,11 @@ where each line of input produces a line of output.}
6184
5916
  % {. If so it reads up to the closing }, if not, it reads the whole
6185
5917
  % line. Whatever was read is then fed to the next control sequence
6186
5918
  % as an argument (by \parsebrace or \parsearg)
6187
- \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
5919
+ \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
6188
5920
  \def\braceorlinexxx{%
6189
5921
  \ifx\nchar\bgroup\else
6190
5922
  \expandafter\parsearg
6191
- \fi \macnamexxx}
5923
+ \fi \next}
6192
5924
 
6193
5925
 
6194
5926
  % @alias.
@@ -6353,7 +6085,7 @@ where each line of input produces a line of output.}
6353
6085
  % If the user specified the print name (third arg) to the ref,
6354
6086
  % print it instead of our usual "Figure 1.2".
6355
6087
  \ifdim\wd0 = 0pt
6356
- \refx{#1-snt}{}%
6088
+ \refx{#1-snt}%
6357
6089
  \else
6358
6090
  \printedrefname
6359
6091
  \fi
@@ -6783,7 +6515,7 @@ where each line of input produces a line of output.}
6783
6515
  % above and below.
6784
6516
  \nobreak\vskip\parskip
6785
6517
  \nobreak
6786
- \line\bgroup
6518
+ \line\bgroup\hss
6787
6519
  \fi
6788
6520
  %
6789
6521
  % Output the image.
@@ -6796,7 +6528,7 @@ where each line of input produces a line of output.}
6796
6528
  \epsfbox{#1.eps}%
6797
6529
  \fi
6798
6530
  %
6799
- \ifimagevmode \egroup \bigbreak \fi % space after the image
6531
+ \ifimagevmode \hss \egroup \bigbreak \fi % space after the image
6800
6532
  \endgroup}
6801
6533
 
6802
6534
 
@@ -6937,7 +6669,6 @@ where each line of input produces a line of output.}
6937
6669
  % caption if specified, else the full caption if specified, else nothing.
6938
6670
  {%
6939
6671
  \atdummies
6940
- %
6941
6672
  % since we read the caption text in the macro world, where ^^M
6942
6673
  % is turned into a normal character, we have to scan it back, so
6943
6674
  % we don't write the literal three characters "^^M" into the aux file.
@@ -6958,9 +6689,8 @@ where each line of input produces a line of output.}
6958
6689
  %
6959
6690
  % place the captured inserts
6960
6691
  %
6961
- % BEWARE: when the floats start floating, we have to issue warning
6962
- % whenever an insert appears inside a float which could possibly
6963
- % float. --kasal, 26may04
6692
+ % BEWARE: when the floats start float, we have to issue warning whenever an
6693
+ % insert appears inside a float which could possibly float. --kasal, 26may04
6964
6694
  %
6965
6695
  \checkinserts
6966
6696
  }
@@ -7387,13 +7117,6 @@ should work if nowhere else does.}
7387
7117
  % \otherifyactive is called near the end of this file.
7388
7118
  \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
7389
7119
 
7390
- % Used sometimes to turn off (effectively) the active characters even after
7391
- % parsing them.
7392
- \def\turnoffactive{%
7393
- \normalturnoffactive
7394
- \otherbackslash
7395
- }
7396
-
7397
7120
  \catcode`\@=0
7398
7121
 
7399
7122
  % \backslashcurfont outputs one backslash character in current font,
@@ -7401,29 +7124,28 @@ should work if nowhere else does.}
7401
7124
  \global\chardef\backslashcurfont=`\\
7402
7125
  \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
7403
7126
 
7127
+ % \rawbackslash defines an active \ to do \backslashcurfont.
7128
+ % \otherbackslash defines an active \ to be a literal `\' character with
7129
+ % catcode other.
7130
+ {\catcode`\\=\active
7131
+ @gdef@rawbackslash{@let\=@backslashcurfont}
7132
+ @gdef@otherbackslash{@let\=@realbackslash}
7133
+ }
7134
+
7404
7135
  % \realbackslash is an actual character `\' with catcode other, and
7405
7136
  % \doublebackslash is two of them (for the pdf outlines).
7406
7137
  {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
7407
7138
 
7408
- % In texinfo, backslash is an active character; it prints the backslash
7409
- % in fixed width font.
7410
- \catcode`\\=\active
7411
- @def@normalbackslash{{@tt@backslashcurfont}}
7412
- % On startup, @fixbackslash assigns:
7413
- % @let \ = @normalbackslash
7139
+ % \normalbackslash outputs one backslash in fixed width font.
7140
+ \def\normalbackslash{{\tt\backslashcurfont}}
7414
7141
 
7415
- % \rawbackslash defines an active \ to do \backslashcurfont.
7416
- % \otherbackslash defines an active \ to be a literal `\' character with
7417
- % catcode other.
7418
- @gdef@rawbackslash{@let\=@backslashcurfont}
7419
- @gdef@otherbackslash{@let\=@realbackslash}
7142
+ \catcode`\\=\active
7420
7143
 
7421
- % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
7422
- % the literal character `\'.
7423
- %
7424
- @def@normalturnoffactive{%
7425
- @let\=@normalbackslash
7144
+ % Used sometimes to turn off (effectively) the active characters
7145
+ % even after parsing them.
7146
+ @def@turnoffactive{%
7426
7147
  @let"=@normaldoublequote
7148
+ @let\=@realbackslash
7427
7149
  @let~=@normaltilde
7428
7150
  @let^=@normalcaret
7429
7151
  @let_=@normalunderscore
@@ -7435,6 +7157,12 @@ should work if nowhere else does.}
7435
7157
  @unsepspaces
7436
7158
  }
7437
7159
 
7160
+ % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
7161
+ % the literal character `\'. (Thus, \ is not expandable when this is in
7162
+ % effect.)
7163
+ %
7164
+ @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
7165
+
7438
7166
  % Make _ and + \other characters, temporarily.
7439
7167
  % This is canceled by @fixbackslash.
7440
7168
  @otherifyactive
@@ -7447,7 +7175,7 @@ should work if nowhere else does.}
7447
7175
  @global@let\ = @eatinput
7448
7176
 
7449
7177
  % On the other hand, perhaps the file did not have a `\input texinfo'. Then
7450
- % the first `\' in the file would cause an error. This macro tries to fix
7178
+ % the first `\{ in the file would cause an error. This macro tries to fix
7451
7179
  % that, assuming it is called before the first `\' could plausibly occur.
7452
7180
  % Also turn back on active characters that might appear in the input
7453
7181
  % file name, in case not using a pre-dumped format.