api-undocumented.texi 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. This file gathers entries that have been automatically generated from
  2. docstrings in libguile. They are not included in the manual, however,
  3. for various reasons, mostly because they have been deprecated. They
  4. are here in this file to give docstring.el a chance to update them
  5. automatically.
  6. - GOOPS is documented in its own manual.
  7. @deffn {Scheme Procedure} substring-move-right!
  8. implemented by the C function "scm_substring_move_x"
  9. @end deffn
  10. @deffn {Scheme Procedure} substring-move-left!
  11. implemented by the C function "scm_substring_move_x"
  12. @end deffn
  13. @deffn {Scheme Procedure} gentemp [prefix [obarray]]
  14. @deffnx {C Function} scm_gentemp (prefix, obarray)
  15. Create a new symbol with a name unique in an obarray.
  16. The name is constructed from an optional string @var{prefix}
  17. and a counter value. The default prefix is @code{t}. The
  18. @var{obarray} is specified as a second optional argument.
  19. Default is the system obarray where all normal symbols are
  20. interned. The counter is increased by 1 at each
  21. call. There is no provision for resetting the counter.
  22. @end deffn
  23. @deffn {Scheme Procedure} symbol-set! o s v
  24. @deffnx {C Function} scm_symbol_set_x (o, s, v)
  25. Find the symbol in @var{obarray} whose name is @var{string}, and rebind
  26. it to @var{value}. An error is signaled if @var{string} is not present
  27. in @var{obarray}.
  28. @end deffn
  29. @deffn {Scheme Procedure} symbol-bound? o s
  30. @deffnx {C Function} scm_symbol_bound_p (o, s)
  31. Return @code{#t} if @var{obarray} contains a symbol with name
  32. @var{string} bound to a defined value. This differs from
  33. @var{symbol-interned?} in that the mere mention of a symbol
  34. usually causes it to be interned; @code{symbol-bound?}
  35. determines whether a symbol has been given any meaningful
  36. value.
  37. @end deffn
  38. @deffn {Scheme Procedure} symbol-binding o s
  39. @deffnx {C Function} scm_symbol_binding (o, s)
  40. Look up in @var{obarray} the symbol whose name is @var{string}, and
  41. return the value to which it is bound. If @var{obarray} is @code{#f},
  42. use the global symbol table. If @var{string} is not interned in
  43. @var{obarray}, an error is signaled.
  44. @end deffn
  45. @deffn {Scheme Procedure} unintern-symbol o s
  46. @deffnx {C Function} scm_unintern_symbol (o, s)
  47. Remove the symbol with name @var{string} from @var{obarray}. This
  48. function returns @code{#t} if the symbol was present and @code{#f}
  49. otherwise.
  50. @end deffn
  51. @deffn {Scheme Procedure} intern-symbol o s
  52. @deffnx {C Function} scm_intern_symbol (o, s)
  53. Add a new symbol to @var{obarray} with name @var{string}, bound to an
  54. unspecified initial value. The symbol table is not modified if a symbol
  55. with this name is already present.
  56. @end deffn
  57. @deffn {Scheme Procedure} string->obarray-symbol o s [softp]
  58. @deffnx {C Function} scm_string_to_obarray_symbol (o, s, softp)
  59. Intern a new symbol in @var{obarray}, a symbol table, with name
  60. @var{string}.
  61. If @var{obarray} is @code{#f}, use the default system symbol table. If
  62. @var{obarray} is @code{#t}, the symbol should not be interned in any
  63. symbol table; merely return the pair (@var{symbol}
  64. . @var{#<undefined>}).
  65. The @var{soft?} argument determines whether new symbol table entries
  66. should be created when the specified symbol is not already present in
  67. @var{obarray}. If @var{soft?} is specified and is a true value, then
  68. new entries should not be added for symbols not already present in the
  69. table; instead, simply return @code{#f}.
  70. @end deffn
  71. @deffn {Scheme Procedure} read-and-eval! [port]
  72. @deffnx {C Function} scm_read_and_eval_x (port)
  73. Read a form from @var{port} (standard input by default), and evaluate it
  74. (memoizing it in the process) in the top-level environment. If no data
  75. is left to be read from @var{port}, an @code{end-of-file} error is
  76. signaled.
  77. @end deffn
  78. @deffn {Scheme Procedure} sloppy-member x lst
  79. @deffnx {C Function} scm_sloppy_member (x, lst)
  80. This procedure behaves like @code{member}, but does no type or error checking.
  81. Its use is recommended only in writing Guile internals,
  82. not for high-level Scheme programs.
  83. @end deffn
  84. @deffn {Scheme Procedure} sloppy-memv x lst
  85. @deffnx {C Function} scm_sloppy_memv (x, lst)
  86. This procedure behaves like @code{memv}, but does no type or error checking.
  87. Its use is recommended only in writing Guile internals,
  88. not for high-level Scheme programs.
  89. @end deffn
  90. @deffn {Scheme Procedure} sloppy-memq x lst
  91. @deffnx {C Function} scm_sloppy_memq (x, lst)
  92. This procedure behaves like @code{memq}, but does no type or error checking.
  93. Its use is recommended only in writing Guile internals,
  94. not for high-level Scheme programs.
  95. @end deffn
  96. @deffn {Scheme Procedure} builtin-variable name
  97. @deffnx {C Function} scm_builtin_variable (name)
  98. Do not use this function.
  99. @end deffn
  100. @deffn {Scheme Procedure} variable-set-name-hint! var hint
  101. @deffnx {C Function} scm_variable_set_name_hint (var, hint)
  102. Do not use this function.
  103. @end deffn
  104. @deffn {Scheme Procedure} close-all-ports-except . ports
  105. @deffnx {C Function} scm_close_all_ports_except (ports)
  106. [DEPRECATED] Close all open file ports used by the interpreter
  107. except for those supplied as arguments. This procedure
  108. was intended to be used before an exec call to close file descriptors
  109. which are not needed in the new process. However it has the
  110. undesirable side effect of flushing buffers, so it's deprecated.
  111. Use port-for-each instead.
  112. @end deffn
  113. @deffn {Scheme Procedure} c-clear-registered-modules
  114. @deffnx {C Function} scm_clear_registered_modules ()
  115. Destroy the list of modules registered with the current Guile process.
  116. The return value is unspecified. @strong{Warning:} this function does
  117. not actually unlink or deallocate these modules, but only destroys the
  118. records of which modules have been loaded. It should therefore be used
  119. only by module bookkeeping operations.
  120. @end deffn
  121. @deffn {Scheme Procedure} c-registered-modules
  122. @deffnx {C Function} scm_registered_modules ()
  123. Return a list of the object code modules that have been imported into
  124. the current Guile process. Each element of the list is a pair whose
  125. car is the name of the module, and whose cdr is the function handle
  126. for that module's initializer function. The name is the string that
  127. has been passed to scm_register_module_xxx.
  128. @end deffn
  129. @deffn {Scheme Procedure} module-import-interface module sym
  130. @deffnx {C Function} scm_module_import_interface (module, sym)
  131. Return the module or interface from which @var{sym} is imported in @var{module}. If @var{sym} is not imported (i.e., it is not defined in @var{module} or it is a module-local binding instead of an imported one), then @code{#f} is returned.
  132. @end deffn
  133. @deffn {Scheme Procedure} self-evaluating? obj
  134. @deffnx {C Function} scm_self_evaluating_p (obj)
  135. Return #t for objects which Guile considers self-evaluating
  136. @end deffn
  137. @deffn {Scheme Procedure} unmemoize-expr m
  138. @deffnx {C Function} scm_i_unmemoize_expr (m)
  139. Unmemoize the memoized expression @var{m},
  140. @end deffn
  141. @deffn {Scheme Procedure} weak-key-alist-vector? obj
  142. @deffnx {Scheme Procedure} weak-value-alist-vector? obj
  143. @deffnx {Scheme Procedure} doubly-weak-alist-vector? obj
  144. @deffnx {C Function} scm_weak_key_alist_vector_p (obj)
  145. Return @code{#t} if @var{obj} is the specified weak hash
  146. table. Note that a doubly weak hash table is neither a weak key
  147. nor a weak value hash table.
  148. @end deffn
  149. @deffn {Scheme Procedure} make-weak-key-alist-vector [size]
  150. @deffnx {Scheme Procedure} make-weak-value-alist-vector size
  151. @deffnx {Scheme Procedure} make-doubly-weak-alist-vector size
  152. @deffnx {C Function} scm_make_weak_key_alist_vector (size)
  153. Return a weak hash table with @var{size} buckets. As with any
  154. hash table, choosing a good size for the table requires some
  155. caution.
  156. You can modify weak hash tables in exactly the same way you
  157. would modify regular hash tables. (@pxref{Hash Tables})
  158. @end deffn
  159. @deffn {Scheme Procedure} include-deprecated-features
  160. Return @code{#t} if deprecated features should be included in public
  161. interfaces, or @code{#f} otherwise.
  162. @end deffn
  163. @deffn {Scheme Procedure} issue-deprecation-warning . msgs
  164. Output @var{msgs} to @code{(current-error-port)} when this
  165. is the first call to @code{issue-deprecation-warning} with
  166. this specific @var{msg}. Do nothing otherwise.
  167. The argument @var{msgs} should be a list of strings;
  168. they are printed in turn, each one followed by a newline.
  169. @end deffn
  170. @deffn {Scheme Procedure} valid-object-procedure? proc
  171. @deffnx {C Function} scm_valid_object_procedure_p (proc)
  172. Return @code{#t} ff @var{proc} is a procedure that can be used with @code{set-object-procedure}. It is always valid to use a closure constructed by @code{lambda}.
  173. @end deffn
  174. @deffn {Scheme Procedure} %get-pre-modules-obarray
  175. @deffnx {C Function} scm_get_pre_modules_obarray ()
  176. Return the obarray that is used for all new bindings before the module system is booted. The first call to @code{set-current-module} will boot the module system.
  177. @end deffn
  178. @deffn {Scheme Procedure} standard-interface-eval-closure module
  179. @deffnx {C Function} scm_standard_interface_eval_closure (module)
  180. Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added.
  181. @end deffn
  182. @deffn {Scheme Procedure} env-module env
  183. @deffnx {C Function} scm_env_module (env)
  184. Return the module of @var{ENV}, a lexical environment.
  185. @end deffn
  186. @deffn {Scheme Procedure} single-active-thread?
  187. implemented by the C function "scm_single_thread_p"
  188. @end deffn
  189. @deffn {Scheme Procedure} set-debug-cell-accesses! flag
  190. @deffnx {C Function} scm_set_debug_cell_accesses_x (flag)
  191. This function is used to turn on checking for a debug version of GUILE. This version does not support this functionality
  192. @end deffn
  193. @deffn {Scheme Procedure} standard-eval-closure module
  194. @deffnx {C Function} scm_standard_eval_closure (module)
  195. Return an eval closure for the module @var{module}.
  196. @end deffn
  197. @deffn {Scheme Procedure} mask-signals
  198. @deffnx {C Function} scm_mask_signals ()
  199. Mask signals. The returned value is not specified.
  200. @end deffn
  201. @deffn {Scheme Procedure} unmask-signals
  202. @deffnx {C Function} scm_unmask_signals ()
  203. Unmask signals. The returned value is not specified.
  204. @end deffn
  205. @deffn {Scheme Procedure} noop . args
  206. @deffnx {C Function} scm_noop (args)
  207. Do nothing. When called without arguments, return @code{#f},
  208. otherwise return the first argument.
  209. @end deffn
  210. @deffn {Scheme Procedure} system-async thunk
  211. @deffnx {C Function} scm_system_async (thunk)
  212. This function is deprecated. You can use @var{thunk} directly
  213. instead of explicitly creating an async object.
  214. @end deffn
  215. @deffn {Scheme Procedure} object-address obj
  216. @deffnx {C Function} scm_object_address (obj)
  217. Return an integer that for the lifetime of @var{obj} is uniquely
  218. returned by this function for @var{obj}
  219. @end deffn
  220. @deffn {Scheme Procedure} %compute-slots class
  221. @deffnx {C Function} scm_sys_compute_slots (class)
  222. Return a list consisting of the names of all slots belonging to
  223. class @var{class}, i.e.@: the slots of @var{class} and of all of
  224. its superclasses.
  225. @end deffn
  226. @deffn {Scheme Procedure} get-keyword key l default_value
  227. @deffnx {C Function} scm_get_keyword (key, l, default_value)
  228. Determine an associated value for the keyword @var{key} from
  229. the list @var{l}. The list @var{l} has to consist of an even
  230. number of elements, where, starting with the first, every
  231. second element is a keyword, followed by its associated value.
  232. If @var{l} does not hold a value for @var{key}, the value
  233. @var{default_value} is returned.
  234. @end deffn
  235. @deffn {Scheme Procedure} slot-ref-using-class class obj slot_name
  236. @deffnx {C Function} scm_slot_ref_using_class (class, obj, slot_name)
  237. @end deffn
  238. @deffn {Scheme Procedure} slot-set-using-class! class obj slot_name value
  239. @deffnx {C Function} scm_slot_set_using_class_x (class, obj, slot_name, value)
  240. @end deffn
  241. @deffn {Scheme Procedure} class-of x
  242. @deffnx {C Function} scm_class_of (x)
  243. Return the class of @var{x}.
  244. @end deffn
  245. @deffn {Scheme Procedure} %goops-loaded
  246. @deffnx {C Function} scm_sys_goops_loaded ()
  247. Announce that GOOPS is loaded and perform initialization
  248. on the C level which depends on the loaded GOOPS modules.
  249. @end deffn
  250. @deffn {Scheme Procedure} %method-more-specific? m1 m2 targs
  251. @deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs)
  252. Return true if method @var{m1} is more specific than @var{m2} given the argument types (classes) listed in @var{targs}.
  253. @end deffn
  254. @deffn {Scheme Procedure} find-method . l
  255. @deffnx {C Function} scm_find_method (l)
  256. @end deffn
  257. @deffn {Scheme Procedure} primitive-generic-generic subr
  258. @deffnx {C Function} scm_primitive_generic_generic (subr)
  259. @end deffn
  260. @deffn {Scheme Procedure} enable-primitive-generic! . subrs
  261. @deffnx {C Function} scm_enable_primitive_generic_x (subrs)
  262. @end deffn
  263. @deffn {Scheme Procedure} generic-capability? proc
  264. @deffnx {C Function} scm_generic_capability_p (proc)
  265. @end deffn
  266. @deffn {Scheme Procedure} %invalidate-method-cache! gf
  267. @deffnx {C Function} scm_sys_invalidate_method_cache_x (gf)
  268. @end deffn
  269. @deffn {Scheme Procedure} %invalidate-class class
  270. @deffnx {C Function} scm_sys_invalidate_class (class)
  271. @end deffn
  272. @deffn {Scheme Procedure} %modify-class old new
  273. @deffnx {C Function} scm_sys_modify_class (old, new)
  274. @end deffn
  275. @deffn {Scheme Procedure} %modify-instance old new
  276. @deffnx {C Function} scm_sys_modify_instance (old, new)
  277. @end deffn
  278. @deffn {Scheme Procedure} %set-object-setter! obj setter
  279. @deffnx {C Function} scm_sys_set_object_setter_x (obj, setter)
  280. @end deffn
  281. @deffn {Scheme Procedure} %allocate-instance class initargs
  282. @deffnx {C Function} scm_sys_allocate_instance (class, initargs)
  283. Create a new instance of class @var{class} and initialize it
  284. from the arguments @var{initargs}.
  285. @end deffn
  286. @deffn {Scheme Procedure} slot-exists? obj slot_name
  287. @deffnx {C Function} scm_slot_exists_p (obj, slot_name)
  288. Return @code{#t} if @var{obj} has a slot named @var{slot_name}.
  289. @end deffn
  290. @deffn {Scheme Procedure} slot-bound? obj slot_name
  291. @deffnx {C Function} scm_slot_bound_p (obj, slot_name)
  292. Return @code{#t} if the slot named @var{slot_name} of @var{obj}
  293. is bound.
  294. @end deffn
  295. @deffn {Scheme Procedure} slot-set! obj slot_name value
  296. @deffnx {C Function} scm_slot_set_x (obj, slot_name, value)
  297. Set the slot named @var{slot_name} of @var{obj} to @var{value}.
  298. @end deffn
  299. @deffn {Scheme Procedure} slot-exists-using-class? class obj slot_name
  300. @deffnx {C Function} scm_slot_exists_using_class_p (class, obj, slot_name)
  301. @end deffn
  302. @deffn {Scheme Procedure} slot-bound-using-class? class obj slot_name
  303. @deffnx {C Function} scm_slot_bound_using_class_p (class, obj, slot_name)
  304. @end deffn
  305. @deffn {Scheme Procedure} %fast-slot-set! obj index value
  306. @deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value)
  307. Set the slot with index @var{index} in @var{obj} to
  308. @var{value}.
  309. @end deffn
  310. @deffn {Scheme Procedure} %fast-slot-ref obj index
  311. @deffnx {C Function} scm_sys_fast_slot_ref (obj, index)
  312. Return the slot value with index @var{index} from @var{obj}.
  313. @end deffn
  314. @deffn {Scheme Procedure} @@assert-bound-ref obj index
  315. @deffnx {C Function} scm_at_assert_bound_ref (obj, index)
  316. Like @code{assert-bound}, but use @var{index} for accessing
  317. the value from @var{obj}.
  318. @end deffn
  319. @deffn {Scheme Procedure} assert-bound value obj
  320. @deffnx {C Function} scm_assert_bound (value, obj)
  321. Return @var{value} if it is bound, and invoke the
  322. @var{slot-unbound} method of @var{obj} if it is not.
  323. @end deffn
  324. @deffn {Scheme Procedure} unbound? obj
  325. @deffnx {C Function} scm_unbound_p (obj)
  326. Return @code{#t} if @var{obj} is unbound.
  327. @end deffn
  328. @deffn {Scheme Procedure} make-unbound
  329. @deffnx {C Function} scm_make_unbound ()
  330. Return the unbound value.
  331. @end deffn
  332. @deffn {Scheme Procedure} accessor-method-slot-definition obj
  333. @deffnx {C Function} scm_accessor_method_slot_definition (obj)
  334. Return the slot definition of the accessor @var{obj}.
  335. @end deffn
  336. @deffn {Scheme Procedure} method-procedure obj
  337. @deffnx {C Function} scm_method_procedure (obj)
  338. Return the procedure of the method @var{obj}.
  339. @end deffn
  340. @deffn {Scheme Procedure} method-specializers obj
  341. @deffnx {C Function} scm_method_specializers (obj)
  342. Return specializers of the method @var{obj}.
  343. @end deffn
  344. @deffn {Scheme Procedure} method-generic-function obj
  345. @deffnx {C Function} scm_method_generic_function (obj)
  346. Return the generic function for the method @var{obj}.
  347. @end deffn
  348. @deffn {Scheme Procedure} generic-function-methods obj
  349. @deffnx {C Function} scm_generic_function_methods (obj)
  350. Return the methods of the generic function @var{obj}.
  351. @end deffn
  352. @deffn {Scheme Procedure} generic-function-name obj
  353. @deffnx {C Function} scm_generic_function_name (obj)
  354. Return the name of the generic function @var{obj}.
  355. @end deffn
  356. @deffn {Scheme Procedure} class-environment obj
  357. @deffnx {C Function} scm_class_environment (obj)
  358. Return the environment of the class @var{obj}.
  359. @end deffn
  360. @deffn {Scheme Procedure} class-slots obj
  361. @deffnx {C Function} scm_class_slots (obj)
  362. Return the slot list of the class @var{obj}.
  363. @end deffn
  364. @deffn {Scheme Procedure} class-precedence-list obj
  365. @deffnx {C Function} scm_class_precedence_list (obj)
  366. Return the class precedence list of the class @var{obj}.
  367. @end deffn
  368. @deffn {Scheme Procedure} class-direct-methods obj
  369. @deffnx {C Function} scm_class_direct_methods (obj)
  370. Return the direct methods of the class @var{obj}
  371. @end deffn
  372. @deffn {Scheme Procedure} class-direct-subclasses obj
  373. @deffnx {C Function} scm_class_direct_subclasses (obj)
  374. Return the direct subclasses of the class @var{obj}.
  375. @end deffn
  376. @deffn {Scheme Procedure} class-direct-slots obj
  377. @deffnx {C Function} scm_class_direct_slots (obj)
  378. Return the direct slots of the class @var{obj}.
  379. @end deffn
  380. @deffn {Scheme Procedure} class-direct-supers obj
  381. @deffnx {C Function} scm_class_direct_supers (obj)
  382. Return the direct superclasses of the class @var{obj}.
  383. @end deffn
  384. @deffn {Scheme Procedure} class-name obj
  385. @deffnx {C Function} scm_class_name (obj)
  386. Return the class name of @var{obj}.
  387. @end deffn
  388. @deffn {Scheme Procedure} instance? obj
  389. @deffnx {C Function} scm_instance_p (obj)
  390. Return @code{#t} if @var{obj} is an instance.
  391. @end deffn
  392. @deffn {Scheme Procedure} %inherit-magic! class dsupers
  393. @deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers)
  394. @end deffn
  395. @deffn {Scheme Procedure} %prep-layout! class
  396. @deffnx {C Function} scm_sys_prep_layout_x (class)
  397. @end deffn
  398. @deffn {Scheme Procedure} %initialize-object obj initargs
  399. @deffnx {C Function} scm_sys_initialize_object (obj, initargs)
  400. Initialize the object @var{obj} with the given arguments
  401. @var{initargs}.
  402. @end deffn
  403. @deffn {Scheme Procedure} make . args
  404. @deffnx {C Function} scm_make (args)
  405. Make a new object. @var{args} must contain the class and
  406. all necessary initialization information.
  407. @end deffn
  408. @deffn {Scheme Procedure} slot-ref obj slot_name
  409. @deffnx {C Function} scm_slot_ref (obj, slot_name)
  410. Return the value from @var{obj}'s slot with the name
  411. @var{slot_name}.
  412. @end deffn
  413. @deffn {Scheme Procedure} %tag-body body
  414. @deffnx {C Function} scm_sys_tag_body (body)
  415. Internal GOOPS magic---don't use this function!
  416. @end deffn
  417. @deffn {Scheme Procedure} make-keyword-from-dash-symbol symbol
  418. @deffnx {C Function} scm_make_keyword_from_dash_symbol (symbol)
  419. Make a keyword object from a @var{symbol} that starts with a dash.
  420. @end deffn
  421. @deffn {Scheme Procedure} keyword-dash-symbol keyword
  422. @deffnx {C Function} scm_keyword_dash_symbol (keyword)
  423. Return the dash symbol for @var{keyword}.
  424. This is the inverse of @code{make-keyword-from-dash-symbol}.
  425. @end deffn
  426. @deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill]
  427. @deffnx {Scheme Procedure} make-uniform-vector length prototype [fill]
  428. @deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill)
  429. Create and return a uniform array or vector of type
  430. corresponding to @var{prototype} with dimensions @var{dims} or
  431. length @var{length}. If @var{fill} is supplied, it's used to
  432. fill the array, otherwise @var{prototype} is used.
  433. @end deffn
  434. @deffn {Scheme Procedure} list->uniform-array ndim prot lst
  435. @deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
  436. Return a uniform array of the type indicated by prototype
  437. @var{prot} with elements the same as those of @var{lst}.
  438. Elements must be of the appropriate type, no coercions are
  439. done.
  440. The argument @var{ndim} determines the number of dimensions
  441. of the array. It is either an exact integer, giving the
  442. number directly, or a list of exact integers, whose length
  443. specifies the number of dimensions and each element is the
  444. lower index bound of its dimension.
  445. @end deffn
  446. @deffn {Scheme Procedure} array-prototype ra
  447. @deffnx {C Function} scm_array_prototype (ra)
  448. Return an object that would produce an array of the same type
  449. as @var{array}, if used as the @var{prototype} for
  450. @code{make-uniform-array}.
  451. @end deffn
  452. @deffn {Scheme Procedure} call-with-dynamic-root thunk handler
  453. @deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
  454. Call @var{thunk} with a new dynamic state and within a continuation barrier. The @var{handler} catches all otherwise uncaught throws and executes within the same dynamic context as @var{thunk}.
  455. @end deffn
  456. @deffn {Scheme Procedure} dynamic-root
  457. @deffnx {C Function} scm_dynamic_root ()
  458. Return an object representing the current dynamic root.
  459. These objects are only useful for comparison using @code{eq?}.
  460. @end deffn
  461. @deffn {Scheme Procedure} uniform-vector? obj
  462. @deffnx {C Function} scm_uniform_vector_p (obj)
  463. Return @code{#t} if @var{obj} is a uniform vector.
  464. @end deffn
  465. @deffn {Scheme Procedure} uniform-vector-ref v idx
  466. @deffnx {C Function} scm_uniform_vector_ref (v, idx)
  467. Return the element at index @var{idx} of the
  468. homogeneous numeric vector @var{v}.
  469. @end deffn
  470. @deffn {Scheme Procedure} uniform-vector-set! v idx val
  471. @deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
  472. Set the element at index @var{idx} of the
  473. homogeneous numeric vector @var{v} to @var{val}.
  474. @end deffn
  475. @deffn {Scheme Procedure} uniform-vector->list uvec
  476. @deffnx {C Function} scm_uniform_vector_to_list (uvec)
  477. Convert the uniform numeric vector @var{uvec} to a list.
  478. @end deffn
  479. @deffn {Scheme Procedure} uniform-vector-length v
  480. @deffnx {C Function} scm_uniform_vector_length (v)
  481. Return the number of elements in the uniform vector @var{v}.
  482. @end deffn
  483. @deffn {Scheme Procedure} make-u8vector len [fill]
  484. @deffnx {C Function} scm_make_u8vector (len, fill)
  485. Return a newly allocated uniform numeric vector which can
  486. hold @var{len} elements. If @var{fill} is given, it is used to
  487. initialize the elements, otherwise the contents of the vector
  488. is unspecified.
  489. @end deffn
  490. @deffn {Scheme Procedure} u8vector . l
  491. @deffnx {C Function} scm_u8vector (l)
  492. Return a newly allocated uniform numeric vector containing
  493. all argument values.
  494. @end deffn
  495. @deffn {Scheme Procedure} list->u8vector l
  496. @deffnx {C Function} scm_list_to_u8vector (l)
  497. Convert the list @var{l} to a numeric uniform vector.
  498. @end deffn
  499. @deffn {Scheme Procedure} any->u8vector obj
  500. @deffnx {C Function} scm_any_to_u8vector (obj)
  501. Convert @var{obj}, which can be a list, vector, or
  502. uniform vector, to a numeric uniform vector of
  503. type u8.
  504. @end deffn
  505. @deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
  506. @deffnx {C Function} scm_string_any (char_pred, s, start, end)
  507. Check if the predicate @var{pred} is true for any character in
  508. the string @var{s}.
  509. Calls to @var{pred} are made from left to right across @var{s}.
  510. When it returns true (ie.@: non-@code{#f}), that return value
  511. is the return from @code{string-any}.
  512. The SRFI-13 specification requires that the call to @var{pred}
  513. on the last character of @var{s} (assuming that point is
  514. reached) be a tail call, but currently in Guile this is not the
  515. case.
  516. @end deffn
  517. @deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
  518. @deffnx {C Function} scm_string_every (char_pred, s, start, end)
  519. Check if the predicate @var{pred} is true for every character
  520. in the string @var{s}.
  521. Calls to @var{pred} are made from left to right across @var{s}.
  522. If the predicate is true for every character then the return
  523. value from the last @var{pred} call is the return from
  524. @code{string-every}.
  525. If there are no characters in @var{s} (ie.@: @var{start} equals
  526. @var{end}) then the return is @code{#t}.
  527. The SRFI-13 specification requires that the call to @var{pred}
  528. on the last character of @var{s} (assuming that point is
  529. reached) be a tail call, but currently in Guile this is not the
  530. case.
  531. @end deffn
  532. @deffn {Scheme Procedure} inf? x
  533. @deffnx {C Function} scm_inf_p (x)
  534. Return @code{#t} if @var{x} is either @samp{+inf.0}
  535. or @samp{-inf.0}, @code{#f} otherwise.
  536. @end deffn