Branch: Tag:

1999-01-01

1999-01-01 00:00:00 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

Pike 0.7

Rev: about_pike/.cvsignore:1.1(DEAD)
Rev: about_pike/README:1.1(DEAD)
Rev: about_pike/about_versions:1.1(DEAD)
Rev: about_pike/client-server.pike:1.1(DEAD)
Rev: about_pike/crypto_stuff.pike:1.1(DEAD)
Rev: about_pike/draw_stuff.pike:1.3(DEAD)
Rev: about_pike/foo.ppm:1.1(DEAD)
Rev: about_pike/mail_stuff.pike:1.1(DEAD)
Rev: about_pike/matrix2.foo:1.1(DEAD)
Rev: about_pike/perl_tcl_python_pike:1.2(DEAD)
Rev: about_pike/why_pike_long:1.1(DEAD)
Rev: about_pike/why_pike_short:1.1(DEAD)
Rev: doc/README:1.1.1.1(DEAD)
Rev: doc/builtin/_memory_usage:1.1(DEAD)
Rev: doc/builtin/_next:1.1(DEAD)
Rev: doc/builtin/_prev:1.1(DEAD)
Rev: doc/builtin/_verify_internals:1.1.1.1(DEAD)
Rev: doc/builtin/add_constant:1.1.1.1(DEAD)
Rev: doc/builtin/aggregage_multiset:1.1.1.1(DEAD)
Rev: doc/builtin/aggregate:1.1.1.1(DEAD)
Rev: doc/builtin/aggregate_mapping:1.1.1.1(DEAD)
Rev: doc/builtin/alarm:1.1.1.1(DEAD)
Rev: doc/builtin/all_constants:1.1.1.1(DEAD)
Rev: doc/builtin/allocate:1.1.1.1(DEAD)
Rev: doc/builtin/arrayp:1.1.1.1(DEAD)
Rev: doc/builtin/backtrace:1.2(DEAD)
Rev: doc/builtin/call_function:1.1.1.1(DEAD)
Rev: doc/builtin/clone:1.1.1.1(DEAD)
Rev: doc/builtin/column:1.1.1.1(DEAD)
Rev: doc/builtin/combine_path:1.1.1.1(DEAD)
Rev: doc/builtin/compile_file:1.1.1.1(DEAD)
Rev: doc/builtin/compile_string:1.1.1.1(DEAD)
Rev: doc/builtin/copy_value:1.1.1.1(DEAD)
Rev: doc/builtin/crypt:1.1.1.1(DEAD)
Rev: doc/builtin/ctime:1.1.1.1(DEAD)
Rev: doc/builtin/destruct:1.1.1.1(DEAD)
Rev: doc/builtin/equal:1.1.1.1(DEAD)
Rev: doc/builtin/exit:1.1.1.1(DEAD)
Rev: doc/builtin/floatp:1.1.1.1(DEAD)
Rev: doc/builtin/function_name:1.1.1.1(DEAD)
Rev: doc/builtin/function_object:1.1.1.1(DEAD)
Rev: doc/builtin/functionp:1.1.1.1(DEAD)
Rev: doc/builtin/gc:1.1.1.1(DEAD)
Rev: doc/builtin/getpid:1.1.1.1(DEAD)
Rev: doc/builtin/glob:1.1.1.1(DEAD)
Rev: doc/builtin/hash:1.1.1.1(DEAD)
Rev: doc/builtin/indices:1.1.1.1(DEAD)
Rev: doc/builtin/intp:1.1.1.1(DEAD)
Rev: doc/builtin/kill:1.1.1.1(DEAD)
Rev: doc/builtin/load_module:1.1(DEAD)
Rev: doc/builtin/localtime:1.1.1.1(DEAD)
Rev: doc/builtin/lower_case:1.1.1.1(DEAD)
Rev: doc/builtin/m_delete:1.1.1.1(DEAD)
Rev: doc/builtin/mappingp:1.1.1.1(DEAD)
Rev: doc/builtin/mkmapping:1.1.1.1(DEAD)
Rev: doc/builtin/multisetp:1.1.1.1(DEAD)
Rev: doc/builtin/next_object:1.1.1.1(DEAD)
Rev: doc/builtin/object_program:1.2(DEAD)
Rev: doc/builtin/objectp:1.1.1.1(DEAD)
Rev: doc/builtin/programp:1.1.1.1(DEAD)
Rev: doc/builtin/query_host_name:1.1.1.1(DEAD)
Rev: doc/builtin/query_num_arg:1.1.1.1(DEAD)
Rev: doc/builtin/random:1.1.1.1(DEAD)
Rev: doc/builtin/random_seed:1.1.1.1(DEAD)
Rev: doc/builtin/replace:1.1.1.1(DEAD)
Rev: doc/builtin/reverse:1.1.1.1(DEAD)
Rev: doc/builtin/rows:1.1.1.1(DEAD)
Rev: doc/builtin/rusage:1.1.1.1(DEAD)
Rev: doc/builtin/search:1.1.1.1(DEAD)
Rev: doc/builtin/signal:1.1.1.1(DEAD)
Rev: doc/builtin/signame:1.1.1.1(DEAD)
Rev: doc/builtin/signum:1.1.1.1(DEAD)
Rev: doc/builtin/sizeof:1.1.1.1(DEAD)
Rev: doc/builtin/sleep:1.1.1.1(DEAD)
Rev: doc/builtin/sort:1.1.1.1(DEAD)
Rev: doc/builtin/stringp:1.1.1.1(DEAD)
Rev: doc/builtin/this_object:1.1.1.1(DEAD)
Rev: doc/builtin/this_thread:1.1(DEAD)
Rev: doc/builtin/thread_create:1.2(DEAD)
Rev: doc/builtin/throw:1.1.1.1(DEAD)
Rev: doc/builtin/time:1.1.1.1(DEAD)
Rev: doc/builtin/trace:1.1.1.1(DEAD)
Rev: doc/builtin/ualarm:1.1.1.1(DEAD)
Rev: doc/builtin/upper_case:1.1.1.1(DEAD)
Rev: doc/builtin/values:1.1.1.1(DEAD)
Rev: doc/builtin/zero_type:1.3(DEAD)
Rev: doc/index.bmml:1.2(DEAD)
Rev: doc/internal/.bmmlrc:1.1(DEAD)
Rev: doc/internal/array/aggregate_array:1.1(DEAD)
Rev: doc/internal/array/allocate_array:1.1(DEAD)
Rev: doc/internal/array/array:1.2(DEAD)
Rev: doc/internal/array/array_index:1.2(DEAD)
Rev: doc/internal/array/array_remove:1.1(DEAD)
Rev: doc/internal/array/array_search:1.1(DEAD)
Rev: doc/internal/array/array_set_index:1.1(DEAD)
Rev: doc/internal/array/copy_array:1.1(DEAD)
Rev: doc/internal/array/free_array:1.1(DEAD)
Rev: doc/internal/array/push_array_items:1.1(DEAD)
Rev: doc/internal/array/resize_array:1.1(DEAD)
Rev: doc/internal/array/slice_array:1.1(DEAD)
Rev: doc/internal/low_level/hashmem:1.1(DEAD)
Rev: doc/internal/low_level/init_memsearch:1.1(DEAD)
Rev: doc/internal/low_level/low_level:1.2(DEAD)
Rev: doc/internal/low_level/memory_search:1.1(DEAD)
Rev: doc/internal/low_level/reorder:1.1(DEAD)
Rev: doc/internal/low_level/set_close_on_exec:1.1(DEAD)
Rev: doc/internal/low_level/set_nonblocking:1.1(DEAD)
Rev: doc/internal/low_level/set_read_callback:1.1(DEAD)
Rev: doc/internal/low_level/set_write_callback:1.1(DEAD)
Rev: doc/internal/low_level/xalloc:1.1(DEAD)
Rev: doc/internal/mappings/copy_mapping:1.1(DEAD)
Rev: doc/internal/mappings/free_mapping:1.1(DEAD)
Rev: doc/internal/mappings/low_mapping_lookup:1.1(DEAD)
Rev: doc/internal/mappings/m_sizeof:1.1(DEAD)
Rev: doc/internal/mappings/map_delete:1.1(DEAD)
Rev: doc/internal/mappings/mapping:1.1(DEAD)
Rev: doc/internal/mappings/mapping_indices:1.1(DEAD)
Rev: doc/internal/mappings/mapping_insert:1.1(DEAD)
Rev: doc/internal/mappings/mapping_replace:1.1(DEAD)
Rev: doc/internal/mappings/mapping_values:1.1(DEAD)
Rev: doc/internal/mappings/mkmapping:1.1(DEAD)
Rev: doc/internal/object/object:1.1(DEAD)
Rev: doc/internal/pike/SETJMP:1.2(DEAD)
Rev: doc/internal/pike/SET_ONERROR:1.2(DEAD)
Rev: doc/internal/pike/UNSETJMP:1.2(DEAD)
Rev: doc/internal/pike/UNSET_ONERROR:1.2(DEAD)
Rev: doc/internal/pike/data_types:1.1(DEAD)
Rev: doc/internal/pike/error:1.3(DEAD)
Rev: doc/internal/pike/error_handling:1.1(DEAD)
Rev: doc/internal/pike/fatal:1.2(DEAD)
Rev: doc/internal/pike/frame:1.2(DEAD)
Rev: doc/internal/pike/throw:1.2(DEAD)
Rev: doc/internal/pike/type_field:1.2(DEAD)
Rev: doc/internal/pike/types:1.2(DEAD)
Rev: doc/internal/program/add_function:1.1(DEAD)
Rev: doc/internal/program/add_storage:1.1(DEAD)
Rev: doc/internal/program/end_c_program:1.1(DEAD)
Rev: doc/internal/program/program:1.2(DEAD)
Rev: doc/internal/program/set_exit_callback:1.1(DEAD)
Rev: doc/internal/program/set_init_callback:1.1(DEAD)
Rev: doc/internal/program/start_new_program:1.1(DEAD)
Rev: doc/internal/strings/add_shared_strings:1.1(DEAD)
Rev: doc/internal/strings/begin_shared_string:1.1(DEAD)
Rev: doc/internal/strings/binary_findstring:1.1(DEAD)
Rev: doc/internal/strings/end_shared_string:1.1(DEAD)
Rev: doc/internal/strings/findstring:1.1(DEAD)
Rev: doc/internal/strings/free_string:1.2(DEAD)
Rev: doc/internal/strings/make_shared_binary_string:1.1(DEAD)
Rev: doc/internal/strings/make_shared_string:1.2(DEAD)
Rev: doc/internal/strings/my_strcmp:1.1(DEAD)
Rev: doc/internal/strings/pike_string:1.2(DEAD)
Rev: doc/internal/strings/push_string:1.1(DEAD)
Rev: doc/internal/strings/string_replace:1.1(DEAD)
Rev: doc/internal/svalue/IS_ZERO:1.1(DEAD)
Rev: doc/internal/svalue/assign_svalue:1.1(DEAD)
Rev: doc/internal/svalue/free_svalue:1.1(DEAD)
Rev: doc/internal/svalue/is_eq:1.1(DEAD)
Rev: doc/internal/svalue/is_equal:1.1(DEAD)
Rev: doc/internal/svalue/is_lt:1.1(DEAD)
Rev: doc/internal/svalue/svalue:1.1(DEAD)
Rev: doc/manual/example1:1.1.1.1(DEAD)
Rev: doc/manual/example2:1.1.1.1(DEAD)
Rev: doc/manual/example3:1.2(DEAD)
Rev: doc/manual/tutorial:1.1.1.1(DEAD)
Rev: doc/operators/and:1.1.1.1(DEAD)
Rev: doc/operators/complement:1.1.1.1(DEAD)
Rev: doc/operators/divide:1.1.1.1(DEAD)
Rev: doc/operators/index:1.1.1.1(DEAD)
Rev: doc/operators/is_equal:1.1.1.1(DEAD)
Rev: doc/operators/is_greater_or_equal:1.1.1.1(DEAD)
Rev: doc/operators/is_greater_than:1.1.1.1(DEAD)
Rev: doc/operators/is_lesser_or_equal:1.1.1.1(DEAD)
Rev: doc/operators/is_lesser_than:1.1.1.1(DEAD)
Rev: doc/operators/logical_and:1.1.1.1(DEAD)
Rev: doc/operators/logical_or:1.1.1.1(DEAD)
Rev: doc/operators/minus:1.1.1.1(DEAD)
Rev: doc/operators/modulo:1.1.1.1(DEAD)
Rev: doc/operators/mult:1.1.1.1(DEAD)
Rev: doc/operators/not:1.1.1.1(DEAD)
Rev: doc/operators/not_equal:1.1.1.1(DEAD)
Rev: doc/operators/operators:1.1.1.1(DEAD)
Rev: doc/operators/or:1.1.1.1(DEAD)
Rev: doc/operators/plus:1.1.1.1(DEAD)
Rev: doc/operators/range:1.1.1.1(DEAD)
Rev: doc/operators/shift_left:1.1.1.1(DEAD)
Rev: doc/operators/shift_right:1.1.1.1(DEAD)
Rev: doc/operators/xor:1.1.1.1(DEAD)
Rev: doc/pike/all.bmml:1.1.1.1(DEAD)
Rev: doc/pike/cast:1.1.1.1(DEAD)
Rev: doc/pike/catch:1.2(DEAD)
Rev: doc/pike/class:1.1.1.1(DEAD)
Rev: doc/pike/command_line_options:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/break:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/catch:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/continue:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/do-while:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/for:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/foreach:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/if-else:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/return:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/switch:1.1.1.1(DEAD)
Rev: doc/pike/control_structures/while:1.1.1.1(DEAD)
Rev: doc/pike/efuns.bmml:1.1.1.1(DEAD)
Rev: doc/pike/functions:1.1.1.1(DEAD)
Rev: doc/pike/gauge:1.2(DEAD)
Rev: doc/pike/hilfe:1.1.1.1(DEAD)
Rev: doc/pike/how_to_make_modules:1.1.1.1(DEAD)
Rev: doc/pike/inherit:1.1.1.1(DEAD)
Rev: doc/pike/lambda:1.1.1.1(DEAD)
Rev: doc/pike/modifier:1.1.1.1(DEAD)
Rev: doc/pike/preprocessor:1.1.1.1(DEAD)
Rev: doc/pike/reserved.bmml:1.1.1.1(DEAD)
Rev: doc/pike/sscanf:1.1.1.1(DEAD)
Rev: doc/pike/typeof:1.1.1.1(DEAD)
Rev: doc/pike/variables:1.1.1.1(DEAD)
Rev: doc/precompiled/FILE:1.1(DEAD)
Rev: doc/precompiled/condition:1.1(DEAD)
Rev: doc/precompiled/fifo:1.1(DEAD)
Rev: doc/precompiled/mutex:1.1(DEAD)
Rev: doc/precompiled/queue:1.1(DEAD)
Rev: doc/precompiled/sql:1.5(DEAD)
Rev: doc/precompiled/sql_result:1.5(DEAD)
Rev: doc/precompiled/stack:1.1(DEAD)
Rev: doc/precompiled/string_buffer:1.2(DEAD)
Rev: doc/simulated/PI:1.1.1.1(DEAD)
Rev: doc/simulated/add_efun:1.1.1.1(DEAD)
Rev: doc/simulated/aggregage_list:1.1.1.1(DEAD)
Rev: doc/simulated/all_efuns:1.1.1.1(DEAD)
Rev: doc/simulated/capitalize:1.1.1.1(DEAD)
Rev: doc/simulated/describe_backtrace:1.1.1.1(DEAD)
Rev: doc/simulated/exec:1.1.1.1(DEAD)
Rev: doc/simulated/explode:1.1.1.1(DEAD)
Rev: doc/simulated/file_size:1.2(DEAD)
Rev: doc/simulated/filter:1.1.1.1(DEAD)
Rev: doc/simulated/filter_array:1.1.1.1(DEAD)
Rev: doc/simulated/find_option:1.1(DEAD)
Rev: doc/simulated/get_args:1.1(DEAD)
Rev: doc/simulated/get_function:1.1.1.1(DEAD)
Rev: doc/simulated/getenv:1.1.1.1(DEAD)
Rev: doc/simulated/implode:1.1.1.1(DEAD)
Rev: doc/simulated/implode_nicely:1.1(DEAD)
Rev: doc/simulated/l_sizeof:1.1.1.1(DEAD)
Rev: doc/simulated/listp:1.1.1.1(DEAD)
Rev: doc/simulated/m_indices:1.1.1.1(DEAD)
Rev: doc/simulated/m_sizeof:1.1.1.1(DEAD)
Rev: doc/simulated/m_values:1.1.1.1(DEAD)
Rev: doc/simulated/map:1.1.1.1(DEAD)
Rev: doc/simulated/map_array:1.1.1.1(DEAD)
Rev: doc/simulated/master:1.1.1.1(DEAD)
Rev: doc/simulated/member_array:1.1.1.1(DEAD)
Rev: doc/simulated/mklist:1.1.1.1(DEAD)
Rev: doc/simulated/mkmultiset:1.1.1.1(DEAD)
Rev: doc/simulated/perror:1.1.1.1(DEAD)
Rev: doc/simulated/popen:1.1.1.1(DEAD)
Rev: doc/simulated/previous_object:1.1.1.1(DEAD)
Rev: doc/simulated/putenv:1.1.1.1(DEAD)
Rev: doc/simulated/read_bytes:1.2(DEAD)
Rev: doc/simulated/read_file:1.2(DEAD)
Rev: doc/simulated/regexp:1.1.1.1(DEAD)
Rev: doc/simulated/search_array:1.1.1.1(DEAD)
Rev: doc/simulated/sort_array:1.2(DEAD)
Rev: doc/simulated/spawn:1.1.1.1(DEAD)
Rev: doc/simulated/stderr:1.1(DEAD)
Rev: doc/simulated/stdin:1.1(DEAD)
Rev: doc/simulated/stdout:1.1(DEAD)
Rev: doc/simulated/strlen:1.1.1.1(DEAD)
Rev: doc/simulated/strmult:1.1(DEAD)
Rev: doc/simulated/strstr:1.1.1.1(DEAD)
Rev: doc/simulated/sum:1.1.1.1(DEAD)
Rev: doc/simulated/sum_arrays:1.1.1.1(DEAD)
Rev: doc/simulated/system:1.1.1.1(DEAD)
Rev: doc/simulated/this_function:1.1.1.1(DEAD)
Rev: doc/simulated/uniq:1.1(DEAD)
Rev: doc/simulated/version:1.1.1.1(DEAD)
Rev: doc/simulated/write:1.1.1.1(DEAD)
Rev: doc/simulated/write_file:1.2(DEAD)
Rev: doc/types/array:1.1.1.1(DEAD)
Rev: doc/types/float:1.1.1.1(DEAD)
Rev: doc/types/function:1.1.1.1(DEAD)
Rev: doc/types/int:1.1.1.1(DEAD)
Rev: doc/types/mapping:1.1.1.1(DEAD)
Rev: doc/types/mixed:1.1.1.1(DEAD)
Rev: doc/types/multiset:1.1.1.1(DEAD)
Rev: doc/types/object:1.1.1.1(DEAD)
Rev: doc/types/program:1.1.1.1(DEAD)
Rev: doc/types/string:1.1.1.1(DEAD)

