FramerD Kernel APIs

Automatically Generated by etc/build-api-doc.fdx at 2002-06-26T14:58:37.044382-4:00

Summary

src/cons/hash.c _fd_hashset_add_nc | _fd_hashtable_set_nolock | _fd_set_symbol_value_noref | _fd_symbol_value_noref | fd_choice_to_hashset | fd_cleanup_locked_hashtable | fd_final_hashset_elts | fd_for_all_symbols | fd_free_hashset | fd_free_hashtable | fd_grow_hashset | fd_grow_hashtable | fd_hash_lisp | fd_hashset_add | fd_hashset_drop | fd_hashset_elts | fd_hashset_get | fd_hashset_intern | fd_hashset_probe | fd_hashset_strget | fd_hashtable_add | fd_hashtable_drop | fd_hashtable_get | fd_hashtable_increment | fd_hashtable_increment_existing | fd_hashtable_max | fd_hashtable_probe | fd_hashtable_set | fd_hashtable_skim | fd_hashtable_test | fd_hashtable_zap | fd_init_hashset | fd_init_hashtable | fd_intern | fd_make_hashset | fd_make_hashtable | fd_make_qstring | fd_make_symbol | fd_probe_symbol | fd_reinit_hashset | fd_reinit_hashtable | fd_select_table_size | fd_set_symbol_value | fd_symbol_value |
src/index/file-index.c fd_dtype_compare | fd_file_index_collect_values | fd_index_report_stats | fd_preload_file_index | fd_register_file_index_opener | fd_unpreload_file_index | object |
src/cons/data.c FD_MAKE_LIST | _FD_MAKE_LIST1 | _FD_MAKE_PAIR | _fd_copy_lisp_proc | _fd_decref_cons | _fd_incref_cons | fd_copy_string | fd_for_elts | fd_free_proc | fd_get_big_buffer | fd_init_string | fd_init_vector | fd_lisp_equal | fd_list_length | fd_lookup_compound | fd_lookup_package_code | fd_lookup_record | fd_lower_string | fd_make_character | fd_make_cptr | fd_make_lrecord | fd_make_pair | fd_make_record | fd_make_string | fd_make_substring | fd_make_vector | fd_memberp | fd_register_record | fd_register_source_file | fd_register_typecode | fd_stream_string | fd_utf8_string_ref | fd_utf8_strlen | fd_utf8_substring |
src/index/index.c fd_close_index | fd_commit_index | fd_find_index | fd_for_indices | fd_index_add | fd_index_drop | fd_index_get | fd_index_get_size | fd_index_keys | fd_index_prefetch | fd_index_set | fd_index_set_sizes | fd_intern_index_values | fd_interpret_index | fd_revert_index | fd_set_index_zipf_threshold | fd_swap_out_index | fd_use_index |
src/os/fdprintf.c _fd_grow_string_stream | _fd_sputc | _fd_sputn | _fd_sputs | fd_default_notifier | fd_fprintf | fd_notify | fd_printf | fd_set_notify_handler | fd_set_warn_handler | fd_warn | fd_xprintf |
src/index/network-index.c fd_use_network_index |
src/eval/sandbox.c fd_add_restricted_cproc | fd_add_restricted_lexpr | fd_add_restricted_special_form |
src/text/mime.c fd_parse_mime |
src/text/text.c fd_text_subst |
src/text/htmlgen.c fd_http_puts | fd_http_write_bytes | fd_set_http_output_methods | fd_start_http | fd_start_http_output | fd_unparse_xml |
src/odb/network-pool.c fd_use_network_pool |
src/odb/pools.c fd_commit_pool | fd_find_pool_named | fd_for_pools | fd_get_pool | fd_interpret_pool | fd_locate_pool | fd_pool_load | fd_random_oid | fd_register_pool | fd_set_oid_locator | fd_use_pool |
src/text/stem.c fd_stem_english_word |
src/cons/xdata.c fd_alist_to_hashtable | fd_compare_cptrs | fd_cons | fd_copy_cptr | fd_hashtable_to_alist | fd_lisp_hashset_elts | fd_make_complex | fd_make_double_vector | fd_make_error | fd_make_exception | fd_make_float_vector | fd_make_flonum | fd_make_hashset_for_lisp | fd_make_hashtable_for_lisp | fd_make_int_vector | fd_make_packet | fd_make_rational | fd_make_short_vector | fd_make_timestamp | fd_make_xtimestamp | fd_parse_packet | fd_quote_lisp |
src/os/timefns.c fd_breakup_time | fd_get_now | fd_init_xtime | fd_iso8601_to_xtime | fd_localtime | fd_mktime | fd_parse_iso8601 | fd_parse_tzspec | fd_sleep | fd_timestamp_time | fd_timestamp_to_xtime | fd_xtime_to_iso8601 | fd_xtime_to_timestamp |
src/cons/consed-oids.c _fd_not_an_oid | fd_grow_oid_table | fd_make_oid | fd_probe_oid |
src/eval/load.c fd_get_module | fd_load_file | fd_load_library |
src/os/envfns.c fd_exit | fd_get_gid | fd_get_gname | fd_get_uid | fd_get_uname | fd_get_user_data | fd_getenv | fd_getrusage | fd_inhibit_anti_warranty | fd_inhibit_herald | fd_int_getenv | fd_load_config | fd_set_build_date | fd_set_gid | fd_set_random | fd_set_session_mnemonic | fd_set_uid | fd_string_getenv |
src/os/filefns.c fd_directoryp | fd_fclose | fd_file_existsp | fd_file_size | fd_file_writablep | fd_find_file | fd_fopen | fd_fopen_locked | fd_get_exec_filename | fd_getpath | fd_regular_filep | fd_symbolic_linkp |
src/odb/odb.c fd_close_pool | fd_commit_oid | fd_control_frame_printing | fd_get_modified | fd_get_oid_value | fd_mark_modified | fd_new_oid | fd_oid_modifiedp | fd_print_oid | fd_revert_oid | fd_revert_pool | fd_set_oid_value | fd_show_poolids | fd_swap_out | fd_swap_out_pool | fd_try_oid_value |
src/fdscript/osprims.c fd_register_url_protocol | fd_urlget |
src/scheme/strings.c fd_string_length | fd_string_ref | fd_string_set |
src/odb/super-pool.c fd_allocate_pool | fd_recovered_pool | fd_super_pool_base | fd_super_pool_loading | fd_super_pool_top |
src/eval/threads.c fd_thread_symbind | fd_thread_symeval |
src/cons/choices.c _fd_add_to_choice | _fd_binary_choice | _fd_make_choice_heterogenous | _fd_make_choice_homogenous | _fd_merge_choices | _fd_quote_choice | _fd_unquote_choice | fd_choice_containsp | fd_choice_overlapsp | fd_init_choice | fd_init_oid_choice | fd_intersect_choices | fd_list_to_choice | fd_merge_choices | fd_proper_choicep | fd_remove_from_choice | fd_return_proper_choice | fd_sort_choice |
src/odb/frames.c fd_already_doing_p | fd_clear_slot_cache | fd_copy_frame | fd_describe_slot | fd_disable_slot_cache | fd_enable_slot_cache | fd_for_slots | fd_frame_add | fd_frame_create | fd_frame_get | fd_frame_get_star | fd_frame_remove | fd_frame_set | fd_frame_slots | fd_frame_test | fd_get_slotmap | fd_inherit_values | fd_inherits_valuep | fd_overlay_create | fd_overlay_get | fd_overlay_test | fd_pathp | fd_prim_add | fd_prim_add_consed | fd_prim_drop | fd_prim_get | fd_prim_set | fd_prim_set_consed | fd_prim_test | fd_use_autoindex |
src/odb/libframerd.c fd_report_framerd_stats |
src/text/xml.c fd_make_xmltag | fd_parse_html | fd_parse_xml | fd_xml_attributes | fd_xml_content | fd_xml_tag | fd_xmltag_name | fd_xmltag_namespace |
src/cons/slotmaps.c _fd_done_with_slotmap_data | _fd_slotmap_data | fd_make_slotmap | fd_slotmap_add | fd_slotmap_get | fd_slotmap_remove | fd_slotmap_set | fd_slotmap_test | fd_slotmap_zap |
src/eval/lambda.c fd_bind_value | fd_free_env | fd_make_env | fd_make_gproc | fd_make_sproc | fd_make_ssproc | fd_mallocd_env | fd_module_export | fd_module_uses | fd_register_module | fd_register_restricted_module | fd_registered_module | fd_required_symeval | fd_safe_set_value | fd_set_value | fd_symeval |
src/eval/eval.c _fd_finalize_static_tail_call | fd_add_alias | fd_add_cproc | fd_add_lexpr | fd_add_special_form | fd_do_application | fd_eval | fd_eval_elts | fd_eval_in_env | fd_evalstring | fd_finish_value | fd_make_rproc | fd_mv_arity | fd_mv_ref | fd_mv_return | fd_record_typep | fd_set_supertype | fd_start_eval | fd_streval |
src/os/network.c fd_careful_dtcall | fd_careful_dtype_eval | fd_close_connection | fd_connect | fd_dtcall | fd_dtype_eval | fd_get_portno | fd_http_get | fd_http_head | fd_http_string | fd_init_connection | fd_open_connection | fd_open_local_socket | fd_open_tcp_socket | fd_read_from_socket | fd_send_smtp_mail | fd_sendall | fd_timed_recv | fd_trace_dteval | fd_try_to_connect |
src/os/i18n.c fd_convert_utf8 | fd_define_encoding | fd_downcase_string | fd_fgetc | fd_foreign_filestring | fd_fputc | fd_fputs_encoded | fd_fputs_raw | fd_free_xfile | fd_get_encoding | fd_get_file_encoding | fd_get_xfile | fd_interpret_unicode_escapes | fd_load_encoding | fd_localize_utf8 | fd_make_utf8 | fd_set_default_encoding | fd_set_file_encoding | fd_set_system_encoding | fd_ungetc | fd_upcase_string | fd_valid_utf8p | fd_xgetc | fd_xgetc_encoded | fd_xputc | fd_xputc_encoded | fd_xungetc |
src/os/fdmalloc.c _fd_qfree | _fd_qmalloc | _fd_qmalloc_cons | fd_free | fd_free_int_array | fd_malloc | fd_malloc_adjust | fd_malloc_init | fd_mallocize | fd_memdup | fd_realloc | fd_strdup | fd_xfree | fd_xmalloc | fd_xmemdup | fd_xrealloc |
src/os/except.c _fd_push_jbr | fd_ctype_error | fd_exception_context | fd_exception_context_push | fd_pigs_fly | fd_raise_detailed_exception | fd_raise_exception | fd_raise_lisp_exception | fd_record_type_error | fd_set_exception | fd_throw | fd_type_error |
src/cons/io.c _fd_sgetc | fd_add_dtype_to_file | fd_configure_oid_io | fd_default_parse_oid | fd_default_print_oid | fd_dtype_size | fd_object_to_string | fd_parse_arg | fd_parse_lisp_from_stream | fd_parse_number | fd_parse_string | fd_print_lisp | fd_print_lisp_to_stdout | fd_print_lisp_to_string | fd_read_dtype_from_file | fd_read_dtypes_from_file | fd_set_bignum_parser | fd_set_super_pool_aliasing | fd_validate_dtype | fd_write_dtype_to_file |
src/odb/file-pool.c fd_cache_file_pool | fd_file_pool_capacity | fd_file_pool_freespace | fd_file_pool_load | fd_label_file_pool | fd_lock_file_pool | fd_make_file_pool | fd_make_new_super_pool | fd_make_pool_snapshot | fd_make_super_pool | fd_new_file_pool | fd_read_file_pool_metadata | fd_register_file_pool_opener | fd_use_file_pool |
src/index/search.c fd_find_frames | fd_find_similar | fd_get_frame_features | fd_get_slot_features | fd_index_frame | fd_index_notice_slot_values | fd_index_slot_values | fd_index_slots | fd_score_from_samples | fd_score_from_spec | fd_strict_search |

Functions defined in src/os/envfns.c

fd_exit | fd_get_gid | fd_get_gname | fd_get_uid | fd_get_uname | fd_get_user_data | fd_getenv | fd_getrusage | fd_inhibit_anti_warranty | fd_inhibit_herald | fd_int_getenv | fd_load_config | fd_set_build_date | fd_set_gid | fd_set_random | fd_set_session_mnemonic | fd_set_uid | fd_string_getenv |

Function Arguments Returns
fd_get_uname uid_t id char *
a uid a string
Gets the user name for a particular id
fd_set_gid char *gname int
a gid changes the current group to be name, return 1 if successful
fd_inhibit_herald int inhibit void
none void
Keeps the startup and shutdown heralds from being shown
fd_get_uid char *uname uid_t
a string gets the user ID for a named user
fd_set_build_date char *date void
a string nothing
Sets the build date to be returned by fd_get_build_date
fd_int_getenv char *var,int dflt int
a string naming a variable and an int default an int
Gets a variable from the environment. It first tries the top level LISP environment, then the Windows registry (under WIN32), and finally the "POSIX" environment. Unlike fd_getenv, this doesn't parse the string.
fd_get_gid char *uname gid_t
a string gets the group ID for a named group
fd_get_gname gid_t id char *
a gid a string
Gets the group name for a particular gid
fd_exit int status void
a status code (an int) no.
This sets the variable fd_normal_exit to 1 if the status code is zero, which can be read by atexit handlers.
fd_load_config char *config_file int
a filename (a string) nothing
Loads the variable bindings defined in the specified configuration file, setting the corresponding symbol values
fd_inhibit_anti_warranty int inhibit void
none void
Keeps the startup and shutdown heralds from being shown
fd_getenv char *var lisp
a string naming a variable a lisp object
Gets a variable from the environment. It first tries the top level LISP environment, then the Windows registry (under WIN32), and finally the "POSIX" environment used by getenv. When the value comes from anywhere besides the lisp environment, it is parsed as a LISP argument, so that numbers turn into numbers.
fd_getrusage struct rusage *r void
a pointer to an rusage structure void
Gets rusage information, covering for holes in various implementations (currently just Linux)
fd_string_getenv char *var fd_u8char *
a string naming a variable a lisp string
Gets a variable from the environment. It first tries the top level LISP environment, then the Windows registry (under WIN32), and finally the "POSIX" environment. Unlike fd_getenv, this doesn't parse the string.
fd_set_random unsigned int seed void
an unsigned int void
This sets the random seed.
fd_set_uid char *uname int
a uid changes the current user to be name, return 1 if successful
fd_set_session_mnemonic char *mnemonic void
a string nothing
Sets the string used to identify this kind of session (e.g. 'fdscript' or more usefully, 'mailreader')
fd_get_user_data uid_t id lisp
a uid a lisp structure
Gets the user password data for a particular id

Functions defined in src/os/fdprintf.c

_fd_grow_string_stream | _fd_sputc | _fd_sputn | _fd_sputs | fd_default_notifier | fd_fprintf | fd_notify | fd_printf | fd_set_notify_handler | fd_set_warn_handler | fd_warn | fd_xprintf |

Function Arguments Returns
fd_default_notifier fd_u8char *message void
a string void
This is the default notification function, which outputs a bracketed time and report.
_fd_sputc fd_string_stream ss,int ch void
a pointer to a string stream and a unicode character void
Writes the utf8 representation of the character to the string stream.
fd_xprintf char *format_string,... void
a format string, and other args void
Outputs a string as exceptional I/O generated from the format string and using the provided arguments. Much like printf (surprise).
fd_fprintf FILE *f,char *fstring,... void
a FILE * stream, a format string, and other args void
Outputs a string to a file stream generated from the format string and using the provided arguments. Much like printf (surprise).
_fd_sputn fd_string_stream ss,fd_u8char *string,int n void
a pointer to a string stream, a utf8 string, and an int void
Internal string stream string putn function, used in macro ssputn
fd_notify char *format_string,... void
a FILE * stream, a format string, and other args void
Outputs a string as a notification, which is generated from the format string and using the provided arguments. Much like printf (surprise).
_fd_sputs fd_string_stream ss,fd_u8char *string void
a pointer to a string stream and a utf8 string void
Internal string stream string put function, used in macro ssputs
fd_printf fd_string_stream s,char *format_string,... void
a string stream, a format string, and other args void
Outputs a string to string stream generated from the format string and using the provided arguments. Much like printf (surprise).
fd_set_notify_handler void (*nf void
a function taking a string arg void
Sets the function which is called on notification messages
fd_warn char *format_string,... void
a FILE * stream, a format string, and other args void
Outputs a string as a warning, which is generated from the format string and using the provided arguments. Much like printf (surprise). Note that notifications can be turned off but warnings cannot.
_fd_grow_string_stream fd_string_stream ss,int delta void
a pointer to a string stream and a number of bytes void
Grows the data structures for the string stream to include delta more bytes
fd_set_warn_handler void (*wf void
a function taking a string arg void
Sets the function which is called on warning messages

Functions defined in src/os/timefns.c

fd_breakup_time | fd_get_now | fd_init_xtime | fd_iso8601_to_xtime | fd_localtime | fd_mktime | fd_parse_iso8601 | fd_parse_tzspec | fd_sleep | fd_timestamp_time | fd_timestamp_to_xtime | fd_xtime_to_iso8601 | fd_xtime_to_timestamp |

Function Arguments Returns
fd_init_xtime struct FD_XTIME *xtp void
a pointer to an extended timestamp structure void
This takes a timestamp object and fills out an extended time pointer structure which includes timezone and precision information.
fd_parse_tzspec char *s,int dflt int
a string and a default offset an offset from UTC
This uses a built in table but should really use operating system facilities if they were even remotely standardized.
fd_sleep double secs void
an interval in seconds (a double) nothing
This is a platform abstraction for sleeping that *may* allow sub-second sleeps.
fd_mktime struct tm *tptr,int tzoff time_t
a pointer to a tm struct and a time offset (from UTC) in seconds a time_t pointer
Returns the UTC time given a filled out tm structure and the offset of the zone it was filled out in from UTC.
fd_breakup_time struct tm *tptr,time_t tick,int tzoff int
a pointer to a tm struct, a time_t value, and an offset an integral timezone offset
Fills the tm struct with the broken down UTC time based on the time_t value. This is threadsafe, locking the possible shared tptr.
fd_timestamp_time lisp timestamp time_t
a lisp pointer to a timestamp a time_t value
fd_xtime_to_timestamp struct FD_XTIME *xtp fd_lisp
a string and a pointer to a timestamp structure -1 on error, the time as a time_t otherwise
This takes an iso8601 string and fills out an extended time pointer which includes possible timezone and precision information.
fd_iso8601_to_xtime char *s,struct FD_XTIME *xtp time_t
a string and a pointer to a timestamp structure -1 on error, the time as a time_t otherwise
This takes an iso8601 string and fills out an extended time pointer which includes possible timezone and precision information.
fd_parse_iso8601 char *string time_t
a string a time_t
Parses an iso8601 format date/time string into a time_t value.
fd_timestamp_to_xtime fd_lisp timestamp,struct FD_XTIME *xtp time_t
a lisp pointer to a timestamp and a pointer to a timestamp structure -1 on error, the time as a time_t otherwise
This takes a timestamp object and fills out an extended time pointer structure which includes timezone and precision information.
fd_xtime_to_iso8601 struct FD_XTIME *xtp,fd_string_stream ss int
a timestamp and a pointer to a string stream -1 on error, the time as a time_t otherwise
This takes an iso8601 string and fills out an extended time pointer which includes possible timezone and precision information.
fd_get_now struct FD_XTIME *xtp time_t
a pointer to an extended time pointer a time_t or -1 if it fails for some reason
This will try and get the finest precision time it can.
fd_localtime struct tm *tptr,time_t tick int
a pointer to a tm struct and a time_t value the time_t value or -1 if it failed
Fills the tm struct with the local time based on the time_t value. This is threadsafe, since localtime is not.

Functions defined in src/os/except.c

_fd_push_jbr | fd_ctype_error | fd_exception_context | fd_exception_context_push | fd_pigs_fly | fd_raise_detailed_exception | fd_raise_exception | fd_raise_lisp_exception | fd_record_type_error | fd_set_exception | fd_throw | fd_type_error |

Function Arguments Returns
fd_raise_detailed_exception fd_exception ex,char *details void
an exception (a string) and details (another string) no.
Raises an exception of a particular kind with particular details used in generating exception reports Unhandled crises cause an exit by calling unhandled_exception.
fd_raise_lisp_exception fd_exception ex,char *details,lisp obj void
an exception (a string), details (another string), and a lisp object no.
Raises an exception of a particular kind with particular details used in generating exception reports and an associated lisp object (the irritant) Unhandled crises cause an exit by calling unhandled_exception.
fd_raise_exception fd_exception ex void
an exception (a string) no.
Raises an exception of a particular kind without providing any other information. Unhandled crises cause an exit by calling unhandled_exception.
fd_set_exception fd_exception ex,fd_u8char *details,lisp object void
an exception (a string), a details string, and a lisp object nothing
Set's the current threads exception information.
fd_exception_context int force struct FD_EXCEPTION_CONTEXT *
none a pointer to a FD_EXCEPTION_CONTEXT struct
fd_ctype_error char *c_context,fd_u8char *details,lisp obj void
details text (a string), and a lisp object no.
Raises a type error with particular details and an object.
fd_record_type_error lisp obj,lisp tag void
details text (a string), and a lisp object no.
Raises a type error with particular details and an object.
fd_pigs_fly fd_u8char *details void
details text (a string) no.
This is used to signal errors which should never happen.
_fd_push_jbr fd_setjmp_rec *jbr void
a setjmp record void
Adds an entry to the exception handling stack for a particular setmp location
fd_type_error fd_u8char *details,lisp obj void
details text (a string), and a lisp object no.
Raises a type error with particular details and an object.
fd_exception_context_push lisp sym void
a lisp pointer void
Adds a value to the current exception context
fd_throw fd_exception ex,char *details,lisp obj void
an exception (a string), details (another string), and a lisp object no.
Throws an exception, with particular details and irritant. This is used when the exception is expected to be caught, as in the use of exceptions to implement continuation. This is identical to fd_raise_lisp_exception but that debuggers may often break on fd_raise_lisp_exception and not on fd_throw.

Functions defined in src/os/network.c

fd_careful_dtcall | fd_careful_dtype_eval | fd_close_connection | fd_connect | fd_dtcall | fd_dtype_eval | fd_get_portno | fd_http_get | fd_http_head | fd_http_string | fd_init_connection | fd_open_connection | fd_open_local_socket | fd_open_tcp_socket | fd_read_from_socket | fd_send_smtp_mail | fd_sendall | fd_timed_recv | fd_trace_dteval | fd_try_to_connect |

Function Arguments Returns
fd_dtype_eval lisp expr,fd_server s lisp
a lisp object and a server a lisp object
Asks the server to evaluate the lisp object, returning the result and trying to restart the connection once if neccessary.
fd_sendall int socket,char *buf,int size,int flags int
a socket, a pointer to a block of data, the length of the block of data, and flags to pass to send() either zero or -1 (indictating an error)
This sends all of the bytes in a block of data, repeatedly calling send(). This will return -1, indicating a failure, if the attempt to write times out.
fd_init_connection fd_server server,char *dest,int port,char *id void
a pointer to an FD_SERVER struct, a host (a string), a port (an int), and an id (a string or NULL) nothing
Initializations a TCP/IP connection structure.
fd_dtcall fd_server s,char *fcn,... lisp
a server, a function name (a string), and a number of args ending with FD_VOID a lisp object
Asks the server to apply the named function to the args, returning the result. It calls fd_dtype_eval. The arguments are quoted before being passed.
fd_try_to_connect char *spec fd_server
a string identifying a server a server
Tries to make a connection to a particular server, returning NULL if it fails. The server identification has the form port@host, where port is either a registered service or is 'touch-tone' encoded to a port number
fd_send_smtp_mail char *dest,char *text,lisp fields void
a destination (a string), a contents (a string), and a set of fields (a lisp object) nothing
Uses a local SMTP connection to send mail to a particular individual with a particular set of fields and a particular contents.
fd_open_tcp_socket char *hostname,int port,char *id,int signal_error,char **fullname int
a hostname (a string) and a port (an int) and an id (a string) and an error flag (an int) an open socket
This utility function gets an open TCP socket for a host and port.
fd_close_connection fd_server s void
a server nothing
Closes the connection to server. This just does a close on the socket and nothing clever to ensure that pending transactions are completed (though they should throw out and restart).
fd_careful_dtcall fd_server s,char *fcn,... lisp
a server, a function name (a string), and a number of args ending with FD_VOID a lisp object
Like fd_dtcall, but signals an error when the remote server returns an error object.
fd_timed_recv int secs,int socket_id,char *data,int len,int flags int
an interval in seconds (an int), an open socket, a pointer to a block of data, a number of bytes, and some flags (an int) for recv() the number of bytes read or -1 on error
Tries to read bytes from a connection, returning -1 if the connection times out.
fd_connect char *spec fd_server
a string identifying a server a server
Makes a connection to a particular server, signalling an error if a connection cannot be made. The server identification has the form port@host, where port is either a registered service or is 'touch-tone' encoded to a port number
fd_http_get char *url,int *sizep char *
a string and a pointer to an int a string (actually a pointer to a byte array)
Gets the contents of a remote URL as a character string, storing the size in the second argument (if non-NULL)
fd_open_local_socket char *filename,char *id,int signal_error int
a filename (a string) and a server id (a string) and an error flag (an int) an open socket
This utility function gets an open socket for a local filenname.
fd_http_head char *url,int *sizep char *
a string and a pointer to an int a string (actually a pointer to a byte array)
Gets the head of a remote URL as a character string
fd_open_connection char *name,int port,char *id fd_server
a name (a string), a port (an int) and an id (a string) a server (a pointer to a FD_SERVER struct)
Looks for a current connection to port@hostname and creates one if it doesn't exist.
fd_read_from_socket struct FD_DBUF *buf,int socket void
a pointer to an FD_DBUF struct and a socket nothing (void)
This fills the expandable FD_DBUF struct with bytes read from socket, stopping when recv() return 0 or the call to recv times out.
fd_careful_dtype_eval lisp expr,fd_server s lisp
a lisp object and a server a lisp object
Like fd_dtype_eval but signals an error if the remote server returns an error or exception object.
fd_get_portno char *string int
a string an integer
Returns the port number identified by a particular string, starting with the service database and doing touch-tone encoding if that fails.
fd_trace_dteval int flag int
1 or 0 1 or 0
Turns on tracing of all remote DTYPE evaluation activity.
fd_http_string char *url char *
a string a string (actually a pointer to a byte array)
Gets the contents of a remote URL as a character string, storing the size in the second argument

Functions defined in src/os/filefns.c

fd_directoryp | fd_fclose | fd_file_existsp | fd_file_size | fd_file_writablep | fd_find_file | fd_fopen | fd_fopen_locked | fd_get_exec_filename | fd_getpath | fd_regular_filep | fd_symbolic_linkp |

Function Arguments Returns
fd_file_size fd_u8char *path off_t
a string a long
Returns the size of a file
fd_fclose FILE *stream void
a filename a FILE * pointer
Closes the stream and cleans up XFILEs associated with it
fd_getpath fd_u8char *name lisp
a string naming an extended environment variable a lisp pointer to a list of directories
Interprets a path variable
fd_symbolic_linkp fd_u8char *path int
a string 1 or 0
Returns 1 if the file is a symbolic link to another file (currently always zero under WIN32).
fd_get_exec_filename char *argv0 char *
a string, typicallying argv[0] a malloc'd absolute filename or NULL
Attempts to figure out the absolute pathname of an executable from the argv[0] parameter. Used to find the FramerD configuration file.
fd_fopen_locked fd_u8char *filename,char *mode,int allow_readers FILE *
a filename, a mode specifier, and a flag (1 or 0) a FILE * pointer
Normalizes the filename for the OS and locks the returned stream (using fcntl). If the integer flag is 1, the lock is only a write lock. If it is 0, neither reads nor writes are permitted.
fd_find_file fd_u8char *filename,lisp search_path fd_u8char *
a string and a lisp pointer another string
The lisp pointer is used as a search path to look for files. It first checks to see if the string exists as a file as given. It then searches along the directories in the search path. The search path can be a string (taken as a directory name) or a list of strings take as directory names. It allocates a string for a result (but doesn't count it as fd_mallocd).
fd_directoryp fd_u8char *path int
a string 1 or 0
Returns 1 if the file is actually a directory.
fd_file_writablep fd_u8char *filename int
a string 1 or 0
Returns 1 if the file can be written (whether it exists or not), 0 otherwise. Actually opens it to try, rather than doing something clever with stat.
fd_regular_filep fd_u8char *path int
a string 1 or 0
Returns 1 if the file is a regular file.
fd_file_existsp fd_u8char *fname int
a string 1 or 0
Returns 1 if the file exists, 0 otherwise. Uses stat.
fd_fopen fd_u8char *filename,char *mode FILE *
a filename and a mode specifier a FILE * pointer
Normalizes the filename for the OS

Functions defined in src/os/i18n.c

fd_convert_utf8 | fd_define_encoding | fd_downcase_string | fd_fgetc | fd_foreign_filestring | fd_fputc | fd_fputs_encoded | fd_fputs_raw | fd_free_xfile | fd_get_encoding | fd_get_file_encoding | fd_get_xfile | fd_interpret_unicode_escapes | fd_load_encoding | fd_localize_utf8 | fd_make_utf8 | fd_set_default_encoding | fd_set_file_encoding | fd_set_system_encoding | fd_ungetc | fd_upcase_string | fd_valid_utf8p | fd_xgetc | fd_xgetc_encoded | fd_xputc | fd_xputc_encoded | fd_xungetc |

Function Arguments Returns
fd_foreign_filestring char *filename,struct FD_TEXT_ENCODING *e lisp
a filename (a localized string) and a text encoding a utf-8 string
Interprets the contents of the file according to the encoding and returns a UTF-8 encoded unicode string.
fd_upcase_string fd_u8char *string,int len fd_u8char *
a utf8 string a copy of the argument converted to upper case
fd_get_file_encoding FILE *f struct FD_TEXT_ENCODING *
a FILE pointer a pointer to an encoding struct or NULL
Returns the encoding associated with a particular file stream.
fd_valid_utf8p fd_u8char *s int
a possible utf8 string 1 if the string is valid, 0 otherwise.
fd_fputs_encoded fd_u8char *s,int len,FILE *f void
a utf8 string and a FILE pointer nothing
Writes the contents of the string to the XFILE, writing unhandled characters with unicode (\u and \U escapes).
fd_fputc xchar c,FILE *f void
a wide char and a FILE pointer void
Writes the character to the FILE stream
fd_set_system_encoding char *name void
an encoding name void
Sets the encoding used by the operating system (e.g. for system calls, filenames, etc)
fd_ungetc int c,FILE *f void
a wide character and a FILE pointer nothing
Ungets the character on the stream, using its XFILE structure if possible.
fd_set_default_encoding char *name void
an encoding name void
Sets the default encoding used for XFILES
fd_set_file_encoding FILE *f,char *name void
a FILE pointer and an ASCII string naming an encoding void
Sets the encoding for a particular FILE pointer to the encoding with the specified name.
fd_fgetc FILE *f int
a FILE pointer a wide character
Returns a wide character from a stream according to its encoding.
fd_get_xfile FILE *f struct FD_XFILE *
a FILE pointer an XFILE pointer (or NULL)
Gets the XFILE struct associated with a particular file pointer.
fd_fputs_raw fd_u8char *s,int len,FILE *f void
a utf8 string and an XFILE pointer nothing
Writes the contents of the string to the XFILE, signalling an error if the stream does not accept any of the characters in the XFILE.
fd_localize_utf8 fd_u8char *string,struct FD_TEXT_ENCODING *e unsigned char *
a utf8 encoded string and a text encoding a regular string
Returns an 8BIT string encoded using the text encoding.
fd_xgetc_encoded struct FD_XFILE *f int
an XFILE pointer a wide character
Returns a wide character from a stream according to its encoding. This will interpret \u and \U escapes in the file.
fd_convert_utf8 fd_u8char *string,int slen,struct FD_TEXT_ENCODING *e,int *size_loc unsigned char *
a utf8 encoded string and a text encoding a regular string
Returns an 8BIT string encoded using the text encoding.
fd_interpret_unicode_escapes fd_u8char *string fd_u8char *
a utf8 string with (potentially) embedded unicode escapes a utf8 string where those escapes have been expanded
fd_free_xfile FILE *f void
an FILE pointer nothing
Frees the XFILE entry from the linked list of FILE association pointers.
fd_load_encoding char *name,char *file void
a name and a filename void
Defines a text encoding based on a text file of byte sequence to unicode mappings. This interprets the standard mappings files provided by the Unicode consortium at ftp://ftp.unicode.org/Public/MAPPINGS/.
fd_get_encoding char *name struct FD_TEXT_ENCODING *
an ASCII string a pointer to an FD_TEXT_ENCODING struct
This gets the structure describing a particular encoding given its ASCII name.
fd_xputc xchar c,struct FD_XFILE *f void
a wide char and an XFILE pointer void
Writes the character to XFILE stream, signalling an error if the stream cannot handle the character.
fd_make_utf8 uchar *start,uchar *end,struct FD_TEXT_ENCODING *e fd_u8char *
a 8BIT string representation and a text encoding a utf8 encoded string
fd_xputc_encoded xchar c,struct FD_XFILE *f void
a wide char and an XFILE pointer void
Writes the character to XFILE stream, using unicode escapes if the stream cannot handle the character.
fd_downcase_string fd_u8char *string,int len fd_u8char *
a utf8 string a copy of the argument converted to lower case
fd_xungetc int c,struct FD_XFILE *e void
a wide character and an XFILE pointer nothing
Ungets the character on an XFILE stream.
fd_define_encoding char *name,struct FD_MB_MAP *charset,int size, wc2mb_fn wc2mb,mb2wc_fn mb2wc,int flags int
a name, a pointer to a charset, a wide-char to multi-byte conversion function, a multi-byte to wide-char conversion function, and a set of flags. 1 if the map was used, zero if it wasn't (mapping was already defined)
Defines an encoding with a name and the associated properties. If an encoding with the give properties already exists, the name is added to that encoding structure.
fd_xgetc struct FD_XFILE *f int
an XFILE pointer a wide character
Returns a wide character from a stream according to its encoding. This will *not* interpret \u and \U escapes in the file.

Functions defined in src/os/fdmalloc.c

_fd_qfree | _fd_qmalloc | _fd_qmalloc_cons | fd_free | fd_free_int_array | fd_malloc | fd_malloc_adjust | fd_malloc_init | fd_mallocize | fd_memdup | fd_realloc | fd_strdup | fd_xfree | fd_xmalloc | fd_xmemdup | fd_xrealloc |

Function Arguments Returns
_fd_qmalloc_cons size_t bytes void *
number of bytes allocated memory
This also initializes the reference count, assuming that the result will be a struct whose first int field is the reference count.
fd_xrealloc void *oldptr,size_t bytes void *
a pointer and a size returns a pointer to a memory chunk with at least size bytes
which includes the data of the argument passed in This signals an exception if malloc fails. It doesn't count the malloc'd bytes
_fd_qmalloc size_t bytes void *
number of bytes allocated memory
This maintains a free list for certain memory sizes and allocates them blocks at a time.
fd_malloc size_t bytes void *
number of bytes allocated memory to at least that many bytes
This signals an exception if malloc fails.
fd_memdup const char *data,size_t sz char *
a pointer to a chunk of memory and a size a string
Allocates a new string which is a copy of its argument and has the corresponding size. This will work with strings that contain NULLs. This will count towards global memory counts and use huge_malloc if neccessary.
fd_malloc_init size_t sz,int chunk_size void
two size_t pointers, struct_size and block_size void
Arranges for malloc tables to keep a free list of structs with *struct_size* bytes and to allocate these structs in blocks of *block_size* to reduce malloc overhead. This will signal an error if any thread has already copied the malloc data table. This isn't neccessary, but just easy to code right now.
fd_xmalloc size_t bytes void *
number of bytes allocated memory to at least that many bytes
This signals an exception if malloc fails. It doesn't count the malloc'd bytes, though...
fd_xfree void *ptr void
a pointer void
Doesn't signal an error of pointer is NULL
fd_free_int_array unsigned int *ptr,size_t size void
a pointer and number of bytes void
This frees the pointer and bumps the malloc pointer down by a number rounded up to the size to FD_STRING_CHUNK.
fd_mallocize char *data,size_t sz char *
a pointer to a chunk of memory and a size a pointer
Returns a pointer which can be used with the fd_malloc/realloc/free functions. This does two things: if the size is large enough to for calling huge_malloc, it is called, the strings contents is copied, and the original chunk is freed; in addition, in either the case of a copy or a pass-through fd_malloc_adjust is called to record the memory take up by the chunk of memory.
fd_xmemdup const char *data,size_t sz char *
a pointer to a chunk of data and a size a string
Allocates a new string which is a copy of its argument and has the corresponding size. This will work with strings that contain NULLs. This does not count towards the global memory counts.
fd_realloc void *ptr,size_t new_size,size_t old_size void *
a pointer and a number of bytes void
Frees the pointer and updates the memory usage count
fd_strdup const char *string char *
a null terminated string a null terminated string
Allocates a new string which is a copy of its argument. This does not count towards the global memory counts.
fd_malloc_adjust int delta void
an int void
Bumps up the malloc count but doesn't really malloc anything
_fd_qfree void *p,size_t bytes void
a pointer and a number of bytes void
This frees a cons allocated by fd_qmalloc which tries to do free list maintainance.
fd_free void *ptr,size_t bytes void
a pointer and a number of bytes void
Frees the pointer and updates the memory usage count
{}

Functions defined in src/cons/oids.c

Function Arguments Returns

Functions defined in src/cons/slotmaps.c

_fd_done_with_slotmap_data | _fd_slotmap_data | fd_make_slotmap | fd_slotmap_add | fd_slotmap_get | fd_slotmap_remove | fd_slotmap_set | fd_slotmap_test | fd_slotmap_zap |

Function Arguments Returns
fd_slotmap_add fd_slotmap sm,lisp key,lisp value void
a slotmap, a lisp key, and a lisp value makes the value be associated with the key
in the slotmap, making the value non deterministic if neccessary. Refcounts (if it's not a set) or copies (if it is) the value given it.
_fd_slotmap_data lisp x,void **velts int
a lisp pointer (to a slotmap) and a pointer to a pointer to a vector of lisp pointers an int (the number of lisp pointers in the vector assigned
Returns the data of the slotmap to use in producing a packaged DTYPE from it.
fd_slotmap_test fd_slotmap sm,lisp key,lisp value int
a slotmap, a lisp key, and a lisp value 1 or 0
Returns 1 if the value can be found on the *key* slot of the slotmap.
fd_slotmap_get fd_slotmap sm,lisp key,lisp dflt lisp
a slotmap, a lisp key, and a default value the value associated with the key in the slotmap
or the default value otherwise.
fd_make_slotmap int size lisp
a size (int) a slotmap with capacity for slots
_fd_done_with_slotmap_data fd_lisp *elts,int size void
a pointer to a vector of LISP pointers and a size nothing
Frees a slotmap data vector.
fd_slotmap_set fd_slotmap sm,lisp key,lisp value void
a slotmap, a lisp key, and a lisp value makes the value be associated with the key
in the slotmap Refcounts (if it's not a set) or copies (if it is) the value given it.
fd_slotmap_remove fd_slotmap sm,lisp key,lisp value void
a slotmap, a lisp key, and a lisp value removes the value from the values associated with
a particular key in the slotmap The value on the slotmap is freed.
fd_slotmap_zap fd_slotmap sm,lisp key void
a pointer to a slotmap and a key nothing
Removes all values associated with the key in the slotmap.

Functions defined in src/cons/io.c

_fd_sgetc | fd_add_dtype_to_file | fd_configure_oid_io | fd_default_parse_oid | fd_default_print_oid | fd_dtype_size | fd_object_to_string | fd_parse_arg | fd_parse_lisp_from_stream | fd_parse_number | fd_parse_string | fd_print_lisp | fd_print_lisp_to_stdout | fd_print_lisp_to_string | fd_read_dtype_from_file | fd_read_dtypes_from_file | fd_set_bignum_parser | fd_set_super_pool_aliasing | fd_validate_dtype | fd_write_dtype_to_file |

Function Arguments Returns
fd_parse_arg char *xstring lisp
a localized string a lisp object
Returns the lisp object described by the printed representation in its argument.
fd_print_lisp lisp x, FILE * stream void
a lisp object and a standard output stream nothing
Outputs an ascii representation of the object to the output stream
fd_configure_oid_io void ((*print_fcn void
a pointer to two C functions; the first outputs OIDs to string streams and the second parses utf8 strings into OIDs nothing
Changes the default printer and parser for OIDs.
fd_write_dtype_to_file lisp v,char *filename void
a lisp object, a filename (a string) nothing
Outputs a dtype representation of the object to the specified file.
fd_default_parse_oid fd_u8char *string lisp
a pointer to a UTF-8 string a lisp pointer to an FD_OID
Outputs the most primitive ASCII representation of the object to the string stream.
_fd_sgetc fd_u8char **ss int
a pointer to a pointer to a UTF-8 string an int (representing a unicode character)
Reads a single unicode character from a utf-8 string, advancing the string past the character.
fd_read_dtype_from_file char *filename lisp
a localized string (a filename) a lisp object
Returns the lisp object described by the first DTYPE in filename.
fd_parse_number fd_u8char *string,int base lisp
a utf8 string and an integral base a lisp object
Parses the number assuming the specified base.
fd_default_print_oid lisp obj,fd_string_stream ss void
a pointer to a LISP OID pointer and a pointer to a "string stream" nothing
Outputs the most primitive ASCII representation of the object to the string stream.
fd_read_dtypes_from_file char *filename lisp
a localized string (a filename) a lisp object
Returns the lisp objects described by the DTYPES in filename.
fd_validate_dtype unsigned char *buf,unsigned char *end int
two pointers into an array of bytes 1 if the range contains a valid dtype representation
fd_set_bignum_parser lisp (*fcn void
a function for parsing bignums from strings and returning lisp objects void
Defines the function used for parsing large integers into lisp objects. The function takes a string and an integral radix and returns a lisp object representing the number described by the string.
fd_dtype_size lisp x unsigned int
a lis pointer an integer
Returns the number of bytes which will be used by the DType representation of its argument.
fd_parse_lisp_from_stream FILE *f lisp
a FILE pointer a lisp object
Parses the printed representation of an object from a stdio file stream
fd_object_to_string lisp object fd_u8char *
a lisp object a string
Returns a string containing a UTF-8 representation of the object.
fd_parse_string fd_u8char *string lisp
a utf8 string a lisp object
Returns the lisp object described by the printed representation in its argument.
fd_set_super_pool_aliasing FD_OID from,FD_OID to void
two OIDs nothing
Sets up the DType reader to translate OIDs in the super pool of *from* into OIDs in the super pool for *to*.
fd_add_dtype_to_file lisp v,char *filename void
a lisp object, a filename (a string) nothing
Outputs a dtype representation of the object to the end of the specified file (creating it if neccessary).
fd_print_lisp_to_stdout lisp dtype void
a lisp object nothing
Outputs an ascii representation of the object to the standard output
fd_print_lisp_to_string lisp x,fd_string_stream s void
a lisp object and a pointer to a "string stream" nothing
Outputs an ASCII representation of the object to the string stream.

Functions defined in src/cons/choices.c

_fd_add_to_choice | _fd_binary_choice | _fd_make_choice_heterogenous | _fd_make_choice_homogenous | _fd_merge_choices | _fd_quote_choice | _fd_unquote_choice | fd_choice_containsp | fd_choice_overlapsp | fd_init_choice | fd_init_oid_choice | fd_intersect_choices | fd_list_to_choice | fd_merge_choices | fd_proper_choicep | fd_remove_from_choice | fd_return_proper_choice | fd_sort_choice |

Function Arguments Returns
fd_init_oid_choice int n lisp
a size An empty non-deterministic set with a homogenous type of OID
This returns an empty set with reserved space for a certain number of elements. The set is initialized as a homogenous choice of OIDS.
_fd_make_choice_heterogenous fd_choice ch void
a pointer to a choice nothing
Makes a homogenous choice into a heterogenous one
_fd_binary_choice lisp x,lisp y lisp
two lisp objects a non-deterministic set containing copies of them
This is useful because the transition from simple value to nd-value usually starts with a set of two elements.
fd_sort_choice fd_lisp arg int
a pointer to a choice 1/0
Sorts the elements of a heterogenous choice, returns 1 if the choice was successfully sorted, 0 otherwise
fd_list_to_choice lisp lst lisp
a lisp list an non-deterministic set whose elements are the elements of
the list it is given This copies (rather than just crefs) the elements it is given
fd_init_choice int n lisp
a size An empty non-deterministic set
This returns an empty set with reserved space for a certain number of elements.
fd_remove_from_choice lisp x,lisp choice lisp
a lisp object and a lisp non-deterministic set a non-deterministic set without any occurences of the object
_fd_make_choice_homogenous fd_choice ch void
a pointer to a choice nothing
Makes a heterogenous choice into a homogenous one
fd_choice_containsp lisp sub,lisp super int
two lisp objects 1 or 0
Returns 1 if the first argument is a subset of the second. of the choice which is the second argument.
_fd_unquote_choice fd_lisp x fd_lisp
a lisp object (possibly a choice) a lisp object
Returns a lisp object will be a quoted choice if appropriate
_fd_merge_choices lisp x,lisp y lisp
two objects a non-deterministic set which contains the elements of both
This implicitly frees y (its second argument), while adding its elements to x.
fd_merge_choices lisp x,lisp y lisp
two objects a non-deterministic set which contains the elements of both
Merges two choices, being smart about sorted choices. This may side effect the first argument.
fd_proper_choicep lisp value int
a lisp pointer 1 if the argument is a proper choice, 0 otherwise
A proper choice has no duplicated elements. Note that a non-choice lisp pointer is always "proper" since it has only one element.
fd_return_proper_choice lisp values lisp
a lisp pointer another lisp pointer
If the argument is a non-deterministic set, this returns a "proper set" which contains no duplicate elements.
fd_choice_overlapsp lisp ch1,lisp ch2 int
two lisp objects 1 or 0
Returns 1 if any elements of the first argument overlap elements of the second.
fd_intersect_choices lisp *choices,int size lisp
a C array of LISP pointers and a size a lisp object
Returns the intersection of all the choices in the array. This is optimized to take advantage of sorted choices.
_fd_add_to_choice lisp x,lisp set void
a lisp object and a lisp non-deterministic set nothing
Adds the object (not a copy!) to the non-deterministic set.
_fd_quote_choice fd_lisp x fd_lisp
a lisp object (possibly a choice) a lisp object
Returns a lisp object will be a quoted choice if appropriate

Functions defined in src/cons/xdata.c

fd_alist_to_hashtable | fd_compare_cptrs | fd_cons | fd_copy_cptr | fd_hashtable_to_alist | fd_lisp_hashset_elts | fd_make_complex | fd_make_double_vector | fd_make_error | fd_make_exception | fd_make_float_vector | fd_make_flonum | fd_make_hashset_for_lisp | fd_make_hashtable_for_lisp | fd_make_int_vector | fd_make_packet | fd_make_rational | fd_make_short_vector | fd_make_timestamp | fd_make_xtimestamp | fd_parse_packet | fd_quote_lisp |

Function Arguments Returns
fd_make_rational lisp num,lisp denom lisp
two lisp numbers a lisp rational
fd_lisp_hashset_elts lisp table lisp
a lisp pointer to a hashset a lisp pointer
Returns all the elements of a hashset as a choice.
fd_quote_lisp lisp x lisp
a lisp object another object, which when evaluated, returns the first
This also copies any structure copied to it.
fd_make_complex lisp real,lisp imag lisp
two numbers a lisp complex
fd_cons char *format,... fd_lisp
a format string and a number of args a lisp object
Geneates a lisp object based on the format string. Codes in the format string are interpreted as follows: i integer f long q lisp pointer (will be incref'd) Q lisp pointer (won't be incref'd) s locally encoded string S locally encoded symbol u utf8 encoded string U utf8 encoded symbol (xxx) list with elements {xxx} choice with elements #(xxx) vector with elements
fd_make_short_vector int len,short *data lisp
a float a LISP floating point number
fd_make_hashtable_for_lisp int size lisp
an integer a lisp pointer to a hashtable
fd_make_double_vector int len,double *data lisp
a int length and a pointer to an array of doubles a homongenous double floating point vector
fd_make_hashset_for_lisp int size lisp
an integer a lisp pointer to a hashtable
fd_make_float_vector int len,float *data lisp
a int length and a pointer to an array of floats a homongenous floating point vector
fd_make_flonum double f lisp
a float a LISP floating point number
fd_make_int_vector int len,int *data lisp
an int length and a pointer to an array of ints a homongenous lisp vector of ints
fd_compare_cptrs lisp x,lisp y unsigned int
two cptr objects an unsigned int
Compares the pointers underlying two cptrs. Returns 1 if they are the same.
fd_hashtable_to_alist lisp table lisp
a lisp pointer to a hashtable a lisp association list
Converts a hashtable to an association list
fd_make_timestamp time_t moment lisp
a time_t value a lisp record whose tag is the symbol timestamp
fd_alist_to_hashtable lisp alist lisp
a lisp association list a lisp pointer to a hashtable
Converts an association list to a hashtable
fd_make_xtimestamp time_t moment,int nsecs,fd_tmprec prec,int tzoff lisp
a time_t value, a nanoseconds value, a precision, and a timezone string a lisp record whose tag is the symbol timestamp
fd_copy_cptr lisp x lisp
a cptr object another cptr object
Makes a new reference counting CONS for a wrapped cptr.
fd_parse_packet fd_u8char *string lisp
a utf8 string a lisp pointer to a packet structure
Takes a long hex string and turns it into a packet
fd_make_error lisp data lisp
another lisp object describing some error an error object whose *details* are the given arguments
Note: the details are not copied
fd_make_packet int len,unsigned char *data lisp
an integer and a pointer to an array of bytes a "packet object" containing the array of bytes
Note: the details are not copied
fd_make_exception lisp data lisp
another lisp object describing some exception an exception object whose *details* are the given arguments
Note: the details are not copied

Functions defined in src/cons/consed-oids.c

_fd_not_an_oid | fd_grow_oid_table | fd_make_oid | fd_probe_oid |

Function Arguments Returns
fd_probe_oid FD_OID id lisp
an OID a lisp pointer to the OID object or the empty set
This is like fd_make_oid but doesn't make the oid, only returns it if it exists.
_fd_not_an_oid lisp x struct FD_CONSOID *
a lisp pointer never, but pretends to return an FD_OID pointer
fd_grow_oid_table unsigned int size void
an unsigned int size nothing
Grows the oid table to at least a specified size. This is provided because if you know there will be a lot of object references, you can grow the oid table at first and avoid having to take the time to grow it along the way.
fd_make_oid FD_OID id lisp
an OID address structure a lisp pointer to a OID object with the corresponding address
This is basically the same loop as above with a substitution of FD_COMPARE_OIDS for ==.

Functions defined in src/cons/lightweight-oids.c

Function Arguments Returns

Functions defined in src/cons/libdtypes.c

Function Arguments Returns

Functions defined in src/cons/data.c

FD_MAKE_LIST | _FD_MAKE_LIST1 | _FD_MAKE_PAIR | _fd_copy_lisp_proc | _fd_decref_cons | _fd_incref_cons | fd_copy_string | fd_for_elts | fd_free_proc | fd_get_big_buffer | fd_init_string | fd_init_vector | fd_lisp_equal | fd_list_length | fd_lookup_compound | fd_lookup_package_code | fd_lookup_record | fd_lower_string | fd_make_character | fd_make_cptr | fd_make_lrecord | fd_make_pair | fd_make_record | fd_make_string | fd_make_substring | fd_make_vector | fd_memberp | fd_register_record | fd_register_source_file | fd_register_typecode | fd_stream_string | fd_utf8_string_ref | fd_utf8_strlen | fd_utf8_substring |

Function Arguments Returns
_fd_decref_cons lisp x void
a lisp object void
Increments the GC count for x and reclaims it if appropriate.
_fd_copy_lisp_proc lisp x lisp
a lisp object a copy of the object
This doesn't bother copying fixnums, symbols, objects, or immediates. The macro fd_incref is the identify for such objects and calls _fd_copy_lisp_proc for everything else.
fd_lisp_equal lisp key0, lisp key1 int
two lisp objects the integer 1 if they're EQUAL, 0 if they're not.
_fd_incref_cons lisp x lisp
a lisp pointer its argument
Increments the reference count associated with a cons
fd_make_vector int size lisp
a C integer a vector of a fixed size, initialized to FD_EMPTY_CHOICE
Makes a vector of the given size. A vector is implemented as a record with the tag VECTOR_TAG and a pointer to an array of size and elements.
fd_make_cptr fd_lisp_type tp,void *data fd_lisp
a lisp type and a data pointer a lisp pointer with the type and an allocated refcounter for
the cpointer
fd_copy_string fd_u8char *string lisp
a null-terminated utf8 string a lisp object describing the string
This copies the string argument and also determines if it is UTF-8 or not.
fd_make_substring fd_u8char *start,fd_u8char *end lisp
two pointers into the same utf-8 string a lisp object describing the substring between them
fd_make_pair lisp x, lisp y lisp
two lisp objects a cons pair whose CAR and CDR are the arguments
the arguments *are* incref'd
fd_lower_string fd_u8char *string lisp
a null-terminated utf-8 C string a lisp object describing the lower-cased version of the string
This is useful for canonicalizing strings to look things up in hashtables, etc.
fd_init_string fd_u8char *string,int size lisp
a null-terminated utf8 string a lisp object describing the string
This uses the actual string argument (so it shouldn't be stack consed or subsequently freed by the caller).
fd_make_character unsigned int c lisp
a character the LISP version of the character
fd_utf8_string_ref fd_u8char *str int
a pointer to a UTF-encoded string returns the first unicode character in the string
fd_memberp lisp x,lisp list int
a lisp object and a list of such objects 1 if the object is in the list and 0 otherwise
fd_make_string char *string lisp
a null-terminated localized C string a lisp object describing the string
This does UTF-8 conversion and doesn't use the direct pointer to string.
FD_MAKE_LIST int length,... lisp
an integer followed by several elements a list of elements in order
fd_utf8_strlen fd_u8char *str,int slen int
a pointer to a UTF-encoded string and a length an integer indicating the number of unicode characters
in the string it represents
fd_list_length lisp x unsigned int
a lisp object the number of elements in the object, if it is a list,
or 1 otherwise.
fd_lookup_compound lisp tag struct FD_TYPE_REGISTRY *
a lisp tag a pointer to a record entry or NULL
Returns the record entry for types with the specified compound tag
fd_make_record lisp type_name, void *data lisp
a type specifier (a lisp object), and a pointer to some data a lisp record
fd_free_proc lisp x void
a lisp object nothing
If x is reclaimable (e.g. not a symbol, object, integer, etc), reclaim the storage used by x for future objects. This is used by the inline fd_decref which doesn't bother invoking it on non-reclaimable objects.
_FD_MAKE_PAIR lisp x, lisp y lisp
two lisp objects a cons pair whose CAR and CDR are the arguments
the arguments are not incref'd
fd_lookup_package_code unsigned char package_code,unsigned char subcode struct FD_TYPE_REGISTRY *
a package code and subcode a pointer to a record entry or NULL
Returns the record entry for types with the specified package code and subcode. Note that this looks up the subcode for the "short" version of the packaged data.
fd_register_typecode fd_lisp_type tp struct FD_TYPE_REGISTRY *
a lisp typecode a pointer to a record entry
Returns a record entry for types with a particular typecode. This creates an entry if one does not already exist. Also, if the tag is FD_VOID, it always creates a new entry. (This is useful for types which don't have tags but need special methods like non-deterministic sets.
_FD_MAKE_LIST1 lisp x lisp
a lisp object a list whose first and only element is the argument
fd_for_elts void (*fcn void
a function which returns void from a lisp object and a list of lisp objects nothing
This applies the function to all the elements of the list.
fd_stream_string struct FD_STRING_STREAM *s lisp
a pointer to a string stream a lisp string containing the contents of the stream
This sets the string stream's pointer to NULL and size to zero, so that subsequent modifications signal errors.
fd_register_source_file char *name,char *date,char *details void
three strings -- name, date, and details void
Registers a module. Name is the filename (basename), date is the compilation date for the file, and details is typically the RCSID tag.
fd_init_vector int size,lisp *elts lisp
a C integer and a pointer to a vector of LISP objects a vector of a fixed size with the given elements
Makes a vector of the given size with particular elements. Called by dtio.c to make vectors when reading dtypes.
fd_make_lrecord lisp type_name, lisp data lisp
a type specifier (a lisp object), and another lisp object a lisp record
fd_lookup_record lisp tag struct FD_TYPE_REGISTRY *
a lisp pointer a pointer to a record entry or NULL
Returns the record entry for types whose record tags are the argument given to the function.
fd_utf8_substring fd_u8char *str,int index char *
a pointer to a UTF-encoded string and an integer the substring starting at the interger-th character
fd_register_record lisp tag struct FD_TYPE_REGISTRY *
a lisp pointer a pointer to a record entry
Returns a record entry for types with a particular record tag. This creates an entry if one does not already exist. Also, if the tag is FD_VOID, it always creates a new entry. (This is useful for types which don't have tags but need special methods like non-deterministic sets.
fd_get_big_buffer unsigned int *bufsize char *
a pointer to an int a pointer to a large char array
Allocates a big buffer, with the size determined by the environment variable FD_BUFFER_SIZE or the runtime define FD_BIGBUFF_DEFAULT. This value is stored in the int pointed to by the argument.

Functions defined in src/cons/hash.c

_fd_hashset_add_nc | _fd_hashtable_set_nolock | _fd_set_symbol_value_noref | _fd_symbol_value_noref | fd_choice_to_hashset | fd_cleanup_locked_hashtable | fd_final_hashset_elts | fd_for_all_symbols | fd_free_hashset | fd_free_hashtable | fd_grow_hashset | fd_grow_hashtable | fd_hash_lisp | fd_hashset_add | fd_hashset_drop | fd_hashset_elts | fd_hashset_get | fd_hashset_intern | fd_hashset_probe | fd_hashset_strget | fd_hashtable_add | fd_hashtable_drop | fd_hashtable_get | fd_hashtable_increment | fd_hashtable_increment_existing | fd_hashtable_max | fd_hashtable_probe | fd_hashtable_set | fd_hashtable_skim | fd_hashtable_test | fd_hashtable_zap | fd_init_hashset | fd_init_hashtable | fd_intern | fd_make_hashset | fd_make_hashtable | fd_make_qstring | fd_make_symbol | fd_probe_symbol | fd_reinit_hashset | fd_reinit_hashtable | fd_select_table_size | fd_set_symbol_value | fd_symbol_value |

Function Arguments Returns
fd_reinit_hashtable fd_hashtable h,int minsize,int locked void
a pointer to a hashtable and an int minsize nothing
Reinitializes the table for use with at least minsize slots. This leaves the tables mutex untouched, since someone may be waiting on it.
fd_final_hashset_elts fd_hashset h lisp
a pointer to a hashset a lisp object (possibly a non-deterministic set)
This returns all the values in the hashset and frees the hashset.
fd_init_hashtable fd_hashtable h,int minsize void
a pointer to a hashtable and an int minsize nothing
Initializes the table for use with at least minsize slots. This can be used for either a malloc'd hashtable or a hashtable on the stack.
fd_make_symbol const fd_u8char *pname lisp
a string a lisp pointer to a symbol with that name
This is basically the same loop as above with a substitution of a strcmp for the == test.
fd_hashtable_get fd_hashtable h,lisp key,lisp dflt lisp
a pointer to a hashtable, a lisp key, and a default a lisp object
Returns the value associated with the key in the hashtable or the given default value if there is no such assocation. Note that this does *not* copy the value returned from the table.
fd_hashtable_skim fd_hashtable h,int threshold lisp
a hashtable and an integral threshold a lisp pointer
Returns (as a choice) all the keys in the hashtable whose values are greater than the numeric threshold.
fd_free_hashset struct FD_HASHSET *h void
a pointer to a hashset nothing
Frees the memory taken by a hashset and its elements. Note that this does not free the hashtable itself, since it might be on the stack.
fd_hash_lisp lisp x unsigned int
a lisp pointer an unsigned int
Returns the hash for a lisp object. This hash is *not* portable across sessions.
fd_make_hashset int minsize struct FD_HASHSET *
an int minsize a pointer to a hashtable
This mallocs a new hashset and initializes it to have at least minsize elements.
fd_cleanup_locked_hashtable fd_hashtable h void
a pointer to a hashtable nothing
Removes empty elements from the hashtable.
fd_hashtable_increment_existing fd_hashtable h,lisp key,int increment void
a pointer to a hashtable, a lisp key, and an int nothing
Increments the value associated with the key by a number, doing nothing if the key does not exist.
fd_grow_hashset fd_hashset h,int minsize void
a pointer to a hashset and an int minsize nothing
Grows the hashset to have at least minsize slots
fd_grow_hashtable struct FD_HASHTABLE *h,int minsize void
a pointer to a hashtable and an int minsize nothing
Grows hashtable to have at least minsize slots
fd_reinit_hashset fd_hashset h,int minsize,int locked void
a pointer to a hashtable and an int minsize nothing
Reinitializes the table for use with at least minsize slots. This leaves the tables mutex untouched, since someone may be waiting on it.
_fd_set_symbol_value_noref lisp x,lisp v void
a LISP symbol, another LISP pointer nothing
Threadsafe modifier for the value slot of a symbol which does not do any refcounting or uncounting.
fd_probe_symbol const fd_u8char *pname lisp
a string a lisp pointer to a symbol with that name
This is like fd_make_symbol but doesn't make the symbol, only returning it if it exists.
fd_make_qstring fd_u8char *string_data,int len lisp
a string and a length a lisp pointer to a qstring that is EQUAL to the string
If the length is negative, it is computed.
_fd_symbol_value_noref lisp x lisp
a LISP symbol the symbol's value
Threadsafe accessor for the value slot which doesn't incref the value it returns
fd_init_hashset fd_hashset h,int minsize void
a pointer to a hashset and an int minsize nothing
Initializes the table for use with at least minsize slots. This can be used for either a malloc'd hashtable or a hashtable on the stack.
fd_hashtable_zap fd_hashtable h,lisp key void
a pointer to a hashtable and a lisp key nothing
Removes all values associated key in the hashtable.
fd_set_symbol_value lisp x,lisp v void
a LISP symbol, another LISP pointer nothing
Threadsafe modifier for the value slot of a symbol.
fd_hashtable_increment fd_hashtable h,lisp key,int increment void
a pointer to a hashtable, a lisp key, and an int nothing
Increments the value associated with the key by a number, simply storing the number if no value is currently associated.
fd_hashtable_test fd_hashtable h,lisp key,lisp value int
a pointer to a hashtable, a lisp key, and a lisp value 1 or 0
Returns 1 if the value is one of the values associated with the key
fd_hashset_get fd_hashset h,lisp key int
a pointer to a hashtable and a lisp key 1 or 0
Returns 1 if the given key is in the hashset.
fd_free_hashtable struct FD_HASHTABLE *h void
a pointer to a hashtable nothing
Frees the memory taken by a hashtable and its elements. Note that this does not free the hashtable itself, since it might be on the stack.
fd_symbol_value lisp x lisp
a LISP symbol the symbol's value
Threadsafe accessor for the value slot which increfs the value it returns
fd_hashtable_drop fd_hashtable h,lisp key,lisp value void
a pointer to a hashtable, a lisp key, and a value nothing
Removes a value from the values associated with key in the hashtable.
fd_hashtable_add fd_hashtable h,lisp key,lisp value void
a pointer to a hashtable, a lisp key, and a value nothing
Adds a value to the values associated with key in the hashtable. If the key is already associated with multiple values, a copy of the new value is added to it. If there is one association, a new non-deterministic set is created. And if there is not association, this is just the same as fd_hashtable_set.
fd_for_all_symbols void (*fcn void
a function on lisp pointers which returns void nothing
Applies the function to every symbol in the symbol table.
fd_hashtable_probe fd_hashtable h,lisp key int
a pointer to a hashtable, a lisp key 1 or 0
Returns 1 if the key is associated with some value in the table.
fd_select_table_size unsigned int min unsigned int
an unsigned int (min) an unsigned int greater than min
Selects a hashtable/index size greater than min.
fd_hashset_probe fd_hashset h,lisp key lisp
a pointer to a hashset and a lisp key a value EQUAL to the key in the hashset
Adds a cref of a key to the hashset (if it doesn't already contain it), otherwise returns the pointer already there
fd_hashtable_set fd_hashtable h,lisp key,lisp value void
a pointer to a hashtable, a lisp key, and a value nothing
Associates the value with the key in the hashtable. If the key is new it copies both key and value; if the key already had an association, that value is freed and a copy of the new value replaces it.
fd_hashset_strget fd_hashset h,fd_u8char *keystring,int len int
a pointer to a hashtable and a string 1 or 0
Returns 1 if the a LISP copy of string is in the hashset.
fd_intern const fd_u8char *name,int len fd_lisp
a pointer to a string and a int length a lisp pointer to a symbol whose name is the string capitalized
Returns an interned symbol whose name is a capitalized version of name.
_fd_hashset_add_nc fd_hashset h,lisp key int
a pointer to a hashset and a lisp key 1 if the value wasn't already there
Adds a key (not a copy!) to the hashset.
fd_hashset_elts fd_hashset h lisp
a pointer to a hashset a lisp object (possibly a non-deterministic set)
This returns all the values in the hashset.
_fd_hashtable_set_nolock fd_hashtable h,lisp key,lisp value void
a pointer to a hashtable, a lisp key, and a value nothing
Associates the value with the key in the hashtable. If the key is new it copies both key and value; if the key already had an association, that value is freed and a copy of the new value replaces it.
fd_hashset_add fd_hashset h,lisp key int
a pointer to a hashset and a lisp key 1 if the value wasn't already there
Adds a cref of a key to the hashset (if it doesn't already contain it).
fd_hashset_intern fd_hashset h,lisp key lisp
a pointer to a hashset and a lisp key a value EQUAL to the key in the hashset
Adds a cref of a key to the hashset (if it doesn't already contain it), otherwise returns the pointer already there
fd_make_hashtable int minsize struct FD_HASHTABLE *
an int minsize a pointer to a hashtable
This mallocs a new hashtable and initializes it to have at least minsize elements.
fd_hashset_drop fd_hashset h,lisp key void
a pointer to a hashtable and a lisp key nothing
"Removes" the key from the hashset by replacing it with FD_VOID. Note that this doesn't save any space, but the search algorithm will just skip over it rather than returning it.
fd_hashtable_max fd_hashtable h lisp
a hashtable a lisp pointer
Returns the keys in the hashtable whose values are numerically maximum.
fd_choice_to_hashset lisp values fd_hashset
a pointer to a hashset a lisp object (possibly a non-deterministic set)
This returns all the values in the hashset.
{}

Functions defined in src/odb/file-pool.c

fd_cache_file_pool | fd_file_pool_capacity | fd_file_pool_freespace | fd_file_pool_load | fd_label_file_pool | fd_lock_file_pool | fd_make_file_pool | fd_make_new_super_pool | fd_make_pool_snapshot | fd_make_super_pool | fd_new_file_pool | fd_read_file_pool_metadata | fd_register_file_pool_opener | fd_use_file_pool |

Function Arguments Returns
fd_make_file_pool char *filename,FD_OID base, unsigned int capacity, int major_version,fd_lisp metadata void
pointer to an object ID (oid) capacity (unsigned int) filename (string pointer) void
Creates an empty file pool on disk which can be subsequently opened or added.
fd_make_super_pool char *filename,unsigned int base,unsigned int load unsigned int
a filename, a base id, and a load the base id
Creates a new super pool file. The base id is specifies the high half of the base of the super pool and the load declares how many OIDs are already "pre allocated" from the super pool.
fd_read_file_pool_metadata FILE *f,int *revnum,int *size,time_t *make,time_t *repack,time_t *change fd_lisp
an open file stream to a file pool and pointers to two ints a lisp object (or the empty choice)
Returns metadata and version information for a file pool. The version information, consisting of a serial repack ID and a file length, are written into the two integer pointers. Since modifications always write at the end of the file, the repack serial number and the length of the file uniquely identify a moment in time for the file.
fd_file_pool_freespace fd_u8char *filename unsigned int
a pathname (a string) an unsigned int
Returns the number of unallocated OIDs in the specified file pool. This operates without actually "using the pool".
fd_make_pool_snapshot char *filename,char *snapshot void
two filenames the base id
Creates a "snapshot" of a specified file pool. This is basically a copy of the pools offset table and load information, which can be used to reconstitute the state of the pool. This takes advantage of the fact that pools don't write over values until they are repacked.
fd_lock_file_pool fd_file_pool p int
a pointer to a file pool 1 on success
Attempts to lock the file storing pool.
fd_new_file_pool char *filename,unsigned int capacity,char *super_pool void
a filename (localized string), a capacity (unsigned int), and a super pool id (localized string) void
Creates a new, empty, file pool with a particular capacity from a specified super pool.
fd_label_file_pool char *filename,lisp label void
a string, and a lisp object void
Modifies a file pool to have a given label.
fd_make_new_super_pool char *filename unsigned int
a filename the base id
Creates a new super pool file with a random base id (based on the time and process id). This will not allocated in the first thousand super pools.
fd_register_file_pool_opener int magic_no,fd_pool (*opener void
a magic number and an opening function void
This associates an opening function with a number which is the first word of the file to use this opener.
fd_use_file_pool fd_u8char *fname fd_pool
a string naming a file a pointer to a file pool structure
Errors: Cannot open pool (signalled by fd_open_file_pool) Side effects: Creates a file pool structure for the named file Adds a pointer to the pool structure to _fd_pool_table
fd_file_pool_load fd_u8char *filename unsigned int
a pathname (a string) an unsigned int
Returns the number of allocated OIDs in the specified file pool. This operates without actually "using the pool".
fd_file_pool_capacity fd_u8char *filename unsigned int
a pathname (a string) an unsigned int
Returns the total number of possible OIDs in the specified file pool. This operates without actually "using the pool".
fd_cache_file_pool fd_pool p void
pointer to a file pool structure void
Initializes a cache for the file pool, reducing the need for disk access and repositioning.

Functions defined in src/index/portahash.c

Function Arguments Returns

Functions defined in src/index/file-index.c

fd_dtype_compare | fd_file_index_collect_values | fd_index_report_stats | fd_preload_file_index | fd_register_file_index_opener | fd_unpreload_file_index | object |

Function Arguments Returns
fd_file_index_collect_values fd_file_index ix,unsigned int loc,unsigned int size lisp
a file stream a "result set"
This reads a linked list stored in a binary file and generates a lisp list from its elements. It returns a "result set" which consists of a size and a list of elements.
fd_index_report_stats FILE *stream void
none void
Prints a report on hash table chaining behavior.
fd_register_file_index_opener int magic_no,fd_index (*opener void
a magic number and an opening function void
This associates an opening function with a number which is the first word of the file to use this opener.
object or the empty choice FRAMERD_EXPORT /* fd_read_file_index_metadata: Arguments: an open file stream to a file index and pointers to two ints Returns: a lisp
an open file stream to a file index, and pointers to two ints a lisp object (or the empty choice)
Returns metadata and version information for a file index. The version information, consisting of a serial repack ID and a file length, are written into the two int pointers. Since modifications always write at the end of the file, the repack serial number and the length of the file uniquely identify a moment in time for the file.
fd_dtype_compare lisp key,FILE *stream int
a lisp object and a file stream boolean (int)
This returns true if the dtype representation on the file stream is equal to the lisp object it is handed. If it returns true (1), the file is positioned at the end of the dtype representation.
fd_unpreload_file_index fd_index idx_arg void
a pointer to an index void
Reinits the size cache and basically undoes the effects of fd_preload_file_index.
fd_preload_file_index fd_index idx_arg void
a pointer to an index void
This loads up the file indices size cache with all of the keys in the table. In addition to providing a fast cache of frequency information, this allows fetching to determine if there is a value without actually going to disk.

Functions defined in src/odb/frames.c

fd_already_doing_p | fd_clear_slot_cache | fd_copy_frame | fd_describe_slot | fd_disable_slot_cache | fd_enable_slot_cache | fd_for_slots | fd_frame_add | fd_frame_create | fd_frame_get | fd_frame_get_star | fd_frame_remove | fd_frame_set | fd_frame_slots | fd_frame_test | fd_get_slotmap | fd_inherit_values | fd_inherits_valuep | fd_overlay_create | fd_overlay_get | fd_overlay_test | fd_pathp | fd_prim_add | fd_prim_add_consed | fd_prim_drop | fd_prim_get | fd_prim_set | fd_prim_set_consed | fd_prim_test | fd_use_autoindex |

Function Arguments Returns
fd_for_slots void (*fcn void
a function on three lisp objects and a lisp object void
Applies the function to the frame and each of its attributes and values.
fd_get_slotmap lisp arg lisp
a lisp pointer a lisp pointer
If arg is a slotmap, it is cref'd and returned; if arg is an OID whose value is a slotmap, that slotmap is returned if arg is an OID whose value is a choice, one of which is a slotmap, that slotmap is returned
fd_inherit_values lisp root,lisp slotid,lisp through lisp
a frame and two slotids a lisp pointer
Searches for a value for the first slotid through the lattice defined by the second slotid.
fd_frame_set lisp frame,lisp slotid,lisp value void
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) void
Modifies the given attribute (slotid) of frame so that it has values, removing and adding values as neccessary.
fd_prim_drop lisp frame,lisp slotid,lisp value void
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) void
Removes the designated value from the designated attribute of a frame Note: the attribute name is compared with ==, meaning that it can be a symbol, fixnum, ascii or unicode character, boolean, or an object
fd_prim_set_consed lisp frame,lisp slotid,lisp value void
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) void
Just like fd_prim_set, but frees the value it was passed (the frame still keeps its pointer. This is a convenience function for passing consed values as arguments.
fd_overlay_get lisp frame,lisp slotid lisp
a frame (slotmap or OID evaluating to one) and a slotid a lisp pointer
Does inheritance through OID values on annotated frames.
fd_frame_remove lisp frame,lisp slotid,lisp value void
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) void
If a frame already possesses the named attribute whose value contains the given value, it is removed. If that would make the attribute value empty, it is replaced with FD_EMPTY_CHOICE; if that would make the attribute value a singleton, it is replaced with just that value. If the slot is itself an oid and the value removed is actually present, then the remove-effects demons of the slot are evaluated.
fd_frame_add lisp frame,lisp slotid,lisp value void
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) void
If a frame already possesses the named attribute, the value is added to its set of values (if it's value isn't a set, it is made one). If the slot is itself an oid and the value stored is new (not currently in the attribute's set of values), then the add-effects demons of the slot are evaluated. Side effects: May replace the slot/value vector of a slotmap to add an attribute Refcounts or copies the value given it (sets are copied) Note: the attribute name is compared with ==, meaning that it can be a symbol, fixnum, ascii or unicode character, boolean, or an oid
fd_use_autoindex fd_index ix void
a pointer to an index void
Sets up a particular index for automatically recording changed and new slot values.
fd_copy_frame lisp original,fd_pool x lisp
a frame and a pool a pointer to a new frame (oid)
This creates a new object in the pool and initializes its value to be a slotmap copying another object's stotmap, thus making it a frame.
fd_prim_add_consed lisp frame,lisp slotid,lisp value void
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) void
Just like fd_prim_add, but frees the value it was passed (the frame still keeps its pointer. This is for passing consed values as arguments.
fd_describe_slot FILE *stream,lisp slotid,lisp value void
an attribute name and a value void
Describes a slot and its value to a stream.
fd_frame_test lisp frame,lisp slotid,lisp value int
a frame, a slotid, and a value 1 if the value is on the slot, 0 otherwise
If the slot is an oid, this may use the TEST-METHODS and GET-METHODS of the slot. Otherwise, it just checks for membership in the corresponding value. Note: the attribute name is compared with ==, meaning that it can be a symbol, fixnum, ascii or unicode character, boolean, or an oid pointer
fd_clear_slot_cache lisp slotid,lisp frame void
slotid, frame void
Clears cached entries for slotid and frame, clearing all entries if frame is FD_VOID
fd_frame_slots lisp frames fd_lisp
a frame a set of slot ids
Returns the current slot ids with associations on the frame
fd_prim_get lisp frame,lisp slotid lisp
a frame and an attribute name (a lisp pointer) a lisp pointer
Returns either the value associated with the attribute or FD_EMPTY_CHOICE if no such attribute exists; this value is computed from the attribute value if the slot is an object identifier. Note: the attribute name is compared with ==, meaning that it can be a symbol, fixnum, ascii or unicode character, boolean, or an object pointer
fd_prim_test lisp frame,lisp slotid,lisp value int
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) 1 or 0
Returns 1 if the named attribute of the frame contains a value
fd_pathp lisp root,lisp slotid,lisp to int
a frame, a slotid, and a frame 1 or 0
Returns 1 if there is a path through slotid between the two frames
fd_overlay_test lisp frame,lisp slotid,lisp value int
a frame (slotmap or OID evaluating to one), a slotid, and a value 1 or 0
Does inheritance through OID values on annotated frames, determining if a slotid is associated with a particular value.
fd_enable_slot_cache lisp slotid void
slotid void
Enables caching on the slot SLOTID
fd_prim_add lisp frame,lisp slotid,lisp value void
a frame, an attribute name (a lisp pointer), and a value (a lisp pointer) void
If the frame already possess the named attribute, the specified value is added to the current one; otherwise, the attribute is added to the frame with the corresponding value. Side effects: May replace the slot/value vector of a slotmap to add an attribute Refcounts or copies the value given it (sets are copied) Note: the attribute name is compared with ==, meaning that it can be a symbol, fixnum, ascii or unicode character, boolean, or an object
fd_overlay_create fd_pool x,lisp value lisp
a pool and a frame a pointer to a frame (oid)
This creates a new oid in the pool and initializes its value to be both a slotmap and a pointer to a frame
fd_frame_create fd_pool x lisp
a pool a pointer to a frame (oid)
This creates a new oid in the pool and initializes its value to be a slotmap, thus making it a frame.
fd_frame_get lisp frame,lisp slotid lisp
a frame and an attribute name (a lisp pointer) either the value associated with the attribute
or FD_EMPTY_CHOICE if no such attribute exists (The return value is a copy which may need to be freed). Note: the attribute name is compared with ==, meaning that it can be a symbol, fixnum, ascii or unicode character, boolean, or an oid pointer
fd_prim_set lisp frame,lisp slotid,lisp value void
a frame, a slotid (a lisp pointer), and a value (a lisp pointer) void
If the frame already possess the named attribute, its value is replaced with the new one; otherwise, the attribute is added to the frame with the corresponding value. Side effects: May replace the slot/value vector of a slotmap to add an attribute Frees the previous value of the attribute (if it exists) Refcounts or copies the value given it (sets are copied) Note: the attribute name is compared with ==, meaning that it can be a symbol, fixnum, ascii or unicode character, boolean, or an object
fd_disable_slot_cache lisp slotid void
slotid void
Disables caching on the slot SLOTID
fd_frame_get_star fd_lisp frames,fd_lisp slotids fd_lisp
a choice of frames and a choice of slotids the kleene star of the slotids on the frames
fd_inherits_valuep lisp root,lisp slotid,lisp through,lisp value int
a frame, two slotids, and a value 1 or 0
Returns 1 if the value can be inherited for the first slotid going through the lattice defined by the second slotid.
fd_already_doing_p slot_op op,lisp frame,lisp slotid,lisp value int
a slot operation, a frame, slot, and value 1 or 0
Returns 1 if the frame system is already doing a slot operation. (This causes most slot operations to return the empty choice).

Functions defined in src/index/search.c

fd_find_frames | fd_find_similar | fd_get_frame_features | fd_get_slot_features | fd_index_frame | fd_index_notice_slot_values | fd_index_slot_values | fd_index_slots | fd_score_from_samples | fd_score_from_spec | fd_strict_search |

Function Arguments Returns
fd_score_from_spec lisp indices,lisp frames,lisp spec fd_hashtable
an index, a set of frames, and a list of feature sets a hashtable of frames and scores
Computes similarity scores to based on the feature sets If the set of frames argument is void, all candidates are scored; otherwise, only the specified frames are scored.
fd_find_similar lisp indices,lisp frames,lisp slots lisp
an index, a set of frames, and a set of slots a set of frames
Finds all frames in that have some in common with
fd_get_frame_features lisp frames lisp
a frame (or set of frames) a set of features based on those on the slots of FRAMES
Gets the features of FRAME based on all of its slots.
fd_score_from_samples lisp indices,lisp frames,lisp samples,lisp slots fd_hashtable
an index, a set of frames, a set of samples, and a set of slotids a hashtable of frames and scores
Computes similarity scores to based on slotids and index. If the set of frames argument is void, all candidates are scored; otherwise, only the specified frames are scored.
fd_find_frames lisp indices,... lisp
a set of indices and a series of slot and value sets terminated by a FD_VOID a set of frames
This is a C version of the FDSCRIPT strict searching function It returns those frames indexed as having each of the slots with at least of the subsequent values
fd_index_frame fd_index idx,lisp frame void
a frame and an index nothing
Indexes an object based on its slot values.
fd_index_slots fd_index idx,lisp frame,lisp slots void
a frame (or set of frames), an index, and a set of slots nothing
Indexes the frame (or set of frames) based on the specified slots
fd_index_notice_slot_values fd_index idx,lisp frames,lisp slots,lisp values void
a frame (or set of frames), an index, a set of slots, and a set of values nothing
Indexes the frame (or set of frames) based on the specified slots This doesn't force slots to be indexed, so stop-features works.
fd_get_slot_features lisp frames,lisp slots lisp
a frame (or set of frames) and a slot (or set of slots) a set of features based on those slots of those frames
Gets the features of FRAME on SLOTS.
fd_index_slot_values fd_index idx,lisp frames,lisp slotids,lisp values void
a frame (or set of frames), an index, a set of slots, and a set of values nothing
Indexes the frame (or set of frames) based on the specified slots
fd_strict_search lisp indices,lisp spec lisp
an index (or set/choice of indices) and a list of sets/choices of features a set of objects
Returns all objects recorded in indices which have one of each set of features in the provided list

Functions defined in src/index/index.c

fd_close_index | fd_commit_index | fd_find_index | fd_for_indices | fd_index_add | fd_index_drop | fd_index_get | fd_index_get_size | fd_index_keys | fd_index_prefetch | fd_index_set | fd_index_set_sizes | fd_intern_index_values | fd_interpret_index | fd_revert_index | fd_set_index_zipf_threshold | fd_swap_out_index | fd_use_index |

Function Arguments Returns
fd_find_index fd_u8char *id fd_index
a string a pointer to an index or NULL
Returns the index whose id matches the given string.
fd_index_drop fd_index x,lisp key,lisp value void
an index pointer, a lisp key, a lisp value an index
Removes the values from the values associated with the key in the index.
fd_index_get_size fd_index x,lisp key unsigned int
an index pointer, a lisp key the number of values associated with the key in the index
Returns the number of values associated with the key in the index
fd_revert_index fd_index x void
a pointer to an index nothing
Erases all of the changes made to the specified index.
fd_set_index_zipf_threshold fd_index ix,int threshold void
an index, an integer nothing
Sets the save threshold for an index, so that keys with fewer than threshold values will not be written to disk or server
fd_intern_index_values fd_index x void
an index pointer void
Arranges for an index to intern the values it stores
fd_index_prefetch fd_index x,lisp keys void
an index pointer, and a choice of keys an index
Prefetches the values for particular keys.
fd_commit_index fd_index x void
a pointer to an index nothing
Saves the changes made to the specified index.
fd_interpret_index lisp spec fd_index
an expression and an environment a pointer to an index
Evaluates the expression in the environment and tries to produce an index object from the result.
fd_index_set_sizes fd_index x,int cache_size,int adds_size,int drops_size,int sizes_size void
a pointer to an index nothing
Grows the internal tables for an index to accomodate n keys and n mods
fd_index_keys fd_index idx lisp
a pointer to an index nothing
Non-deterministically returns all the keys in an index.
fd_for_indices void (*fcn void
a function on pointers to indices nothing
Calls the function on all registered indices.
fd_use_index fd_u8char *spec fd_index
a string an index
Returns an index object based on the string argument. If the string has the form "port@host" it is taken to be a network index; otherwise, it is taken to be a file index which is opened.
fd_index_add fd_index x,lisp key,lisp value void
an index pointer, a lisp key, a lisp value an index
Adds the value to the values associated with the key in the index.
fd_close_index fd_index idx void
a pointer to an index nothing
Closes an index
fd_index_get fd_index x,lisp key,lisp dflt lisp
an index pointer, a lisp key, and a default value the values associated with the key in the index
Returns the values associated with the key in the index or the default value if there are none.
fd_swap_out_index fd_index x void
a pointer to an index nothing
Frees most of the space used by the cached values of an index.
fd_index_set fd_index x,lisp key,lisp value void
an index pointer, a lisp key, a lisp value an index
Sets the values associated with the key in the index.

Functions defined in src/odb/super-pool.c

fd_allocate_pool | fd_recovered_pool | fd_super_pool_base | fd_super_pool_loading | fd_super_pool_top |

Function Arguments Returns
fd_allocate_pool char *super_pool,unsigned int capacity,char *label FD_OID
a super pool id, a capacity, and a string label an FD_OID
Allocates a new pool from a designated super pool with a particular capacity, returning the base of the new pool.
fd_recovered_pool char *super_pool,FD_OID base,unsigned int capacity,lisp sp_label FD_OID
a super pool id, a base, a capacity, and a lisp pointer label an FD_OID
Asserts lost information about a pool in a super pool.
fd_super_pool_top char *id FD_OID
a super pool id an FD_OID
Returns the highest allocated FD_OID in a super pool
fd_super_pool_loading char *id float
a super pool id a float
Returns the fraction of the super pool which is allocated
fd_super_pool_base char *id FD_OID
a super pool id an FD_OID
Returns the base of a super pool (e.g. @sp_id/0)

Functions defined in src/odb/network-pool.c

fd_use_network_pool |

Function Arguments Returns
fd_use_network_pool char *servername,int port,fd_u8char *id fd_network_pool
a port number, a host name, and an id string a pointer to a networked pool structure
Errors: Cannot connect to server Side effects: Creates a networked pool structure for the server Adds a pointer to the pool structure to fd_all_pools

Functions defined in src/odb/odb.c

fd_close_pool | fd_commit_oid | fd_control_frame_printing | fd_get_modified | fd_get_oid_value | fd_mark_modified | fd_new_oid | fd_oid_modifiedp | fd_print_oid | fd_revert_oid | fd_revert_pool | fd_set_oid_value | fd_show_poolids | fd_swap_out | fd_swap_out_pool | fd_try_oid_value |

Function Arguments Returns
fd_close_pool fd_pool p void
a pointer to a pool void
Closes open file pointers or network connections underlying the pool.
fd_control_frame_printing int level void
an integral print level void
Controls the printing of oids If print level is 0, names are never printed If print level is 1, names are printed for loaded oids If print level is 2, names are always printed and oids are loaded when printed
fd_get_oid_value lisp oid lisp
a lisp pointer to an oid a lisp pointer
Gets the value of an OID, doing fetching from files or network as neccessary.
fd_set_oid_value lisp oid,lisp value void
a lisp pointer to an oid and a lisp pointer to a value none
This sets the value of an oid (its first argument) to a new value (its second argument). fd_set_oid_value refcounts or copies the second argument (if it's a choice) Errors: Cannot modify oid Side effects: Frees the old value of the oid Changes the value field of the oid Adds the oid to its pools "modified objects"
fd_mark_modified lisp oid void
a lisp pointer to an oid void
Marks the designated OID as modified and signals an error if it cannot be modified.
fd_show_poolids int use_ids void
1 or 0 void
Determines if pool ids are used to print OIDs.
fd_swap_out_pool fd_pool p void
a pointer to a pool void
Frees any space being used for the values of unmodified OIDs in pool. It doesn't do anything about committing changes.
fd_try_oid_value lisp oid lisp
a lisp pointer to an oid a lisp pointer
Gets the value of an OID, doing fetching from files or network as neccessary. If an error occurs, this will return FD_VOID rather than signalling the error.
fd_commit_oid lisp oid int
a lisp pointer to an oid 1 if successful, 0 otherwise
Commits any changes to an oid using pool specific methods, as appropriate.
fd_print_oid lisp frame,fd_string_stream ss void
a lisp pointer (to an `oid') and a string stream nothing
Outputs an external representation of the oid, consisting of its ID followed by its OBJ-NAME slot (if it exists).
fd_swap_out lisp oid void
a lisp pointer to an oid none
If this oid's value has not been modified, it is freed and the oid declared "non present", allowing it to be reloaded later if its value is needed.
fd_oid_modifiedp lisp oid int
a lisp pointer to an oid 1 or 0
Returns 1 if the oid has usaved modifications.
fd_revert_oid lisp oid int
a lisp pointer to an oid 1 if successful, 0 otherwise
Erases any uncommited changes to the designated oid.
fd_new_oid fd_pool p lisp
a pointer to a pool structure a new oid in the pool
Errors: Pool is used up Side effects: Increments the load of a file pool or Updates the load on a remote server
fd_revert_pool fd_pool p void
a pointer to a pool void
Erases any uncommited changes to the oids in the pool.
fd_get_modified fd_pool p,int *n_oids,int reset fd_lisp *
a pointer to a pool, a result pointer to an int, and a flag a pointer to an array of lisp pointers
Returns an array of all the modified OIDs Marks the designated OID as modified and signals an error if it cannot be modified.

Functions defined in src/odb/pools.c

fd_commit_pool | fd_find_pool_named | fd_for_pools | fd_get_pool | fd_interpret_pool | fd_locate_pool | fd_pool_load | fd_random_oid | fd_register_pool | fd_set_oid_locator | fd_use_pool |

Function Arguments Returns
fd_get_pool lisp id fd_pool
a lisp pointer to an OID a pointer to a pool
Finds the pool containing an oid.
fd_random_oid fd_pool p lisp
a pointer to a pool an lisp pointer to an oid (or the empty choice)
Returns a random allocated OID in pool, or the empty choice if the pool is empty.
fd_for_pools void (*fcn void
a function on a pool pointer and a void pointer and a void data pointer void
Applies the function to each known pool and the data pointer passed to the call (got that?).
fd_interpret_pool lisp spec fd_pool
an expression and an environment a pointer to a pool
Evaluates the expression in the environment and tries to produce an index object from the result.
fd_commit_pool fd_pool p void
a pool nothing
fd_find_pool_named fd_u8char *name fd_pool
a utf-8 string a pointer to a pool or NULL
Returns the pool which has been assigned the designated name.
fd_register_pool fd_pool p int
a pointer to a pool void
Adds an entry for the pool to the pool table, doing nothing if it is already there and signalling an error if the pool overlaps with a currently registered pool.
fd_set_oid_locator fd_pool (*ol void
a function which maps OIDs to pools nothing
Sets the OID locator function for this session, which takes an OID and returns its pool. This function is only called if the pool is not already known, so the purpose of the oid locator is to find otherwise undeclared pools.
fd_pool_load fd_pool p int
a pointer to a pool an int
Returns the number of OIDs allocated in pool.
fd_locate_pool lisp loid fd_pool
a lisp pointer (to an OID) a pointer to a pool or NULL
This is just like fd_get_pool, but will try harder, calling locator functions to try pools which haven't been explicitly registered.
fd_use_pool fd_u8char *c fd_pool
a pool specification a pool
Returns a pool based on a specification. The specification either has the form port@host indicating a server or a filename indicating a file pool.

Functions defined in src/odb/libframerd.c

fd_report_framerd_stats |

Function Arguments Returns
fd_report_framerd_stats FILE *to void
none void
Reports framerd stats to the standard error.

Functions defined in src/index/network-index.c

fd_use_network_index |

Function Arguments Returns
fd_use_network_index char *servname,int port_no,fd_u8char *id fd_network_index
servername (a string), port_no (an int), and id (a utf8 string) a pointer to a network index struct
Finds or creates (if neccessary) a network index served by the specified servername and port.
{}

Functions defined in src/eval/load.c

fd_get_module | fd_load_file | fd_load_library |

Function Arguments Returns
fd_load_file char *filename,char *enc,fd_lispenv env lisp
a filename string, an encoding string, an environment a lisp pointer
Loads a file into a particular environment with a particular encoding.
fd_get_module fd_u8char *name,fd_u8char *filename,int all fd_lispenv
a module name, a filename, and an int flag a pointer to a lispenv or NULL
Returns the module with the given name, loading it from filename if needed. If filename is non-NULL, it is used to load the module's definition. The final flag argument determines whether the search includes modules which have restricted access.
fd_load_library char *filename,char *enc,fd_lispenv env lisp
a filename string, an encoding string, an environment a lisp pointer
Loads a file into a particular environment with a particular encoding. This searches for the file along FDMYPATH and FDPATH.

Functions defined in src/eval/libfdeval.c

Function Arguments Returns

Functions defined in src/eval/threads.c

fd_thread_symbind | fd_thread_symeval |

Function Arguments Returns
fd_thread_symeval lisp sym lisp
a lisp symbol a lisp value
Returns the thread-local value assigned to a symbol. This increfs the value it returns.
fd_thread_symbind lisp sym,lisp value void
a lisp symbol and a lisp value void
Assigns a thread-local value to a symbol. The value is `used up' in the assignment.

Functions defined in src/eval/sandbox.c

fd_add_restricted_cproc | fd_add_restricted_lexpr | fd_add_restricted_special_form |

Function Arguments Returns
fd_add_restricted_cproc char *name,int n_args,lisp (*proc void
a string, an int, and a function pointer void
Defines a primitive procedure in the standard restricted environment.
fd_add_restricted_special_form char *name,lisp (*proc void
a string, an int, and a function pointer void
Defines a primitive special form in the standard restricted environment.
fd_add_restricted_lexpr char *name,int argcode,lisp (*proc void
a string, an int, and a function pointer void
Defines a primitive lexpr in the standard restricted environment.

Functions defined in src/eval/lambda.c

fd_bind_value | fd_free_env | fd_make_env | fd_make_gproc | fd_make_sproc | fd_make_ssproc | fd_mallocd_env | fd_module_export | fd_module_uses | fd_register_module | fd_register_restricted_module | fd_registered_module | fd_required_symeval | fd_safe_set_value | fd_set_value | fd_symeval |

Function Arguments Returns
fd_set_value lisp sym,lisp val,lispenv env void
a symbol, a value, and an environment void
Sets the binding for symbol in an environment chain, setting it in the innermost module or the global environment if the variable is not directly bound.
fd_free_env fd_lispenv env void
an environment void
Frees a dynamically allocated environment
fd_mallocd_env fd_lispenv env fd_lispenv
an environment a dynamically allocated environment
Returns the existing dynamic copy of an environment or makes one if one doesn't exist.
fd_registered_module fd_u8char *name,int risky fd_lispenv
a string a lisp environment
Returns a module environment, register
fd_required_symeval fd_lisp sym,lispenv env fd_lisp
a lisp symbol and an environment (possibly NULL) a lisp object (cref'd)
Does an environment lookup (using fd_symeval) but signals an error if it fails
fd_module_uses fd_lispenv env,fd_lispenv use void
two pointers to modules void
Adds the second argument to the uses for the first argument, if it is not already included.
fd_make_gproc lisp lambda,lispenv env lisp
a lisp lambda expression and an environment a procedure object closing the expression in the environment
fd_make_sproc lisp lambda,lispenv env lisp
a lisp lambda expression and an environment a procedure object closing the expression in the environment
fd_register_module fd_u8char *name,fd_lispenv menv void
a string and an environment void
Binds the named symbol to the environment in the global environment. This will signal an error if the global binding is not VOID.
fd_safe_set_value lisp sym,lisp val,lispenv env void
a symbol, a value, and an environment void
Sets the value for a variable, but never effecting the global environment.
fd_make_env fd_lispenv env fd_lispenv
a parent environment a new environment
This dynamically allocates a new environment with a specified parent.
fd_symeval fd_lisp sym,lispenv env fd_lisp
a lisp symbol and an environment (possibly NULL) a lisp object (not cref'd)
This looks up a symbol, handling both lexical references, module references, and global references.
fd_make_ssproc lisp lambda,lispenv env lisp
a lisp lambda expression and an environment a procedure object closing the expression in the environment
with a lock for synchronizing application.
fd_bind_value lisp sym,lisp val,lispenv env void
a symbol, a value, and an environment 1 on success, 0 on failure
Sets the binding for symbol in the first frame of environment or creates a new one if one does not exist. Returns 1 if a new binding had to be created.
fd_register_restricted_module fd_u8char *name,fd_lispenv menv void
a string and an environment void
Binds the named symbol to the environment in the restricted environment. This will signal an error if the global binding is not VOID.
fd_module_export fd_lispenv modenv,lisp symbol void
a pointer to a module and a lisp symbol void
Arranges for the module to export the specified symbol.

Functions defined in src/eval/mini.c

Function Arguments Returns

Functions defined in src/eval/ndeval.c

Function Arguments Returns

Functions defined in src/eval/eval.c

_fd_finalize_static_tail_call | fd_add_alias | fd_add_cproc | fd_add_lexpr | fd_add_special_form | fd_do_application | fd_eval | fd_eval_elts | fd_eval_in_env | fd_evalstring | fd_finish_value | fd_make_rproc | fd_mv_arity | fd_mv_ref | fd_mv_return | fd_record_typep | fd_set_supertype | fd_start_eval | fd_streval |

Function Arguments Returns
fd_make_rproc fd_server s,lisp op lisp
a server id and a remote op name, both lisp pointers an rproc to invoke the op name on the named server
fd_do_application lisp fcn,lisp argvalues lisp
two lisp values, a procedure and a list of arguments a value or a tail call resulting from applying the
procedure to the arguments.
fd_eval_elts lisp lst,lispenv env lisp
a list of expressions a list of objects
Returns the result of evaluating each element of a list in an environment. Actual implementation is above.
fd_mv_return lisp *x,int len fd_lisp
a pointer to an array of lisp pointers and a int length a multiple value object whose elements are the elements
of the array (copied into a new array)
fd_eval lisp expr lisp
an expression a lisp pointer
Evaluates an expression in the top level environment. It's argument is not gc'd.
fd_add_alias fd_lispenv env,char *alias,char *name void
a null terminated string, an argument count, and a pointer to a C function nothing (void)
Defines a new FDScript primitive which is the same as another existing primitive. This saves a little consing in that it simply keeps a pointer to the primitive struct rather than making a new one. It inherits the safety information of the procedure it is aliasing.
fd_add_lexpr fd_lispenv env,char *name,int argcode,lisp (*proc void
a null terminated string and a pointer to a C function nothing (void)
Defines a new FDScript primitive which accepts any number of arguments. The C function is called on a single lisp object, pointing to a list of arguments. Note that any non-deterministic arguments are represented as sets. fd_add_lexpr also declares the symbol to be "safe" for evaluation.
fd_streval char *input char *
a string a string
Evaluates an expression in the top level environment.
fd_evalstring char *input,lispenv env char *
a string a string
Evaluates an expression in the top level environment.
fd_add_cproc fd_lispenv env,char *name,int n_args,lisp (*proc void
a null terminated string, an argument count, and a pointer to a C function nothing (void)
Defines a new FDScript primitive with a name, a number of arguments and a C implementation. Note that if the number of arguments is negative, it is taken to be a lexpr or special form, thought fd_add_special_form is the preferred way to declare such primitives. A special form's implementation function is called on the expression being evaluated and its environment, without any further processing of the expression. fd_add_cproc also declares the symbol to be "safe" for evaluation.
fd_record_typep lisp x,lisp tag int
a lisp record and a tag 1 or 0
Returns 1 if the record's tag is the specified pointer or one of its `supertypes'. Returns 0 otherwise or if the record is not really a record
fd_start_eval lisp expr,lispenv env lisp
a lisp expression and a lisp environment a lisp value, possibly a tail call
This starts the evaluation process which can be finished with fd_finish_value
_fd_finalize_static_tail_call lisp tc,fd_lispenv env lisp
a tail call object and an environment the results of evaluating the tail call until it no
longer depends on the given environment
fd_finish_value lisp value lisp
a lisp pointer a lisp pointer which isn't a tail call
This will force any tail call to evaluate to a real value.
fd_eval_in_env lisp expr,lispenv env lisp
a lisp expression and a lisp environment a lisp value, never a tail call
This starts and finishes the evaluation process. It returns a value which may need to be freed but does not use up the value it is passed.
fd_mv_ref lisp x,unsigned int i fd_lisp
a lisp pointer and an int the ith value represented by the pointer or FD_VOID otherwise
fd_add_special_form fd_lispenv env,char *name,lisp (*proc void
a null terminated string and a pointer to a C function nothing (void)
Defines a new FDScript special form. Whenever a form whose head is the specified symbol is evaluated, the declared function is called on the form and the environment of evaluation. fd_add_special_form also declares the symbol to be "safe" for evaluation.
fd_set_supertype lisp tag,lisp super_tag void
two lisp tags nothing (void)
Records a super type relationship between two tags
fd_mv_arity lisp x int
a lisp pointer the number of values represented by the pointer
{}

Functions defined in src/scheme/cxr.c

Function Arguments Returns

Functions defined in src/scheme/reflect.c

Function Arguments Returns

Functions defined in src/scheme/pairs.c

Function Arguments Returns

Functions defined in src/scheme/characters.c

Function Arguments Returns

Functions defined in src/scheme/bignum.c

Function Arguments Returns

Functions defined in src/scheme/ioprims.c

Function Arguments Returns

Functions defined in src/scheme/arith.c

Function Arguments Returns

Functions defined in src/scheme/special.c

Function Arguments Returns

Functions defined in src/scheme/libfdscheme.c

Function Arguments Returns

Functions defined in src/scheme/strings.c

fd_string_length | fd_string_ref | fd_string_set |

Function Arguments Returns
fd_string_set fd_lisp str,int index,unichar_t ch void
a lisp pointer to a string, an int, and a unicode character void
Modifies the string so that a particular character is changed.
fd_string_length lisp str int
a lisp pointer to a string the length (in unicode characters) of a string
fd_string_ref lisp string,int index unichar_t
a lisp pointer to a string and an int an unsigned int encoding a unicode character

Functions defined in src/scheme/records.c

Function Arguments Returns
{}

Functions defined in src/fdscript/framerd.c

Function Arguments Returns

Functions defined in src/fdscript/osprims.c

fd_register_url_protocol | fd_urlget |

Function Arguments Returns
fd_register_url_protocol char *protocol,fd_lisp (*getter void
a string and a pointer to an URL handler void
Registers the handler for a particular protocol name.
fd_urlget char *url fd_lisp
a string and a pointer to an int a string (actually a pointer to a byte array)
Gets the contents of a remote URL as a character string, storing the size in the second argument (if non-NULL)

Functions defined in src/fdscript/libfdscript.c

Function Arguments Returns

Functions defined in src/fdscript/prims.c

Function Arguments Returns

Functions defined in src/fdscript/seq.c

Function Arguments Returns

Functions defined in src/fdscript/printout.c

Function Arguments Returns

Functions defined in src/fdscript/hashprims.c

Function Arguments Returns

Functions defined in src/fdscript/maint.c

Function Arguments Returns
{}

Functions defined in src/text/match.c

Function Arguments Returns

Functions defined in src/text/mime.c

fd_parse_mime |

Function Arguments Returns
fd_parse_mime char *packet,int len fd_lisp
a C string and an integer length a slotmap
The slotmap is derived from MIME-parsing the string; the CONTENT slot of the returned slotmap is either a string or a list of slotmaps (for multipart mime messages).

Functions defined in src/text/text.c

fd_text_subst |

Function Arguments Returns
fd_text_subst fd_lisp pat,fd_lisp string fd_lisp
a pattern (a lisp pointer) and a string (also a lisp pointer) another lisp string
Applies the substitutions specified in the pattern to the string, returning the result.

Functions defined in src/text/xml.c

fd_make_xmltag | fd_parse_html | fd_parse_xml | fd_xml_attributes | fd_xml_content | fd_xml_tag | fd_xmltag_name | fd_xmltag_namespace |

Function Arguments Returns
fd_xmltag_namespace fd_lisp tag fd_lisp
a lisp object (symbol or xml tag) the tag's namespace (possibly #f)
For symbols, this just returns #F; for tags, it returns the tag's namespace.
fd_xml_attributes fd_lisp x fd_lisp
a lisp pointer a lisp pointer
Gets the attributes of a pair or OID describing an XML element. Note that the attributes are a property list of lists.
fd_xmltag_name fd_lisp tag fd_lisp
a lisp object (symbol or xml tag) the tag's name
For symbols, this is just the identity; for tags, it returns whatever the base of the xmltag is.
fd_xml_tag fd_lisp x fd_lisp
a lisp pointer a lisp pointer
Gets the tag (or element type) of an pair or OID describing an XML element.
fd_parse_html fd_u8char *string fd_lisp
a UTF8-string A nested pair structure based on the HTML structure of the given string
This knows about the empty HTML tags and will handle them appropriately. It also automatically terminates paragraphs and list items.
fd_parse_xml fd_u8char *string,int err_level,fd_lisp ns fd_lisp
a UTF8-string, an error level, and a namespace (a lisp pointer) A nested pair structure based on the XML structure of the given string
Unqualified element and attribute names will be created in the given namespace, unless it is false (#f,FD_FALSE), in which case they will just be created as symbols. The error level is an int in the range [0,2]: 0 XML_LAX Try and fix XML mismatches and other syntax errors 1 XML_ATTENTIVE Warn about XML mismatches and other syntax errors (and try to fix them) 2 XML_PARANOID Raise an exception for XML mismatches and other syntax errors
fd_make_xmltag fd_lisp ns,fd_lisp base fd_lisp
a namespace (a string or symbol), and a type (a symbol) an lisp object describing a qualified xmltag
If the namespace is false (#f), this just returns the type. Otherwise, it conses a lisp record.
fd_xml_content fd_lisp x fd_lisp
a lisp pointer a lisp pointer
Gets the content of a pair or OID describing an XML element. Note that this should always be a list of either strings or other elements.

Functions defined in src/text/md5c.c

Function Arguments Returns

Functions defined in src/text/htmlgen.c

fd_http_puts | fd_http_write_bytes | fd_set_http_output_methods | fd_start_http | fd_start_http_output | fd_unparse_xml |

Function Arguments Returns
fd_unparse_xml fd_lisp expr,fd_lispenv env,fd_htstream *hs void
an xml element rep, an environment, and an http stream void
Outputs a text representation of the xml/html structure represented by the first argument. Any tags which have bindings in the environment are interpreted as function calls. If the html flag is true, the generation process will try and generate HTML rather than XML.
fd_start_http_output fd_htstream *s void
a pointer to an fd_htstream void
Begins output to the designated htstream, setting it as the thread-local HTTP output stream and setting the initial phasse of the HTTP output process.
fd_set_http_output_methods void (*_puts void
three functions void
Sets the methods used for HTTP output. The first function is for outputting null-terminated strings in their entirety; the second function is for outputing single characters; and the third function is for outputing substrings given a start and a length.
fd_start_http char *mime void
a string containing a mime type specification void
Outputs a content-type header field, including a charset specifier which refers to the current default character encoding.
fd_http_puts char *s,fd_htstream *stream void
a pointer to a null-terminated string and an FD_HTTP_STREAM struct void
Writes the string to the stream.
fd_http_write_bytes char *s,int n,fd_htstream *stream void
a pointer to a null-terminated string and an FD_HTTP_STREAM struct void
Writes the string to the stream.

Functions defined in src/text/getnames.c

Function Arguments Returns

Functions defined in src/text/stem.c

fd_stem_english_word |

Function Arguments Returns
fd_stem_english_word fd_u8char *original char *
an ASCII string a stemmed string (malloc'd)
Applies all the Porter rules for stemming a word. If the word is too long (more than 200 characters) it just gives up. This returns a malloc'd string containing the porter stem. Note that the porter stem is usually not itself a word you would recognize.
{}

Functions defined in src/misc/console.c

Function Arguments Returns

Functions defined in src/misc/cgiparse.c

Function Arguments Returns

Functions defined in src/misc/indextools.c

Function Arguments Returns

Functions defined in src/misc/server.c

Function Arguments Returns
{}