1:   <?xml version='1.0' encoding='utf-8'?>   <autodoc> - <namespace name='c'> - <docgroup homogen-name='IS_ZERO' homogen-type='method'> - <method name='IS_ZERO'/><doc placeholder='true'> - <text> - <p><tt>IS_ZERO</tt> - is this svalue considered 'false'</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int IS_ZERO(struct svalue *<i>s</i>);<br/> - </p> - </tt> - <p>IS_ZERO returns true if the svalue 's' is a zero. (or an object with - `! operator that returned true..)</p> - </text> -  - <group><note/><text> - <p>IS_ZERO is actually a macro</p> -  - svalue</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::is_eq' to='is_eq'>is_eq</ref>, <ref resolved='c::is_equal' to='is_equal'>is_equal</ref> and <ref resolved='c::is_lt' to='is_lt'>is_lt</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='SETJMP' homogen-type='method'> - <method name='SETJMP'/><doc placeholder='true'> - <text> - <p><tt>SETJMP</tt> - catch errors</p> -  - <tt><p>#include "error.h"<br/> -  - </p> - <p>int SETJMP(JMP_BUF <i>buf</i>);<br/> - </p> - </tt> - <p>These macros are wrappers to the setjmp/longjmp routines with some - added support for cleaning up the Pike stack and other things that - might need freeing. What SETJUMP does is that it lets you catch - Pike errors much like the Pike function catch(). When called, - SETJMP returns zero, so the 'failsafe' code is executed. If an error - occurs in that code the processor will jump directly to the SETJMP - again and it will return 'true'. Then the 'error' code will be - executed.</p> - </text> -  - <group><note/><text> - <p>SETJMP is a macro - </p> - <p>'buf' has to be a local variable - </p> - <p>There are some limitations to how you can use local variables in the - same function as setjump/longjump. See setjup(3) for more details.</p> - </text></group> -  - <group><example/><text> - <tt><p>#include "error.h"<br/> -  - </p> - <p>void do_catch()<br/> - {<br/> - <dl><group><text>JMP_BUF buf;<br/> - </text></group></dl> - </p> - <p><dl><group><text>if(SETJMP(buf)) {<br/> - <dl><group><text>/* An error / longjump occured */<br/> - </text></group></dl>} else {<br/> - <dl><group><text>/* Execute failsafe code here */<br/> - </text></group></dl>}<br/> - </text></group></dl> - </p> - <p><dl><group><text>UNSETJMP(foo)<br/> - </text></group></dl>}<br/> - </p> - </tt> - error_handling</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::throw' to='throw'>throw</ref>, <ref resolved='c::error' to='error'>error</ref>, <ref resolved='c::UNSETJMP' to='UNSETJMP'>UNSETJMP</ref>, <ref resolved='c::SET_ONERROR' to='SET_ONERROR'>SET_ONERROR</ref> and <ref resolved='c::UNSET_ONERROR' to='UNSET_ONERROR'>UNSET_ONERROR</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='SET_ONERROR' homogen-type='method'> - <method name='SET_ONERROR'/><doc placeholder='true'> - <text> - <p><tt>SET_ONERROR</tt> - call this function if an error occurs</p> -  - <tt><p>#include "error.h"<br/> -  - </p> - <p>void SET_ONERROR(ONERROR <i>tmp</i>, void (*func)(<i>void</i> *), void *<i>arg</i>);<br/> - </p> - </tt> - <p>This function sets an error handler to be called when an error - occurs. When an error occurs the function 'func' is called with - the argument 'arg'. The advantage of this method over using SETJMP - for cleanup handling is that this should be slightly faster and it - does not have problems with undefined local variables.</p> - </text> -  - <group><note/><text> - <p>SET_ONERROR is a macro - </p> - <p>'tmp' has to be a local variable.</p> - </text></group> -  - <group><example/><text> - <tt><p>#include "error.h"<br/> - #include "memory.h"<br/> -  - </p> - <p>void do_something()<br/> - {<br/> - <dl><group><text>ONERROR tmp;<br/> - char *mem=xalloc(4711);<br/> - </text></group></dl> - </p> - <p><dl><group><text>SET_ONERROR(tmp, (void (*)(void *)) free, mem);<br/> - </text></group></dl> - </p> - <p><dl><group><text>/* Do some code that might cause an Pike error */<br/> - </text></group></dl> - </p> - <p><dl><group><text>UNSET_ONERROR(tmp);<br/> - </text></group></dl>}<br/> - </p> - </tt> - error_handling</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::UNSET_ONERROR' to='UNSET_ONERROR'>UNSET_ONERROR</ref> and <ref resolved='c::error' to='error'>error</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='UNSETJMP' homogen-type='method'> - <method name='UNSETJMP'/><doc placeholder='true'> - <text> - <p><tt>UNSETJMP</tt> - stop catching error</p> -  - <p>This macro cleans up after calling SETJMP. See the page for SETJMP - for more details.</p> -  - error_handling</text> -  - <group><seealso/><text> - <p><ref resolved='c::SETJMP' to='SETJMP'>SETJMP</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='UNSET_ONERROR' homogen-type='method'> - <method name='UNSET_ONERROR'/><doc placeholder='true'> - <text> - <p><tt>UNSET_ONERROR</tt> - cleanup after an SET_ONERROR</p> -  - <p>This function cleans up after a SET_ONERROR call. - See SET_ONERROR for more details.</p> -  - error_handling</text> -  - <group><seealso/><text> - <p><ref resolved='c::SET_ONERROR' to='SET_ONERROR'>SET_ONERROR</ref> and <ref resolved='c::SETJMP' to='SETJMP'>SETJMP</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='add_function' homogen-type='method'> - <method name='add_function'/><doc placeholder='true'> - <text> - <p><tt>add_function</tt> - add a function to the program</p> -  - <tt><p>#include "program.h"<br/> -  - </p> - <p>void add_function(char *name,<br/> - <dl><group><text>void (*fun)(INT32),<br/> - char *type,<br/> - INT16 flags)<br/> - </text></group></dl></p> - </tt> - <p>This function adds a function to the program you are building. - The function will have the name 'name' and the type 'type'. - The function 'fun' will be called with an integer telling it how - many arguments are on the stack and is expected to remove those - elements from the stack and replace them with a return value. - The flags are zero or more of the following or:ed together: - ID_STATIC, ID_PRIVATE, ID_NOMASK, ID_PUBLIC, ID_PROTECTED and - ID_INLINE.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='c::start_new_program' to='start_new_program'>start_new_program</ref> and <ref resolved='c::types' to='types'>types</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='add_shared_strings' homogen-type='method'> - <method name='add_shared_strings'/><doc placeholder='true'> - <text> - <p><tt>add_shared_strings</tt> - add two pike strings</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *add_shared_strings(struct pike_string *a,<br/> - <dl><group><text>struct pike_string *b);<br/> - </text></group></dl></p> - </tt> - <p>This function builds the string a+b, that is the string a with the - string b appended to it. Note that the string returned will have - an extra reference.</p> -  - pike_string</text> -  - <group><seealso/><text> - <p><ref resolved='c::begin_shared_string' to='begin_shared_string'>begin_shared_string</ref> and <ref resolved='c::make_shared_string' to='make_shared_string'>make_shared_string</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='add_storage' homogen-type='method'> - <method name='add_storage'/><doc placeholder='true'> - <text> - <p><tt>add_storage</tt> - allocate space for object-local data</p> -  - <tt><p>#include "program.h"<br/> -  - </p> - <p>void add_storage(INT32 <i>size</i>);<br/> - </p> - </tt> - <p>This function allocates 'size' bytes in every object cloned from the - program you are in the process of building. (Be sure to call - start_new_program first...) Whenever one of your methods are called - fp-&gt;current_storage will point to this area.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='c::start_new_program' to='start_new_program'>start_new_program</ref> and <ref resolved='c::frame' to='frame'>frame</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='aggregate_array' homogen-type='method'> - <method name='aggregate_array'/><doc placeholder='true'> - <text> - <p><tt>aggregate_array</tt> - build an array from the stack</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>struct array *aggregate_array(INT32 num)<br/> - </p> - </tt> - <p>This pops 'num' args off the stack an puts them in an array. - The 'top' of the stack will be the last element in the array.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref to='check_stack'>check_stack</ref> and <ref resolved='c::push_array_items' to='push_array_items'>push_array_items</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='allocate_array' homogen-type='method'> - <method name='allocate_array'/><doc placeholder='true'> - <text> - <p><tt>allocate_array</tt> - allocate an array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>struct array *allocate_array(INT32 <i>size</i>);<br/> - </p> - </tt> - <p>This function allocates an array of size 'size'. The returned - array will have 'size' struct svalues in the member 'item'. - The array can contain any svalue, and the type field will be - initalized to -1.</p> - </text> -  - <group><note/><text> - <p>When building arrays, it is recommended that you push the values - on the stack and call aggregate_array or f_aggregate instead of - allocating and filling in the values 'by hand'.</p> -  - array</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='array' homogen-type='method'> - <method name='array'/><doc placeholder='true'> - <text> - <p><tt>array</tt> - the internal representation of an array</p> -  - <p>A Pike array is represented as a 'struct array' with all the - needed svalues malloced in the same block. The relevant members - are: - </p> - <p><matrix> - <r><c> refs </c><c> reference count </c></r> - <r><c> size </c><c> the number of svalues in the array </c></r> - <r><c> malloced_size </c><c> the number of svalues that can fit in this block </c></r> - <r><c> type_field </c><c> a bitfield indicating what types the array contains </c></r> - <r><c> item </c><c> the array of svalues </c></r> - </matrix> - </p> - </text> -  - <group><seealso/><text> - <p><ref resolved='c::type_field' to='type_field'>type_field</ref></p> -  - internals</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='array_index' homogen-type='method'> - <method name='array_index'/><doc placeholder='true'> - <text> - <p><tt>array_index</tt> - get an index from an array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>void array_index(struct svalue *<i>to</i>, struct array *<i>a</i>, INT32 <i>n</i>);<br/> - </p> - </tt> - <p>This function frees the contents of the svalue 'to' and replaces - it with a copy of the contents from index 'n' in the array 'a'. - Basically, what it does is: - </p> - <p><matrix> - <r><c> </c><c> assign_svalue(to, a-&gt;item + n); </c></r> - <r><c> </c></r> - </matrix> -  - </p> - <p>The only differance is that it adds some debug and safety - measures. Usually you don't really need to use this function.</p> - </text> -  - <group><note/><text> - <p>If n is out of bounds (n &lt; 0 or n &gt;= a-&gt;size) Pike will dump - core. If Pike was compiled with DEBUG, a message will be written - first stating what the problem was.</p> -  - array</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::assign_svalue' to='assign_svalue'>assign_svalue</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='array_remove' homogen-type='method'> - <method name='array_remove'/><doc placeholder='true'> - <text> - <p><tt>array_remove</tt> - remove an index from an array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>struct array *array_remove(struct array *<i>a</i>, INT32 <i>ind</i>);<br/> - </p> - </tt> - <p>This function removes the index 'ind' from the array 'a' destructively. - The returned array should be used instead of 'a' and can be the same - as 'a'. Because this function is destructive and might free the - memory region for 'a' it may only be used on arrays which has not been - sent to any lpc functions yet.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref to='array_insert'>array_insert</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='array_search' homogen-type='method'> - <method name='array_search'/><doc placeholder='true'> - <text> - <p><tt>array_search</tt> - search an array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>INT32 array_search(struct array *a,<br/> - <dl><group><text>struct svalue *val,<br/> - INT32 start);<br/> - </text></group></dl></p> - </tt> - <p>This function loops over the array 'a' starting at 'start' until - it finds an index that is_eq to 'val'. When it finds such a value - the number for that index will be returned. If no such value is - found -1 is returned.</p> - </text> -  - <group><note/><text> - <p>This function checks the type_field in the array, and also re-builds - the type-field if the value is not found.</p> -  - array</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::is_eq' to='is_eq'>is_eq</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='array_set_index' homogen-type='method'> - <method name='array_set_index'/><doc placeholder='true'> - <text> - <p><tt>array_set_index</tt> - get an index from an array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>void array_set_index(struct array *a,<br/> - <dl><group><text>INT32 ind,<br/> - struct svalue *from);<br/> - </text></group></dl></p> - </tt> - <p>This function frees the contents of the index 'ind' in the array - 'a' and replaces it with a copy of the contents from 'from'. - Basically, what it does is: - </p> - <p><matrix> - <r><c> </c><c> assign_svalue(a-&gt;item + n, from); </c></r> - <r><c> </c></r> - </matrix> -  - </p> - <p>The only differance is that it adds some debug and safety - measures. Usually you don't really need to use this function.</p> - </text> -  - <group><note/><text> - <p>If n is out of bounds (n &lt; 0 or n &gt;= a-&gt;size) Pike will dump - core. If Pike was compiled with DEBUG, a message will be written - first stating what the problem was.</p> -  - array</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::assign_svalue' to='assign_svalue'>assign_svalue</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='assign_svalue' homogen-type='method'> - <method name='assign_svalue'/><doc placeholder='true'> - <text> - <p><tt>assign_svalue</tt> - copy svalues from one place to another</p> -  - <tt><p>#include &lt;svalue.h&gt;<br/> -  - </p> - <p>void assign_svalue(struct svale *<i>to</i>, struct svalue *<i>from</i>);<br/> - </p> - </tt> - <p>This function copies an svalue from one struct svalue to another. - It frees the contents of 'to' first and updates the involved - refcounts.</p> -  - svalue</text> -  - <group><seealso/><text> - <p><ref resolved='c::free_svalue' to='free_svalue'>free_svalue</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='begin_shared_string' homogen-type='method'> - <method name='begin_shared_string'/><doc placeholder='true'> - <text> - <p><tt>begin_shared_string</tt> - allocate space for a shared string</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *begin_shared_string(INT32 <i>len</i>);<br/> - </p> - </tt> - <p>This function allocates space for a shared string of length 'len'. - You should then MEMCPY 'len' bytes into the s-&gt;str. (s being the - returned value) And then call end_shared_string.</p> -  - pike_string</text> -  - <group><seealso/><text> - <p><ref resolved='c::end_shared_string' to='end_shared_string'>end_shared_string</ref> and <ref resolved='c::make_shared_string' to='make_shared_string'>make_shared_string</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='binary_findstring' homogen-type='method'> - <method name='binary_findstring'/><doc placeholder='true'> - <text> - <p><tt>binary_findstring</tt> - find a string</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *binary_findstring(char *<i>str</i>, INT32 <i>length</i>);<br/> - </p> - </tt> - <p>This function looks for the 'str' with length 'len' in the - global hash table. It returns the shared string if found, otherwise - zero. It does not increase/decrease the references to the string.</p> -  - pike_string</text> -  - <group><seealso/><text> - <p><ref resolved='c::findstring' to='findstring'>findstring</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='copy_array' homogen-type='method'> - <method name='copy_array'/><doc placeholder='true'> - <text> - <p><tt>copy_array</tt> - copy an array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>struct array *copy_array(struct svalue *<i>a</i>);<br/> - </p> - </tt> - <p>This function returns a copy of the array 'a'. It is not recursive, - arrays within 'a' will only get extra references.</p> -  - array</text> -  - </doc> - </docgroup> - <docgroup homogen-name='copy_mapping' homogen-type='method'> - <method name='copy_mapping'/><doc placeholder='true'> - <text> - <p><tt>copy_mapping</tt> - copy a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>struct mapping *copy_mapping(struct mapping *m)<br/> - </p> - </tt> - <p>This function returns a copy of the mapping m. If you change the - contents of the new mapping the contents of the mapping m will not - change. Note that this function is not recursive.</p> -  - mapping</text> -  - </doc> - </docgroup> - <docgroup homogen-name='data_types' homogen-type='method'> - <method name='data_types'/><doc placeholder='true'> - <text> - <p><tt>data_types</tt> - Pike internal data types</p> -  - <p>Of course the Pike source uses a lot of data types except for those - that represents mappings, arrays, strings etc. Callbacks, stack frames - and type fields are just the beginning.</p> -  - internals</text> -  - </doc> - </docgroup> - <docgroup homogen-name='end_c_program' homogen-type='method'> - <method name='end_c_program'/><doc placeholder='true'> - <text> - <p><tt>end_c_program</tt> - finish building a 'struct program'</p> -  - <tt><p>#include "program.h"<br/> -  - </p> - <p>struct program *end_c_program(char *<i>name</i>);<br/> - </p> - </tt> - <p>This function finishes up the process of building a 'struct program'. - It initializes the struct program and calls - master()-&gt;add_precompiled_program with the program and the suggested - name. (As sent to end_c_program). It then returns the newly built - program. Note that the new program does NOT have an extra reference, - if you want to keep it around and use it you have to add that reference - yourself.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='c::start_new_program' to='start_new_program'>start_new_program</ref> and <ref resolved='c::add_function' to='add_function'>add_function</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='end_shared_string' homogen-type='method'> - <method name='end_shared_string'/><doc placeholder='true'> - <text> - <p><tt>end_shared_string</tt> - link a shared string into the hashtable</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *end_shared_string(struct pike_string *<i>p</i>);<br/> - </p> - </tt> - <p>This function the prepared output from a begin_shared_string and - links the string into the hash table. If an identical string is - already present in the hash table, p is freed and that string is - returned instead. The returned string will have one extra reference - added.</p> - </text> -  - <group><example/><text> - <tt><p>#include "global.h"<br/> - #include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *mkcharstring(int ch)<br/> - {<br/> - <dl><group><text>struct pike_string *ret;<br/> - ret=begin_shared_string(1);<br/> - ret-&gt;str[0]=ch;<br/> - return end_shared_string(ret);<br/> - </text></group></dl>}<br/> - </p> - </tt> - pike_string</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::begin_shared_string' to='begin_shared_string'>begin_shared_string</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='error' homogen-type='method'> - <method name='error'/><doc placeholder='true'> - <text> - <p><tt>error</tt> - throw an error</p> -  - <tt><p>#include "error.h"<br/> -  - </p> - <p>void error(char *<i>format_string</i>, ...);<br/> - </p> - </tt> - <p>This function takes the same kind of arguments as printf, puts it - all together to a string and throws this as an error message - togehter with a backtrace that tells the catcher where the error - was. Note that this function does _not_ return. Instead it calls - the C function lonjump and continues executing from the most - resent active catch() call.</p> -  - error_handling</text> -  - <group><seealso/><text> - <p><ref resolved='c::SET_ONERROR' to='SET_ONERROR'>SET_ONERROR</ref>, <ref resolved='c::fatal' to='fatal'>fatal</ref> and <ref resolved='c::throw' to='throw'>throw</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='error_handling' homogen-type='method'> - <method name='error_handling'/><doc placeholder='true'> - <text> - <p><tt>error_handling</tt> - how to error handling works inside Pike</p> -  - <p>Error handling in Pike is implemented with the setjmp/longjmp - functionality. This means that functions that can cause errors - will NOT return if an error occurs. Special care has to be taken - so that no memory is left unfreed if an error occurs. Almost all - functions that can cause Pike code to be executed can cause an - error. Also functions that implements Pike operators / functions - can cause errors. If you are paranoid you should assume that all - functions can cause errors. You may also read the code for the - function to see if there are any calls to error() in it. If the - function is documented in this manual, it will say if the function - can cause errors.</p> -  - internals</text> -  - </doc> - </docgroup> - <docgroup homogen-name='fatal' homogen-type='method'> - <method name='fatal'/><doc placeholder='true'> - <text> - <p><tt>fatal</tt> - print a message and dump core</p> -  - <tt><p>#include "error.h"<br/> -  - </p> - <p>void fatal(char *<i>format_string</i>, ...);<br/> - </p> - </tt> - <p>This function takes the same type of argument as 'printf', and - prints these with any available debug information. (A trace of - the 512 last executed instructions if you compiled with DEBUG.) - Then it forces the driver to dump core so you can examine the - bug with a debugger. Use with extreme caution, an error() might - sometimes be a lot better...</p> -  - error_handling</text> -  - <group><seealso/><text> - <p><ref resolved='c::error' to='error'>error</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='findstring' homogen-type='method'> - <method name='findstring'/><doc placeholder='true'> - <text> - <p><tt>findstring</tt> - find a string</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *findstring(char *<i>str</i>);<br/> - </p> - </tt> - <p>This function looks for the null terminated C string 'str' in the - global hash table. It returns the shared string if found, otherwise - zero. It does not increase/decrease the references to the string.</p> -  - pike_string</text> -  - <group><seealso/><text> - <p><ref resolved='c::make_shared_string' to='make_shared_string'>make_shared_string</ref> and <ref resolved='c::binary_findstring' to='binary_findstring'>binary_findstring</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='frame' homogen-type='method'> - <method name='frame'/><doc placeholder='true'> - <text> - <p><tt>frame</tt> - the current frame of exectution</p> -  - <p>The frame pointer is called 'fp' and is of type 'struct frame'. - The frame pointer contains information about what function we - are executing in, what is the current object, the current program, - where the local variables are etc. It also contains a pointer to - the previous frame in the call stack. The most important members - of 'fp' are: - </p> - <p><matrix> - <r><c> current_object </c><c> same as the Pike function this_object() </c></r> - <r><c> context.program </c><c> the program in which this function resides </c></r> - <r><c> current_storage </c><c> a 'char *' pointer into the data area for this </c></r> - </matrix> - <dl><group><text><matrix> - <r><c> </c><c> object. This is the pointer to the area reserved </c></r> - <r><c> </c></r> - </matrix> - <dl><group><text><matrix> - <r><c> </c><c> for you if you have done add_storage() earlier. </c></r> - <r><c> </c></r> - </matrix> - </text></group></dl></text></group></dl></p> -  - data_types</text> -  - </doc> - </docgroup> - <docgroup homogen-name='free_array' homogen-type='method'> - <method name='free_array'/><doc placeholder='true'> - <text> - <p><tt>free_array</tt> - free one reference to a array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>void free_array(struct array *a)<br/> - </p> - </tt> - <p>This function frees one reference to the array a. If the reference - is the last reference to the array, it will free the memory used - by the array a.</p> - </text> -  - <group><note/><text> - <p>free_array is a macro</p> -  - array</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='free_mapping' homogen-type='method'> - <method name='free_mapping'/><doc placeholder='true'> - <text> - <p><tt>free_mapping</tt> - free one reference to a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>void free_mapping(struct mapping *m)<br/> - </p> - </tt> - <p>This function frees one reference to the mapping m. If the reference - is the last reference to the mapping, it will free the memory used - by the mapping m.</p> - </text> -  - <group><note/><text> - <p>free_mapping is a macro</p> -  - mapping</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='free_string' homogen-type='method'> - <method name='free_string'/><doc placeholder='true'> - <text> - <p><tt>free_string</tt> - free a pike string</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>void free_string(struct pike_string *p)<br/> - </p> - </tt> - <p>This function frees the string 'p'. What it actually does is that it - decreases the reference count of 'p' and frees the memory reserved - for it if the refereneces reach zero.</p> - </text> -  - <group><note/><text> - <p>free_string is actually a macro</p> -  - pike_string</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='free_svalue' homogen-type='method'> - <method name='free_svalue'/><doc placeholder='true'> - <text> - <p><tt>free_svalue</tt> - free the contents of an svalue</p> -  - <tt><p>#include &lt;svalue.h&gt;<br/> -  - </p> - <p>void free_svalue(struct svalue *<i>s</i>);<br/> - </p> - </tt> - <p>This function frees the contents of an svalue with respect to - ref counts. It does not however free the storage for svalue itself. - That is up to the caller to do.</p> -  - svalue</text> -  - <group><seealso/><text> - <p><ref resolved='c::assign_svalue' to='assign_svalue'>assign_svalue</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='hashmem' homogen-type='method'> - <method name='hashmem'/><doc placeholder='true'> - <text> - <p><tt>hashmem</tt> - hash a memory region</p> -  - <tt><p>#include "memory.h"<br/> -  - </p> - <p>unsigned INT32 hashmem(const unsigned char *<i>a</i>,INT32 <i>len</i>,INT32 <i>mlen</i>);<br/> - </p> - </tt> - <p>This function looks at the memory region beginning at 'a' and is 'len' - bytes long and returns a hash value depending on the bytes in that - region. The argument 'mlen' is how many bytes it should actually look - at, larger mlen gives better values but slower hashing.</p> -  - low_level</text> -  - </doc> - </docgroup> - <docgroup homogen-name='init_memsearch' homogen-type='method'> - <method name='init_memsearch'/><doc placeholder='true'> - <text> - <p><tt>init_memsearch</tt> - initialize a memory search struct</p> -  - <tt><p>#include "memory.h"<br/> -  - </p> - <p><matrix> - <r><c> void init_memsearch(struct mem_searcher *s, </c></r> - <r><c> </c><c> </c><c> char *needle, SIZE_T needlelen, SIZE_T max_haystacklen); </c></r> - </matrix> - </p> - </tt> - <p>This function initializes a struct mem_searcher to be used with - the function memory_search. 'needle' is the byte sequence to - search for, and needlelen is how many bytes long the 'needle' is. - The argument 'max_haystacklen' is an approximation of how much - this memory searcher will be used. More time will be spent optimizing - the memory searcher struct if max_haystacklen is large.</p> - </text> -  - <group><note/><text> - <p>The needle is not copied by this function. It must still be available - when memory_search is called.</p> -  - low_level</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::memory_search' to='memory_search'>memory_search</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='is_eq' homogen-type='method'> - <method name='is_eq'/><doc placeholder='true'> - <text> - <p><tt>is_eq</tt> - compare two svalues</p> -  - <tt><p>#include &lt;svalue.h&gt;<br/> -  - </p> - <p>int is_eq(struct svalue *<i>a</i>, struct svalue *<i>b</i>);<br/> - </p> - </tt> - <p>This is the equivialent of the Pike operator `==. It compares two - svalues and returns one if they are the same. Otherwise zero.</p> -  - svalue</text> -  - <group><seealso/><text> - <p><ref resolved='c::is_equal' to='is_equal'>is_equal</ref>, <ref resolved='c::is_lt' to='is_lt'>is_lt</ref> and <ref resolved='c::IS_ZERO' to='IS_ZERO'>IS_ZERO</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='is_equal' homogen-type='method'> - <method name='is_equal'/><doc placeholder='true'> - <text> - <p><tt>is_equal</tt> - compare two svalues recursively</p> -  - <tt><p>#include &lt;svalue.h&gt;<br/> -  - </p> - <p>int is_equal(struct svalue *<i>a</i>, struct svalue *<i>b</i>);<br/> - </p> - </tt> - <p>This is the equivialent of the Pike function equal(), it compares - two svalues recursively and returns 1 if their contents are equal, - zero otherwise.</p> -  - svalue</text> -  - <group><seealso/><text> - <p><ref resolved='c::is_eq' to='is_eq'>is_eq</ref>, <ref resolved='c::is_lt' to='is_lt'>is_lt</ref> and <ref resolved='c::IS_ZERO' to='IS_ZERO'>IS_ZERO</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='is_lt' homogen-type='method'> - <method name='is_lt'/><doc placeholder='true'> - <text> - <p><tt>is_lt</tt> - compare two svalues</p> -  - <tt><p>#include &lt;svalue.h&gt;<br/> -  - </p> - <p>int is_lt(struct svalue *<i>a</i>, struct svalue *<i>b</i>);<br/> - </p> - </tt> - <p>This is the equivialent of the Pike operator `&lt;. It compares the - contents of two svalues and returns true if the 'a' is lesser than - 'b'. It will give an error if the types are not comparable.</p> - </text> -  - <group><note/><text> - <p>is_gt, is_ge and is_le are also available. They are all macros that - call this function.</p> -  - svalue</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::is_eq' to='is_eq'>is_eq</ref> and <ref resolved='c::is_equal' to='is_equal'>is_equal</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='low_level' homogen-type='method'> - <method name='low_level'/><doc placeholder='true'> - <text> - <p><tt>low_level</tt> - low level routines supplied by pike</p> -  - <p>These functions are here to help you write fast and portable modules. - Pike itself also uses them for the same purpose.</p> -  - internals</text> -  - </doc> - </docgroup> - <docgroup homogen-name='low_mapping_lookup' homogen-type='method'> - <method name='low_mapping_lookup'/><doc placeholder='true'> - <text> - <p><tt>low_mapping_lookup</tt> - lookup a key in a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>struct svalue *low_mapping_lookup(struct mapping *m,<br/> - <dl><group><text>struct svalue *key);<br/> - </text></group></dl></p> - </tt> - <p>This function looks up the key-index pair that has the key 'key' in - the mapping 'm' and returns a pointer to the 'value'. If no such - key-index pair is found, zero is returned.</p> - </text> -  - <group><note/><text> - <p>Any call to an internal Pike function may re-allocate the mapping - 'm', which means that the pointer returned from this call is only - valid until your next function call.</p> - </text></group> -  - <group><note/><text> - <p>This function is intended for _reading_ mappings, it is forbidden - to change the contents of the returned svalue.</p> -  - mapping</text></group> -  - <group><seealso/><text> - <p><ref to='map_insert'>map_insert</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='m_sizeof' homogen-type='method'> - <method name='m_sizeof'/><doc placeholder='true'> - <text> - <p><tt>m_sizeof</tt> - return the number of key-value pairs in a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>int m_sizeof(struct mapping *m)<br/> - </p> - </tt> - <p>This function returns the number of key-index pairs in the mapping, - just like the function sizeof() in Pike.</p> - </text> -  - <group><note/><text> - <p>m_sizeof is a macro</p> -  - mapping</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='make_shared_binary_string' homogen-type='method'> - <method name='make_shared_binary_string'/><doc placeholder='true'> - <text> - <p><tt>make_shared_binary_string</tt> - make a shared string</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *make_shared_binary_string(const char *<i>str</i>, int <i>len</i>);<br/> - </p> - </tt> - <p>This function makes a shared string from the memory area beginning - at 'str' and ends at str+len. The returned string will have one - extra reference.</p> -  - pike_string</text> -  - <group><seealso/><text> - <p><ref resolved='c::make_shared_string' to='make_shared_string'>make_shared_string</ref>, <ref resolved='c::begin_shared_string' to='begin_shared_string'>begin_shared_string</ref>, <ref resolved='c::push_string' to='push_string'>push_string</ref> and <ref resolved='c::free_string' to='free_string'>free_string</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='make_shared_string' homogen-type='method'> - <method name='make_shared_string'/><doc placeholder='true'> - <text> - <p><tt>make_shared_string</tt> - make a shared string</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *make_shared_string(const char *<i>str</i>);<br/> - </p> - </tt> - <p>This function does the same thing as make_shared_binary_string, but - expects a zero terminated string instead.</p> -  - pike_string</text> -  - <group><seealso/><text> - <p><ref resolved='c::make_shared_binary_string' to='make_shared_binary_string'>make_shared_binary_string</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='map_delete' homogen-type='method'> - <method name='map_delete'/><doc placeholder='true'> - <text> - <p><tt>map_delete</tt> - delete an item from a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>void map_delete(struct mapping *<i>m</i>, struct svalue *<i>key</i>);<br/> - </p> - </tt> - <p>This function removes the key-index pair that has they key 'key' - from the mapping. If there is no such key-index pair in the mapping - nothing will be done.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='c::mapping_insert' to='mapping_insert'>mapping_insert</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mapping' homogen-type='method'> - <method name='mapping'/><doc placeholder='true'> - <text> - <p><tt>mapping</tt> - internal pike mappings</p> -  - <p>'struct mapping' is the C representation of a Pike mapping. The struct - itself contains no user servicable parts except for the member 'refs' - which has to be increased when putting a 'struct mapping *' into a - svalue. Never _ever_ decrease the ref counter manually, use - free_mapping instead. Also note that you should never ever allocate - a mapping statically, you should always use the functions provided by - pike to allocate mappings. - </p> - <p>A mapping is basically a hash table with a linked list of key-value - pairs in each hash bin. The hash table and the key-index pairs are - allocated together in one large block to minimize memory fragmentation. - Also note that whenever you search for a specific key-value pair in - the mapping that key-value pair is propagated to the top of the linked - list in that hash bin, which makes the search time very very small for - most cases.</p> -  - internals</text> -  - </doc> - </docgroup> - <docgroup homogen-name='mapping_indices' homogen-type='method'> - <method name='mapping_indices'/><doc placeholder='true'> - <text> - <p><tt>mapping_indices</tt> - return all the keys from a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>struct array *mapping_indices(struct mapping *m)<br/> - </p> - </tt> - <p>This function returns an array with all the keys from the mapping m. - The keys in the array are ordered in the same order as the values - when using mapping_values. But only if no other mapping operations - are done in between.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='c::mapping_values' to='mapping_values'>mapping_values</ref> and <ref resolved='c::mkmapping' to='mkmapping'>mkmapping</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mapping_insert' homogen-type='method'> - <method name='mapping_insert'/><doc placeholder='true'> - <text> - <p><tt>mapping_insert</tt> - insert a key-value pair into a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>void mapping_insert(struct mapping *m,<br/> - <dl><group><text>struct svalue *key,<br/> - struct svalue *value)<br/> - </text></group></dl></p> - </tt> - <p>This function inserts a new key-value pair into the mapping m. - If there is a already key-value pair with the same key in the mapping - it will be replaced with the new key-value pair. If there isn't - such a key-value pair in the mapping the mapping will grow in size - to accomodate the new key-value pair. This is identical to the - Pike operation: m[key]=value</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='c::map_delete' to='map_delete'>map_delete</ref> and <ref resolved='c::low_mapping_lookup' to='low_mapping_lookup'>low_mapping_lookup</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mapping_replace' homogen-type='method'> - <method name='mapping_replace'/><doc placeholder='true'> - <text> - <p><tt>mapping_replace</tt> - replace values in a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>void mapping_replace(struct mapping *m,<br/> - <dl><group><text>struct svalue *from,<br/> - struct svalue *to)<br/> - </text></group></dl></p> - </tt> - <p>This function replaces all values of the value 'from' in the mapping - 'm' with 'to'. It is a part of the Pike function replace().</p> -  - mapping</text> -  - </doc> - </docgroup> - <docgroup homogen-name='mapping_values' homogen-type='method'> - <method name='mapping_values'/><doc placeholder='true'> - <text> - <p><tt>mapping_values</tt> - return all the values from a mapping</p> -  - <tt><p>#include "mapping.h"<br/> -  - </p> - <p>struct array *mapping_values(struct mapping *m)<br/> - </p> - </tt> - <p>This function returns an array with all the values from the mapping m. - The values in the array are ordered in the same order as the keys - when using mapping_indices, but only if no other mapping operations - are done between the mapping_values and the mapping_indices.</p> - </text> -  - <group><example/><text> - <tt><p>struct mapping *slow_copy_mapping(struct mapping *m)<br/> - {<br/> - <dl><group><text>struct array *indices, *values;<br/> - indices=mapping_indices(m);<br/> - values=mapping_indices(m);<br/> - m=mkmapping(indices,values);<br/> - free_array(indices);<br/> - free_array(values);<br/> - return m;<br/> - </text></group></dl>}<br/> - </p> - </tt> - mapping</text></group> -  - <group><seealso/><text> - <p><ref resolved='c::mapping_indices' to='mapping_indices'>mapping_indices</ref>, <ref resolved='c::copy_mapping' to='copy_mapping'>copy_mapping</ref> and <ref resolved='c::mkmapping' to='mkmapping'>mkmapping</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='memory_search' homogen-type='method'> - <method name='memory_search'/><doc placeholder='true'> - <text> - <p><tt>memory_search</tt> - search memory for a sequence of bytes</p> -  - <tt><p><matrix> - <r><c> #include "memory.h" </c></r> - <r><c> </c></r> - <r><c> char *memory_search(struct mem_searcher *s, </c></r> - <r><c> </c><c> </c><c> char *haystack, SIZE_T haystacklen); </c></r> - </matrix> - </p> - </tt> - <p>This function searches through a memory region (called 'haystack') - for a sequence of bytes (called 'needle'). If found, a pointer to - the first occurance of 'needle' in 'haystack' is returned. The needle - is given by calling init_memsearch to initialize a struct mem_searcher - that can then be used with this function.</p> -  - low_level</text> -  - <group><seealso/><text> - <p><ref resolved='c::init_memsearch' to='init_memsearch'>init_memsearch</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mkmapping' homogen-type='method'> - <method name='mkmapping'/><doc placeholder='true'> - <text> - <p><tt>mkmapping</tt> - make a mapping</p> -  - <tt><p>#include &lt;mapping.h&gt;<br/> -  - </p> - <p>struct mapping *mkmapping(struct array *keys, struct array *values)<br/> - </p> - </tt> - <p>This function is the same as the Pike function mkmapping. It - makes a mapping out of an array of keys and an array of values. - Note that the returned mapping will have one extra reference.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='c::mapping_indices' to='mapping_indices'>mapping_indices</ref> and <ref resolved='c::mapping_values' to='mapping_values'>mapping_values</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='my_strcmp' homogen-type='method'> - <method name='my_strcmp'/><doc placeholder='true'> - <text> - <p><tt>my_strcmp</tt> - my own strcmp function</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>int my_strcmp(struct pike_string *a, struct pike_string *b)<br/> - </p> - </tt> - <p>This function compares two pike strings and takes locales into - account if the system supports locales. It returns zero if the - strings are the same, a number greater than zero zero if 'a' - is greater than 'b', and a number below zero otherwise.</p> -  - pike_string</text> -  - <group><seealso/><text> - <p><ref resolved='c::make_shared_string' to='make_shared_string'>make_shared_string</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='object' homogen-type='method'> - <method name='object'/><doc placeholder='true'> - <text> - <p><tt>object</tt> - internal representation of an object</p> -  - <p>Pike uses a 'struct object' with all the global variables - allocated in the same block to represent the Pike type 'object'. - An object without any global variables is only the size of 4 C - pointers. (usually 16 bytes) The only important members of the - 'struct object' are the ref counts and the pointer to the - program from which the object was cloned.</p> -  - internals</text> -  - </doc> - </docgroup> - <docgroup homogen-name='pike_string' homogen-type='method'> - <method name='pike_string'/><doc placeholder='true'> - <text> - <p><tt>pike_string</tt> - internal pike shared strings</p> -  - <p>This is the internal type for representing pike strings. They have - ref counts and they are shared though a global hash table. The C - type is a struct pike_string that has two public members: str and - len. str is an array of char which contain the actual string. It - is guaranteed that the string is null terminated, but the string - can also contain zeroes before the end. len is of course the - length of the string. Since strings are shared you may _never_ - modify the contents of a string, except for adding/subtracting - references when approperiate. The only exception to this is when - creating a new shared string with begin_shared_string which has - not yet been linked to the hash table with end_shared_string.</p> -  - internals</text> -  - </doc> - </docgroup> - <docgroup homogen-name='program' homogen-type='method'> - <method name='program'/><doc placeholder='true'> - <text> - <p><tt>program</tt> - internal representation of a program</p> -  - <p>A 'struct program' is basically what C++ hackers call a 'class'. - It contains the byte code, information about line numbers, - global variables etc. etc. Mostly you won't have to bother with - any of the contents of a 'struct program'. Usually you only need - to create them with start_new_program()/end_c_program() or - clone them with clone().</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='c::frame' to='frame'>frame</ref></p> -  - internals</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='push_array_items' homogen-type='method'> - <method name='push_array_items'/><doc placeholder='true'> - <text> - <p><tt>push_array_items</tt> - push array contents on stack</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>void push_array_items(struct array *a)<br/> - </p> - </tt> - <p>This function is mainly used by the @ operator. It pushes all elements - in the array 'a' on the stack. It also frees one ref count on 'a', so - be sure to do a-&gt;refs++ first if you want to use the array after - calling this function. This function also calls check_stack properly.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='c::aggregate_array' to='aggregate_array'>aggregate_array</ref> and <ref to='check_stack'>check_stack</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='push_string' homogen-type='method'> - <method name='push_string'/><doc placeholder='true'> - <text> - <p><tt>push_string</tt> - push a string on the pike stack</p> -  - <tt><p>#include "interpret.h"<br/> -  - </p> - <p>void push_string(struct pike_string *p)<br/> - </p> - </tt> - <p><matrix> - <r><c> This function pushes the string p on the pike stack. Note that this </c></r> - <r><c> function does _not_ add any extra references to 'p'. Most functions </c></r> - <r><c> that create shared strings give one extra reference to them though. </c></r> - <r><c> If you get your string from a function that does not add extra </c><c> </c></r> - <r><c> references you will have to add a reference manually. </c></r> - </matrix> - </p> - </text> -  - <group><note/><text> - <p>push_string is actually a macro</p> -  - pike_string</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='reorder' homogen-type='method'> - <method name='reorder'/><doc placeholder='true'> - <text> - <p><tt>reorder</tt> - re-order an array of memory blocks</p> -  - <tt><p>#include "memory.h"<br/> -  - </p> - <p>void reorder(char *<i>memory</i>, INT32 <i>nitems</i>, INT32 <i>size</i>,INT32 *<i>order</i>);<br/> - </p> - </tt> - <p>This function takes an array of memory blocks and re-organizes them - according to the argument 'order'. 'nitems' tells how many memory - blocks there are, and 'size' tells how big they are in bytes. - 'order' is simply an array of INT32 of size 'nitems' in which each - int tells which memory block from 'memory' should be placed in that - position. In pseudo code, this could be written as: - </p> - <p>mem_copy=copy_memory(memory);<br/> - for(int e=0;e&lt;nitems;e++)<br/> - <dl><group><text>memory[e]=mem_copy[order[e]];<br/> - </text></group></dl></p> -  - low_level</text> -  - </doc> - </docgroup> - <docgroup homogen-name='resize_array' homogen-type='method'> - <method name='resize_array'/><doc placeholder='true'> - <text> - <p><tt>resize_array</tt> - change the size of an array destructively</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>struct array *resize_array(struct array *<i>a</i>, INT32 <i>new_size</i>);<br/> - </p> - </tt> - <p>This function makes an array from 'a' with the size 'new_size'. - Note that the returned might or might not be the same as 'a'. - If 'a' is too small or too big for 'new_size', a copy of 'a' will - be made with enough room and then 'a' will be freed. This means - that you can only use this function on arrays which has not been - passed to any lpc functions yet.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref to='array_insert'>array_insert</ref> and <ref resolved='c::array_remove' to='array_remove'>array_remove</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='set_close_on_exec' homogen-type='method'> - <method name='set_close_on_exec'/><doc placeholder='true'> - <text> - <p><tt>set_close_on_exec</tt> - set the close-on-exec flag on a filedescriptor</p> -  - <tt><p>#include "fd_control.h"<br/> -  - </p> - <p>void set_close_on_exec(int fd, int onoff)<br/> - </p> - </tt> - <p>This function sets the close-on-exec flag on a filedescriptor. If - onoff is true, the filedescriptor will be closed whenever an exec() - is executed. If it is false, the fildescriptor will remain open.</p> -  - low_level</text> -  - <group><seealso/><text> - <p><ref resolved='c::set_nonblocking' to='set_nonblocking'>set_nonblocking</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='set_exit_callback' homogen-type='method'> - <method name='set_exit_callback'/><doc placeholder='true'> - <text> - <p><tt>set_exit_callback</tt> - set function to call att destruct()</p> -  - <tt><p>#include "program.h"<br/> -  - </p> - <p>void set_exit_callback(void (*exit)(struct object *) <i>fun</i>);<br/> - </p> - </tt> - <p>This function sets what function will be called when an object - cloned from your program is destructed. This function is - mainly for de-initializing the fp-&gt;current_storage region. - The function will be called with the object about to be destructed - as argument.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='c::start_new_program' to='start_new_program'>start_new_program</ref> and <ref resolved='c::set_init_callback' to='set_init_callback'>set_init_callback</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='set_init_callback' homogen-type='method'> - <method name='set_init_callback'/><doc placeholder='true'> - <text> - <p><tt>set_init_callback</tt> - set function to call att clone()</p> -  - <tt><p>#include "program.h"<br/> -  - </p> - <p>void set_init_callback(void (*init)(struct object *) <i>fun</i>);<br/> - </p> - </tt> - <p>This function sets what function will be called when someone - clones the struct program your are building. This function is - mainly for initializing the fp-&gt;current_storage region. - The initalizer function will be called with the newly cloned - object as argument.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='c::start_new_program' to='start_new_program'>start_new_program</ref> and <ref resolved='c::set_exit_callback' to='set_exit_callback'>set_exit_callback</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='set_nonblocking' homogen-type='method'> - <method name='set_nonblocking'/><doc placeholder='true'> - <text> - <p><tt>set_nonblocking</tt> - set a filedescriptor nonblocking</p> -  - <tt><p>#include "fd_control.h"<br/> -  - </p> - <p>void set_nonblocking(int fd, int onoff)<br/> - </p> - </tt> - <p>This function sets a filedescriptor in nonblocking mode. Nonblocking - mode means that any read() or write() exits insteads of waits when - no more data can be read/written immediately. If 'onoff' is true, - the fd will be set to nonblocking, otherwise it will be set to - blocking mode.</p> -  - low_level</text> -  - <group><seealso/><text> - <p><ref resolved='c::set_close_on_exec' to='set_close_on_exec'>set_close_on_exec</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='set_read_callback' homogen-type='method'> - <method name='set_read_callback'/><doc placeholder='true'> - <text> - <p><tt>set_read_callback</tt> - set 'data available' callback</p> -  - <tt><p>#include "backend.h"<br/> -  - </p> - <p>void set_read_callback(int <i>fd</i>,file_callback <i>cb</i>,void *<i>data</i>);<br/> - </p> - </tt> - <p>This function sets what function should be called when there is - more data to be read from 'fd'. The 'file_callback' should be a - function like this: - </p> - <p>void file_callback(int fd, void *data); - </p> - <p>The arguments are the same as sent to set_read_callback(). - To disable the read callback, call set_read_callback again with - cb and data equal to zero.</p> -  - low_level</text> -  - <group><seealso/><text> - <p><ref to='set_write_callback'>set_write_callback</ref> and <ref resolved='c::set_nonblocking' to='set_nonblocking'>set_nonblocking</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='set_read_callback' homogen-type='method'> - <method name='set_read_callback'/><doc placeholder='true'> - <text> - <p><tt>set_read_callback</tt> - set 'buffer available' callback</p> -  - <tt><p>#include "backend.h"<br/> -  - </p> - <p>void set_write_callback(int <i>fd</i>,file_callback <i>cb</i>,void *<i>data</i>);<br/> - </p> - </tt> - <p>This function sets what function should be called when there is - time to write more data to 'fd'. The 'file_callback' should be a - function like this: - </p> - <p>void file_callback(int fd, void *data); - </p> - <p>The arguments are the same as sent to set_write_callback(). - To disable the write callback, call set_write_callback again with - cb and data equal to zero.</p> -  - low_level</text> -  - <group><seealso/><text> - <p><ref resolved='c::set_read_callback' to='set_read_callback'>set_read_callback</ref> and <ref resolved='c::set_nonblocking' to='set_nonblocking'>set_nonblocking</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='slice_array' homogen-type='method'> - <method name='slice_array'/><doc placeholder='true'> - <text> - <p><tt>slice_array</tt> - slice a pice of an array</p> -  - <tt><p>#include "array.h"<br/> -  - </p> - <p>struct array *slice_array(struct array *<i>a</i>, INT32 <i>start</i>, INT32 <i>end</i>);<br/> - </p> - </tt> - <p>This is the equivialent of the pike operation a[start..end]. A new - array will be returned with one reference.</p> -  - array</text> -  - </doc> - </docgroup> - <docgroup homogen-name='start_new_program' homogen-type='method'> - <method name='start_new_program'/><doc placeholder='true'> - <text> - <p><tt>start_new_program</tt> - start building a new 'struct program'</p> -  - <tt><p>#include "program.h"<br/> -  - </p> - <p>void start_new_program(void);<br/> - </p> - </tt> - <p>This function initalizes a new 'struct program' to be be fitted - with functions, variables, inherits etc. etc.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='c::end_c_program' to='end_c_program'>end_c_program</ref>, <ref resolved='c::add_function' to='add_function'>add_function</ref> and <ref resolved='c::add_storage' to='add_storage'>add_storage</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='string_replace' homogen-type='method'> - <method name='string_replace'/><doc placeholder='true'> - <text> - <p><tt>string_replace</tt> - do string replacements</p> -  - <tt><p>#include "stralloc.h"<br/> -  - </p> - <p>struct pike_string *string_replace(struct pike_string *str,<br/> - <dl><group><text>struct pike_string *from,<br/> - struct pike_string *to);<br/> - </text></group></dl></p> - </tt> - <p>This function builds a new string from 'str' with all occurances - of 'from' replaced by 'to'. Note that the new string will have one - extra reference.</p> -  - pike_string</text> -  - </doc> - </docgroup> - <docgroup homogen-name='svalue' homogen-type='method'> - <method name='svalue'/><doc placeholder='true'> - <text> - <p><tt>svalue</tt> - internal type for storing Pike values</p> -  - <p>The 'struct svalue' contains one Pike 'value', variables, arrays - and the evaluator are all svalues. An svalue consists of three - elements: type, subtype and a union containing the actual value. - The type is a short which tells you what type the svalue is. The - value is one of the following: - </p> - <p><matrix> - <r><c> T_ARRAY </c><c> When type is T_ARRAY, the array is stored in </c></r> - <r><c> </c></r> - </matrix> - <dl><group><text><matrix> - <r><c> </c><c> the 'array' member of the union. So if sval is </c></r> - <r><c> </c></r> - </matrix> - <matrix> - <r><c> </c><c> the pointer to the svalue, you would use sval-&gt;u.array </c></r> - <r><c> </c></r> - </matrix> - <matrix> - <r><c> </c><c> to access the actual array. </c></r> - <r><c> </c></r> - </matrix> - </text></group></dl><matrix> - <r><c> T_MAPPING </c><c> In this case, you use sval-&gt;u.mapping. </c></r> - <r><c> T_MULTISET </c><c> sval-&gt;u.multiset </c></r> - <r><c> T_OBJECT </c><c> sval-&gt;u.object </c></r> - <r><c> T_FUNCTION </c><c> Functions are a bit more difficult, sval-&gt;u.object </c></r> - </matrix> - <dl><group><text><matrix> - <r><c> </c><c> is the object the function is in, and sval-&gt;subtype </c></r> - <r><c> </c></r> - </matrix> - <matrix> - <r><c> </c><c> is the number of the function in that object. </c></r> - <r><c> </c></r> - </matrix> - </text></group></dl><matrix> - <r><c> T_PROGRAM </c><c> sval-&gt;u.program is the struct program you want. </c></r> - <r><c> T_STRING </c><c> sval-&gt;u.string </c></r> - <r><c> T_FLOAT </c><c> sval-&gt;u.float_number </c></r> - <r><c> T_INT </c><c> sval-&gt;u.integer, a special case is that sval-&gt;subtype </c></r> - </matrix> - <dl><group><text><matrix> - <r><c> </c><c> is used in some cases to represent the value </c></r> - <r><c> </c><c> 'undefined'. This is what zero_type detects. </c></r> - </matrix> - </text></group></dl> - </p> - <p>There are lots of functions operating on svalues, so you shouldn't - have to do all that much stuff with them yourself. However, for now - you do need to check the type and extract the proper member of the - union yourself when writing your own C functions for Pike.</p> -  - internals</text> -  - </doc> - </docgroup> - <docgroup homogen-name='throw' homogen-type='method'> - <method name='throw'/><doc placeholder='true'> - <text> - <p><tt>throw</tt> - throw an exception</p> -  - <tt><p>#include "error.h"<br/> -  - </p> - <p>int throw(void);<br/> - </p> - </tt> - <p>This function calls longjmp and does all the cleanup and popping - the Pike stack etc. etc. This function does not setup any error - message or backtrace like error() does. error() calls this function - after doing all that. Since this function calls longjmp, it does - not return. See SETJMP for more details.</p> -  - error_handling</text> -  - <group><seealso/><text> - <p><ref resolved='c::SETJMP' to='SETJMP'>SETJMP</ref> and <ref resolved='c::error' to='error'>error</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='type_field' homogen-type='method'> - <method name='type_field'/><doc placeholder='true'> - <text> - <p><tt>type_field</tt> - bit field used for optimizations</p> -  - <p>Type fields are used by arrays, mappings and some svalue operations - for optimization. The type field consists of OR:ed bits, one for - each type. The bit for an array is 1&lt;&lt;T_ARRAY (same as BIT_ARRAY) - The bit for a string is 1&lt;&lt;T_STRING (or BIT_STRING) etc. - </p> - <p>A bit field never has to be exact, it needs to have at least those - bits that are present in the operation. It is never harmful to have - too many bits though. It seldom pays off to calculate the bit field - explicitly, so if you don't know what types are involved you should - use -1 for the type field.</p> -  - data_types</text> -  - <group><seealso/><text> - <p><ref resolved='c::mapping' to='mapping'>mapping</ref>, <ref resolved='c::array' to='array'>array</ref> and <ref resolved='c::svalue' to='svalue'>svalue</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='types' homogen-type='method'> - <method name='types'/><doc placeholder='true'> - <text> - <p><tt>types</tt> - how to describe types internally</p> -  - <p>When describing types to add_function or add_efun you always write - it in a string. You write the type just as you would in Pike. The - internal types have a few extra features though. Here is a brief - explanation of the syntax: - </p> - <p><matrix> - <r><c> type </c><c> you write: </c></r> - <r><c> int </c><c> "int" </c></r> - <r><c> float </c><c> "float" </c></r> - <r><c> string </c><c> "string" </c></r> - <r><c> mapping </c><c> "mapping(mixed:mixed)" or "mapping" </c></r> - <r><c> array of int </c><c> </c><c> "array(int)" or "int *" </c></r> - <r><c> function(int:int) </c><c> "function(int:int)" </c></r> - <r><c> varargs function </c><c> "function(int ...:int)" </c></r> - <r><c> int or string </c><c> </c><c> "int|string" </c></r> - </matrix> -  - </p> - <p>Then there are a few tricks you can use, say you have a function which - returns an int except if you call it with a string in which case it - return a string: - </p> - <p>"!function(string:mixed)&amp;function(mixed:int)|function(string:string)" - </p> - <p>The &amp; and ! operators work as you might expect but are only useful - together.</p> -  - data_types</text> -  - <group><seealso/><text> - <p><ref resolved='c::add_function' to='add_function'>add_function</ref> and <ref to='add_efun'>add_efun</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='xalloc' homogen-type='method'> - <method name='xalloc'/><doc placeholder='true'> - <text> - <p><tt>xalloc</tt> - fail-safe memory allocation</p> -  - <tt><p>#include "memory.h"<br/> -  - </p> - <p>char *xalloc(long <i>size</i>);<br/> - </p> - </tt> - <p>This function works exactly like the malloc() function, it will - never return NULL. Instead it will try to free up any pike resources - that are not needed any longer and try again. If that doesn't work - either it will call fatal("out of memory\n"); and Pike will dump core. - This type of error handling makes it easier to code, but is not - always what you want.</p> -  - low_level</text> -  - </doc> - </docgroup> - </namespace> - <namespace name='cpp'> - <doc placeholder='true'> - <text> - <p><tt>preprocessor</tt> - textually process code before compiling</p> -  - <p>Pike has a builtin C-style preprocessor. It works similar to old - C preprocessors but has a few extra features. This file describes - the different preprocessor directives.</p> -  - <tt><p><dl><group><text>#!<br/> - #define<br/> - #elif<br/> - #else<br/> - #elseif<br/> - #endif<br/> - #error<br/> - #if<br/> - #ifdef<br/> - #ifndef<br/> - #include<br/> - #line<br/> - #pragma<br/> - #undef<br/> - </text></group></dl></p> - </tt> - pike</text> -  - </doc> - <docgroup homogen-name='#!' homogen-type='directive'> - <directive name='#!'> - </directive> - <doc placeholder='true'> - <text> -  - <p>This directive is in effect a comment statement, since the - preprocessor will ignore everything to the end of the line. - This is used to write unix type scripts in Pike by starting - the script with - </p> - <p>#!/usr/local/bin/pike - </p> - </text> -  - </doc> - </docgroup> - <docgroup homogen-name='#define' homogen-type='directive'> - <directive name='#define'> - </directive> - <doc placeholder='true'> - <text> -  - <p>The simplest way to use define is to write - </p> - <p><dl><group><text>#define &lt;identifier&gt; &lt;replacement string&gt;<br/> - </text></group></dl> - </p> - <p>which will cause all subsequent occurances of 'identifier' to be - replaced with the replacement string. - </p> - <p>Define also has the capability to use arguments, thus a line like - </p> - <p><dl><group><text>#define &lt;identifier&gt;(arg1, arg2) &lt;replacement string&gt;<br/> - </text></group></dl> - </p> - <p>would cause identifer to be a macro. All occurances of - 'identifier(something1,something2d)' would be replaced with - the replacement string. And in the replacement string, arg1 and arg2 - will be replaced with something1 and something2.</p> - </text> -  - <group><bugs/><text> - <p>Note that it is not a good idea to do something like this: - </p> - <p>#define foo bar // a comment - </p> - <p>The comment will be included in the define, and thus inserted in the - code. This will have the effect that the rest of the line will be - ignored when the word foo is used. Not exactly what you might expect. - </p> - <p/> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-type='directive'> - <directive name='#if'> - </directive> - <directive name='#elif'> - </directive> - <directive name='#elseif'> - </directive> - <directive name='#else'> - </directive> - <directive name='#endif'> - </directive> - <doc placeholder='true'> - <text> -  - <p>The #if directive causes conditional compiling of code depending on - the expression after the #if directive. That is, if the expression - is true, the code up to the next #else, #elif, #elseif or #endif is - compiled. If the expression is false, that code will be skipped. - If the skip leads up to a #else, the code after the else will be - compiled. #elif and #elseif are equivialent and causes the code that - follow them to be compiled if the previous #if or #elif evaluated - false and the expression after the #elif evaluates true. - </p> - <p>Expressions given to #if, #elif or #endif are special, all identifiers - evaluate to zero unless they are defined to something else. Integers, - strings and floats are the only types that can be used, but all pike - operators can be used on these types. - </p> - <p>Also, two special functions can be used, defined() and constant(). - defined(&lt;identifer&gt;) expands to '1' if the identifier is defined, - '0' otherwise. constant(&lt;identifier&gt;) expands to '1' if identifer is - an predefined constant (with add_constant), '0' otherwise.</p> - </text> -  - <group><example/><text> - <tt><p>#if 1<br/> - <dl><group><text>write("foo");<br/> - </text></group></dl>#else<br/> - <dl><group><text>write("bar");<br/> - </text></group></dl>#endif<br/> -  - </p> - <p>#if defined(FOO)<br/> - <dl><group><text>write(FOO);<br/> - </text></group></dl>#elif defined(BAR)<br/> - <dl><group><text>write(BAR);<br/> - </text></group></dl>#else<br/> - <dl><group><text>write("default");<br/> - </text></group></dl>#endif<br/> -  - </p> - <p>#if !constant(write_file)<br/> - inherit "simulate.pike"<br/> - #endif<br/> - <br/> - </p> - </tt></text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='#error' homogen-type='directive'> - <directive name='#error'> - </directive> - <doc placeholder='true'> - <text> -  - <p>This directive causes a compiler error, it can be used to notify - the user that certain functions are missing and similar things.</p> - </text> -  - <group><example/><text> - <tt><p>#if !constant(write_file)<br/> - #error write_file efun is missing<br/> - #endif<br/> - <br/> - </p> - </tt></text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='#include' homogen-type='directive'> - <directive name='#include'> - </directive> - <doc placeholder='true'> - <text> -  - <p>This directive should be given a file as argument, it will then be - compiled as if all those lines were written at the #include line. - The compiler then continues to compile this file.</p> - </text> -  - <group><example/><text> - <tt><p>#include "foo.h"<br/> - <br/> - </p> - </tt></text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='#line' homogen-type='directive'> - <directive name='#line'> - </directive> - <doc placeholder='true'> - <text> -  - <p>This directive tells the compiler what line and file we are compiling. - This is for instance used by the #include directive to tell the - compiler that we are compiling another file. The directive takes - the line number first, and optionally, the file afterwards. - </p> - <p>This can also be used when generating pike from something else, to - tell teh compiler where the code originally originated from.</p> - </text> -  - <group><example/><text> - <tt><p>#line 4 "foo.cf" /* The next line was generated from 4 in foo.cf */<br/> - <br/> - </p> - </tt></text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='#pragma' homogen-type='directive'> - <directive name='#pragma'> - </directive> - <doc placeholder='true'> - <text> -  - <p>This is a generic directive for flags to the compiler. Currently, the - only flag available is 'all_inline' which is the same as adding the - modifier 'inline' to all functions that follows. - </p> - </text> -  - </doc> - </docgroup> - <docgroup homogen-name='#undef' homogen-type='directive'> - <directive name='#undef'> - </directive> - <doc placeholder='true'> - <text> -  - <p>This removes the effect of a #define, all subsequent occurances of - the undefined identifier will not be replaced by anything. Note that - when undefining a macro, you just give the identifer, not the - arguments.</p> - </text> -  - <group><example/><text> - <tt><p>#define foo bar<br/> - #undef foo<br/> - #define foo(bar) gazonk bar<br/> - #undef foo<br/> - <br/> - </p> - </tt></text></group> -  - </doc> - </docgroup> - </namespace> +    <namespace name='predef'> - <docgroup homogen-name='&amp;&amp;' homogen-type='method'> - <method name='&amp;&amp;'/><doc placeholder='true'> - <text> - <p><tt>&amp;&amp;</tt> - logical and</p> -  - <tt><p>a &amp;&amp; b<br/> - </p> - </tt> - <p>This operator does logical 'and' between expressions. It first - evaluates a and returns zero if a is zero. Otherwise it returns - b. Note that b is not evaluated at all if a returns zero.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref> and <ref resolved='predef::&amp;&amp;' to='||'>||</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='PI' homogen-type='constant'> - <constant name='PI'/><doc placeholder='true'> - <text> - <p><tt>PI</tt> - pi</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>PI<br/> - </p> - </tt> - <p>This is not a function, it is a constant added by simulate.pike.</p> -  - float</text> -  - </doc> - </docgroup> +    <docgroup homogen-name='_do_call_outs' homogen-type='method'>   <method name='_do_call_outs'/><doc placeholder='true'>   <text>
2188:   </text>      <group><seealso/><text> - <p><ref resolved='predef::call_out' to='call_out'>call_out</ref>, <ref resolved='predef::remove_call_out' to='remove_call_out'>remove_call_out</ref>, <ref resolved='predef::call_out_info' to='call_out_info'>call_out_info</ref> and <ref resolved='predef::time' to='time'>time</ref></p> + <p><ref resolved='predef::call_out' to='call_out'>call_out</ref>, <ref resolved='predef::remove_call_out' to='remove_call_out'>remove_call_out</ref>, <ref resolved='predef::call_out_info' to='call_out_info'>call_out_info</ref> and <ref to='time'>time</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='_memory_usage' homogen-type='method'> - <method name='_memory_usage'/><doc placeholder='true'> - <text> - <p><tt>_memory_usage</tt> - check memory usage</p> -  - <tt><p>mapping(string:int) <i>_memory_usage</i>();<br/> - </p> - </tt> - <p>This function is mostly intended for debugging. It delivers a mapping - with information about how many arrays/mappings/strings etc. there - are currently allocated and how much memory they use. Try evaluating - the function in hilfe to see precisly what it returns.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::_verify_internals' to='_verify_internals'>_verify_internals</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='_next' homogen-type='method'> - <method name='_next'/><doc placeholder='true'> - <text> - <p><tt>_next</tt> - find the next object/array/whatever</p> -  - <tt><p>mixed _next(mixed <i>p</i>);<br/> - </p> - </tt> - <p>This function returns the 'next' object/array/mapping/string/etc - in the linked list. It is mainly meant for debugging Pike but - can also be used to control memory usage.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::next_object' to='next_object'>next_object</ref> and <ref resolved='predef::_prev' to='_prev'>_prev</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='_prev' homogen-type='method'> - <method name='_prev'/><doc placeholder='true'> - <text> - <p><tt>_prev</tt> - find the previous object/array/whatever</p> -  - <tt><p>mixed _next(mixed <i>p</i>);<br/> - </p> - </tt> - <p>This function returns the 'previous' object/array/mapping/etc - in the linked list. It is mainly meant for debugging Pike but - can also be used to control memory usage. Note that this function - does not work on strings.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::_next' to='_next'>_next</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='_verify_internals' homogen-type='method'> - <method name='_verify_internals'/><doc placeholder='true'> - <text> - <p><tt>_verify_internals</tt> - check Pike internals</p> -  - <tt><p>void _verify_internals();<br/> - </p> - </tt> - <p>This function goes through most of the internal Pike structures and - generates a fatal error if one of them is found to be out of order. - It is only used for debugging.</p> -  - debugging</text> -  - </doc> - </docgroup> - <docgroup homogen-name='`!' homogen-type='method'> - <method name='`!'/><doc placeholder='true'> - <text> - <p><tt>`!</tt> - is not true</p> -  - <tt><p>! a<br/> - or<br/> - int `!(mixed a)<br/> - </p> - </tt> - <p>Returns 1 if a is zero, 0 otherwise.</p> -  - operators</text> -  - </doc> - </docgroup> - <docgroup homogen-name='`!=' homogen-type='method'> - <method name='`!='/><doc placeholder='true'> - <text> - <p><tt>`!=</tt> - check if not equal</p> -  - <tt><p>a != b<br/> - or<br/> - int `!=(mixed a, mixed b)<br/> - </p> - </tt> - <p>This operator compares two values and returns 0 if they are the same, - 1 otherwise. Note that pointer equivialenec is required for arrays, - objects, programs, mappings and multisets. (Thus it is not enough that - two arrays LOOK alike, it must be the same array.)</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref>, <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref> and <ref to='efuns/equal'>efuns/equal</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`%' homogen-type='method'> - <method name='`%'/><doc placeholder='true'> - <text> - <p><tt>`%</tt> - modulo</p> -  - <tt><p>a % b<br/> - or<br/> - int `%(int a, int b)<br/> - or<br/> - float `%(int|float a,int|float b)<br/> - </p> - </tt> - <p>This operator computes the rest of a division. For integers, this - is the same as same as computing a-(a/b)*a. For floats, modulo is - interpreted as a-floor(a/b)*a - </p> - </text> -  - <group><example/><text> - <tt><p><matrix> - <r><c> 9%3 </c><c> returns 0 </c></r> - <r><c> 10%3 </c><c> returns 1 </c></r> - <r><c> 2%0.3 </c><c> returns 0.2 </c></r> - </matrix> - </p> - </tt> - operators</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::`/' to='`/'>`/</ref> and <ref resolved='predef::`*' to='`*'>`*</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`&amp;' homogen-type='method'> - <method name='`&amp;'/><doc placeholder='true'> - <text> - <p><tt>`&amp;</tt> - intersection</p> -  - <tt><p>a &amp; b<br/> - or<br/> - mixed `&amp;(mixed ... args)<br/> - </p> - </tt> - <p>This operator does logical intersections. For ints this means - bitwise and. - </p> - <p>Arrays and multisets are treated as sets, so intersecting two arrays - will result in an array with containing all values present in all - arguments. - </p> - <p>For mappings, the intersection will be done on the indexes solely, - however, the values will be taken from the rightmost mapping.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`|' to='`|'>`|</ref>, <ref resolved='predef::`^' to='`^'>`^</ref> and <ref resolved='predef::`&amp;' to='&amp;&amp;'>&amp;&amp;</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`*' homogen-type='method'> - <method name='`*'/><doc placeholder='true'> - <text> - <p><tt>`*</tt> - multiplication</p> -  - <tt><p>a * b<br/> - or<br/> - int `*(int ... args)<br/> - or<br/> - float `*(int|float ... args)<br/> - or<br/> - string `*(string *strings, string delimeter)<br/> - </p> - </tt> - <p>For ints and floats, this operator simply multiplies its arguments. - If the first argument is an array, and the second a string, all - strings in the arrays will be concatenated, with the delimiter in - between each string and the result will be returned.</p> - </text> -  - <group><example/><text> - <tt><p><matrix> - <r><c> 2*2 </c><c> returns 4 </c></r> - <r><c> 2.0*2.0 </c><c> returns 4.0 </c></r> - <r><c> 2.0*2 </c><c> returns 4.0 </c></r> - <r><c> ({"f","",""})*"o") </c><c> Returns "foo" </c></r> - <r><c> `*(2,2,2) </c><c> returns 8 </c></r> - </matrix> - </p> - </tt> - operators</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::`/' to='`/'>`/</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`+' homogen-type='method'> - <method name='`+'/><doc placeholder='true'> - <text> - <p><tt>`+</tt> - add things together</p> -  - <tt><p>a + b<br/> - or<br/> - mixed `+(mixed ... args)<br/> - </p> - </tt> - <p>For ints and floats this operator simply adds the two operators - together. For strings and arrays, concatenation is done. For multisets - and mapping this creates a new multiset/mapping with all indices and data as - in a and b. Note that this can cause a multiset to contain - several equal indices. Also, when adding a string to an int or float - the number is converted to a printable string first.</p> - </text> -  - <group><example/><text> - <tt><p><matrix> - <r><c> "a"+10 </c><c> returns "a10" </c></r> - <r><c> 10+20 </c><c> returns 30 </c></r> - <r><c> ({1})+({2}) </c><c> returns ({1,2}) </c></r> - <r><c> (&lt;1&gt;)+(&lt;1&gt;) </c><c> returns (&lt;1,1&gt;) </c></r> - <r><c> `+(2,2,2) </c><c> returns 6 </c></r> - </matrix> - </p> - </tt> - operators</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::`-' to='`-'>`-</ref> and <ref resolved='predef::`*' to='`*'>`*</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`-' homogen-type='method'> - <method name='`-'/><doc placeholder='true'> - <text> - <p><tt>`-</tt> - subtract/negate</p> -  - <tt><p>- a<br/> - or<br/> - `-(mixed <i>a</i>);<br/> - or<br/> - a - b<br/> - or<br/> - mixed `-(mixed a, mixed b)<br/> - </p> - </tt> - <p>This is the negation and subtraction operator, for ints and floats - the operation should be obvious. - </p> - <p>For arrays, an array containing all elements present in a and not in - b is returne. The order of the remaining values from a will be kept. - </p> - <p>For multisets, the same operation is done as for arrays, except order is - of course not considered. - </p> - <p><matrix> - <r><c> For mappings, a mapping is returned with every key-index pair from </c></r> - <r><c> a whos index is not present as an index in b. </c></r> - <r><c> EXAMPLES </c></r> - <r><c> 5-10 </c><c> returns -5 </c></r> - <r><c> 10-2.0 </c><c> returns 8.0 </c></r> - <r><c> ({1,2})-({2}) </c><c> returns ({1}) </c></r> - <r><c> ([1:2,2:1])-([1:0]) </c><c> returns ([2:1]) </c></r> - </matrix> - </p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`+' to='`+'>`+</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`/' homogen-type='method'> - <method name='`/'/><doc placeholder='true'> - <text> - <p><tt>`/</tt> - division</p> -  - <tt><p>a / b<br/> - or<br/> - int `/(int a, int b)<br/> - or<br/> - float `/(int|float a,int|float b)<br/> - or<br/> - string* `/(string a,string b)<br/> - </p> - </tt> - <p>For ints and floats, this operator simply divide its arguments. - If the arguments are strings, the first string will be divided - at every occurance of the second string. The resulting pieces - are then returned in the form of an array.</p> - </text> -  - <group><example/><text> - <tt><p><matrix> - <r><c> 2/2 </c><c> returns 1 </c></r> - <r><c> 3/2 </c><c> returns 1 </c></r> - <r><c> 2.0/2.0 </c><c> returns 1.0 </c></r> - <r><c> 2.0/2 </c><c> returns 1.0 </c></r> - <r><c> "foo"/"o" </c><c> returns ({"f","",""}) </c></r> - <r><c> `/(2,2) </c><c> returns 1 </c></r> - </matrix> - </p> - </tt> - operators</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::`*' to='`*'>`*</ref> and <ref resolved='predef::`%' to='`%'>`%</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`&lt;' homogen-type='method'> - <method name='`&lt;'/><doc placeholder='true'> - <text> - <p><tt>`&lt;</tt> - is lesser than?</p> -  - <tt><p>a &lt; b<br/> - or<br/> - int `&lt;(int|float|string a,int|float|string b)<br/> - </p> - </tt> - <p>This operator compares two values and returns 1 if the first one - is lesser than the second one.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref> and <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`&lt;&lt;' homogen-type='method'> - <method name='`&lt;&lt;'/><doc placeholder='true'> - <text> - <p><tt>`&lt;&lt;</tt> - shift left</p> -  - <tt><p>a &lt;&lt; b<br/> - or<br/> - int `&lt;&lt;(int a, int b)<br/> - </p> - </tt> - <p>This operator shift the integer a b steps left. This is equal to - multiplying a by 2 b times.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`&gt;&gt;' to='`&gt;&gt;'>`&gt;&gt;</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`&lt;=' homogen-type='method'> - <method name='`&lt;='/><doc placeholder='true'> - <text> - <p><tt>`&lt;=</tt> - is lesser or equal than?</p> -  - <tt><p>a &lt;= b<br/> - or<br/> - int `&lt;=(int|float|string a,int|float|string b)<br/> - </p> - </tt> - <p>This operator compares two values and returns 1 if the first one - is lesser than or equal to the second one.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref> and <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`==' homogen-type='method'> - <method name='`=='/><doc placeholder='true'> - <text> - <p><tt>`==</tt> - compare values</p> -  - <tt><p>a == b<br/> - or<br/> - int `==(mixed a, mixed b)<br/> - </p> - </tt> - <p>This operator compares two values and returns 1 if they are the same, - 0 otherwise. Note that pointer equivialenec is required for arrays, - objects, programs, mappings and multisets. (Thus it is not enough that - two arrays LOOK alike, it must be the same array.)</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref>, <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref> and <ref to='efuns/equal'>efuns/equal</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`&gt;' homogen-type='method'> - <method name='`&gt;'/><doc placeholder='true'> - <text> - <p><tt>`&gt;</tt> - is lesser than?</p> -  - <tt><p>a &gt; b<br/> - or<br/> - int `&gt;(int|float|string a,int|float|string b)<br/> - </p> - </tt> - <p>This operator compares two values and returns 1 if the first one - is greater than the second one.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref>, <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref> and <ref resolved='predef::`&gt;=' to='`&gt;='>`&gt;=</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`&gt;=' homogen-type='method'> - <method name='`&gt;='/><doc placeholder='true'> - <text> - <p><tt>`&gt;=</tt> - is greater than or equal to?</p> -  - <tt><p>a &gt;= b<br/> - or<br/> - int `&gt;=(int|float|string a,int|float|string b)<br/> - </p> - </tt> - <p>This operator compares two values and returns 1 if the first one - is greater than or equal to the second one.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`!=' to='`!='>`!=</ref>, <ref resolved='predef::`==' to='`=='>`==</ref>, <ref resolved='predef::`&gt;' to='`&gt;'>`&gt;</ref>, <ref resolved='predef::`&lt;' to='`&lt;'>`&lt;</ref> and <ref resolved='predef::`&lt;=' to='`&lt;='>`&lt;=</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`&gt;&gt;' homogen-type='method'> - <method name='`&gt;&gt;'/><doc placeholder='true'> - <text> - <p><tt>`&gt;&gt;</tt> - shift right</p> -  - <tt><p>a &gt;&gt; b<br/> - or<br/> - int `&gt;&gt;(int a, int b)<br/> - </p> - </tt> - <p>This operator shift the integer a b steps right. This is equal to - dividing a by 2 b times.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`&lt;&lt;' to='`&lt;&lt;'>`&lt;&lt;</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`^' homogen-type='method'> - <method name='`^'/><doc placeholder='true'> - <text> - <p><tt>`^</tt> - exclusive or</p> -  - <tt><p>a ^ b<br/> - or<br/> - mixed `^(mixed ... args)<br/> - </p> - </tt> - <p>This operator does logical exclusive or operations For ints this means - bitwise xor. - </p> - <p>Arrays and multisets are treated as sets, so xoring two arrays will - result in an array with containing all values present in either but - not both arrays. - </p> - <p>For mappings, the intersection will be done on the indexes solely, - however, the values will be taken from the rightmost mapping.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`|' to='`|'>`|</ref> and <ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`|' homogen-type='method'> - <method name='`|'/><doc placeholder='true'> - <text> - <p><tt>`|</tt> - union</p> -  - <tt><p>a | b<br/> - or<br/> - mixed `|(mixed ... args)<br/> - </p> - </tt> - <p>This operator does logical unions. For ints this means bitwise or. - </p> - <p>Arrays and multisets are treated as sets, so doing a union on two arrays - will result in an array with containing all values present in either - array. Although values present in both ararys will only be present - once in the result. - </p> - <p>For mappings, the intersection will be done on the indexes solely, - however, the values will be taken from the rightmost mapping.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref>, <ref resolved='predef::`^' to='`^'>`^</ref> and <ref resolved='predef::`|' to='||'>||</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='`~' homogen-type='method'> - <method name='`~'/><doc placeholder='true'> - <text> - <p><tt>`~</tt> - bitwise complement</p> -  - <tt><p>~ a<br/> - or<br/> - int `~(int a)<br/> - </p> - </tt> - <p>This operator inverses all bits in an integer and returns the - new integer.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`&amp;' to='`&amp;'>`&amp;</ref>, <ref resolved='predef::`|' to='`|'>`|</ref> and <ref resolved='predef::`^' to='`^'>`^</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='acos' homogen-type='method'>   <method name='acos'/><doc placeholder='true'>   <text>
2768:      </doc>   </docgroup> - <docgroup homogen-name='add_constant' homogen-type='method'> - <method name='add_constant'/><doc placeholder='true'> - <text> - <p><tt>add_constant</tt> - add new predefined functions or constants</p> -  - <tt><p>void add_constant(string <i>name</i>, mixed <i>value</i>);<br/> - or<br/> - void add_constant(string <i>name</i>);<br/> - </p> - </tt> - <p>This function adds a new constant to Pike, it is often used to - add builin functions (efuns). All programs compiled after add_constant - function is called can access 'value' by the name given by 'name'. - If there is a constant called 'name' already, it will be replaced by - by the new definition. This will not affect already compiled programs. - </p> - <p>Calling add_constant without a value will remove that name from the list<br/> - <dl><group><text><matrix> - <r><c> </c><c> of of constant. As with replacing, this will not affect already compiled </c></r> - <r><c> </c></r> - </matrix> - </text></group></dl>programs.<br/> - </p> - </text> -  - <group><example/><text> - <tt><p>add_constant("true",1);<br/> - add_constant("false",0);<br/> - add_constant("PI",4.0);<br/> - add_constant("sqr",lambda(mixed x) { return x * x; });<br/> - add_constant("add_constant");<br/> - </p> - </tt></text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::all_constants' to='all_constants'>all_constants</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='add_efun' homogen-type='method'> - <method name='add_efun'/><doc placeholder='true'> - <text> - <p><tt>add_efun</tt> - add an efun or constant</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>void add_efun(string func_name, mixed function)<br/> - or<br/> - void add_efun(string func_name)<br/> - </p> - </tt> - <p>This function is the same as add_constant.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::add_constant' to='predef::add_constant'>builtin/add_constant</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='aggregage_list' homogen-type='method'> - <method name='aggregage_list'/><doc placeholder='true'> - <text> - <p><tt>aggregage_list</tt> - aggregate a multiset</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>multiset aggregage_list(mixed ... <i>args</i>);<br/> - </p> - </tt> - <p>This function is exactly the same as aggregate_multiset.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::aggregate_multiset' to='predef::aggregate_multiset'>builtin/aggregate_multiset</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='aggregate' homogen-type='method'> - <method name='aggregate'/><doc placeholder='true'> - <text> - <p><tt>aggregate</tt> - construct an array</p> -  - <tt><p>mixed *aggregate(mixed ... <i>elems</i>);<br/> - or<br/> - ({ elem1, elem2, ... })<br/> - </p> - </tt> - <p>Construct an array with the arguments as indices. This function - could be written in Pike as: - </p> - <p>mixed *aggregate(mixed ... elems) { return elems; }</p> - </text> -  - <group><note/><text> - <p>Arrays are dynamically allocated there is no need to declare them - like int a[10]=allocate(10); (and it isn't possible either) like - in C, just int *a=allocate(10); will do.</p> -  - array</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref> and <ref resolved='predef::allocate' to='allocate'>allocate</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='aggregate_mapping' homogen-type='method'> - <method name='aggregate_mapping'/><doc placeholder='true'> - <text> - <p><tt>aggregate_mapping</tt> - construct a mapping</p> -  - <tt><p>mapping aggregate_mapping(mixed ... <i>elems</i>);<br/> - or<br/> - ([ key1:val1, key2:val2, ... ])<br/> - </p> - </tt> - <p>Groups the arguments together two and two to key-index pairs and - creates a mapping of those pairs. The second syntax is always - preferable.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref> and <ref resolved='predef::mkmapping' to='mkmapping'>mkmapping</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='aggregate_multiset' homogen-type='method'> - <method name='aggregate_multiset'/><doc placeholder='true'> - <text> - <p><tt>aggregate_multiset</tt> - construct a multiset</p> -  - <tt><p>multiset aggregate_multiset(mixed ... <i>elems</i>);<br/> - or<br/> - (&lt; elem1, elem2, ... &gt;)<br/> - </p> - </tt> - <p>Construct an multiset with the arguments as indexes. This function - could be written in Pike as: - </p> - <p>multiset aggregate(mixed ... elems) { return mkmultiset(elems); } - </p> - <p>The only problem is that mkmultiset is implemented using - aggregage_multiset...</p> -  - multiset</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::mkmultiset' to='mkmultiset'>mkmultiset</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='alarm' homogen-type='method'> - <method name='alarm'/><doc placeholder='true'> - <text> - <p><tt>alarm</tt> - set an alarm clock for delivery of a signal</p> -  - <tt><p>int alarm(int <i>seconds</i>);<br/> - </p> - </tt> - <p>alarm arranges for a SIGALRM signal to be delivered to the - process in seconds seconds. - </p> - <p>If seconds is zero, no new alarm is scheduled. - </p> - <p>In any event any previously set alarm is cancelled.</p> - </text> -  - <group><returns/><text> - <p>alarm returns the number of seconds remaining until any - previously scheduled alarm was due to be delivered, or - zero if there was no previously scheduled alarm.</p> - </text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::signal' to='signal'>signal</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='all_constants' homogen-type='method'> - <method name='all_constants'/><doc placeholder='true'> - <text> - <p><tt>all_constants</tt> - return all predefined constants</p> -  - <tt><p>mapping (string:mixed) <i>all_constant</i>();<br/> - </p> - </tt> - <p>Return a mapping containing all constants, indexed on the names of the - constant, and with the value of the efun as argument.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::add_constant' to='add_constant'>add_constant</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='all_efuns' homogen-type='method'> - <method name='all_efuns'/><doc placeholder='true'> - <text> - <p><tt>all_efuns</tt> - return all 'efuns'</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>mapping all_efuns();<br/> - </p> - </tt> - <p>This function is the same as all_constants.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::all_constants' to='all_constants'>all_constants</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='allocate' homogen-type='method'> - <method name='allocate'/><doc placeholder='true'> - <text> - <p><tt>allocate</tt> - allocate an array</p> -  - <tt><p>mixed *allocate(int <i>size</i>);<br/> - </p> - </tt> - <p>Allocate an array of size elements and initialize them to zero.</p> - </text> -  - <group><example/><text> - <tt><p>mixed *a=allocate(17);<br/> - </p> - </tt></text></group> -  - <group><note/><text> - <p>Arrays are dynamically allocated there is no need to declare them - like int a[10]=allocate(10); (and it isn't possible either) like - in C, just int *a=allocate(10); will do.</p> -  - array</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::aggregate' to='aggregate'>aggregate</ref> and <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='array' homogen-type='method'> - <method name='array'/><doc placeholder='true'> - <text> - <p><tt>array</tt> - an array of values</p> -  - <tt><p>({ 1, 2, 3 })<br/> - allocate(10);<br/> - </p> - </tt> - <p>Arrays are basically a place to store a number of other values. - Arrays in pike are allocated blocks of values. They are dynamically - allocated and does not need to be declared as in C. The values in - the array can be set when creating the array as in the first - construction or anytime afterwards like this: arr[index]=data where - index is an integer. Index is normally 0 &lt;= index &lt; sizeof(arr), and - refers to the corresponding element in the array. If index is less - than zero, it is the same as doing arr[sizeof(arr)+index]. This - means that negative index will index the array from the end rather - than from the beginning. - </p> - <p>Note that arrays are shared and use reference counts to keep - track of their references. This will have the effect that you can - have two variables pointing to the same array, and when you change - an index in in it, both variables will show the change. - </p> - <p>Here follows a list of operators that applies to arrays: - In this list a and b is used to represent an array expression: - </p> - <p><matrix> - <r><c> a + b </c><c> summation ( ({1}) + ({2}) returns ({1,2}) ) </c></r> - <r><c> a - b </c><c> subtraction, returns a copy of a with all values that are present in b removed, ( ({1, 2, 3}) - ({2}) returns ({1,3}) ) </c></r> - <r><c> a &amp; b </c><c> intersection, return an array with all values that are present in both a and b </c></r> - <r><c> a | b </c><c> union, return an array with all values that are present in a or b, differs from summation in that values that are present in both a and b are only returned once. </c></r> - <r><c> a ^ b </c><c> xor, return an array with all values that are present in a or b but not in both. </c></r> - <r><c> a * c </c><c> multiplication (c is a string) same thing as implode(a,c) </c></r> - <r><c> a == b </c><c> returns 1 if a is the same array as b, same size and values is not enough. </c></r> - <r><c> a != b </c><c> returns 0 if a is the same array as b, same size and values is not enough. </c></r> - <r><c> ! a </c><c> boolean not, returns 0 </c></r> - <r><c> a[c] </c><c> indexing, returns element c in the array (c is an int) </c></r> - <r><c> a[c]=d </c><c> setting, sets element c in the array to d (c is an int) </c></r> - <r><c> a[c..d] </c><c> range (c &amp; d are ints) returns an array containing a pice of the array a. The piece starts at element c and ends (and includes) element d. </c></r> - </matrix> - </p> -  - types</text> -  - <group><seealso/><text> - <p><ref resolved='predef::mapping' to='mapping'>mapping</ref>, <ref resolved='predef::multiset' to='multiset'>multiset</ref>, <ref resolved='predef::allocate' to='predef::allocate'>builtin/allocate</ref> and <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='arrayp' homogen-type='method'> - <method name='arrayp'/><doc placeholder='true'> - <text> - <p><tt>arrayp</tt> - is the argument an array?</p> -  - <tt><p>int arrayp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is an array, zero otherwise.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::allocate' to='allocate'>allocate</ref>, <ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='asin' homogen-type='method'>   <method name='asin'/><doc placeholder='true'>   <text>
3128:      </doc>   </docgroup> - <docgroup homogen-name='backtrace' homogen-type='method'> - <method name='backtrace'/><doc placeholder='true'> - <text> - <p><tt>backtrace</tt> - get a description of the call stack</p> -  - <tt><p>mixed *backtrace();<br/> - </p> - </tt> - <p>This function returns a description of the call stack at this moment. - The description is returned in an array with one entry for each call - in the stack. Each entry has this format: - </p> - <p>({<br/> - <dl><group><text><matrix> - <r><c> file, </c><c> /* a string with the filename if known, else zero */ </c></r> - <r><c> line, </c><c> /* an integer containing the line if known, else zero */ </c></r> - <r><c> function, </c><c> /* The function-pointer to the called function */ </c></r> - </matrix> - </text></group></dl>})<br/> -  - </p> - <p>The current call frame will be last in the array, and the one above - that the last but one and so on.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::catch' to='catch'>catch</ref> and <ref resolved='predef::throw' to='throw'>throw</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='break' homogen-type='method'> - <method name='break'/><doc placeholder='true'> - <text> - <p><tt>break</tt> - break a loop or switch</p> -  - <tt><p>break<br/> - </p> - </tt> - <p>Break jumps directly out of any loop or switch statement, it is - a very vital part of every switch statement.</p> -  - control</text> -  - <group><seealso/><text> - <p><ref to='do-while'>do-while</ref>, <ref resolved='predef::while' to='while'>while</ref>, <ref resolved='predef::for' to='for'>for</ref> and <ref resolved='predef::switch' to='switch'>switch</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='call_function' homogen-type='method'> - <method name='call_function'/><doc placeholder='true'> - <text> - <p><tt>call_function</tt> - call a function with arguments</p> -  - <tt><p>mixed call_function(function <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed fun ( mixed ... <i>args</i> );<br/> - </p> - </tt> - <p>This function takes a a function pointer as first argument and calls - this function with the rest of the arguments as arguments. Normally, - you will never have to write call_function(), because you will use the - second syntax instead.</p> -  - function</text> -  - <group><seealso/><text> - <p><ref resolved='predef::backtrace' to='backtrace'>backtrace</ref> and <ref resolved='predef::get_function' to='get_function'>get_function</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='call_out' homogen-type='method'>   <method name='call_out'/><doc placeholder='true'>   <text>
3252:      </doc>   </docgroup> - <docgroup homogen-name='capitalize' homogen-type='method'> - <method name='capitalize'/><doc placeholder='true'> - <text> - <p><tt>capitalize</tt> - capitalize a string</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>string capitalize(string str)<br/> - </p> - </tt> - <p>Convert the first character in str to upper case, and return the - new string.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::lower_case' to='predef::lower_case'>builtin/lower_case</ref> and <ref resolved='predef::upper_case' to='predef::upper_case'>builtin/upper_case</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='cast' homogen-type='method'> - <method name='cast'/><doc placeholder='true'> - <text> - <p><tt>cast</tt> - convert one type to another</p> -  - <tt><p>( <i>type</i> ) <i>expression</i><br/> - </p> - </tt> - <p>Casts convert types, in most cases it just tells the compiler what - type the expression has, but it can also be used to actually convert - the value of the expression into something else. - </p> - <p>Casting from float or int to string will convert the given number - into a decimal ascii string representation. - </p> - <p>Casting from string to float or int will do the opposite. IE. - Read a decimal number from the string and return that. - </p> - <p>Casting from string to program will call cast_to_program in the - master object and request a program to return. The standard master - object will consider the string a file name and compile the program - given by that string. It will then put the program in a chache in - case you cast the same string to a program again later. - </p> - <p>Castring from string to object will call cast_to_object in the - master object and request an object to return. The standard master - object will consider the string a file name, cast it to a program - and return a clone of that file. If the same cast is attempted again - later, the _same_ object will be returned. - </p> - <p>When casting an object, the method o-&gt;cast will be called with a string - with the name of the type as argument. o-&gt;cast can then return any - value. - </p> - <p>In all other cases, casts are just compiler hints.</p> - </text> -  - <group><example/><text> - <tt><p><matrix> - <r><c> (program)"Stdio.File" </c><c> // returns the file program </c></r> - <r><c> (object)"Stdio.File" </c><c> // returns a clone of the file program </c></r> - <r><c> (int)(object)"Gmp.mpz" // returns 0 </c></r> - </matrix> - </p> - </tt> - pike</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::compile_file' to='compile_file'>compile_file</ref> and <ref resolved='predef::sscanf' to='sscanf'>sscanf</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='catch' homogen-type='method'> - <method name='catch'/><doc placeholder='true'> - <text> - <p><tt>catch</tt> - catch errors</p> -  - <tt><p>catch { commands }<br/> - or<br/> - catch ( expression )<br/> - </p> - </tt> - <p>catch traps exceptions such as run time errors or calls to throw() and - returns the argument given to throw. For a run time error, this value - is ({ "error message", backtrace }) </p> -  - control</text> -  - <group><seealso/><text> - <p><ref resolved='predef::throw' to='predef::throw'>builtin/throw</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='cd' homogen-type='method'>   <method name='cd'/><doc placeholder='true'>   <text>
3415:      </doc>   </docgroup> - <docgroup homogen-name='class' homogen-type='method'> - <method name='class'/><doc placeholder='true'> - <text> - <p><tt>class</tt> - define a inlined program</p> -  - <tt><p>class { program definition }<br/> - </p> - </tt> - <p>Class is a way of writing serveral programs in one file. - The program written between the brackets will be returned by - class.</p> - </text> -  - <group><example/><text> - <tt><p>complex=clone(class { float r, i; });<br/> - complex-&gt;r=1.0;<br/> - complex-&gt;i=1.0;<br/> - </p> - </tt> - pike</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::inherit' to='inherit'>inherit</ref> and <ref resolved='predef::lambda' to='lambda'>lambda</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='clone' homogen-type='method'> - <method name='clone'/><doc placeholder='true'> - <text> - <p><tt>clone</tt> - clone an object from a program</p> -  - <tt><p>object clone(program <i>p</i>,mixed ... <i>args</i>);<br/> - </p> - </tt> - <p>clone() creates an object from the program p. Or in C++ terms: - It creates an instance of the class p. This clone will first have - all global variables initalized, and then create() will be called - with args as arguments.</p> -  - object and program</text> -  - <group><seealso/><text> - <p><ref resolved='predef::destruct' to='destruct'>destruct</ref>, <ref resolved='predef::compile_string' to='compile_string'>compile_string</ref> and <ref resolved='predef::compile_file' to='compile_file'>compile_file</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='column' homogen-type='method'> - <method name='column'/><doc placeholder='true'> - <text> - <p><tt>column</tt> - extract a column</p> -  - <tt><p>array column(mixed *data,mixed index)<br/> - </p> - </tt> - <p>This function is exactly equivialent to: - </p> - <p>map_array(index,lambda(mixed x,mixed y) { return x[y]; },data) - </p> - <p>Except of course it is a lot shorter and faster. - That is, it indexes every index in the array data on the value of - the argument index and returns an array with the results.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::rows' to='rows'>rows</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='combine_path' homogen-type='method'> - <method name='combine_path'/><doc placeholder='true'> - <text> - <p><tt>combine_path</tt> - concatenate paths</p> -  - <tt><p>string combine_path(string <i>absolute</i>, string <i>relative</i>);<br/> - </p> - </tt> - <p>Concatenate a relative path to an absolute path and remove any - "//", "/.." or "/." to produce a straightforward absolute path - as a result.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; combine_path("/foo/bar/","..");<br/> - Result: /foo<br/> - &gt; combine_path("/foo/bar/","../apa.c");<br/> - Result: /foo/apa.c<br/> - &gt; combine_path("/foo/bar","./sune.c");<br/> - Result: /foo/bar/sune.c<br/> - </p> - </tt> - file</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::getcwd' to='getcwd'>getcwd</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='compile_file' homogen-type='method'> - <method name='compile_file'/><doc placeholder='true'> - <text> - <p><tt>compile_file</tt> - compile a file to a program</p> -  - <tt><p>program compile_file(string <i>filename</i>);<br/> - </p> - </tt> - <p>This function will compile the filename to an Pike program that can - later be used for cloning.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='predef::clone' to='clone'>clone</ref> and <ref resolved='predef::compile_string' to='compile_string'>compile_string</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='compile_string' homogen-type='method'> - <method name='compile_string'/><doc placeholder='true'> - <text> - <p><tt>compile_string</tt> - compile a string to a program</p> -  - <tt><p>program compile_string(string <i>prog</i>, string <i>name</i>);<br/> - </p> - </tt> - <p>Compile_string takes a complete Pike program as an argument in a the - string prog and compiles it to clonable program. The second argument - will be used as the file name of the program and will be used for - error messages and such.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='predef::compile_string' to='compile_string'>compile_string</ref> and <ref resolved='predef::clone' to='clone'>clone</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='continue' homogen-type='method'> - <method name='continue'/><doc placeholder='true'> - <text> - <p><tt>continue</tt> - continue a loop</p> -  - <tt><p>continue<br/> - </p> - </tt> - <p>Continue work similarly to break only it does't finish the loop, - it just aborts the rest of this turn in the loop. </p> -  - control</text> -  - <group><seealso/><text> - <p><ref to='do-while'>do-while</ref>, <ref resolved='predef::while' to='while'>while</ref> and <ref resolved='predef::for' to='for'>for</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='copy_value' homogen-type='method'> - <method name='copy_value'/><doc placeholder='true'> - <text> - <p><tt>copy_value</tt> - copy a value recursively</p> -  - <tt><p>mixed copy_value(mixed <i>value</i>);<br/> - </p> - </tt> - <p>Copy value will copy the value given to it recursively. If the result - value is changed destructively (only possible for multisets, arrays and - mappings) the copied value will not be changed. The resulting value - will always be equal to the copied (tested with the efun equal), but - they may not the the same value. (tested with ==)</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::equal' to='equal'>equal</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='cos' homogen-type='method'>   <method name='cos'/><doc placeholder='true'>   <text>
3615:      </doc>   </docgroup> - <docgroup homogen-name='crypt' homogen-type='method'> - <method name='crypt'/><doc placeholder='true'> - <text> - <p><tt>crypt</tt> - crypt a password</p> -  - <tt><p>string crypt(string <i>password</i>);<br/> - or<br/> - int crypt(string <i>typed_password</i>, string <i>crypted_password</i>);<br/> - </p> - </tt> - <p>This function crypts and verifies a short string. (normally only - the first 8 characters are significant) The first syntax crypts - the string password into something that is hopefully hard to decrypt, - and the second function crypts the first string and verifies that the - crypted result matches the second argument and returns 1 if they - matched, 0 otherwise.</p> - </text> -  - <group><example/><text> - <tt><p>To crypt a password use:<br/> - <dl><group><text>crypted_password = crypt(typed_password);<br/> - </text></group></dl>To see if the same password was used again use:<br/> - <dl><group><text>matched = crypt(typed_password, crypted_password);<br/> - </text></group></dl></p> - </tt> - string</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='ctime' homogen-type='method'> - <method name='ctime'/><doc placeholder='true'> - <text> - <p><tt>ctime</tt> - convert time int to readable date string</p> -  - <tt><p>string ctime(int <i>current_time</i>);<br/> - </p> - </tt> - <p>Convert the output from a previous call to time() into a readable - string containing the currnent year, month, day and time.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; ctime(time());<br/> - Result: Wed Jan 14 03:36:08 1970<br/> - </p> - </tt></text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::time' to='time'>time</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='describe_backtrace' homogen-type='method'> - <method name='describe_backtrace'/><doc placeholder='true'> - <text> - <p><tt>describe_backtrace</tt> - make a backtrace readable</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>string describe_backtrace(mixed **<i>backtrace</i>);<br/> - </p> - </tt> - <p>Describe backtrace returns a string containing a readable message - that describes where the backtrace was made. The argument 'backtrace' - should normally be the return value from a call to backtrace()</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::backtrace' to='predef::backtrace'>builtin/backtrace</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='destruct' homogen-type='method'> - <method name='destruct'/><doc placeholder='true'> - <text> - <p><tt>destruct</tt> - destruct an object</p> -  - <tt><p>void destruct(object <i>o</i>);<br/> - </p> - </tt> - <p>Destruct marks an object as destructed, all pointers and function - pointers to this object will become zero. The destructed object will - be freed from memory as soon as possible. This will also call - o-&gt;destroy.</p> -  - object</text> -  - <group><seealso/><text> - <p><ref resolved='predef::clone' to='clone'>clone</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='do-while' homogen-type='method'> - <method name='do-while'/><doc placeholder='true'> - <text> - <p><tt>do-while</tt> - execute a statement while an expression is true</p> -  - <tt><p>do <i>statement</i> while ( <i>expression</i> );<br/> - </p> - </tt> - <p>do - while only differs from the ordinary while-loop in that it does - _not_ evaluate the expression until after the statement has been - executed once. Thus it always runs the statement once.</p> - </text> -  - <group><example/><text> - <tt><p>int i=circular_buffer_pos;<br/> - do<br/> - {<br/> - <dl><group><text>write(circular_buffer[i]);<br/> - i=(i+1) % sizeof(circular_buffer);<br/> - </text></group></dl>}while(i != circular_buffer_pos);<br/> - </p> - </tt> - control</text></group> -  - <group><seealso/><text> - <p><ref to='do-while'>do-while</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='equal' homogen-type='method'> - <method name='equal'/><doc placeholder='true'> - <text> - <p><tt>equal</tt> - check if two values are equal or not</p> -  - <tt><p>int equal(mixed <i>a</i>, mixed <i>b</i>);<br/> - </p> - </tt> - <p>This function checks if the values a and b are equal. For all types but - arrays, multisets and mappings, this operation is the same as doing a == b. - For arrays, mappings and multisets however, their contents are checked - recursively, and if all their contents are the same and in the same - place, they are considered equal.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; ({ 1 }) == ({ 1 });<br/> - Result: 0<br/> - &gt; equal( ({ 1 }), ({ 1 }) );<br/> - Result: 1<br/> - &gt; <br/> - </p> - </tt></text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::copy_value' to='copy_value'>copy_value</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='errno' homogen-type='method'>   <method name='errno'/><doc placeholder='true'>   <text>
3790:      </doc>   </docgroup> - <docgroup homogen-name='exec' homogen-type='method'> - <method name='exec'/><doc placeholder='true'> - <text> - <p><tt>exec</tt> - simple way to use exece()</p> -  - <tt><p>#include &lt;process.h&gt;<br/> -  - </p> - <p>int exec(string <i>file</i>, string ... <i>args</i>);<br/> - </p> - </tt> - <p>This function destroys the Pike parser and runs the program - 'file' instead with the arguments. If no there are no '/' in - the filename, the variable PATH will be consulted when looking - for the program. This function does not return except when - the exec fails for some reason.</p> - </text> -  - <group><example/><text> - <tt><p>exec("/bin/echo","hello","world");<br/> - <br/> - </p> - </tt></text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='exece' homogen-type='method'>   <method name='exece'/><doc placeholder='true'>   <text>
3852:      </doc>   </docgroup> - <docgroup homogen-name='exit' homogen-type='method'> - <method name='exit'/><doc placeholder='true'> - <text> - <p><tt>exit</tt> - exit Pike interpreter</p> -  - <tt><p>void exit(int <i>returncode</i>);<br/> - </p> - </tt> - <p>This function exits the whole 'pike' program with the return code - given. Using exit() with any other value than 0 indicates that - something went wrong during execution. See your system manuals for - more information about return codes. - </p> - </text> -  - </doc> - </docgroup> +    <docgroup homogen-name='exp' homogen-type='method'>   <method name='exp'/><doc placeholder='true'>   <text>
3888:      </doc>   </docgroup> - <docgroup homogen-name='explode' homogen-type='method'> - <method name='explode'/><doc placeholder='true'> - <text> - <p><tt>explode</tt> - explode a string on a delimeter</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>string *explode(string <i>victim</i>, string <i>delimeter</i>);<br/> - </p> - </tt> - <p>Explode divides the string called victim at every occurance of - the string delimeter and returns the resulting parts in an array. - If delimeter is an empty string, victim will be divided into strings - of length 1. - </p> - <p>Explode is the same as division.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; explode("foobar","o");<br/> - Result: ({ "f", "", "bar" })<br/> - &gt; explode("10101001010100010101","10");<br/> - Result: ({ "", "", "", "0", "", "", "00", "", "1" })<br/> - &gt; explode("/foo/bar/gazonk","/");<br/> - Result: ({ "", "foo", "bar", "gazonk" })<br/> - &gt; explode("foobar","");<br/> - Result: ({ "f", "o", "o", "b", "a", "r" })<br/> - </p> - </tt> - string</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::implode' to='implode'>implode</ref> and <ref resolved='predef::`/' to='`/'>`/</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='file_size' homogen-type='method'> - <method name='file_size'/><doc placeholder='true'> - <text> - <p><tt>file_size</tt> - return the size of a file in bytes</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>int file_size(string <i>file</i>);<br/> - </p> - </tt> - <p>Give the size of a file. Size -1 indicates that the file either - does not exist, or that it is not readable by you. Size -2 - indicates that it is a directory.</p> -  - file</text> -  - <group><seealso/><text> - <p><ref resolved='predef::write_file' to='write_file'>write_file</ref> and <ref resolved='predef::read_bytes' to='read_bytes'>read_bytes</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='file_stat' homogen-type='method'>   <method name='file_stat'/><doc placeholder='true'>   <text>
4040:      </doc>   </docgroup> - <docgroup homogen-name='filter' homogen-type='method'> - <method name='filter'/><doc placeholder='true'> - <text> - <p><tt>filter</tt> - filter an array or mapping through a function</p> -  - <tt><p>#include &lt;array.h&gt;<br/> -  - </p> - <p>mixed *filter(mixed <i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *filter(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *filter(function *<i>arr</i>,-<i>1</i>,mixed ... <i>args</i>);<br/> - </p> - </tt> - <p>First syntax: - Filter array returns an array holding the items of arr for which - fun returns true. - </p> - <p>Second syntax: - Filter array calls fun in all the objects in the array arr, and - return all objects that returned true. - </p> - <p>Third syntax: - Filter array calls all functionpointers in the array arr, and - return all that returned true.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::map' to='map'>map</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='filter_array' homogen-type='method'> - <method name='filter_array'/><doc placeholder='true'> - <text> - <p><tt>filter_array</tt> - filter an array through a function</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>mixed *filter_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *filter_array(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *filter_array(function *<i>arr</i>,-<i>1</i>,mixed ... <i>args</i>);<br/> - </p> - </tt> - <p>Filter array is the same function as filter.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref>, <ref resolved='predef::map_array' to='map_array'>map_array</ref> and <ref resolved='predef::filter' to='filter'>filter</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='find_call_out' homogen-type='method'>   <method name='find_call_out'/><doc placeholder='true'>   <text>
4125:      </doc>   </docgroup> - <docgroup homogen-name='find_option' homogen-type='method'> - <method name='find_option'/><doc placeholder='true'> - <text> - <p><tt>find_option</tt> - find command line options</p> -  - <tt><p>#include &lt;getopt.h&gt;<br/> -  - </p> - <p>mixed find_option(string *argv,<br/> - <dl><group><text>string shortform,<br/> - string longform,<br/> - string envvar,<br/> - mixed def);<br/> - </text></group></dl></p> - </tt> - <p>This is a generic function to parse command line options of the - type '-f', '--foo' or '--foo=bar'. The first argument should be - the array of strings that is sent as second argument to your - main() function, the second is a string with the short form of - your option. The short form must be only one character long. - The 'longform' is an alternative and maybe more readable way to - give the same option. If you give "foo" as longform your program - will accept --foo as argument. The envvar argument specifies what - environment variable can be used to specify the same option. The - envvar option exists to make it easier to custimizer program usage. - The 'def' has two functions: It specifies that the option takes an - argument and it tells find_option what to return if the option is - not present. If 'def' is given and the option does not have an - argument find_option will print an error message and exit the program. - </p> - <p>Also, as an extra bonus: shortform, longform and envvar can all be - arrays, in which case either of the options in the array will be - accpted.</p> - </text> -  - <group><note/><text> - <p>find_option modifies argv.</p> - </text></group> -  - <group><example/><text> - <tt><p>int main(int argc, string *argv)<br/> - {<br/> - <dl><group><text>if(find_option(argv,"f","foo"))<br/> - <dl><group><text>werror("The FOO option was given.\n");<br/> - </text></group></dl></text></group></dl> - </p> - <p><dl><group><text>werror("The BAR option got the "+<br/> - find_option(argv,"b","bar","BAR_OPTION","default")+<br/> - " argument.\n");<br/> - </text></group></dl>}<br/> - </p> - </tt></text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::get_args' to='get_args'>get_args</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='float' homogen-type='method'> - <method name='float'/><doc placeholder='true'> - <text> - <p><tt>float</tt> - floating point numbers</p> -  - <tt><p>0.9<br/> - 1.0<br/> - 2.7e7<br/> - </p> - </tt> - <p>This type stores a floating point number, normally it use 4 bytes - of storage when used in a global variable. - </p> - <p>A list of operators that applies to floats follows: - In this list a and b is used to represent a float expression: - </p> - <p><matrix> - <r><c> a + b </c><c> summation </c></r> - <r><c> a - b </c><c> subtraction </c></r> - <r><c> a * b </c><c> multiplication </c></r> - <r><c> a / b </c><c> division </c></r> - <r><c> a % b </c><c> modulo ( same thing as a - floor( a / b ) * b ) </c></r> - <r><c> - a </c><c> negation </c></r> - <r><c> a == b </c><c> return 1 if a is equal to b, 0 otherwise </c></r> - <r><c> a != b </c><c> return 0 if a is equal to b, 1 otherwise </c></r> - <r><c> a &lt; b </c><c> returns 1 if a is lesser than b, 0 otherwise </c></r> - <r><c> a &lt;= b </c><c> returns 1 if a is lesser or equal to b, 0 otherwise </c></r> - <r><c> a &gt; b </c><c> returns 1 if a is greater than b, 0 otherwise </c></r> - <r><c> a &gt;= b </c><c> returns 1 if a is greater or equal to b, 0 otherwise </c></r> - </matrix> - </p> - </text> -  - <group><note/><text> - <p>floats and ints cannot be used together, they have to be cast - to the same type first.</p> -  - types</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::sin' to='predef::sin'>math/sin</ref>, <ref resolved='predef::cos' to='predef::cos'>math/cos</ref>, <ref resolved='predef::tan' to='predef::tan'>math/tan</ref> and <ref resolved='predef::sqrt' to='predef::sqrt'>math/sqrt</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='floatp' homogen-type='method'> - <method name='floatp'/><doc placeholder='true'> - <text> - <p><tt>floatp</tt> - is the argument an float?</p> -  - <tt><p>int floatp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is a float, zero otherwise.</p> -  - float</text> -  - <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='floor' homogen-type='method'>   <method name='floor'/><doc placeholder='true'>   <text>
4266:      </doc>   </docgroup> - <docgroup homogen-name='for' homogen-type='method'> - <method name='for'/><doc placeholder='true'> - <text> - <p><tt>for</tt> - generic loop statement</p> -  - <tt><p>for ( expression1 ; expression2 ; expression3 ) <i>statement</i><br/> - </p> - </tt> - <p>the above statement is exactly equal to: - </p> - <p>expression1;<br/> - while( expression2 )<br/> - {<br/> - <dl><group><text>&lt;statement&gt;<br/> - expression3;<br/> - </text></group></dl>}<br/> -  - </p> - <p>Except when using 'continue'. When using continue in &lt;statement&gt; - expresstion3 will not be called.</p> - </text> -  - <group><example/><text> - <tt><p>int e;<br/> - for(e=0;e&lt;10;e++) write(e+"\n");<br/> - </p> - </tt> - control</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::while' to='while'>while</ref>, <ref resolved='predef::break' to='break'>break</ref> and <ref resolved='predef::continue' to='continue'>continue</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='foreach' homogen-type='method'> - <method name='foreach'/><doc placeholder='true'> - <text> - <p><tt>foreach</tt> - loop over an array</p> -  - <tt><p>foreach ( array, variable ) statement<br/> - </p> - </tt> - <p>For each element in array, set variable to that value and execute - 'statement'.</p> - </text> -  - <group><example/><text> - <tt><p>string word;<br/> - foreach( explode(sentence," "), word) foo(word);<br/> - </p> - </tt> - control</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::for' to='for'>for</ref> and <ref resolved='predef::while' to='while'>while</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='fork' homogen-type='method'>   <method name='fork'/><doc placeholder='true'>   <text>
4343:   </text></group>      <group><seealso/><text> - <p><ref resolved='predef::exec' to='predef::exec'>files/exec</ref> and <ref to='file-&gt;pipe'>file-&gt;pipe</ref></p> + <p><ref to='predef::exec'>files/exec</ref> and <ref to='file-&gt;pipe'>file-&gt;pipe</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='function' homogen-type='method'> - <method name='function'/><doc placeholder='true'> - <text> - <p><tt>function</tt> - a function pointer</p> -  - <tt><p>foo /* if foo is a function in this object */<br/> - bar::foo /* if foo is a function in the inherited program 'bar' */<br/> - o-&gt;foo /* function (or variable) foo in the object o */<br/> - </p> - </tt> - <p>A functionpointer is a reference to a function in an object. It can be - called with call_function which can also be written as just (). - If the object the functionpointer is in is destructed the pointer will - become 0. If you try to call a functionpointer that has is 0 then 0 - will be returned.</p> -  - types</text> -  - <group><seealso/><text> - <p><ref resolved='predef::object' to='object'>object</ref>, <ref resolved='predef::call_function' to='predef::call_function'>builtin/call_function</ref>, <ref resolved='predef::functionp' to='predef::functionp'>builtin/functionp</ref>, <ref resolved='predef::function_object' to='predef::function_object'>builtin/function_object</ref> and <ref resolved='predef::function_name' to='predef::function_name'>builtin/function_name</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='function_name' homogen-type='method'> - <method name='function_name'/><doc placeholder='true'> - <text> - <p><tt>function_name</tt> - return the name of a function, if known</p> -  - <tt><p>string function_name(function <i>f</i>);<br/> - </p> - </tt> - <p>This function returns the name of the function f. If the function is - a pre-defined function in the driver, zero will be returned.</p> -  - function</text> -  - <group><seealso/><text> - <p><ref resolved='predef::function_object' to='function_object'>function_object</ref> and <ref resolved='predef::get_function' to='get_function'>get_function</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='function_object' homogen-type='method'> - <method name='function_object'/><doc placeholder='true'> - <text> - <p><tt>function_object</tt> - return what object a function is in</p> -  - <tt><p>object function_object(function <i>f</i>);<br/> - </p> - </tt> - <p>Function_object will return the object the function f is in. If the - function is a predefined function from the driver, zero will be - returned.</p> -  - function</text> -  - <group><seealso/><text> - <p><ref resolved='predef::function_name' to='function_name'>function_name</ref> and <ref resolved='predef::get_function' to='get_function'>get_function</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='functionp' homogen-type='method'> - <method name='functionp'/><doc placeholder='true'> - <text> - <p><tt>functionp</tt> - is the argument an function?</p> -  - <tt><p>int functionp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is a function, zero otherwise.</p> -  - function</text> -  - <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::floatp' to='floatp'>floatp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='functions' homogen-type='method'> - <method name='functions'/><doc placeholder='true'> - <text> - <p><tt>functions</tt> - how to write a function</p> -  - <tt><p>modifier type function_name (argument_specification)<br/> - {<br/> - <dl><group><text>/* function body */<br/> - </text></group></dl>}<br/> - </p> - </tt> - <p>A function is basically a piece of code which takes some data - does some things, and hands some data back. Data sent to a - a function is called an 'argument'. - </p> - <p>This defines a function called 'function_name' returning the type - 'type'. The argument_specification is a comma separated list of - arguments. Each argument is specified with a type, whitespace and - the name of the argument. The last argument may have ... before - the name to indicate that that argument shall contain an array of - the rest of the arguments given by the caller. Note that using - ... automatically makes an the variable an array, so writing - </p> - <p><matrix> - <r><c> </c><c> int foo(int * ... ints); </c></r> - <r><c> </c></r> - </matrix> -  - </p> - <p>means that 'ints' is an array of arrays of integers. Which might not - be what you want. - </p> - <p>The modifiers can be zero or more of: static, no_mask, varargs, inline - and private. Varargs means that it is ok to call the function with - less arguments that would otherwise be needed. Inline means that - the function may be inlined in other code. Inline also makes the - function no_mask. Static means that the function can not be called - from other objects. Private means that the function can not be accessed - from programs that inherits this program. - </p> - <p>Some times you need to use a function before it is defined, then you - can write a 'forward declaration' of the function. This is done by - copying the function definition up until (but not including) the '{' - and putting a semicolon after it. The forward declaration should be - put before the use of the function of course. - </p> - <p>Function definitions and forward declarations are toplevel constructs, - they can not be written inside functions or expressions.</p> - </text> -  - <group><example/><text> - <tt><p>/* Forward declare foobar as taking an array of int as argument <br/> - <dl><group><text>*and returning an int<br/> - */<br/> - </text></group></dl>static int foobar(int *a);<br/> -  - </p> - <p>/* This function takes a format string and any number of integers<br/> - <dl><group><text>* as argument and returns a string<br/> - */<br/> - </text></group></dl>string dofobar(string format ,int ... rest)<br/> - {<br/> - <dl><group><text>return sprintf(format, foobar(rest));<br/> - </text></group></dl>}<br/> -  - </p> - <p>/* Define foobar */<br/> - static int foobar(int *a)<br/> - {<br/> - <dl><group><text>int e, ret;<br/> - ret=1;<br/> - </text></group></dl> - </p> - <p><dl><group><text>for(e=0;e&lt;sizeof(a);e++)<br/> - <dl><group><text>ret*=a[e];<br/> - </text></group></dl></text></group></dl> - </p> - <p><dl><group><text>return ret;<br/> - </text></group></dl>}<br/> - </p> - </tt> - pike</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::lambda' to='lambda'>lambda</ref>, <ref resolved='predef::return' to='return'>return</ref> and <ref resolved='predef::modifier' to='modifier'>modifier</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='gauge' homogen-type='method'> - <method name='gauge'/><doc placeholder='true'> - <text> - <p><tt>gauge</tt> - measure system time</p> -  - <tt><p>gauge { commands }<br/> - or<br/> - gauge ( expression )<br/> - </p> - </tt> - <p>Gauge measure how much cpu time is used to execute the commands - given as arguments. The number of milliseconds used is returned - as an integer.</p> -  - control</text> -  - <group><seealso/><text> - <p><ref resolved='predef::catch' to='catch'>catch</ref> and <ref resolved='predef::rusage' to='predef::rusage'>builtin/rusage</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='gc' homogen-type='method'> - <method name='gc'/><doc placeholder='true'> - <text> - <p><tt>gc</tt> - do garbage collection</p> -  - <tt><p>int gc();<br/> - </p> - </tt> - <p><matrix> - <r><c> This function checks all the memory for cyclic structures such </c></r> - <r><c> as arrays containing themselves and frees them if approperiate. </c></r> - <r><c> It also frees up destructed objects. It then returns how many </c></r> - <r><c> arrays/objects/programs/etc. it managed </c><c> to free by doing this. </c></r> - <r><c> Normally there is no need to call this function since Pike will </c></r> - <r><c> call it by itself every now and then. (Pike will try to predict </c></r> - <r><c> when 20% of all arrays/object/programs in memory is 'garbage' </c></r> - <r><c> and call this routine then.) </c></r> - </matrix> -  - </p> - <p/> - </text> -  - </doc> - </docgroup> - <docgroup homogen-name='get_args' homogen-type='method'> - <method name='get_args'/><doc placeholder='true'> - <text> - <p><tt>get_args</tt> - get the non-option arguments</p> -  - <tt><p>#include &lt;getopt.h&gt;<br/> -  - </p> - <p>string *get_args(string *<i>argv</i>);<br/> - </p> - </tt> - <p>This function returns the remaining command line arguments after - you have run find_options to find all the options in the - argument list. If there are any options left not handled by - find_options an error message will be written and the program will - exit. Otherwise a new 'argv' array without the parsed options is - returned.</p> - </text> -  - <group><example/><text> - <tt><p>int main(int argc, string *argv)<br/> - {<br/> - <dl><group><text>if(find_option(argv,"f","foo"))<br/> - <dl><group><text>werror("The FOO option was given.\n");<br/> - </text></group></dl></text></group></dl> - </p> - <p><dl><group><text>argv=get_args(argv);<br/> - werror("The arguments are: "+(argv*" ")+".\n");<br/> - </text></group></dl>}<br/> - </p> - </tt></text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::find_option' to='find_option'>find_option</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='get_dir' homogen-type='method'>   <method name='get_dir'/><doc placeholder='true'>   <text>
4622:      </doc>   </docgroup> - <docgroup homogen-name='get_function' homogen-type='method'> - <method name='get_function'/><doc placeholder='true'> - <text> - <p><tt>get_function</tt> - fetch a function from an object</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>function get_function(object <i>o</i>, string <i>name</i>);<br/> - </p> - </tt> - <p>Defined as: return o[name];</p> -  - function</text> -  - </doc> - </docgroup> +    <docgroup homogen-name='getcwd' homogen-type='method'>   <method name='getcwd'/><doc placeholder='true'>   <text>
4670:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref> and <ref resolved='predef::system' to='system/setegid'>system/setegid</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref> and <ref to='system/setegid'>system/setegid</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='getenv' homogen-type='method'> - <method name='getenv'/><doc placeholder='true'> - <text> - <p><tt>getenv</tt> - get an environment variable</p> -  - <tt><p>string getenv(string <i>varname</i>);<br/> - </p> - </tt> - <p>Reurns the value of the environment variable with the name varname, - if no such environment variable exists, zero is returned.</p> - </text> -  - <group><note/><text> - <p>This function is provided by master.c - </p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='geteuid' homogen-type='method'>   <method name='geteuid'/><doc placeholder='true'>   <text>
4707:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/setegid'>system/setegid</ref> and <ref resolved='predef::system' to='system/getegid'>system/getegid</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>   </text></group>      </doc>
4725:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref>, <ref resolved='predef::system' to='system/setegid'>system/setegid</ref> and <ref resolved='predef::system' to='system/getegid'>system/getegid</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>   </text></group>      </doc>
4822:   Processes</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/getpid'>system/getpid</ref> and <ref resolved='predef::system' to='system/getppid'>system/getppid</ref></p> + <p><ref to='system/getpid'>system/getpid</ref> and <ref to='system/getppid'>system/getppid</ref></p>   </text></group>      </doc>
4830:   <docgroup homogen-name='getpid' homogen-type='method'>   <method name='getpid'/><doc placeholder='true'>   <text> - <p><tt>getpid</tt> - get the process id of this process</p> -  - <tt><p>int getpid();<br/> - </p> - </tt> - <p>This returns the pid of this process. Useful for sending - signals to yourself.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::kill' to='kill'>kill</ref>, <ref resolved='predef::fork' to='fork'>fork</ref> and <ref resolved='predef::signal' to='signal'>signal</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='getpid' homogen-type='method'> - <method name='getpid'/><doc placeholder='true'> - <text> +    <p><tt>getpid</tt> - get the process ID</p>      <tt><p>int getpid();<br/>
4858:   Processes</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/getppid'>system/getppid</ref> and <ref resolved='predef::system' to='system/getpgrp'>system/getpgrp</ref></p> + <p><ref to='system/getppid'>system/getppid</ref> and <ref to='system/getpgrp'>system/getpgrp</ref></p>   </text></group>      </doc>
4876:   Processes</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/getpid'>system/getpid</ref> and <ref resolved='predef::system' to='system/getpgrp'>system/getpgrp</ref></p> + <p><ref to='system/getpid'>system/getpid</ref> and <ref to='system/getpgrp'>system/getpgrp</ref></p>   </text></group>      </doc>
4894:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref>, <ref resolved='predef::system' to='system/setegid'>system/setegid</ref> and <ref resolved='predef::system' to='system/getegid'>system/getegid</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='glob' homogen-type='method'> - <method name='glob'/><doc placeholder='true'> - <text> - <p><tt>glob</tt> - match strings against globs</p> -  - <tt><p>int glob(string <i>glob</i>, string <i>str</i>);<br/> - or<br/> - string *glob(string <i>glob</i>, string *<i>arr</i>);<br/> - </p> - </tt> - <p>This function matches "globs". A in the glob string a question sign - matches any character and an asterisk matches any string. When - given two strings as argument a true/false value is returned - which reflects if the 'str' matches 'glob'. When given an array as - second argument, an array containing all matching strings is returned.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::sscanf' to='sscanf'>sscanf</ref> and <ref resolved='predef::regexp' to='regexp'>regexp</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='hardlink' homogen-type='method'>   <method name='hardlink'/><doc placeholder='true'>   <text>
4935:   file</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/symlink'>system/symlink</ref>, <ref resolved='predef::mv' to='predef::mv'>files/mv</ref> and <ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p> + <p><ref to='system/symlink'>system/symlink</ref>, <ref resolved='predef::mv' to='predef::mv'>files/mv</ref> and <ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='hash' homogen-type='method'> - <method name='hash'/><doc placeholder='true'> - <text> - <p><tt>hash</tt> - hash a string</p> -  - <tt><p>int hash(string <i>s</i>);<br/> - or<br/> - int hash(string <i>s</i>, int <i>max</i>);<br/> - </p> - </tt> - <p>This function will return an int derived from the string s. The same - string will always hash to the same value. If a second argument - is given, the result will be &gt;= 0 and lesser than that argument.</p> -  - string</text> -  - </doc> - </docgroup> - <docgroup homogen-name='hilfe' homogen-type='method'> - <method name='hilfe'/><doc placeholder='true'> - <text> - <p><tt>hilfe</tt> - Hubbe's Incremental Pike FrontEnd</p> -  - <tt><p>$ hilfe<br/> - or<br/> - $ pike -Cstay hilfe<br/> - </p> - </tt> - <p>Hilfe is a Pike-script that supplies an incremental environment for - Pike. It allowes you to evaluate Pike 'on the fly'. If you're running - UNIX, you only have to write 'hilfe' to start it, otherwise you will - have to write 'driver -Cstay hilfe' to run it. If you don't know what - 'incremeantal' means in this context, ask you local LISP junkie. - </p> - <p>Hilfe has the following commands: - </p> - <p>quit - exit hilfe - new - clear all variables and function definition - dump - dump all current variables - . - clear input buffer - </p> - <p>Hilfe parses a subset of Pike, there many things it doesn't handle. Here - is a list of what you can do: - </p> - <p>Define a function: - &lt;type&gt; &lt;name&gt;( &lt;arguments&gt; ) { &lt;statements &gt; } - Note that hilfe simulates a function defenition by defining a variable - and setting it to the function pointer. Therefor actual typechecking is - almost nil. Also note that hilfe doesn't recognize type modifiers such - as static, private, varargs etc. - </p> - <p>Declare one or many global variables: - &lt;type&gt; &lt;name&gt; [=&lt;value&gt;], &lt;name&gt; [=value&gt;] ..... ; - Hilfe simulates variable handling, and typechecking is almost nil, - therefor all global variables are declared as mixed, whatever the - &lt;type&gt; may be. - </p> - <p>Evaluate a statement: - &lt;statement&gt; ; - Statements include the following examples: - </p> - <p><dl><group><text>for(e=0;e&lt;10;e++) ;<br/> - </text></group></dl> - </p> - <p><dl><group><text>e=10;<br/> - </text></group></dl> - </p> - <p><dl><group><text>write(e);<br/> - </text></group></dl> - </p> - <p><dl><group><text>if(foo) return bar; else return gazonk;<br/> - </text></group></dl> - </p> - <p>Statements beginning with for, while, switch, if, do or return will - not automatically return anything, and no result will be printed. - </p> - </text> -  - </doc> - </docgroup> - <docgroup homogen-name='if-else' homogen-type='method'> - <method name='if-else'/><doc placeholder='true'> - <text> - <p><tt>if-else</tt> - run on condition</p> -  - <tt><p>if( expression ) <i>statement</i><br/> - or<br/> - if( expression ) <i>statement</i> else <i>statement</i><br/> - </p> - </tt> - <p>If is the simplest of all control structures, in the first form - it runs the statement if the expression is true and in the second - form it runs the first statement if the expression is true and the - second if it is false.</p> -  - control</text> -  - <group><seealso/><text> - <p><ref resolved='predef::switch' to='switch'>switch</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='implode' homogen-type='method'> - <method name='implode'/><doc placeholder='true'> - <text> - <p><tt>implode</tt> - implode an array of strings</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>string implode(string *<i>a</i>, string <i>delimeter</i>);<br/> - or<br/> - a * delimeter<br/> - </p> - </tt> - <p>This function is the inverse of explode. It contatenates all the - strings in a with a delimeter in between each. - </p> - <p>This function is the same as multiplication.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; implode( ({ "foo","bar","gazonk"}), "-" );<br/> - Result: foo-bar-gazonk<br/> - &gt; ({ "a","b","c" })*" and ";<br/> - Result: a and b and c<br/> - &gt; <br/> - </p> - </tt> - string</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::explode' to='explode'>explode</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='implode_nicely' homogen-type='method'> - <method name='implode_nicely'/><doc placeholder='true'> - <text> - <p><tt>implode_nicely</tt> - make an english comma separated list</p> -  - <tt><p>#include &lt;string.h&gt;<br/> -  - </p> - <p>string implode_nicely(string *words, string|void separator)<br/> - </p> - </tt> - <p>This function implodes a list of words to a readable string. - If the separator is omitted, the default is 'and'.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; implode_nicely(({"green"}));<br/> - Result: green<br/> - &gt; implode_nicely(({"green","blue"}));<br/> - Result: green and blue<br/> - &gt; implode_nicely(({"green","blue","white"}));<br/> - Result: green, blue and white<br/> - &gt; implode_nicely(({"green","blue","white"}),"or");<br/> - Result: green, blue or white<br/> - </p> - </tt> - string</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::`*' to='`*'>`*</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='index' homogen-type='method'> - <method name='index'/><doc placeholder='true'> - <text> - <p><tt>index</tt> - get/set an element in an array/string/mapping/object</p> -  - <tt><p>a [ b ]<br/> - or<br/> - a [ b ] = c<br/> - or<br/> - a -&gt; b<br/> - </p> - </tt> - <p><matrix> - <r><c> This operator does a lookup in 'a' to find the element named 'b' in </c></r> - <r><c> 'a'. The last syntax (a-&gt;b) is equal to a [ "b" ]. Different usage </c></r> - <r><c> applies </c><c> to different types. </c></r> - </matrix> -  - </p> - <p><matrix> - <r><c> Strings </c><c> With strings, the index operator can only be used to get values </c></r> - <r><c> </c><c> not change them. The index must be an integer, and the return value will be the ascii value of the corresponding character in the string. The first character is numbered 0. </c></r> - <r><c> Arrays </c><c> As with strings, arrays can only be indexed on integers. However, values can also be changed by using indexing on the left side of an assignment. The values in the array can have any type. As with strings, the first index is 0. </c></r> - <r><c> Mappings </c><c> Mappings can be indexed on any type of value, quite often they are indexed on strings. Values can be changed as with arrays. Mappings do not have a fixed size, nor do they have a specific order in which the values are stored. If you attempt to set a value in a mapping that does not already exists, the mapping will grow to include the new value. There is no 'first' index for mappings. </c></r> - <r><c> Multisets </c><c> Multisets can be also be indexed on any value, but the return value only reflects a true/false status depending on weather that index was present in the multiset. As with mappings, multisets will grow when you try to set a value in it that is does not already exists. However multisets will only grow if the inserted 'c' is nonzero. </c></r> - <r><c> Object </c><c> Objects can only be indexed on strings. It then gets/sets the value of the variable with that name. If the 'variable' isn't a variable at all, but a function it will return a pointer to that function but you can't change it. </c></r> - </matrix> - </p> - </text> -  - <group><example/><text> - <tt><p><matrix> - <r><c> "foobar"[2] </c><c> returns 111 /* ascii for 'o' */ </c></r> - <r><c> "foobar"[0] </c><c> returns 102 /* ascii for 'f' */ </c></r> - <r><c> ({1,2,3})[1] </c><c> returns 2 </c></r> - <r><c> ([1:2})[1] </c><c> returns 2 </c></r> - <r><c> (&lt;1,2,3&gt;)[2] </c><c> returns 1 </c></r> - </matrix> - </p> - </tt> - operators</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::index' to='index'>index</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='indices' homogen-type='method'> - <method name='indices'/><doc placeholder='true'> - <text> - <p><tt>indices</tt> - return an array of all index possible for a value</p> -  - <tt><p>mixed *indices(string|array|mapping|multiset|object <i>foo</i>);<br/> - </p> - </tt> - <p>Indices returns an array of all values you can use as index when - indexing foo. For strings and arrays this is simply an array of the - ascending numbers. For mappings and multisets, the array may contain any - kind of value. For objects, the result is an array of strings.</p> -  - mapping and multiset</text> -  - <group><seealso/><text> - <p><ref resolved='predef::values' to='values'>values</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='inherit' homogen-type='method'> - <method name='inherit'/><doc placeholder='true'> - <text> - <p><tt>inherit</tt> - use definitions from another program</p> -  - <tt><p>inherit "&lt;program name&gt;";<br/> - or<br/> - inherit "&lt;program name&gt;" : local_name;<br/> - </p> - </tt> - <p><matrix> - <r><c> Inherit copies the global identifiers (functions and global variables) </c></r> - <r><c> from the named program. These functions and variables can then be </c></r> - <r><c> used as </c><c> if they were defined in this program. All the inherited </c></r> - <r><c> identifiers that was no declared as no_mask in the inherited program </c></r> - <r><c> can be also be redefined. The redefinition will not only </c></r> - <r><c> affect functions following the redefinition, but all functions in </c></r> - <r><c> this program, including the inherited ones. </c></r> - </matrix> -  - </p> - <p>Even if an identifier is redefined you can still access the original - though. Prepending the identifier name with :: will return the original - identifier, OR an array of all inherited identifiers with that name. - </p> - <p>You can also use the local_name to access a specific identifier, just - prepend it like 'local_name::identifier'. This will return the named - identifer in the program inherited with the given local_name. If no - local_name was given to inherit , the last part of the path in the - program name will be used as local_name. - </p> - <p>Inherit calls master()-&gt;cast_to_program(&lt;program name&gt;) to get the - program to inherit. For this reason there can be no inherits in the - master object. - </p> - <p>Inherit is not an expression or statement, it is a toplevel construct - and must not be written inside a function body.</p> - </text> -  - <group><example/><text> - <tt><p>/* This is file hworld.pike */<br/> - int hello_world() { write("Hello world.\n"); }<br/> -  - </p> - <p>/* This is the file hello_world.pike */<br/> - inherit "hworld.pike";<br/> - <br/> - int main()<br/> - {<br/> - <dl><group><text>hello_world();<br/> - exit(0);<br/> - </text></group></dl>}<br/> - </p> - </tt> - pike</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::class' to='class'>class</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='initgroups' homogen-type='method'>   <method name='initgroups'/><doc placeholder='true'>   <text>
5258:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref>, <ref resolved='predef::system' to='system/setegid'>system/setegid</ref>, <ref resolved='predef::system' to='system/getegid'>system/getegid</ref>, <ref resolved='predef::system' to='system/getgroups'>system/getgroups</ref> and <ref resolved='predef::system' to='system/setgroups'>system/setgroups</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref>, <ref to='system/getegid'>system/getegid</ref>, <ref to='system/getgroups'>system/getgroups</ref> and <ref to='system/setgroups'>system/setgroups</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='int' homogen-type='method'> - <method name='int'/><doc placeholder='true'> - <text> - <p><tt>int</tt> - integers numbers</p> -  - <tt><p>9797 /* decimal number */<br/> - 0x20 /* hexadecimal number */<br/> - 020 /* octal number */<br/> - </p> - </tt> - <p>This type stores an integer, normally it is 32 bits and use 4 bytes - of storage when used in a global variable. - </p> - <p>A list of operators that applies to ints follows: - </p> - <p>In this list a and b is used to represent an integer expression: - </p> - <p><matrix> - <r><c> a + b </c><c> summation </c></r> - <r><c> a - b </c><c> subtraction </c></r> - <r><c> a * b </c><c> multiplication </c></r> - <r><c> a / b </c><c> integer division </c></r> - <r><c> a % b </c><c> modulo ( same thing as a - ( a / b ) * b ) </c></r> - <r><c> a | b </c><c> bitwise or </c></r> - <r><c> a &amp; b </c><c> bitwise and </c></r> - <r><c> a ^ b </c><c> bitwise xor </c></r> - <r><c> ! a </c><c> boolean not, returns 1 if a is zero 0 otherwise </c></r> - <r><c> ~ a </c><c> bitwise complement </c></r> - <r><c> - a </c><c> negation </c></r> - <r><c> a == b </c><c> return 1 if a is equal to b, 0 otherwise </c></r> - <r><c> a != b </c><c> return 0 if a is equal to b, 1 otherwise </c></r> - <r><c> a &lt; b </c><c> returns 1 if a is lesser than b, 0 otherwise </c></r> - <r><c> a &lt;= b </c><c> returns 1 if a is lesser or equal to b, 0 otherwise </c></r> - <r><c> a &gt; b </c><c> returns 1 if a is greater than b, 0 otherwise </c></r> - <r><c> a &gt;= b </c><c> returns 1 if a is greater or equal to b, 0 otherwise </c></r> - </matrix> - </p> -  - types</text> -  - <group><seealso/><text> - <p><ref resolved='predef::float' to='float'>float</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='intp' homogen-type='method'> - <method name='intp'/><doc placeholder='true'> - <text> - <p><tt>intp</tt> - is the argument an int?</p> -  - <tt><p>array intp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is an int, zero otherwise.</p> -  - int</text> -  - <group><seealso/><text> - <p><ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='kill' homogen-type='method'> - <method name='kill'/><doc placeholder='true'> - <text> - <p><tt>kill</tt> - send signal to other process</p> -  - <tt><p>int kill(int pid, int signal)<br/> - </p> - </tt> - <p>Kill sends a signal to another process. If something goes wrong - -1 is returned, 0 otherwise. - </p> - <p>Some signals and their supposed purpose: - </p> - <p><matrix> - <r><c> SIGHUP </c><c> Hangup, sent to process when user logs out </c></r> - <r><c> SIGINT </c><c> Interrupt, normally sent by ctrl-c </c></r> - <r><c> SIGQUIT </c><c> Quit, sent by ctrl-\ </c></r> - <r><c> SIGILL </c><c> Illegal instruction </c></r> - <r><c> SIGTRAP </c><c> Trap, mostly used by debuggers </c></r> - <r><c> SIGABRT </c><c> Aborts process, can be caught, used by Pike whenever something goes seriously wrong. </c></r> - <r><c> SIGBUS </c><c> Bus error </c></r> - <r><c> SIGFPE </c><c> Floating point error (such as division by zero) </c></r> - <r><c> SIGKILL </c><c> Really kill a process, cannot be caught </c></r> - <r><c> SIGUSR1 </c><c> Signal reserved for whatever you want to use it for. </c></r> - <r><c> SIGSEGV </c><c> Segmentation fault, caused by accessing memory where you shouldn't. Should never happen to Pike. </c></r> - <r><c> SIGUSR2 </c><c> Signal reserved for whatever you want to use it for. </c></r> - <r><c> SIGALRM </c><c> Signal used for timer interrupts. </c></r> - <r><c> SIGTERM </c><c> Termination signal </c></r> - <r><c> SIGSTKFLT </c><c> Stack fault </c></r> - <r><c> SIGCHLD </c><c> Child process died </c></r> - <r><c> SIGCONT </c><c> Continue suspended </c></r> - <r><c> SIGSTOP </c><c> Stop process </c></r> - <r><c> SIGSTP </c><c> Suspend process </c></r> - <r><c> SIGTTIN </c><c> tty input for background process </c></r> - <r><c> SIGTTOU </c><c> tty output for background process </c></r> - <r><c> SIGXCPU </c><c> Out of cpu </c></r> - <r><c> SIGXFSZ </c><c> File size limit exceeded </c></r> - <r><c> SIGPROF </c><c> Profile trap </c></r> - <r><c> SIGWINCH </c><c> Window change signal </c></r> - </matrix> -  - </p> - <p>Note that you have to use signame to translate the name of a signal - to it's number.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::signal' to='signal'>signal</ref>, <ref resolved='predef::signum' to='signum'>signum</ref>, <ref resolved='predef::signame' to='signame'>signame</ref> and <ref resolved='predef::fork' to='predef::fork'>files/fork</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='l_sizeof' homogen-type='method'> - <method name='l_sizeof'/><doc placeholder='true'> - <text> - <p><tt>l_sizeof</tt> - Return the size of a multiset</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int l_sizeof(multiset <i>m</i>);<br/> - </p> - </tt> - <p>This function is equal to sizeof.</p> -  - multiset</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='lambda' homogen-type='method'> - <method name='lambda'/><doc placeholder='true'> - <text> - <p><tt>lambda</tt> - write nameless functions</p> -  - <tt><p>lambda(&lt;argument specifications&gt;) { <i>code</i> }<br/> - </p> - </tt> - <p>Lambda let's you write a function as a value to a function call - or anywhere where you can enter an expression. Using lambda is - basically the same as defining the function before the current - function with a temporary name and then use the name instead.</p> - </text> -  - <group><example/><text> - <tt><p>/* These two lettersort routines are equal */<br/> - string *lettersort(string *words)<br/> - {<br/> - <dl><group><text>return sort_array(lettersort, lambda(string a,string b)<br/> - <dl><group><text>{<br/> - <dl><group><text>return a &lt; b;<br/> - </text></group></dl>});<br/> - </text></group></dl></text></group></dl>}<br/> -  - </p> - <p>int tmp_cmp_fun(string a, string b)<br/> - {<br/> - <dl><group><text>return a &lt; b;<br/> - </text></group></dl>}<br/> -  - </p> - <p>string *lettersort(string *words)<br/> - {<br/> - <dl><group><text>return sort_array(lettersort, tmp_cmp_fun);<br/> - </text></group></dl>}<br/> - </p> - </tt></text></group> -  - <group><note/><text> - <p>function_name() will return something for lambda functions, - what it returns is unspecified though.</p> - </text></group> -  - <group><bugs/><text> - <p>confuses the hell out of C indent programs</p> -  - pike</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::class' to='class'>class</ref> and <ref resolved='predef::function' to='function'>function</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='listp' homogen-type='method'> - <method name='listp'/><doc placeholder='true'> - <text> - <p><tt>listp</tt> - is the argument a list? (multiset)</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int listp(mixed l)<br/> - </p> - </tt> - <p>This function is the same as multisetp.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::multisetp' to='predef::multisetp'>builtin/multisetp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='load_module' homogen-type='method'> - <method name='load_module'/><doc placeholder='true'> - <text> - <p><tt>load_module</tt> - load a binary module</p> -  - <tt><p>int load_module(string <i>module_name</i>);<br/> - </p> - </tt> - <p>This function loads a module written in C or some other language - into Pike. The module is initialized and any programs or constants - defined will immediately be available. - </p> - <p>When a module is loaded the functions init_module_efuns and - init_module_programs are called to initialize it. When Pike exits - exit_module is called in all dynamically loaded modules. These - functions _must_ be available in the module. - </p> - <p>Please see the source and any examples available at - ftp://www.infovav.se/pub/pike for more information on how to - write modules for Pike in C.</p> - </text> -  - <group><bugs/><text> - <p>Please use "./name.so" instead of just "foo.so" for the module - name. If you use just "foo.se" the module will not be found. - </p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='localtime' homogen-type='method'> - <method name='localtime'/><doc placeholder='true'> - <text> - <p><tt>localtime</tt> - break down time() into intelligible components</p> -  - <tt><p>mapping(string:int) localtime(int <i>time</i>);<br/> - </p> - </tt> - <p>Given a time represented as second since 1970, as returned by the - function time(), this function returns a mapping with the following - components: - </p> - <p><matrix> - <r><c> sec </c><c> seconds over the minute </c><c> 0 - 59 </c></r> - <r><c> min </c><c> minutes over the hour </c><c> 0 - 59 </c></r> - <r><c> hour </c><c> what hour in the day </c><c> 0 - 23 </c></r> - <r><c> mday </c><c> day of the month </c><c> 1 - 31 </c></r> - <r><c> mon </c><c> what month </c><c> 0 - 11 </c></r> - <r><c> year </c><c> years since 1900 </c><c> 0 - </c></r> - <r><c> wday </c><c> day of week (0=sunday) </c><c> 0 - 6 </c></r> - <r><c> yday </c><c> day of year </c><c> 0 - 365 </c></r> - <r><c> isdst </c><c> is daylight saving time </c><c> 0/1 </c></r> - <r><c> timezone </c><c> differance between </c></r> - <r><c> </c><c> </c><c> local time and UTC </c></r> - </matrix> - </p> - </text> -  - <group><note/><text> - <p>The 'timezone' might not be available on all platforms.</p> - </text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::time' to='time'>time</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='log' homogen-type='method'>   <method name='log'/><doc placeholder='true'>   <text>
5561:      </doc>   </docgroup> - <docgroup homogen-name='lower_case' homogen-type='method'> - <method name='lower_case'/><doc placeholder='true'> - <text> - <p><tt>lower_case</tt> - convert a string to lower case</p> -  - <tt><p>string lower_case(string <i>s</i>);<br/> - </p> - </tt> - <p>Return a string with all capital letters converted to lower case.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::upper_case' to='upper_case'>upper_case</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='m_delete' homogen-type='method'> - <method name='m_delete'/><doc placeholder='true'> - <text> - <p><tt>m_delete</tt> - remove an index from a mapping</p> -  - <tt><p>mapping m_delete(mapping <i>map</i>, mixed <i>index</i>);<br/> - </p> - </tt> - <p>Remove the entry with index 'index' from mapping 'map' destructively. - Return the changed mapping. If the mapping does not have an - entry with index 'index', nothing is done. - Note that m_delete changes map destructively and only returns - the mapping for compatibility reasons.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::mappingp' to='mappingp'>mappingp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='m_indices' homogen-type='method'> - <method name='m_indices'/><doc placeholder='true'> - <text> - <p><tt>m_indices</tt> - return all indices from a mapping</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>mixed *m_indices(mapping <i>m</i>);<br/> - </p> - </tt> - <p>This function is equal to indices</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='m_sizeof' homogen-type='method'> - <method name='m_sizeof'/><doc placeholder='true'> - <text> - <p><tt>m_sizeof</tt> - Return the size of a mapping</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int m_sizeof(mapping <i>m</i>);<br/> - </p> - </tt> - <p>This function is equal to sizeof.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='m_values' homogen-type='method'> - <method name='m_values'/><doc placeholder='true'> - <text> - <p><tt>m_values</tt> - return all values from a mapping</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>mixed *m_values(mapping <i>m</i>);<br/> - </p> - </tt> - <p>This function is equal to values</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::values' to='predef::values'>builtin/values</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='map' homogen-type='method'> - <method name='map'/><doc placeholder='true'> - <text> - <p><tt>map</tt> - map an array or mapping over a function</p> -  - <tt><p>mixed *map(mixed <i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *map(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *map(function *<i>arr</i>,-<i>1</i>,mixed ... <i>arg</i>);<br/> - </p> - </tt> - <p>First syntax: - Map array returns an array holding the items of arr mapped thrugh - the function fun. ie. arr[x]=fun(arr[x], @args) for all x. - </p> - <p>Second syntax: - Map array calls function fun in all objects in the array arr. - ie. arr[x]=arr[x]-&gt;fun(@ args); - </p> - <p>Third syntax: - Map array calls the functions in the array arr: - arr[x]=arr[x]-&gt;fun(@ args);</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::filter' to='filter'>filter</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='map_array' homogen-type='method'> - <method name='map_array'/><doc placeholder='true'> - <text> - <p><tt>map_array</tt> - map an array over a function</p> -  - <tt><p>mixed *map_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *map_array(object *<i>arr</i>,string <i>fun</i>,mixed ... <i>args</i>);<br/> - or<br/> - mixed *map_array(function *<i>arr</i>,-<i>1</i>,mixed ... <i>arg</i>);<br/> - </p> - </tt> - <p>This function is the same as map.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::filter_array' to='filter_array'>filter_array</ref>, <ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref> and <ref resolved='predef::map' to='map'>map</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mapping' homogen-type='method'> - <method name='mapping'/><doc placeholder='true'> - <text> - <p><tt>mapping</tt> - an associative array</p> -  - <tt><p>([ index1:data1, index2:data2 ])<br/> - </p> - </tt> - <p>A mapping is basically an array that can be indexed on any type, not - not just integers. It can also be seen as a way of linking data - (usaully strings) together. It consists of a lot of index-data pairs - which are linked togeter in such a way that map[index1] returns data1. - It is also possible to set that data by writing map[index1]=new_data1. - If you try to set an index in a mapping that isn't already present in - the mapping then it will be added. - </p> - <p>Here follows a list of operators that applies to mappings: - In this list a and b is used to represent a mapping expression: - </p> - <p><matrix> - <r><c> a + b </c><c> summation ( ([1:1]) + ([2:2,2:2]) returns ([1:1,2:2,2:2]) ) </c></r> - <r><c> a - b </c><c> subtraction, returns a copy of a with all pairs whos index is present in b removed. </c></r> - <r><c> a &amp; b </c><c> intersection, return a mapping with all indices that are resent in both a and b, if an index is present in both a &amp; b the data for that index will be taken from b. </c></r> - <r><c> a | b </c><c> union, return a mapping with all values that are present in a or b, differs from summation in that values that are present in both a and b are only returned once, as with intersection, data will be taken from b when possible. </c></r> - <r><c> a ^ b </c><c> xor, return a mapping with all indices that are present in a or b but not in both. </c></r> - <r><c> a == b </c><c> returns 1 if a is the same mapping as b, same size, indices and values is not enough, 0 otherwise. </c></r> - <r><c> a != b </c><c> returns 0 if a is the same mapping as b, same size, indices and values is not enough, 1 otherwise. </c></r> - <r><c> ! a </c><c> boolean not, returns 0 </c></r> - <r><c> a[c] </c><c> indexing, returns the value associated with the value c in the mapping a. If there is no index c in the mapping zero will be returned. (With zero_type = 1) </c></r> - <r><c> a[c]=d </c><c> setting, this associates d with c in the mapping, the index c will be added to the mapping automatically if it isn't already there. </c></r> - </matrix> - </p> -  - types</text> -  - <group><seealso/><text> - <p><ref resolved='predef::array' to='array'>array</ref>, <ref resolved='predef::multiset' to='multiset'>multiset</ref>, <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref>, <ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref>, <ref resolved='predef::values' to='predef::values'>builtin/values</ref> and <ref resolved='predef::zero_type' to='predef::zero_type'>builtin/zero_type</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mappingp' homogen-type='method'> - <method name='mappingp'/><doc placeholder='true'> - <text> - <p><tt>mappingp</tt> - is the argument an mapping?</p> -  - <tt><p>int mappingp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is a mapping, zero otherwise.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='master' homogen-type='method'> - <method name='master'/><doc placeholder='true'> - <text> - <p><tt>master</tt> - return the master object</p> -  - <tt><p>object master();<br/> - </p> - </tt> - <p>Master is added by the master object to make it easier to access it.</p> -  - object</text> -  - </doc> - </docgroup> - <docgroup homogen-name='member_array' homogen-type='method'> - <method name='member_array'/><doc placeholder='true'> - <text> - <p><tt>member_array</tt> - find first occurance of a value in an array</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int member_array(mixed <i>item</i>, mixed *<i>arr</i>);<br/> - </p> - </tt> - <p>Returns the index of the first occurence of item in array arr. - If not found, then -1 is returned.</p> -  - array</text> -  - </doc> - </docgroup> - <docgroup homogen-name='mixed' homogen-type='method'> - <method name='mixed'/><doc placeholder='true'> - <text> - <p><tt>mixed</tt> - any type</p> -  - <p>This is not really a type. But this keyword can be used to specify - that a variable, argument or return type can be of any type.</p> - </text> -  - <group><example/><text> - <tt><p>mixed i=1;<br/> - mixed j="foo";<br/> - mixed foo() { return "bar"; }<br/> - mixed bar() { return ({}); }<br/> - </p> - </tt> - types</text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='mkdir' homogen-type='method'>   <method name='mkdir'/><doc placeholder='true'>   <text>
5847:      </doc>   </docgroup> - <docgroup homogen-name='mklist' homogen-type='method'> - <method name='mklist'/><doc placeholder='true'> - <text> - <p><tt>mklist</tt> - make a multiset</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>multiset mklist(mixed *a)<br/> - </p> - </tt> - <p>This function creates a multiset from an array.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; mklist( ({1,2,3}) );<br/> - Result: (&lt; /* 3 elements */<br/> - <dl><group><text>1,<br/> - 2,<br/> - 3<br/> - </text></group></dl>&gt;)<br/> - </p> - </tt> - multiset</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::aggregate_multiset' to='predef::aggregate_multiset'>builtin/aggregate_multiset</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mkmapping' homogen-type='method'> - <method name='mkmapping'/><doc placeholder='true'> - <text> - <p><tt>mkmapping</tt> - make a mapping from two arrays</p> -  - <tt><p>mapping mkmapping(mixed *<i>ind</i>, mixed *<i>val</i>);<br/> - </p> - </tt> - <p>Makes a mapping ind[x]:val[x], 0&lt;=x&lt;sizeof(ind). - Ind and val must have the same size. - This is the inverse operation of indices and values.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::indices' to='indices'>indices</ref> and <ref resolved='predef::values' to='values'>values</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='mkmultiset' homogen-type='method'> - <method name='mkmultiset'/><doc placeholder='true'> - <text> - <p><tt>mkmultiset</tt> - make a multiset</p> -  - <tt><p>multiset mkmultiset(mixed *a)<br/> - </p> - </tt> - <p>This function creates a multiset from an array.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; mkmultiset( ({1,2,3}) );<br/> - Result: (&lt; /* 3 elements */<br/> - <dl><group><text>1,<br/> - 2,<br/> - 3<br/> - </text></group></dl>&gt;)<br/> - </p> - </tt> - multiset</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::aggregate_multiset' to='predef::aggregate_multiset'>builtin/aggregate_multiset</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='modifier' homogen-type='method'> - <method name='modifier'/><doc placeholder='true'> - <text> - <p><tt>modifier</tt> - modify function / variable definitions</p> -  - <p>Modifiers makes it possible to give functions and gobal variables - certain characteristics. A list of modifiers follows: - </p> - <p><matrix> - <r><c> static </c><c> make this identifier unavailable by indexing </c></r> - <r><c> inline </c><c> allow inlining this function </c></r> - <r><c> private </c><c> hide this identifier to inheriting programs </c></r> - <r><c> nomask </c><c> don't allow this identifier to be re-defined </c></r> - </matrix> - </p> -  - pike</text> -  - <group><seealso/><text> - <p><ref resolved='predef::functions' to='functions'>functions</ref> and <ref resolved='predef::variables' to='variables'>variables</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='multiset' homogen-type='method'> - <method name='multiset'/><doc placeholder='true'> - <text> - <p><tt>multiset</tt> - a set of values</p> -  - <tt><p>(&lt; 1, 7, 8, 9 &gt;)<br/> - </p> - </tt> - <p>A multiset is basically a mapping without data values, when indexing a - multiset 1 willl be returned if the index is present, zero otherwise. - </p> - <p>Here follows a list of operators that applies to multisets: - In this list a and b is used to represent a multiset expression: - </p> - <p><matrix> - <r><c> a + b </c><c> summation ( (&lt;1&gt;) + (&lt;2&gt;) returns (&lt;1,2&gt;) ) </c></r> - <r><c> a - b </c><c> subtraction, returns a copy of a with all values that are present in b removed. </c></r> - <r><c> a &amp; b </c><c> intersection, return a multiset with all values that are present in both a &amp; b. </c></r> - <r><c> a | b </c><c> union, return a multiset with all values that are present in a or b, differs from summation in that values that are present in both a and b are only returned once. </c></r> - <r><c> a ^ b </c><c> xor, return a multiset with all indices that are present in a or b but not in both. </c></r> - <r><c> a == b </c><c> returns 1 if a is the same multiset as b, same size and values is not enough. </c></r> - <r><c> a != b </c><c> returns 1 if a is the same multiset as b, same size and values is not enough. </c></r> - <r><c> ! a </c><c> boolean not, returns 0 </c></r> - <r><c> a[c] </c><c> indexing, returns 1 c is present in the multiset a. </c></r> - <r><c> a[c]=d </c><c> setting, if d is true, c is added to the multiset if it is not present already. If d is false, it is removed if it is present. </c></r> - </matrix> - </p> -  - types</text> -  - <group><seealso/><text> - <p><ref resolved='predef::mapping' to='mapping'>mapping</ref>, <ref resolved='predef::array' to='array'>array</ref>, <ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref> and <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='multisetp' homogen-type='method'> - <method name='multisetp'/><doc placeholder='true'> - <text> - <p><tt>multisetp</tt> - is the argument a multiset?</p> -  - <tt><p>int multisetp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is a multiset, zero otherwise.</p> -  - multiset</text> -  - <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='mv' homogen-type='method'>   <method name='mv'/><doc placeholder='true'>   <text>
6024:      </doc>   </docgroup> - <docgroup homogen-name='next_object' homogen-type='method'> - <method name='next_object'/><doc placeholder='true'> - <text> - <p><tt>next_object</tt> - get next object</p> -  - <tt><p>object next_object(object <i>o</i>);<br/> - or<br/> - object next_object();<br/> - </p> - </tt> - <p>All objects are stored in a linked list, next_object() returns the - first object in this list, and next_object(o) the next object in the - list after o.</p> - </text> -  - <group><example/><text> - <tt><p>/* This example calls shutting_down() in all cloned objects */<br/> - object o;<br/> - for(o=next_object();o;o=next_object(o))<br/> - <dl><group><text>o-&gt;shutting_down();<br/> - </text></group></dl></p> - </tt> - object</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::clone' to='clone'>clone</ref> and <ref resolved='predef::destruct' to='destruct'>destruct</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='object' homogen-type='method'> - <method name='object'/><doc placeholder='true'> - <text> - <p><tt>object</tt> - an instance of a class (program)</p> -  - <p>There is no syntax example in this file because there is no way to - write constant object. The only way to make new objects is to use - clone() on a program. - </p> - <p>Here follows a list of operators that applies to objects: - In this list, o and o2 are used to represent object expressions, - and s is a string expression: - </p> - <p><matrix> - <r><c> o[s] </c><c> indexing, returns the identifier named s in the object o, </c></r> - <r><c> </c><c> an identifier is a global variable or a function. </c></r> - <r><c> o[s]=c </c><c> This sets the global variable s int the object o to c, if s is a function however, an error is produced. </c></r> - <r><c> o-&gt;foo </c><c> same as o["foo"] </c></r> - <r><c> o == o2 </c><c> return 1 if o and o2 are the same object </c></r> - <r><c> o != o2 </c><c> return 0 if o and o2 are the same object </c></r> - </matrix> - </p> -  - types</text> -  - <group><seealso/><text> - <p><ref resolved='predef::program' to='program'>program</ref>, <ref resolved='predef::function' to='function'>function</ref>, <ref resolved='predef::clone' to='predef::clone'>builtin/clone</ref> and <ref resolved='predef::destruct' to='predef::destruct'>builtin/destruct</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='object_program' homogen-type='method'> - <method name='object_program'/><doc placeholder='true'> - <text> - <p><tt>object_program</tt> - get the program asociated with the object</p> -  - <tt><p>program object_program(object <i>o</i>);<br/> - </p> - </tt> - <p>This function returns the program from which o was cloned. - If o is not an object, or o was destructed zero is returned.</p> -  - object</text> -  - <group><seealso/><text> - <p><ref resolved='predef::clone' to='clone'>clone</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='objectp' homogen-type='method'> - <method name='objectp'/><doc placeholder='true'> - <text> - <p><tt>objectp</tt> - is the argument an object?</p> -  - <tt><p>int objectp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is an object, zero otherwise.</p> -  - object</text> -  - <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='openlog' homogen-type='method'>   <method name='openlog'/><doc placeholder='true'>   <text>
6180:      </doc>   </docgroup> - <docgroup homogen-name='operators' homogen-type='method'> - <method name='operators'/><doc placeholder='true'> - <text> - <p><tt>operators</tt> - arethmics and other stuff</p> -  - <p>Pike has the following operators: - </p> - <p><matrix> - <r><c> a(args) </c><c> function call </c></r> - <r><c> a[b..c] </c><c> range </c></r> - <r><c> a[b] </c><c> index </c></r> - <r><c> --a </c><c> pre decrement </c></r> - <r><c> a-- </c><c> post decrement </c></r> - <r><c> ++a </c><c> pre increment </c></r> - <r><c> a++ </c><c> post increment </c></r> - <r><c> (type)a </c><c> cast </c></r> - <r><c> ~a </c><c> complement </c></r> - <r><c> !a </c><c> not </c></r> - <r><c> -a </c><c> negate </c></r> - <r><c> a/b </c><c> divide </c></r> - <r><c> a%b </c><c> modulo </c></r> - <r><c> a*b </c><c> multiply </c></r> - <r><c> a-b </c><c> subtract </c></r> - <r><c> a+b </c><c> add </c></r> - <r><c> &gt;&gt; </c><c> shift right </c></r> - <r><c> &lt;&lt; </c><c> shift left </c></r> - <r><c> a&gt;b </c><c> greater than? </c></r> - <r><c> a&lt;b </c><c> lesser than? </c></r> - <r><c> a&gt;=b </c><c> greater or equal than? </c></r> - <r><c> a&lt;=b </c><c> lesser or equal than? </c></r> - <r><c> a!=b </c><c> not equal to? </c></r> - <r><c> a==b </c><c> equal to? </c></r> - <r><c> a&amp;b </c><c> intersection </c></r> - <r><c> a^b </c><c> xor (symmetric differance) </c></r> - <r><c> a|b </c><c> union </c></r> - <r><c> a&amp;&amp;b </c><c> logical and </c></r> - <r><c> a||b </c><c> logical or </c></r> - <r><c> a?b:c </c><c> condition </c></r> - <r><c> a=b </c><c> assignment </c></r> - </matrix> -  - </p> - <p>The ones at the top of the list are parsed before operators lower - down on the list. This means that a|b&amp;c means a|(b&amp;c) not (a|b)&amp;c. - Look at the individual pages for fuller explanations of what they do. - </p> - <p>Then there is also the @ "splice" operator which can only be used in - argument lists. - </p> - <p>Arguments to operators are always computed from left to right. - </p> - <p>Many (but not all) of these operators can also be used as by prepending - with a ` sign. For instance `+(a,b) is the same as a+b. These functions - are called "operator functions" and the following are currently - available: - </p> - <p>`== `!= `! `&lt; `&lt;= `&gt; `&gt;= `+ `- `&amp; `| `^ `&lt;&lt; `&gt;&gt; `* `/ `% `~ - </p> - <p>These operator functions are basically "efuns", but beware, if you - re-define the `+ function a+b will also be redefined. - </p> - <p>On top of all this, many operators can also be overloaded. Overloading - an operator lets you specify how operators works on your objects. - To overload an operator you simply put the corresponding operator - function as a method in your object. An example: - </p> - <p>&gt; program nine=class {<br/> - <dl><group><text>int `+(int arg) { return arg+9; }<br/> - </text></group></dl>};<br/> - Result: program<br/> - &gt; clone(nine)+1;<br/> - Result: 10<br/> - &gt;<br/> -  - </p> - <p>This little example defines a program that works almost like the number - nine. As you can see, clone(nine)+1 is the same as clone(nine)-&gt;`+(1) - in this case, and that is the whole point of operator overloading. - Note however that it would not have worked to write 1+clone(nine) - because operator overloading only works if the first argument is the - object with the overloaded function. Well, almost anyway, the operators - &lt;, &gt;, &lt;=, &gt;= can check both sides. In fact, the methods `&lt;= and `&gt;= - will never be called since Pike will translate a&lt;=b to !(a&gt;b). - </p> - <p>These are the operators you can overload: - </p> - <p><matrix> - <r><c> `== </c><c> also overloads `!= </c></r> - <r><c> `! </c><c> This is also used by if-statements to find out if the object in question is 'true' or not. </c></r> - <r><c> `&lt; </c><c> also overloads `&gt;= </c></r> - <r><c> `&gt; </c><c> also overloads `&lt;= </c></r> - <r><c> `+ </c><c> </c></r> - <r><c> `- </c><c> </c></r> - <r><c> `&amp; </c><c> </c></r> - <r><c> `| </c><c> </c></r> - <r><c> `^ </c><c> </c></r> - <r><c> `&lt;&lt; </c><c> </c></r> - <r><c> `&gt;&gt; </c><c> </c></r> - <r><c> `* </c><c> </c></r> - <r><c> `/ </c><c> </c></r> - <r><c> `% </c><c> </c></r> - <r><c> `~ </c><c> </c></r> - </matrix> -  - </p> - <p>If you also define a function __hash to return an integer, which - must be equal for all objects where `== is true you can index mappings - on the contents of your objects rather than on the object itself. - More details about this will come later.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::Gmp.mpz' to='Gmp.mpz'>Gmp.mpz</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='perror' homogen-type='method'> - <method name='perror'/><doc placeholder='true'> - <text> - <p><tt>perror</tt> - print error</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>void perror(string <i>s</i>);<br/> - </p> - </tt> - <p>This function prints a message to stderr along with a description - of what went wrong if available. It uses the system errno to find - out what went wrong, so it is only applicable to IO errors.</p> -  - file</text> -  - <group><seealso/><text> - <p><ref resolved='predef::werror' to='werror'>werror</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='popen' homogen-type='method'> - <method name='popen'/><doc placeholder='true'> - <text> - <p><tt>popen</tt> - pipe open</p> -  - <tt><p>#include &lt;process.h&gt;<br/> -  - </p> - <p>string popen(string <i>cmd</i>);<br/> - </p> - </tt> - <p>This function runs the command cmd as in a shell and returns the - output. See your unix/C manual for details on popen. - </p> - <p/> - </text> -  - </doc> - </docgroup> +    <docgroup homogen-name='pow' homogen-type='method'>   <method name='pow'/><doc placeholder='true'>   <text>
6357:      </doc>   </docgroup> - <docgroup homogen-name='previous_object' homogen-type='method'> - <method name='previous_object'/><doc placeholder='true'> - <text> - <p><tt>previous_object</tt> - return the calling object</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>object previous_object();<br/> - </p> - </tt> - <p>Returns an object pointer to the object that called current function, - if any.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::call_function' to='predef::call_function'>builtin/call_function</ref> and <ref resolved='predef::backtrace' to='predef::backtrace'>builtin/backtrace</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='program' homogen-type='method'> - <method name='program'/><doc placeholder='true'> - <text> - <p><tt>program</tt> - a class, or blueprint for an object</p> -  - <p>There is no syntax example in this file because there is no way to - write constant programs. (yet) New programs are made with - compile_file() or compile_string(). Programs are only useful as - arguments to clone() and the only operators that applies to programs - are == and !=.</p> - </text> -  - <group><note/><text> - <p>In Pike the term 'program' is somewhat confusing, becuase it is used - both to reference a complete runnable software package, and to a - structure in Pike containing code.</p> -  - types</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::object' to='object'>object</ref>, <ref resolved='predef::function' to='function'>function</ref>, <ref resolved='predef::compile_file' to='predef::compile_file'>builtin/compile_file</ref>, <ref resolved='predef::compile_string' to='predef::compile_string'>builtin/compile_string</ref> and <ref resolved='predef::clone' to='predef::clone'>builtin/clone</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='programp' homogen-type='method'> - <method name='programp'/><doc placeholder='true'> - <text> - <p><tt>programp</tt> - is the argument an program?</p> -  - <tt><p>int programp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is a program, zero otherwise.</p> -  - program</text> -  - <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='putenv' homogen-type='method'> - <method name='putenv'/><doc placeholder='true'> - <text> - <p><tt>putenv</tt> - put environment variable</p> -  - <tt><p>void putenv(string <i>varname</i>, string <i>value</i>);<br/> - </p> - </tt> - <p>This function sets the environment variable 'varname' to 'value'.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::getenv' to='getenv'>getenv</ref> and <ref resolved='predef::exece' to='exece'>exece</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='query_host_name' homogen-type='method'> - <method name='query_host_name'/><doc placeholder='true'> - <text> - <p><tt>query_host_name</tt> - return the name of the host we are running on</p> -  - <tt><p>string query_host_name();<br/> - </p> - </tt> - <p>This function returns the name of the machine the interpreter is - running on. This is the same thing that the command 'hostname' - prints. - </p> - </text> -  - </doc> - </docgroup> - <docgroup homogen-name='query_num_arg' homogen-type='method'> - <method name='query_num_arg'/><doc placeholder='true'> - <text> - <p><tt>query_num_arg</tt> - find out how many arguments were given</p> -  - <tt><p>int query_num_arg();<br/> - </p> - </tt> - <p>Query_num_arg returns the number of arguments given when this - function was called. This is only useful for varargs functions.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::call_function' to='call_function'>call_function</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='random' homogen-type='method'> - <method name='random'/><doc placeholder='true'> - <text> - <p><tt>random</tt> - return a random number</p> -  - <tt><p>int random(int <i>max</i>);<br/> - </p> - </tt> - <p>This function returns a random number in the range 0 - max-1.</p> -  - int</text> -  - <group><seealso/><text> - <p><ref resolved='predef::random_seed' to='random_seed'>random_seed</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='random_seed' homogen-type='method'> - <method name='random_seed'/><doc placeholder='true'> - <text> - <p><tt>random_seed</tt> - seed random generator</p> -  - <tt><p>void random_seed(int <i>seed</i>);<br/> - </p> - </tt> - <p>This function sets the initial value for the random generator.</p> - </text> -  - <group><example/><text> - <tt><p>Pike v1.0E-13 Running Hilfe v1.2 (Hubbe's Incremental Pike FrontEnd)<br/> - &gt; random_seed(17);<br/> - Result: 0<br/> - &gt; random(1000);<br/> - Result: 732<br/> - &gt; random(1000);<br/> - Result: 178<br/> - &gt; random(1000);<br/> - Result: 94<br/> - &gt; random_seed(17);<br/> - Result: 0<br/> - &gt; random(1000);<br/> - Result: 732<br/> - &gt; random(1000);<br/> - Result: 178<br/> - &gt; random(1000);<br/> - Result: 94<br/> - &gt;<br/> - </p> - </tt> - int</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::random' to='random'>random</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='range' homogen-type='method'> - <method name='range'/><doc placeholder='true'> - <text> - <p><tt>range</tt> - cut a slice of an array or string</p> -  - <tt><p>a [ b .. c ]<br/> - or<br/> - a [ .. c ]<br/> - or<br/> - a [ b .. ]<br/> - </p> - </tt> - <p>This operator cuts out a piece of an array or string. If a is an array - a[b..c] will return an array containing a[b], a[b+1], a[b+2] to a[c]. - Given a string about the same thing will happen, except the the result - will be a string of course. If b is omitted, everything from the - beginning up to and including c will be included. If c is omitted - the result will include everything from (and including) b to the end.</p> - </text> -  - <group><example/><text> - <tt><p><matrix> - <r><c> "foobar"[0..2] </c><c> returns "foo" </c></r> - <r><c> "foobar"[3..5] </c><c> returns "bar" </c></r> - <r><c> ({1,2,3})[..1] </c><c> returns ({1,2}) </c></r> - <r><c> ({1,2,3})[1..] </c><c> returns ({2,3}) </c></r> - <r><c> ({1,2,3})[..] </c><c> returns ({1,2,3}) </c></r> - </matrix> - </p> - </tt> - operators</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::index' to='index'>index</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='read_bytes' homogen-type='method'> - <method name='read_bytes'/><doc placeholder='true'> - <text> - <p><tt>read_bytes</tt> - read a number of bytes into a string from a file</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>string read_bytes(string <i>file</i>,int <i>start</i>,int <i>len</i>);<br/> - </p> - </tt> - <p>Read len number of bytes from file file staring at byte start and - return it as a string.</p> -  - file</text> -  - <group><seealso/><text> - <p><ref resolved='predef::write_file' to='write_file'>write_file</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='read_file' homogen-type='method'> - <method name='read_file'/><doc placeholder='true'> - <text> - <p><tt>read_file</tt> - read a number of lines into a string from file</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>string read_file(string <i>file</i>, int <i>start</i>, int <i>len</i>);<br/> - </p> - </tt> - <p>Read 'len' lines from the file 'file' after skipping 'start' lines - and return those lines as a string. If start and len are omitted - the whole file is read.</p> -  - file</text> -  - <group><seealso/><text> - <p><ref resolved='predef::read_bytes' to='read_bytes'>read_bytes</ref> and <ref resolved='predef::write_file' to='write_file'>write_file</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='readline' homogen-type='method'>   <method name='readline'/><doc placeholder='true'>   <text>
6646:   file</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/symlink'>system/symlink</ref></p> + <p><ref to='system/symlink'>system/symlink</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='regexp' homogen-type='method'> - <method name='regexp'/><doc placeholder='true'> - <text> - <p><tt>regexp</tt> - filter an array through a regexp</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>string *regexp(string *<i>arr</i>, string <i>reg</i>);<br/> - </p> - </tt> - <p>Return those strings in arr that matches the regexp in reg.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::regexp' to='regexp/regexp'>regexp/regexp</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='remove_call_out' homogen-type='method'>   <method name='remove_call_out'/><doc placeholder='true'>   <text>
6695:      </doc>   </docgroup> - <docgroup homogen-name='replace' homogen-type='method'> - <method name='replace'/><doc placeholder='true'> - <text> - <p><tt>replace</tt> - generic replace function</p> -  - <tt><p>string replace(string <i>s</i>, string <i>from</i>, string <i>to</i>);<br/> - or<br/> - string replace(string <i>s</i>, string *<i>from</i>, string *<i>to</i>);<br/> - or<br/> - array replace(array <i>a</i>, mixed <i>from</i>, mixed <i>to</i>);<br/> - or<br/> - mapping replace(mapping <i>a</i>, mixed <i>from</i>, mixed <i>to</i>);<br/> - </p> - </tt> - <p>This function can do several kinds replacement operations, the - different syntaxes do different things as follow: - </p> - <p>string replace(string s, string from, string to); - </p> - <p><dl><group><text>When given strings as second and third argument, a copy of<br/> - s with every occurance of 'from' return 'to' is returned.<br/> - </text></group></dl> - </p> - <p>string replace(string s, string *from, string *to); - </p> - <p><dl><group><text>When given arrays of strings as second and third argument,<br/> - every occurance of from[0] in s is replaced by to[0],<br/> - from[1] is replaced by to[1] and so on...<br/> - </text></group></dl> - </p> - <p><matrix> - <r><c> array replace(array a, mixed from, mixed to); </c><c> </c></r> - <r><c> mapping replace(mapping a, mixed from, mixed to); </c></r> - </matrix> -  - </p> - <p><dl><group><text>When the first argument is an array or mapping, the values in<br/> - a are searched for values equal to from, which are replaced by<br/> - to destructively.<br/> - </text></group></dl></p> -  - string, array and mapping</text> -  - </doc> - </docgroup> - <docgroup homogen-name='return' homogen-type='method'> - <method name='return'/><doc placeholder='true'> - <text> - <p><tt>return</tt> - return from a function</p> -  - <tt><p>return<br/> - or<br/> - return <i>expression</i><br/> - </p> - </tt> - <p>Return jumps directly out of a function returning the given value to - the calling function. If no expression is given, 0 is returned.</p> -  - control</text> -  - </doc> - </docgroup> - <docgroup homogen-name='reverse' homogen-type='method'> - <method name='reverse'/><doc placeholder='true'> - <text> - <p><tt>reverse</tt> - reverse a string, array or int</p> -  - <tt><p>string reverse(string <i>s</i>);<br/> - or<br/> - array reverse(arary <i>a</i>);<br/> - or<br/> - int reverse(int <i>i</i>);<br/> - </p> - </tt> - <p>This function reverseses a string, char by char, an array, value - by value or an int, bit by bit and returns the result. Reversing - strings can be particularly useful for parsing difficult syntaxes - which require scanning backwards.</p> -  - string, array and int</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sscanf' to='sscanf'>sscanf</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='rm' homogen-type='method'>   <method name='rm'/><doc placeholder='true'>   <text>
6800:      </doc>   </docgroup> - <docgroup homogen-name='rows' homogen-type='method'> - <method name='rows'/><doc placeholder='true'> - <text> - <p><tt>rows</tt> - select a set of rows from an array</p> -  - <tt><p>array rows(mixed data, mixed *index)<br/> - </p> - </tt> - <p>This function is exactly equivialent to: - </p> - <p>map_array(index,lambda(mixed x,mixed y) { return y[x]; },data) - </p> - <p>Except of course it is a lot shorter and faster. - That is, it indexes data on every index in the array index and - returns an array with the results.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::column' to='column'>column</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='rusage' homogen-type='method'> - <method name='rusage'/><doc placeholder='true'> - <text> - <p><tt>rusage</tt> - return resource usage</p> -  - <tt><p>int *rusage();<br/> - </p> - </tt> - <p>This function returns an array of ints describing how much resources - the intepreter process has used so far. This array will have at least - 29 elements, of which those values not available on this system will - be zero. The elements are as follows: - </p> - <p>0: user time - 1: system time - 2: maxrss - 3: idrss - 4: isrss - 5: minflt - 6: minor pagefaults - 7: major pagefaults - 8: swaps - 9: block input op. - 10: block output op. - 11: messages sent - 12: messages received - 13: signals received - 14: voluntary context switches - 15: involuntary context switches - 16: sysc - 17: ioch - 18: rtime - 19: ttime - 20: tftime - 21: dftime - 22: kftime - 23: ltime - 24: slptime - 25: wtime - 26: stoptime - 27: brksize - 28: stksize - </p> - <p>Don't ask me to explain these values, read your system manuals for - more information. (Note that all values may not be present though)</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::time' to='time'>time</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='search' homogen-type='method'> - <method name='search'/><doc placeholder='true'> - <text> - <p><tt>search</tt> - search for a value in a string or array</p> -  - <tt><p>int search(string <i>haystack</i>, string <i>needle</i>, [ int <i>start</i> ]);<br/> - or<br/> - int search(mixed *<i>haystack</i>, mixed <i>needle</i>, [ int <i>start</i> ]);<br/> - or<br/> - mixed search(mapping <i>haystack</i>, mixed <i>needle</i>, [ mixed <i>start</i> ]);<br/> - </p> - </tt> - <p>Search for needle in haystack. Return the position of needle in - haystack or -1 if not found. If the optional argument start is present - search is started at this position. Note that when haystack is a string - needle must be a string, and the first occurance of this string is - returned. However, when haystack is an array, needle is compared only - to one value at a time in haystack. - </p> - <p>When the haystack is a mapping, search tries to find the index - connected to the data needle. That is, it tries to lookup the mapping - backwards. If needle isn't present in the mapping, zero is returned, - and zero_type() will return 1 for this zero.</p> - </text> -  - <group><note/><text> - <p>This function replaces strstr and member_array from Pike4.</p> -  - string, array and mapping</text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::indices' to='indices'>indices</ref>, <ref resolved='predef::values' to='values'>values</ref> and <ref resolved='predef::zero_type' to='zero_type'>zero_type</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='search_array' homogen-type='method'> - <method name='search_array'/><doc placeholder='true'> - <text> - <p><tt>search_array</tt> - search for something in an array</p> -  - <tt><p>#include &lt;array.h&gt;<br/> -  - </p> - <p>int search_array(mixed *<i>arr</i>,function <i>fun</i>,mixed <i>arg</i>, ...);<br/> - or<br/> - int search_array(object *<i>arr</i>,string <i>fun</i>,mixed <i>arg</i>, ...);<br/> - or<br/> - int search_array(function *<i>arr</i>,-<i>1</i>,mixed <i>arg</i>, ...);<br/> - </p> - </tt> - <p>search_array works like map_array, only it returns the index of the - first call that returned true instead or returning an array of the - returned values. If no call returns true, -1 is returned.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sum_arrays' to='sum_arrays'>sum_arrays</ref>, <ref resolved='predef::filter_array' to='filter_array'>filter_array</ref> and <ref resolved='predef::member_array' to='member_array'>member_array</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='setegid' homogen-type='method'>   <method name='setegid'/><doc placeholder='true'>   <text>
6953:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref> and <ref resolved='predef::system' to='system/getegid'>system/getegid</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref> and <ref to='system/getegid'>system/getegid</ref></p>   </text></group>      </doc>
6971:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref>, <ref resolved='predef::system' to='system/setegid'>system/setegid</ref> and <ref resolved='predef::system' to='system/getegid'>system/getegid</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>   </text></group>      </doc>
6989:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/setuid'>system/setuid</ref>, <ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref>, <ref resolved='predef::system' to='system/setegid'>system/setegid</ref> and <ref resolved='predef::system' to='system/getegid'>system/getegid</ref></p> + <p><ref to='system/setuid'>system/setuid</ref>, <ref to='system/getuid'>system/getuid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>   </text></group>      </doc>
7007:   Usersecurity</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/getuid'>system/getuid</ref>, <ref resolved='predef::system' to='system/setgid'>system/setgid</ref>, <ref resolved='predef::system' to='system/getgid'>system/getgid</ref>, <ref resolved='predef::system' to='system/seteuid'>system/seteuid</ref>, <ref resolved='predef::system' to='system/geteuid'>system/geteuid</ref>, <ref resolved='predef::system' to='system/setegid'>system/setegid</ref> and <ref resolved='predef::system' to='system/getegid'>system/getegid</ref></p> + <p><ref to='system/getuid'>system/getuid</ref>, <ref to='system/setgid'>system/setgid</ref>, <ref to='system/getgid'>system/getgid</ref>, <ref to='system/seteuid'>system/seteuid</ref>, <ref to='system/geteuid'>system/geteuid</ref>, <ref to='system/setegid'>system/setegid</ref> and <ref to='system/getegid'>system/getegid</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='signal' homogen-type='method'> - <method name='signal'/><doc placeholder='true'> - <text> - <p><tt>signal</tt> - trap signals</p> -  - <tt><p>void signal(int <i>sig</i>, function(int:void) <i>callback</i>);<br/> - or<br/> - void signal(int <i>sig</i>);<br/> - </p> - </tt> - <p>This function allows you to trap a signal and have a function called - when the process receives a signal. Although it IS possible to trap - SIGBUS, SIGSEGV etc. I advice you not to. Pike should not receive any - such signals and if it does it is because of bugs in the Pike - interperter. And all bugs should be reported, no matter how trifle. - </p> - <p>The callback will receive the signal number as the only argument. - See the document for the function 'kill' for a list of signals. - </p> - <p>If no second argument is given, the signal handler for that signal - is restored to the default handler. - </p> - <p>If the second argument is zero, the signal will be completely ignored.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::kill' to='kill'>kill</ref>, <ref resolved='predef::signame' to='signame'>signame</ref> and <ref resolved='predef::signum' to='signum'>signum</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='signame' homogen-type='method'> - <method name='signame'/><doc placeholder='true'> - <text> - <p><tt>signame</tt> - get the name of a signal</p> -  - <tt><p>string signame(int <i>sig</i>);<br/> - </p> - </tt> - <p>Return a string describing the signal.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; signame(9);<br/> - Result: SIGKILL<br/> - </p> - </tt></text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::kill' to='kill'>kill</ref>, <ref resolved='predef::signum' to='signum'>signum</ref> and <ref resolved='predef::signal' to='signal'>signal</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='signum' homogen-type='method'> - <method name='signum'/><doc placeholder='true'> - <text> - <p><tt>signum</tt> - get a signal number given a desctiptive string</p> -  - <tt><p>int signum(string <i>sig</i>);<br/> - </p> - </tt> - <p>This function is the opposite of signame.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; signum("SIGKILL");<br/> - Result: 9<br/> - </p> - </tt></text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::signame' to='signame'>signame</ref>, <ref resolved='predef::kill' to='kill'>kill</ref> and <ref resolved='predef::signal' to='signal'>signal</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='sin' homogen-type='method'>   <method name='sin'/><doc placeholder='true'>   <text>
7107:      </doc>   </docgroup> - <docgroup homogen-name='sizeof' homogen-type='method'> - <method name='sizeof'/><doc placeholder='true'> - <text> - <p><tt>sizeof</tt> - return the size of an array, string, multiset or mapping</p> -  - <tt><p>int sizeof(string|multiset|mapping|array|object <i>a</i>);<br/> - </p> - </tt> - <p>This function returns the number of indexes available in the argument - given to it. It replaces older functions like strlen, m_sizeof and - size.</p> -  - string, multiset, mapping and array</text> -  - </doc> - </docgroup> - <docgroup homogen-name='sleep' homogen-type='method'> - <method name='sleep'/><doc placeholder='true'> - <text> - <p><tt>sleep</tt> - let interpreter doze of for a while</p> -  - <tt><p>void sleep(int <i>s</i>);<br/> - </p> - </tt> - <p>This function makes the program stop for s seconds. Only signal - handlers can interrupt the sleep. Other callbacks are not called - during sleep.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::signal' to='signal'>signal</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='sort' homogen-type='method'> - <method name='sort'/><doc placeholder='true'> - <text> - <p><tt>sort</tt> - sort an array destructively</p> -  - <tt><p>mixed *sort(array(mixed) <i>index</i>, array(mixed) ... <i>data</i>);<br/> - </p> - </tt> - <p>This function sorts the array 'index' destructively. That means - that the array itself is changed and returned, no copy is created. - If extra arguments are given, they are supposed to be arrays of the - same size. Each of these arrays will be modified in the same way as - 'index'. Ie. if index 3 is moved to position 0 in 'index' index 3 - will be moved to position 0 in all the other arrays as well. - </p> - <p>Sort can sort strings, integers and floats in ascending order. - Arrays will be sorted first on the first element of each array. - </p> - <p>Sort returns it's first argument.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::reverse' to='reverse'>reverse</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='sort_array' homogen-type='method'> - <method name='sort_array'/><doc placeholder='true'> - <text> - <p><tt>sort_array</tt> - sort an array</p> -  - <tt><p>#include &lt;array.h&gt;<br/> -  - </p> - <p>mixed *sort_array(mixed *<i>arr</i>,function <i>fun</i>,mixed ... <i>args</i>);<br/> - </p> - </tt> - <p>This function sorts an array after a compare-function 'fun' - which takes two arguments and should return 1 if the first argument - is larger then the second. The rest of the arguments 'args' will be - sent as 3rd, 4th etc. argument to fun. If fun is omitted, `&lt; is unsed - instead.</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::map_array' to='map_array'>map_array</ref> and <ref resolved='predef::filter_array' to='filter_array'>filter_array</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='spawn' homogen-type='method'> - <method name='spawn'/><doc placeholder='true'> - <text> - <p><tt>spawn</tt> - spawn a process</p> -  - <tt><p>#include &lt;process.h&gt;<br/> -  - </p> - <p>int spawn(string <i>cmd</i>);<br/> - or<br/> - int spawn(string <i>cmd</i>, object <i>stdin</i>);<br/> - or<br/> - int spawn(string <i>cmd</i>, object <i>stdin</i>, object <i>stdout</i>);<br/> - or<br/> - int spawn(string <i>cmd</i>, object <i>stdin</i>, object <i>stdout</i>, object <i>stderr</i>);<br/> - </p> - </tt> - <p>This function spawns a process but does not wait for it to finish. - Optionally, clones of Stdio.File can be sent to it to - specify where stdin, stdout and stderr of the spawned processes - should go.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::popen' to='popen'>popen</ref>, <ref resolved='predef::fork' to='predef::fork'>files/fork</ref>, <ref resolved='predef::exec' to='predef::exec'>files/exec</ref>, <ref to='predef::file-&gt;pipe'>files/file-&gt;pipe</ref> and <ref to='predef::file-&gt;dup2'>files/file-&gt;dup2</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='sprintf' homogen-type='method'>   <method name='sprintf'/><doc placeholder='true'>   <text>
7411:   string</text></group>      <group><seealso/><text> - <p><ref resolved='predef::sscanf' to='sscanf'>sscanf</ref></p> + <p><ref to='sscanf'>sscanf</ref></p>   </text></group>      </doc>
7437:      </doc>   </docgroup> - <docgroup homogen-name='sscanf' homogen-type='method'> - <method name='sscanf'/><doc placeholder='true'> - <text> - <p><tt>sscanf</tt> - scan a string using a format string</p> -  - <tt><p>int sscanf(string <i>str</i>, string <i>fmt</i>, mixed <i>var1</i>, mixed <i>var2</i> ...);<br/> - </p> - </tt> - <p>Parse a string str using the format fmt. fmt can contain strings - separated by "%d,%s,%c and %f. Every % corresponds to one of var1, - var2... - </p> - <p><matrix> - <r><c> %d </c><c> gives an integer </c></r> - <r><c> %o </c><c> gives an octal integer </c></r> - <r><c> %x </c><c> gives a hexadecimal integer </c></r> - <r><c> %D </c><c> gives an integer that is either octal (leading zero), hexadecimal (leading 0x) or decimal. </c></r> - <r><c> %f </c><c> gives a float </c></r> - <r><c> %c </c><c> matches one char and returns it as an integer </c></r> - <r><c> %2c </c><c> matches two chars and returns them as an integer (short) </c></r> - <r><c> %s </c><c> gives a string </c></r> - <r><c> %5s </c><c> gives a string of 5 characters (5 can be any number) </c></r> - <r><c> %[set] </c><c> matches a string containing a given set of characters. (thos given inside the brackets) %[^set] means any character ecept those inside brackets. %[0-9H] means any number or 'H'. </c></r> - </matrix> -  - </p> - <p>If a * is put between the percent and the operator, the operator - will not only match it's argument, not assign any variables. - </p> - <p>Number of matched arguments is returned.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::explode' to='explode'>explode</ref> and <ref resolved='predef::sprintf' to='sprintf'>sprintf</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='stderr' homogen-type='method'> - <method name='stderr'/><doc placeholder='true'> - <text> - <p><tt>stderr</tt> - Standard error stream</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>stderr-&gt;gets()<br/> - </p> - </tt> - <p>Stderr is a clone of Stdio.File connected to the standard - error stream.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::Stdio.File' to='Stdio.File'>Stdio.File</ref> and <ref resolved='predef::werror' to='werror'>werror</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='stdin' homogen-type='method'> - <method name='stdin'/><doc placeholder='true'> - <text> - <p><tt>stdin</tt> - Standard input</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>stdin-&gt;gets()<br/> - </p> - </tt> - <p>Stdin is a clone of Stdio.FILE connected to the standard input.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::Stdio.FILE' to='Stdio.FILE'>Stdio.FILE</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='stdout' homogen-type='method'> - <method name='stdout'/><doc placeholder='true'> - <text> - <p><tt>stdout</tt> - Standard output</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>stdout-&gt;gets()<br/> - </p> - </tt> - <p>Stdout is a clone of Stdio.File connected to the standard output.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::Stdio.File' to='Stdio.File'>Stdio.File</ref> and <ref resolved='predef::write' to='write'>write</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='strerror' homogen-type='method'>   <method name='strerror'/><doc placeholder='true'>   <text>
7557:      </doc>   </docgroup> - <docgroup homogen-name='string' homogen-type='method'> - <method name='string'/><doc placeholder='true'> - <text> - <p><tt>string</tt> - a string of characters</p> -  - <tt><p>"foo"<br/> - </p> - </tt> - <p>This type can contan text. ie. a word, a sentence, or a book. Note - that this is not simply the letters A to Z, special characters, - null characters, newlines can all be stored in a string. Any 8-bit - character in fact. Strings are a basic - type in Pike, as opposed to C where strings are represented by an - array of char. This means that you cannot set individual characters - in a string with the index operator for instance. In fact, there are - no functions that alters strings destructively. Also, all strings - are 'shared', that means that if the same string is used in several - places, only one will be stored in memory. - </p> - <p>When writing a string in a program, you enclose it in doublequotes. - To write special characters you need to use one of the following - syntaxes: - </p> - <p><matrix> - <r><c> \n </c><c> newline </c></r> - <r><c> \r </c><c> carriage return </c></r> - <r><c> \t </c><c> tab </c></r> - <r><c> \b </c><c> backspace </c></r> - <r><c> \" </c><c> " </c></r> - <r><c> \\ </c><c> \ </c></r> - </matrix> -  - </p> - <p>A list of operators that applies to strings follow: - In this list a and b is used to represent a string expression: - </p> - <p><matrix> - <r><c> a + b </c><c> summation ( "a"+"b" returns "ab") </c></r> - <r><c> a - b </c><c> subtraction ( same as replace(a,b,"") ) </c></r> - <r><c> a / b </c><c> division ( same thing as explode(a,b) ) </c></r> - <r><c> ! a </c><c> boolean not, returns 0 </c></r> - </matrix> -  - </p> - <p>The following operators compare two string alphabetically: - </p> - <p><matrix> - <r><c> a == b </c><c> return 1 if a is equal to b, 0 otherwise </c></r> - <r><c> a != b </c><c> return 0 if a is equal to b, 1 otherwise </c></r> - <r><c> a &lt; b </c><c> returns 1 if a is lesser than b, 0 otherwise </c></r> - <r><c> a &lt;= b </c><c> returns 1 if a is lesser or equal to b, 0 otherwise </c></r> - <r><c> a &gt; b </c><c> returns 1 if a is greater than b, 0 otherwise </c></r> - <r><c> a &gt;= b </c><c> returns 1 if a is greater or equal to b, 0 otherwise </c></r> - </matrix> - </p> -  - types</text> -  - <group><seealso/><text> - <p><ref resolved='predef::indices' to='predef::indices'>builtin/indices</ref>, <ref resolved='predef::values' to='predef::values'>builtin/values</ref>, <ref resolved='predef::sscanf' to='predef::sscanf'>builtin/sscanf</ref>, <ref resolved='predef::sprintf' to='predef::sprintf'>builtin/sprintf</ref> and <ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='stringp' homogen-type='method'> - <method name='stringp'/><doc placeholder='true'> - <text> - <p><tt>stringp</tt> - is the argument an string?</p> -  - <tt><p>int stringp(mixed <i>arg</i>);<br/> - </p> - </tt> - <p>Returns 1 if arg is a string, zero otherwise.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::multisetp' to='multisetp'>multisetp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='strlen' homogen-type='method'> - <method name='strlen'/><doc placeholder='true'> - <text> - <p><tt>strlen</tt> - Return the length of a string</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int strlen(string <i>s</i>);<br/> - </p> - </tt> - <p>This function is equal to sizeof.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sizeof' to='predef::sizeof'>builtin/sizeof</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='strmult' homogen-type='method'> - <method name='strmult'/><doc placeholder='true'> - <text> - <p><tt>strmult</tt> - multiply strings</p> -  - <tt><p>#include &lt;string.h&gt;<br/> -  - </p> - <p>string strmult(string <i>s</i>, int <i>num</i>);<br/> - </p> - </tt> - <p>This function multplies 's' by 'num'. The return value is the same - as appending 's' to an empty string 'num' times. - </p> - </text> -  - </doc> - </docgroup> - <docgroup homogen-name='strstr' homogen-type='method'> - <method name='strstr'/><doc placeholder='true'> - <text> - <p><tt>strstr</tt> - find a string inside a string</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int strstr(string <i>str1</i>,string <i>str2</i>);<br/> - </p> - </tt> - <p>Return the position of str2 in str1, if str2 can't be found in str1 - -1 is returned.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::sscanf' to='predef::sscanf'>builtin/sscanf</ref> and <ref resolved='predef::explode' to='predef::explode'>builtin/explode</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='sum' homogen-type='method'> - <method name='sum'/><doc placeholder='true'> - <text> - <p><tt>sum</tt> - add values together</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>int sum(int ... <i>i</i>);<br/> - or<br/> - float sum(float ... <i>f</i>);<br/> - or<br/> - string sum(string|float|int ... <i>p</i>);<br/> - or<br/> - array sum(array ... <i>a</i>);<br/> - or<br/> - mapping sum(mapping ... <i>m</i>);<br/> - or<br/> - list sum(multiset ... <i>l</i>);<br/> - </p> - </tt> - <p>This function does exactly the same thing as adding all the arguments - together with +. It's just here so you can get a function-pointer to - the summation operator.</p> -  - int, float, string, array, mapping and multiset</text> -  - </doc> - </docgroup> - <docgroup homogen-name='sum_arrays' homogen-type='method'> - <method name='sum_arrays'/><doc placeholder='true'> - <text> - <p><tt>sum_arrays</tt> - map any number of arrays over a function.</p> -  - <tt><p>#include &lt;array.h&gt;<br/> -  - </p> - <p>mixed *sum_arrays(function <i>fun</i>,mixed *<i>arr1</i>,...);<br/> - </p> - </tt> - <p>Works like this: - </p> - <p>mixed *sum_arrays(function fun,mixed *arr1,...)<br/> - {<br/> - <dl><group><text>int e;<br/> - mixed *res=allocate(sizeof(arr1));<br/> - for(e=0;e&lt;sizeof(arr1);e++)<br/> - {<br/> - <dl><group><text>res[e]=fun(arr1[e],arr2[e],...);<br/> - </text></group></dl>}<br/> - return res;<br/> - </text></group></dl>}<br/> -  - </p> - <p>Simple ehh?</p> -  - array</text> -  - <group><seealso/><text> - <p><ref resolved='predef::map_array' to='map_array'>map_array</ref>, <ref resolved='predef::filter_array' to='filter_array'>filter_array</ref> and <ref resolved='predef::search_array' to='search_array'>search_array</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='switch' homogen-type='method'> - <method name='switch'/><doc placeholder='true'> - <text> - <p><tt>switch</tt> - Complicated conditional statement</p> -  - <tt><p>switch( expression )<br/> - {<br/> - <dl><group><text>case constant1:<br/> - <dl><group><text><i>statement1</i><br/> - </text></group></dl></text></group></dl><br/> - <dl><group><text>case constant2:<br/> - <dl><group><text><i>statement2</i><br/> - break;<br/> - </text></group></dl></text></group></dl><br/> - <dl><group><text>case constant3..constant4:<br/> - <dl><group><text><i>statement4</i><br/> - break;<br/> - </text></group></dl></text></group></dl><br/> - <dl><group><text>default:<br/> - <dl><group><text><i>statement3</i><br/> - </text></group></dl></text></group></dl>}<br/> - </p> - </tt> - <p>Switch evaluates the expression give and then executes one or more - statement accordingly to the result. If the result is equal to - constant1 then statement1 will be executed, please observe that - the second case-statement dos _not_ abort the execution in any way - instead statement2 will also be executed. After that break will - cause execution to continue after the after the last } in the - switch statement. If the result is equal to constant2 only - statement2 will be executed. If expression &lt;= consant3 and - expression &gt;= constant4, statement4 will be executed. In all other - cases statement3 is executed because it is 'default'. Please note - that the expression and constants can be any type that can be - written as a constant. Arrays, mappings and multisets have little or - no use though.</p> -  - control</text> -  - <group><seealso/><text> - <p><ref to='if-else'>if-else</ref> and <ref resolved='predef::break' to='break'>break</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='symlink' homogen-type='method'>   <method name='symlink'/><doc placeholder='true'>   <text>
7822:   file</text>      <group><seealso/><text> - <p><ref resolved='predef::system' to='system/hardlink'>system/hardlink</ref>, <ref resolved='predef::system' to='system/readlink'>system/readlink</ref>, <ref resolved='predef::mv' to='predef::mv'>files/mv</ref> and <ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p> + <p><ref to='system/hardlink'>system/hardlink</ref>, <ref to='system/readlink'>system/readlink</ref>, <ref resolved='predef::mv' to='predef::mv'>files/mv</ref> and <ref resolved='predef::rm' to='predef::rm'>files/rm</ref></p>   </text></group>      </doc>   </docgroup> - <docgroup homogen-name='system' homogen-type='method'> - <method name='system'/><doc placeholder='true'> - <text> - <p><tt>system</tt> - run an external program</p> -  - <tt><p>#include &lt;process.h&gt;<br/> -  - </p> - <p>void system(string <i>cmd</i>);<br/> - </p> - </tt> - <p>This function runs the external program cmd and waits until it - is finished. Standard /bin/sh completions/redirectoins/etc. can - be used.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::popen' to='popen'>popen</ref>, <ref resolved='predef::exec' to='exec'>exec</ref> and <ref resolved='predef::spawn' to='spawn'>spawn</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='tan' homogen-type='method'>   <method name='tan'/><doc placeholder='true'>   <text>
7867:      </doc>   </docgroup> - <docgroup homogen-name='this_function' homogen-type='method'> - <method name='this_function'/><doc placeholder='true'> - <text> - <p><tt>this_function</tt> - return a functionpointer to the current function</p> -  - <tt><p>#include &lt;simulate.h&gt;<br/> -  - </p> - <p>function this_function();<br/> - </p> - </tt> - <p>Returns a functionpointer to the current function, useful for - making recursive lambda-functions.</p> -  - function</text> -  - <group><seealso/><text> - <p><ref resolved='predef::get_function' to='predef::get_function'>builtin/get_function</ref>, <ref resolved='predef::function_name' to='predef::function_name'>builtin/function_name</ref>, <ref resolved='predef::function_object' to='predef::function_object'>builtin/function_object</ref> and <ref resolved='predef::backtrace' to='predef::backtrace'>builtin/backtrace</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='this_object' homogen-type='method'> - <method name='this_object'/><doc placeholder='true'> - <text> - <p><tt>this_object</tt> - return the object we are evaluating in currently</p> -  - <tt><p>object this_object();<br/> - </p> - </tt> - <p>This function returns the object we are curently evaluating in.</p> -  - object</text> -  - </doc> - </docgroup> - <docgroup homogen-name='this_thread' homogen-type='method'> - <method name='this_thread'/><doc placeholder='true'> - <text> - <p><tt>this_thread</tt> - return thread id</p> -  - <tt><p>object thread_id();<br/> - </p> - </tt> - <p>This function returns the object that identifies this thread.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::thread_create' to='thread_create'>thread_create</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='thread_create' homogen-type='method'> - <method name='thread_create'/><doc placeholder='true'> - <text> - <p><tt>thread_create</tt> - create a thread</p> -  - <tt><p>object thread_create(function <i>f</i>, mixed ... <i>args</i>);<br/> - </p> - </tt> - <p>This function creates a new thread which will run simultaneously - to the rest of the program. The new thread will call the function - f with the arguments args. When f returns the thread will cease - to exist. All Pike functions are 'thread safe' meanting that running - a function at the same time from different threads will not corrupt - any internal data in the Pike process. The returned value will be - the same as the return value of this_thread() for the new thread.</p> - </text> -  - <group><note/><text> - <p>This function is only available on systems with POSIX threads support.</p> - </text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::Thread.Mutex' to='Thread.Mutex'>Thread.Mutex</ref>, <ref resolved='predef::Thread.Condition' to='Thread.Condition'>Thread.Condition</ref> and <ref resolved='predef::this_thread' to='this_thread'>this_thread</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='throw' homogen-type='method'> - <method name='throw'/><doc placeholder='true'> - <text> - <p><tt>throw</tt> - throw a value to catch or global error handling</p> -  - <tt><p>void throw(mixed <i>value</i>);<br/> - </p> - </tt> - <p>This function throws a value to a waiting catch. If no catch is - waiting global error handling will send the value to handle_error - in the master object. If you throw an array with where the first - index contains an error message and the second index is a backtrace, - (the output from backtrace() that is) then it will be treated exactly - like a real error by overlying functions.</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::catch' to='catch'>catch</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='time' homogen-type='method'> - <method name='time'/><doc placeholder='true'> - <text> - <p><tt>time</tt> - return the current time</p> -  - <tt><p>int time();<br/> - or<br/> - int time(1);<br/> - </p> - </tt> - <p>This function returns the number of secons since 1 Jan 1970. - The function ctime() converts this integer to a readable string. - </p> - <p>The second syntax does not call the system call time() as often, - but is only updated in the backed. (when pike code isn't running)</p> - </text> -  - <group><seealso/><text> - <p><ref resolved='predef::time' to='time'>time</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='trace' homogen-type='method'> - <method name='trace'/><doc placeholder='true'> - <text> - <p><tt>trace</tt> - change debug trace level</p> -  - <tt><p>int trace(int <i>t</i>);<br/> - </p> - </tt> - <p>This function affects the debug trace level. (also set by the -t - command line option) The old level is returned. Trace level 1 or - higher means that calls to pike functions are printed to stderr, - level 2 or higer means calls to builtin functions are printed, 3 - means every opcode interpreted is printed, 4 means arguments to - these opcodes are printed as well. See the command lines options - for more information - </p> - </text> -  - </doc> - </docgroup> - <docgroup homogen-name='typeof' homogen-type='method'> - <method name='typeof'/><doc placeholder='true'> - <text> - <p><tt>typeof</tt> - check return type of expression</p> -  - <tt><p>typeof ( expression )<br/> - </p> - </tt> - <p>This is a not really a function even if it looks like it, it returns - a human readable (almost) representation of the type that the - expression would return without actually evaluating it. - The representation is in the form of a string.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; typeof(`sizeof);<br/> - Result: function(object | mapping | array | multiset | string : int)<br/> - &gt; typeof(sizeof(({})));<br/> - Result: int<br/> - &gt; <br/> - </p> - </tt> - pike</text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='ualarm' homogen-type='method'> - <method name='ualarm'/><doc placeholder='true'> - <text> - <p><tt>ualarm</tt> - set an alarm clock for delivery of a signal</p> -  - <tt><p>int ualarm(int <i>useconds</i>);<br/> - </p> - </tt> - <p>ualarm arranges for a SIGALRM signal to be delivered to the - process in useconds micro seconds. - </p> - <p>If useconds is zero, no new alarm is scheduled. - </p> - <p>In any event any previously set alarm is cancelled.</p> - </text> -  - <group><returns/><text> - <p>ualarm returns the number of microseconds seconds remaining<br/> - <dl><group><text>until any previously scheduled alarm was due to be delivered, or<br/> - </text></group></dl>zero if there was no previously scheduled alarm.<br/> - </p> - </text></group> -  - <group><seealso/><text> - <p><ref resolved='predef::signal' to='signal'>signal</ref></p> - </text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='uname' homogen-type='method'>   <method name='uname'/><doc placeholder='true'>   <text>
8095:      </doc>   </docgroup> - <docgroup homogen-name='uniq' homogen-type='method'> - <method name='uniq'/><doc placeholder='true'> - <text> - <p><tt>uniq</tt> - return one of each element</p> -  - <tt><p>#include &lt;array.h&gt;<br/> -  - </p> - <p>array uniq(array <i>a</i>);<br/> - </p> - </tt> - <p>This function returns an copy of the array a with all duplicate - values removed. The order of the values in the result is undefined.</p> -  - array</text> -  - </doc> - </docgroup> - <docgroup homogen-name='upper_case' homogen-type='method'> - <method name='upper_case'/><doc placeholder='true'> - <text> - <p><tt>upper_case</tt> - convert a string to upper case</p> -  - <tt><p>string upper_case(string <i>s</i>);<br/> - </p> - </tt> - <p>Return a copy of the string s with all lower case character converted - to upper case character.</p> -  - string</text> -  - <group><seealso/><text> - <p><ref resolved='predef::lower_case' to='lower_case'>lower_case</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='values' homogen-type='method'> - <method name='values'/><doc placeholder='true'> - <text> - <p><tt>values</tt> - return an array of all possible values from indexing</p> -  - <tt><p>mixed *values(string|multiset|mapping|array|object <i>foo</i>);<br/> - </p> - </tt> - <p>Values return an array of all values you can get when indexing the - value foo. For strings, an array of int with the ascii values of the - characters in the string is returned. For a multiset, an array filled with - ones is return. For mappings, objects and arrays, the returned array - may contain any kind of value.</p> -  - mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::indices' to='indices'>indices</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='variables' homogen-type='method'> - <method name='variables'/><doc placeholder='true'> - <text> - <p><tt>variables</tt> - how to declare a variable</p> -  - <tt><p>modifier type variable_name_list;<br/> - </p> - </tt> - <p>This is how you declare a global variable. Local variables are defined - in the same way, but you may not use any modifiers for local variables. - The variable_name_list is a comma separated list of the variables - to declare as the type 'type'. Note that '*' binds to the variable - names, not the type. This means that: - </p> - <p><matrix> - <r><c> </c><c> int * i,j; </c></r> - <r><c> </c></r> - </matrix> -  - </p> - <p>Declares i as an array of int, but j will be declared as int. To - declare both i and j as arrays of int you have to write. - </p> - <p><matrix> - <r><c> </c><c> int * i, * j; </c></r> - <r><c> </c></r> - </matrix> -  - </p> - <p>or - </p> - <p><matrix> - <r><c> </c><c> array(int) i,j; </c></r> - <r><c> </c></r> - </matrix> -  - </p> - <p>Modifiers can be zero or more of: static, no_mask and private. - Private means that the variable can not be accessed from programs - that inherit this program. Static means that it can not be accessed - from other objects with the index operator. No_mask means that it - can not be redefined in inheriting programs.</p> -  - pike</text> -  - <group><seealso/><text> - <p><ref resolved='predef::functions' to='functions'>functions</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='version' homogen-type='method'> - <method name='version'/><doc placeholder='true'> - <text> - <p><tt>version</tt> - return version info</p> -  - <tt><p>string version();<br/> - </p> - </tt> - <p>This function returns a brief information about the Pike version.</p> - </text> -  - <group><example/><text> - <tt><p>&gt; version();<br/> - Result: Pike v1.0E-13<br/> - <br/> - </p> - </tt></text></group> -  - </doc> - </docgroup> +    <docgroup homogen-name='werror' homogen-type='method'>   <method name='werror'/><doc placeholder='true'>   <text>
8240:      </doc>   </docgroup> - <docgroup homogen-name='while' homogen-type='method'> - <method name='while'/><doc placeholder='true'> - <text> - <p><tt>while</tt> - execute a statement while an expression is true</p> -  - <tt><p>while( expression ) <i>statement</i><br/> - </p> - </tt> - <p>While runns the statement until the expression is false. The - expression is evaluated once for every loop. If the expression is - false the first time the statement is never executed.</p> -  - control</text> -  - <group><seealso/><text> - <p><ref resolved='predef::for' to='for'>for</ref> and <ref to='do-while'>do-while</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='write' homogen-type='method'> - <method name='write'/><doc placeholder='true'> - <text> - <p><tt>write</tt> - write text to stdout</p> -  - <tt><p>int write(string <i>text</i>);<br/> - </p> - </tt> - <p>Added by the master, it directly calls write in a clone of - Stdio.File</p> - </text> -  - <group><seealso/><text> - <p><ref to='Builtin.werror'>Builtin.werror</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='write_file' homogen-type='method'> - <method name='write_file'/><doc placeholder='true'> - <text> - <p><tt>write_file</tt> - append a string to a file</p> -  - <tt><p>#include &lt;stdio.h&gt;<br/> -  - </p> - <p>int write_file(string file, string str)<br/> - </p> - </tt> - <p>Append the string str onto the file file. Returns number of bytes written.</p> -  - file</text> -  - <group><seealso/><text> - <p><ref resolved='predef::read_bytes' to='read_bytes'>read_bytes</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='zero_type' homogen-type='method'> - <method name='zero_type'/><doc placeholder='true'> - <text> - <p><tt>zero_type</tt> - return the type of zero</p> -  - <tt><p>int zero_type(mixed <i>a</i>);<br/> - </p> - </tt> - <p>There are many types of zeros out there, or at least there are two. - One is returned by normal functions, and one returned by mapping - lookups and find_call_out() when what you looked for wasn't there. - The only way to separate these two kinds of zeros is zero_type. - When doing a find_call_out or mapping lookup, zero_type on this value - will return 1 if there was no such thing present in the mappping, or - no such call_out could be found. If the argument to zero type is a - destructed object or a function in a destructed object, 2 will be - returned. Otherwize zero_type will return zero. - </p> - <p>If the argument is not an int, zero will be returned.</p> -  - int and mapping</text> -  - <group><seealso/><text> - <p><ref resolved='predef::find_call_out' to='find_call_out'>find_call_out</ref></p> - </text></group> -  - </doc> - </docgroup> - <docgroup homogen-name='||' homogen-type='method'> - <method name='||'/><doc placeholder='true'> - <text> - <p><tt>||</tt> - logical or</p> -  - <tt><p>a || b<br/> - </p> - </tt> - <p>This operator does logical 'or' between expressions. It first - evaluates a and returns that if a is non-zero. Otherwise it - returns b. Note that b is not evaluated at all if a is non-zero.</p> -  - operators</text> -  - <group><seealso/><text> - <p><ref resolved='predef::`|' to='`|'>`|</ref> and <ref resolved='predef::||' to='&amp;&amp;'>&amp;&amp;</ref></p> - </text></group> -  - </doc> - </docgroup> +    <module name='Calendar'>   <doc>   <text>
8426:   <docgroup homogen-name='parse' homogen-type='method'>   <method name='parse'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='fmt'><type><string/></type></argument>   <argument name='arg'><type><string/></type></argument>   
8474:   <docgroup homogen-type='method'>   <method name='next'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><method name='prev'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><method name='`+'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='n'><type><int/></type></argument>       </arguments>   </method><method name='`-'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='n'><type><int/></type></argument>       </arguments>   </method><method name='`-'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='x'><type><object resolved='predef::Calendar.time_unit.next'/></type></argument>       </arguments>
9188:   <docgroup homogen-name='__decode' homogen-type='method'>   <method name='__decode'>    <returntype> -  <object resolved='predef::array'>array </object></returntype> +  <object>array </object></returntype>    <arguments>    </arguments>   </method><doc>
9243:   <docgroup homogen-name='_decode' homogen-type='method'>   <method name='_decode'>    <returntype> -  <object resolved='predef::array'>array </object></returntype> +  <object>array </object></returntype>    <arguments><argument name='gifdata'><type><string/></type></argument>       </arguments>   </method><method name='_decode'>    <returntype> -  <object resolved='predef::array'>array </object></returntype> +  <object>array </object></returntype>    <arguments><argument name='__decoded'><type><array/></type></argument>       </arguments>
9337:   <docgroup homogen-name='_encode' homogen-type='method'>   <method name='_encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='data'><type><array/></type></argument>       </arguments>
9360:   <docgroup homogen-name='_gce_block' homogen-type='method'>   <method name='_gce_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='transparency'><type><int/></type></argument>   <argument name='transparency_index'><type><int/></type></argument>   <argument name='delay'><type><int/></type></argument>
9417:   <docgroup homogen-name='_render_block' homogen-type='method'>   <method name='_render_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='x'><type><int/></type></argument>   <argument name='y'><type><int/></type></argument>   <argument name='xsize'><type><int/></type></argument>
9475:   <docgroup homogen-name='decode' homogen-type='method'>   <method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>   </method><method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='_decoded'><type><array/></type></argument>       </arguments>   </method><method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='__decoded'><type><array/></type></argument>       </arguments>
9515:   <docgroup homogen-type='method'>   <method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>       </arguments>   </method><method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colors'><type><int/></type></argument>       </arguments>   </method><method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.encode'/></type></argument>       </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='alpha'><type><object resolved='predef::Image.GIF.encode'/></type></argument>       </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='tr_r'><type><int/></type></argument>   <argument name='tr_g'><type><int/></type></argument>
9551:    </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colors'><type><int/></type></argument>   <argument name='alpha'><type><object resolved='predef::Image.GIF.encode'/></type></argument>
9559:    </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colors'><type><int/></type></argument>   <argument name='tr_r'><type><int/></type></argument>
9569:    </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colors'><type><int/></type></argument>   <argument name='alpha'><type><object resolved='predef::Image.GIF.encode'/></type></argument>
9580:    </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='alpha'><type><object resolved='predef::Image.GIF.encode'/></type></argument>
9588:    </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='tr_r'><type><int/></type></argument>
9598:    </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='alpha'><type><object resolved='predef::Image.GIF.encode'/></type></argument>
9609:    </arguments>   </method><method name='encode_trans'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.encode'/></type></argument>   <argument name='transp_index'><type><int/></type></argument>
9680:   <docgroup homogen-name='end_block' homogen-type='method'>   <method name='end_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments>    </arguments>   </method><doc>
9707:   <docgroup homogen-name='header_block' homogen-type='method'>   <method name='header_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='xsize'><type><int/></type></argument>   <argument name='ysize'><type><int/></type></argument>   <argument name='numcolors'><type><int/></type></argument>
9715:    </arguments>   </method><method name='header_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='xsize'><type><int/></type></argument>   <argument name='ysize'><type><int/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.header_block'/></type></argument>
9723:    </arguments>   </method><method name='header_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='xsize'><type><int/></type></argument>   <argument name='ysize'><type><int/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.header_block'/></type></argument>
9735:    </arguments>   </method><method name='header_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='xsize'><type><int/></type></argument>   <argument name='ysize'><type><int/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.header_block'/></type></argument>
9806:   <docgroup homogen-name='netscape_loop_block' homogen-type='method'>   <method name='netscape_loop_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments>    </arguments>   </method><method name='netscape_loop_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='number_of_loops'><type><int/></type></argument>       </arguments>
9830:   <docgroup homogen-name='render_block' homogen-type='method'>   <method name='render_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='x'><type><int/></type></argument>
9840:    </arguments>   </method><method name='render_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='x'><type><int/></type></argument>
9851:    </arguments>   </method><method name='render_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='x'><type><int/></type></argument>
9865:    </arguments>   </method><method name='render_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='x'><type><int/></type></argument>
9880:    </arguments>   </method><method name='render_block'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='colortable'><type><object resolved='predef::Image.GIF.render_block'/></type></argument>   <argument name='x'><type><int/></type></argument>
10020:   <docgroup homogen-name='decode' homogen-type='method'>   <method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>   </method><method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.JPEG.decode'/></type></argument>
10070:   <docgroup homogen-name='decode_header' homogen-type='method'>   <method name='decode_header'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>   </method><method name='decode_header'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.JPEG.decode_header'/></type></argument>
10119:   <docgroup homogen-name='encode' homogen-type='method'>   <method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.JPEG.encode'/></type></argument>       </arguments>   </method><method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.JPEG.encode'/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.JPEG.encode'/></type></argument>
10189:   <docgroup homogen-name='__decode' homogen-type='method'>   <method name='__decode'>    <returntype> -  <object resolved='predef::array'>array </object></returntype> +  <object>array </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>   </method><method name='__decode'>    <returntype> -  <object resolved='predef::array'>array </object></returntype> +  <object>array </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='intdontcheckcrc'><type>    <object resolved='predef::Image.PNG.__decode'/></type></argument>
10229:   <docgroup homogen-name='_chunk' homogen-type='method'>   <method name='_chunk'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='type'><type><string/></type></argument>   <argument name='data'><type><string/></type></argument>   
10248:   <docgroup homogen-name='_decode' homogen-type='method'>   <method name='_decode'>    <returntype> -  <object resolved='predef::array'>array </object></returntype> +  <object>array </object></returntype>    <arguments><argument name='data'><type>    <or><string/><array/></or></type></argument>       </arguments>   </method><method name='_decode'>    <returntype> -  <object resolved='predef::array'>array </object></returntype> +  <object>array </object></returntype>    <arguments><argument name='data'><type>    <or><string/><array/></or></type></argument>   <argument name='options'><type><mapping/></type></argument>
10360:   <docgroup homogen-name='decode' homogen-type='method'>   <method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>   </method><method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.PNG.decode'/></type></argument>
10392:   <docgroup homogen-name='encode' homogen-type='method'>   <method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNG.encode'/></type></argument>       </arguments>   </method><method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNG.encode'/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.PNG.encode'/></type></argument>
10479:   <docgroup homogen-name='decode' homogen-type='method'>   <method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>
10504:   <docgroup homogen-type='method'>   <method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_binary'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_ascii'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_P1'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_P2'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_P3'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_P4'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_P5'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>   </method><method name='encode_P6'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.PNM.encode'/></type></argument>       </arguments>
10605:   <docgroup homogen-name='`()' homogen-type='method'>   <method name='`()'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='filename'><type><string/></type></argument>       </arguments>   </method><method name='`()'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='filename'><type><string/></type></argument>   <argument name='options'><type><mapping/></type></argument>   
10652:   <docgroup homogen-type='method'>   <method name='names'>    <returntype> -  <object resolved='predef::mapping'>mapping </object></returntype> +  <object>mapping </object></returntype>    <arguments>    </arguments>   </method><method name='_names'>
10704:   <docgroup homogen-name='`()' homogen-type='method'>   <method name='`()'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><doc>
10722:   <docgroup homogen-name='flush' homogen-type='method'>   <method name='flush'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><doc>
10741:   <docgroup homogen-name='properties' homogen-type='method'>   <method name='properties'>    <returntype> -  <object resolved='predef::mapping'>mapping </object></returntype> +  <object>mapping </object></returntype>    <arguments>    </arguments>   </method><doc>
10802:   <docgroup homogen-name='decode_pseudocolor' homogen-type='method'>   <method name='decode_pseudocolor'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='width'><type><int/></type></argument>   <argument name='height'><type><int/></type></argument>
10826:   <docgroup homogen-type='method'>   <method name='decode_truecolor'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='width'><type><int/></type></argument>   <argument name='height'><type><int/></type></argument>
10843:    </arguments>   </method><method name='decode_truecolor_masks'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='width'><type><int/></type></argument>   <argument name='height'><type><int/></type></argument>
10869:   <docgroup homogen-name='encode_pseudocolor' homogen-type='method'>   <method name='encode_pseudocolor'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.X.encode_pseudocolor'/></type></argument>   <argument name='bpp'><type><int/></type></argument>   <argument name='alignbits'><type><int/></type></argument>
10879:    </arguments>   </method><method name='encode_pseudocolor'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.X.encode_pseudocolor'/></type></argument>   <argument name='bpp'><type><int/></type></argument>   <argument name='alignbits'><type><int/></type></argument>
10919:   <docgroup homogen-type='method'>   <method name='encode_truecolor'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.X.encode_truecolor'/></type></argument>   <argument name='bpp'><type><int/></type></argument>   <argument name='alignbits'><type><int/></type></argument>
10934:    </arguments>   </method><method name='encode_truecolor_masks'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.X.encode_truecolor'/></type></argument>   <argument name='bpp'><type><int/></type></argument>   <argument name='alignbits'><type><int/></type></argument>
10946:    </arguments>   </method><method name='encode_truecolor'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.X.encode_truecolor'/></type></argument>   <argument name='bpp'><type><int/></type></argument>   <argument name='alignbits'><type><int/></type></argument>
10962:    </arguments>   </method><method name='encode_truecolor_masks'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.X.encode_truecolor'/></type></argument>   <argument name='bpp'><type><int/></type></argument>   <argument name='alignbits'><type><int/></type></argument>
11048:   <docgroup homogen-name='decode' homogen-type='method'>   <method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>   </method><method name='decode'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.XFace.decode'/></type></argument>
11074:   <docgroup homogen-name='decode_header' homogen-type='method'>   <method name='decode_header'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>   </method><method name='decode_header'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.XFace.decode_header'/></type></argument>
11113:   <docgroup homogen-name='encode' homogen-type='method'>   <method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.XFace.encode'/></type></argument>       </arguments>   </method><method name='encode'>    <returntype> -  <object resolved='predef::string'>string </object></returntype> +  <object>string </object></returntype>    <arguments><argument name='img'><type><object resolved='predef::Image.XFace.encode'/></type></argument>   <argument name='mappingoptions'><type>    <object resolved='predef::Image.XFace.encode'/></type></argument>
11163:   <docgroup homogen-name='_decode' homogen-type='method'>   <method name='_decode'>    <returntype> -  <object resolved='predef::mapping'>mapping </object></returntype> +  <object>mapping </object></returntype>    <arguments><argument name='data'><type><string/></type></argument>       </arguments>
11215:   <docgroup homogen-type='method'>   <method name='map'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.colortable.map'/></type></argument>       </arguments>   </method><method name='`*'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.colortable.map'/></type></argument>       </arguments>   </method><method name='``*'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='image'><type><object resolved='predef::Image.colortable.map'/></type></argument>       </arguments>
11297:   <docgroup homogen-name='`+' homogen-type='method'>   <method name='`+'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='with'><type><object resolved='predef::Image.colortable.`+'/></type></argument>   <argument><value>...</value></argument>    </arguments>
11317:   <docgroup homogen-name='`-' homogen-type='method'>   <method name='`-'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='with'><type><object resolved='predef::Image.colortable.`-'/></type></argument>   <argument><value>...</value></argument>    </arguments>
11387:    </arguments>   </method><method name='add'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='colors'><type>    <array><valuetype>    <array><valuetype><int/></valuetype></array></valuetype></array></type></argument>
11395:    </arguments>   </method><method name='add'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='image'><type>    <object resolved='predef::Image.image'>Image.image</object></type></argument>   <argument name='number'><type><int/></type></argument>
11403:    </arguments>   </method><method name='add'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='image'><type>    <object resolved='predef::Image.image'>Image.image</object></type></argument>   <argument name='number'><type><int/></type></argument>
11414:    </arguments>   </method><method name='add'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11422:    </arguments>   </method><method name='add'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11510:   <docgroup homogen-name='cast' homogen-type='method'>   <method name='cast'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='to'><type><string/></type></argument>       </arguments>
11536:   <docgroup homogen-name='cubicles' homogen-type='method'>   <method name='cubicles'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><method name='cubicles'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11549:    </arguments>   </method><method name='cubicles'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11638:   <docgroup homogen-name='floyd_steinberg' homogen-type='method'>   <method name='floyd_steinberg'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><method name='floyd_steinberg'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='dir'><type><int/></type></argument>   <argument name='forward'><type>    <or><int/><float/></or></type></argument>
11702:   <docgroup homogen-name='full' homogen-type='method'>   <method name='full'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><doc>
11729:   <docgroup homogen-name='image' homogen-type='method'>   <method name='image'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><doc>
11748:   <docgroup homogen-name='nodither' homogen-type='method'>   <method name='nodither'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><doc>
11765:   <docgroup homogen-name='ordered' homogen-type='method'>   <method name='ordered'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments>    </arguments>   </method><method name='ordered'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11778:    </arguments>   </method><method name='ordered'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11788:    </arguments>   </method><method name='ordered'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11800:    </arguments>   </method><method name='ordered'>    <returntype> -  <object resolved='predef::object'>object </object></returntype> +  <object>object </object></returntype>    <arguments><argument name='r'><type><int/></type></argument>   <argument name='g'><type><int/></type></argument>   <argument name='b'><type><int/></type></argument>
11876:   <docgroup homogen-type='method'>   <method name='randomcube'>    <returntype> -</