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.cfd_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.cFD_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.cfd_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.cfd_use_network_index |
src/eval/sandbox.cfd_add_restricted_cproc | fd_add_restricted_lexpr | fd_add_restricted_special_form |
src/text/mime.cfd_parse_mime |
src/text/text.cfd_text_subst |
src/text/htmlgen.cfd_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.cfd_use_network_pool |
src/odb/pools.cfd_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.cfd_stem_english_word |
src/cons/xdata.cfd_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.cfd_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.cfd_get_module | fd_load_file | fd_load_library |
src/os/envfns.cfd_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.cfd_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.cfd_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.cfd_register_url_protocol | fd_urlget |
src/scheme/strings.cfd_string_length | fd_string_ref | fd_string_set |
src/odb/super-pool.cfd_allocate_pool | fd_recovered_pool | fd_super_pool_base | fd_super_pool_loading | fd_super_pool_top |
src/eval/threads.cfd_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.cfd_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.cfd_report_framerd_stats |
src/text/xml.cfd_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.cfd_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.cfd_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.cfd_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.cfd_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.cfd_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 |

FunctionArgumentsReturns
fd_get_unameuid_t idchar *
a uida string
Gets the user name for a particular id
fd_set_gidchar *gnameint
a gidchanges the current group to be name, return 1 if successful
fd_inhibit_heraldint inhibitvoid
nonevoid
Keeps the startup and shutdown heralds from being shown
fd_get_uidchar *unameuid_t
a stringgets the user ID for a named user
fd_set_build_datechar *datevoid
a stringnothing
Sets the build date to be returned by fd_get_build_date
fd_int_getenvchar *var,int dfltint
a string naming a variable and an int defaultan 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_gidchar *unamegid_t
a stringgets the group ID for a named group
fd_get_gnamegid_t idchar *
a gida string
Gets the group name for a particular gid
fd_exitint statusvoid
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_configchar *config_fileint
a filename (a string)nothing
Loads the variable bindings defined in the specified configuration file, setting the corresponding symbol values
fd_inhibit_anti_warrantyint inhibitvoid
nonevoid
Keeps the startup and shutdown heralds from being shown
fd_getenvchar *varlisp
a string naming a variablea 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_getrusagestruct rusage *rvoid
a pointer to an rusage structurevoid
Gets rusage information, covering for holes in various implementations (currently just Linux)
fd_string_getenvchar *varfd_u8char *
a string naming a variablea 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_randomunsigned int seedvoid
an unsigned intvoid
This sets the random seed.
fd_set_uidchar *unameint
a uidchanges the current user to be name, return 1 if successful
fd_set_session_mnemonicchar *mnemonicvoid
a stringnothing
Sets the string used to identify this kind of session (e.g. 'fdscript' or more usefully, 'mailreader')
fd_get_user_datauid_t idlisp
a uida 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 |

FunctionArgumentsReturns
fd_default_notifierfd_u8char *messagevoid
a stringvoid
This is the default notification function, which outputs a bracketed time and report.
_fd_sputcfd_string_stream ss,int chvoid
a pointer to a string stream and a unicode charactervoid
Writes the utf8 representation of the character to the string stream.
fd_xprintfchar *format_string,...void
a format string, and other argsvoid
Outputs a string as exceptional I/O generated from the format string and using the provided arguments. Much like printf (surprise).
fd_fprintfFILE *f,char *fstring,...void
a FILE * stream, a format string, and other argsvoid
Outputs a string to a file stream generated from the format string and using the provided arguments. Much like printf (surprise).
_fd_sputnfd_string_stream ss,fd_u8char *string,int nvoid
a pointer to a string stream, a utf8 string, and an intvoid
Internal string stream string putn function, used in macro ssputn
fd_notifychar *format_string,...void
a FILE * stream, a format string, and other argsvoid
Outputs a string as a notification, which is generated from the format string and using the provided arguments. Much like printf (surprise).
_fd_sputsfd_string_stream ss,fd_u8char *stringvoid
a pointer to a string stream and a utf8 stringvoid
Internal string stream string put function, used in macro ssputs
fd_printffd_string_stream s,char *format_string,...void
a string stream, a format string, and other argsvoid
Outputs a string to string stream generated from the format string and using the provided arguments. Much like printf (surprise).
fd_set_notify_handlervoid (*nfvoid
a function taking a string argvoid
Sets the function which is called on notification messages
fd_warnchar *format_string,...void
a FILE * stream, a format string, and other argsvoid
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_streamfd_string_stream ss,int deltavoid
a pointer to a string stream and a number of bytesvoid
Grows the data structures for the string stream to include delta more bytes
fd_set_warn_handlervoid (*wfvoid
a function taking a string argvoid
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 |

FunctionArgumentsReturns
fd_init_xtimestruct FD_XTIME *xtpvoid
a pointer to an extended timestamp structurevoid
This takes a timestamp object and fills out an extended time pointer structure which includes timezone and precision information.
fd_parse_tzspecchar *s,int dfltint
a string and a default offsetan offset from UTC
This uses a built in table but should really use operating system facilities if they were even remotely standardized.
fd_sleepdouble secsvoid
an interval in seconds (a double)nothing
This is a platform abstraction for sleeping that *may* allow sub-second sleeps.
fd_mktimestruct tm *tptr,int tzofftime_t
a pointer to a tm struct and a time offset (from UTC) in secondsa 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_timestruct tm *tptr,time_t tick,int tzoffint
a pointer to a tm struct, a time_t value, and an offsetan 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_timelisp timestamptime_t
a lisp pointer to a timestampa time_t value
fd_xtime_to_timestampstruct FD_XTIME *xtpfd_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_xtimechar *s,struct FD_XTIME *xtptime_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_iso8601char *stringtime_t
a stringa time_t
Parses an iso8601 format date/time string into a time_t value.
fd_timestamp_to_xtimefd_lisp timestamp,struct FD_XTIME *xtptime_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_iso8601struct FD_XTIME *xtp,fd_string_stream ssint
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_nowstruct FD_XTIME *xtptime_t
a pointer to an extended time pointera time_t or -1 if it fails for some reason
This will try and get the finest precision time it can.
fd_localtimestruct tm *tptr,time_t tickint
a pointer to a tm struct and a time_t valuethe 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 |

FunctionArgumentsReturns
fd_raise_detailed_exceptionfd_exception ex,char *detailsvoid
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_exceptionfd_exception ex,char *details,lisp objvoid
an exception (a string), details (another string), and a lisp objectno.
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_exceptionfd_exception exvoid
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_exceptionfd_exception ex,fd_u8char *details,lisp objectvoid
an exception (a string), a details string, and a lisp objectnothing
Set's the current threads exception information.
fd_exception_contextint forcestruct FD_EXCEPTION_CONTEXT *
nonea pointer to a FD_EXCEPTION_CONTEXT struct
fd_ctype_errorchar *c_context,fd_u8char *details,lisp objvoid
details text (a string), and a lisp objectno.
Raises a type error with particular details and an object.
fd_record_type_errorlisp obj,lisp tagvoid
details text (a string), and a lisp objectno.
Raises a type error with particular details and an object.
fd_pigs_flyfd_u8char *detailsvoid
details text (a string)no.
This is used to signal errors which should never happen.
_fd_push_jbrfd_setjmp_rec *jbrvoid
a setjmp recordvoid
Adds an entry to the exception handling stack for a particular setmp location
fd_type_errorfd_u8char *details,lisp objvoid
details text (a string), and a lisp objectno.
Raises a type error with particular details and an object.
fd_exception_context_pushlisp symvoid
a lisp pointervoid
Adds a value to the current exception context
fd_throwfd_exception ex,char *details,lisp objvoid
an exception (a string), details (another string), and a lisp objectno.
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 |

FunctionArgumentsReturns
fd_dtype_evallisp expr,fd_server slisp
a lisp object and a servera lisp object
Asks the server to evaluate the lisp object, returning the result and trying to restart the connection once if neccessary.
fd_sendallint socket,char *buf,int size,int flagsint
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_connectionfd_server server,char *dest,int port,char *idvoid
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_dtcallfd_server s,char *fcn,...lisp
a server, a function name (a string), and a number of args ending with FD_VOIDa 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_connectchar *specfd_server
a string identifying a servera 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_mailchar *dest,char *text,lisp fieldsvoid
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 **fullnameint
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_connectionfd_server svoid
a servernothing
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_dtcallfd_server s,char *fcn,...lisp
a server, a function name (a string), and a number of args ending with FD_VOIDa lisp object
Like fd_dtcall, but signals an error when the remote server returns an error object.
fd_timed_recvint secs,int socket_id,char *data,int len,int flagsint
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_connectchar *specfd_server
a string identifying a servera 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_getchar *url,int *sizepchar *
a string and a pointer to an inta 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_socketchar *filename,char *id,int signal_errorint
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_headchar *url,int *sizepchar *
a string and a pointer to an inta string (actually a pointer to a byte array)
Gets the head of a remote URL as a character string
fd_open_connectionchar *name,int port,char *idfd_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_socketstruct FD_DBUF *buf,int socketvoid
a pointer to an FD_DBUF struct and a socketnothing (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_evallisp expr,fd_server slisp
a lisp object and a servera lisp object
Like fd_dtype_eval but signals an error if the remote server returns an error or exception object.
fd_get_portnochar *stringint
a stringan 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_dtevalint flagint
1 or 01 or 0
Turns on tracing of all remote DTYPE evaluation activity.
fd_http_stringchar *urlchar *
a stringa 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 |

FunctionArgumentsReturns
fd_file_sizefd_u8char *pathoff_t
a stringa long
Returns the size of a file
fd_fcloseFILE *streamvoid
a filenamea FILE * pointer
Closes the stream and cleans up XFILEs associated with it
fd_getpathfd_u8char *namelisp
a string naming an extended environment variablea lisp pointer to a list of directories
Interprets a path variable
fd_symbolic_linkpfd_u8char *pathint
a string1 or 0
Returns 1 if the file is a symbolic link to another file (currently always zero under WIN32).
fd_get_exec_filenamechar *argv0char *
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_lockedfd_u8char *filename,char *mode,int allow_readersFILE *
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_filefd_u8char *filename,lisp search_pathfd_u8char *
a string and a lisp pointeranother 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_directorypfd_u8char *pathint
a string1 or 0
Returns 1 if the file is actually a directory.
fd_file_writablepfd_u8char *filenameint
a string1 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_filepfd_u8char *pathint
a string1 or 0
Returns 1 if the file is a regular file.
fd_file_existspfd_u8char *fnameint
a string1 or 0
Returns 1 if the file exists, 0 otherwise. Uses stat.
fd_fopenfd_u8char *filename,char *modeFILE *
a filename and a mode specifiera 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 |

FunctionArgumentsReturns
fd_foreign_filestringchar *filename,struct FD_TEXT_ENCODING *elisp
a filename (a localized string) and a text encodinga utf-8 string
Interprets the contents of the file according to the encoding and returns a UTF-8 encoded unicode string.
fd_upcase_stringfd_u8char *string,int lenfd_u8char *
a utf8 stringa copy of the argument converted to upper case
fd_get_file_encodingFILE *fstruct FD_TEXT_ENCODING *
a FILE pointera pointer to an encoding struct or NULL
Returns the encoding associated with a particular file stream.
fd_valid_utf8pfd_u8char *sint
a possible utf8 string1 if the string is valid, 0 otherwise.
fd_fputs_encodedfd_u8char *s,int len,FILE *fvoid
a utf8 string and a FILE pointernothing
Writes the contents of the string to the XFILE, writing unhandled characters with unicode (\u and \U escapes).
fd_fputcxchar c,FILE *fvoid
a wide char and a FILE pointervoid
Writes the character to the FILE stream
fd_set_system_encodingchar *namevoid
an encoding namevoid
Sets the encoding used by the operating system (e.g. for system calls, filenames, etc)
fd_ungetcint c,FILE *fvoid
a wide character and a FILE pointernothing
Ungets the character on the stream, using its XFILE structure if possible.
fd_set_default_encodingchar *namevoid
an encoding namevoid
Sets the default encoding used for XFILES
fd_set_file_encodingFILE *f,char *namevoid
a FILE pointer and an ASCII string naming an encodingvoid
Sets the encoding for a particular FILE pointer to the encoding with the specified name.
fd_fgetcFILE *fint
a FILE pointera wide character
Returns a wide character from a stream according to its encoding.
fd_get_xfileFILE *fstruct FD_XFILE *
a FILE pointeran XFILE pointer (or NULL)
Gets the XFILE struct associated with a particular file pointer.
fd_fputs_rawfd_u8char *s,int len,FILE *fvoid
a utf8 string and an XFILE pointernothing
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_utf8fd_u8char *string,struct FD_TEXT_ENCODING *eunsigned char *
a utf8 encoded string and a text encodinga regular string
Returns an 8BIT string encoded using the text encoding.
fd_xgetc_encodedstruct FD_XFILE *fint
an XFILE pointera 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_utf8fd_u8char *string,int slen,struct FD_TEXT_ENCODING *e,int *size_locunsigned char *
a utf8 encoded string and a text encodinga regular string
Returns an 8BIT string encoded using the text encoding.
fd_interpret_unicode_escapesfd_u8char *stringfd_u8char *
a utf8 string with (potentially) embedded unicode escapesa utf8 string where those escapes have been expanded
fd_free_xfileFILE *fvoid
an FILE pointernothing
Frees the XFILE entry from the linked list of FILE association pointers.
fd_load_encodingchar *name,char *filevoid
a name and a filenamevoid
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_encodingchar *namestruct FD_TEXT_ENCODING *
an ASCII stringa pointer to an FD_TEXT_ENCODING struct
This gets the structure describing a particular encoding given its ASCII name.
fd_xputcxchar c,struct FD_XFILE *fvoid
a wide char and an XFILE pointervoid
Writes the character to XFILE stream, signalling an error if the stream cannot handle the character.
fd_make_utf8uchar *start,uchar *end,struct FD_TEXT_ENCODING *efd_u8char *
a 8BIT string representation and a text encodinga utf8 encoded string
fd_xputc_encodedxchar c,struct FD_XFILE *fvoid
a wide char and an XFILE pointervoid
Writes the character to XFILE stream, using unicode escapes if the stream cannot handle the character.
fd_downcase_stringfd_u8char *string,int lenfd_u8char *
a utf8 stringa copy of the argument converted to lower case
fd_xungetcint c,struct FD_XFILE *evoid
a wide character and an XFILE pointernothing
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 flagsint
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_xgetcstruct FD_XFILE *fint
an XFILE pointera 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 |

FunctionArgumentsReturns
_fd_qmalloc_conssize_t bytesvoid *
number of bytesallocated memory
This also initializes the reference count, assuming that the result will be a struct whose first int field is the reference count.
fd_xreallocvoid *oldptr,size_t bytesvoid *
a pointer and a sizereturns 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_qmallocsize_t bytesvoid *
number of bytesallocated memory
This maintains a free list for certain memory sizes and allocates them blocks at a time.
fd_mallocsize_t bytesvoid *
number of bytesallocated memory to at least that many bytes
This signals an exception if malloc fails.
fd_memdupconst char *data,size_t szchar *
a pointer to a chunk of memory and a sizea 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_initsize_t sz,int chunk_sizevoid
two size_t pointers, struct_size and block_sizevoid
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_xmallocsize_t bytesvoid *
number of bytesallocated memory to at least that many bytes
This signals an exception if malloc fails. It doesn't count the malloc'd bytes, though...
fd_xfreevoid *ptrvoid
a pointervoid
Doesn't signal an error of pointer is NULL
fd_free_int_arrayunsigned int *ptr,size_t sizevoid
a pointer and number of bytesvoid
This frees the pointer and bumps the malloc pointer down by a number rounded up to the size to FD_STRING_CHUNK.
fd_mallocizechar *data,size_t szchar *
a pointer to a chunk of memory and a sizea 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_xmemdupconst char *data,size_t szchar *
a pointer to a chunk of data and a sizea 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_reallocvoid *ptr,size_t new_size,size_t old_sizevoid *
a pointer and a number of bytesvoid
Frees the pointer and updates the memory usage count
fd_strdupconst char *stringchar *
a null terminated stringa 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_adjustint deltavoid
an intvoid
Bumps up the malloc count but doesn't really malloc anything
_fd_qfreevoid *p,size_t bytesvoid
a pointer and a number of bytesvoid
This frees a cons allocated by fd_qmalloc which tries to do free list maintainance.
fd_freevoid *ptr,size_t bytesvoid
a pointer and a number of bytesvoid
Frees the pointer and updates the memory usage count
{}

Functions defined in src/cons/oids.c

FunctionArgumentsReturns

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 |

FunctionArgumentsReturns
fd_slotmap_addfd_slotmap sm,lisp key,lisp valuevoid
a slotmap, a lisp key, and a lisp valuemakes 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_datalisp x,void **veltsint
a lisp pointer (to a slotmap) and a pointer to a pointer to a vector of lisp pointersan 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_testfd_slotmap sm,lisp key,lisp valueint
a slotmap, a lisp key, and a lisp value1 or 0
Returns 1 if the value can be found on the *key* slot of the slotmap.
fd_slotmap_getfd_slotmap sm,lisp key,lisp dfltlisp
a slotmap, a lisp key, and a default valuethe value associated with the key in the slotmap
or the default value otherwise.
fd_make_slotmapint sizelisp
a size (int)a slotmap with capacity for slots
_fd_done_with_slotmap_datafd_lisp *elts,int sizevoid
a pointer to a vector of LISP pointers and a sizenothing
Frees a slotmap data vector.
fd_slotmap_setfd_slotmap sm,lisp key,lisp valuevoid
a slotmap, a lisp key, and a lisp valuemakes 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_removefd_slotmap sm,lisp key,lisp valuevoid
a slotmap, a lisp key, and a lisp valueremoves the value from the values associated with
a particular key in the slotmap The value on the slotmap is freed.
fd_slotmap_zapfd_slotmap sm,lisp keyvoid
a pointer to a slotmap and a keynothing
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 |

FunctionArgumentsReturns
fd_parse_argchar *xstringlisp
a localized stringa lisp object
Returns the lisp object described by the printed representation in its argument.
fd_print_lisplisp x, FILE * streamvoid
a lisp object and a standard output streamnothing
Outputs an ascii representation of the object to the output stream
fd_configure_oid_io void ((*print_fcnvoid
a pointer to two C functions; the first outputs OIDs to string streams and the second parses utf8 strings into OIDsnothing
Changes the default printer and parser for OIDs.
fd_write_dtype_to_filelisp v,char *filenamevoid
a lisp object, a filename (a string)nothing
Outputs a dtype representation of the object to the specified file.
fd_default_parse_oidfd_u8char *stringlisp
a pointer to a UTF-8 stringa lisp pointer to an FD_OID
Outputs the most primitive ASCII representation of the object to the string stream.
_fd_sgetcfd_u8char **ssint
a pointer to a pointer to a UTF-8 stringan 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_filechar *filenamelisp
a localized string (a filename)a lisp object
Returns the lisp object described by the first DTYPE in filename.
fd_parse_numberfd_u8char *string,int baselisp
a utf8 string and an integral basea lisp object
Parses the number assuming the specified base.
fd_default_print_oidlisp obj,fd_string_stream ssvoid
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_filechar *filenamelisp
a localized string (a filename)a lisp object
Returns the lisp objects described by the DTYPES in filename.
fd_validate_dtypeunsigned char *buf,unsigned char *endint
two pointers into an array of bytes1 if the range contains a valid dtype representation
fd_set_bignum_parserlisp (*fcnvoid
a function for parsing bignums from strings and returning lisp objectsvoid
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_sizelisp xunsigned int
a lis pointeran integer
Returns the number of bytes which will be used by the DType representation of its argument.
fd_parse_lisp_from_streamFILE *flisp
a FILE pointera lisp object
Parses the printed representation of an object from a stdio file stream
fd_object_to_stringlisp objectfd_u8char *
a lisp objecta string
Returns a string containing a UTF-8 representation of the object.
fd_parse_stringfd_u8char *stringlisp
a utf8 stringa lisp object
Returns the lisp object described by the printed representation in its argument.
fd_set_super_pool_aliasingFD_OID from,FD_OID tovoid
two OIDsnothing
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_filelisp v,char *filenamevoid
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_stdoutlisp dtypevoid
a lisp objectnothing
Outputs an ascii representation of the object to the standard output
fd_print_lisp_to_stringlisp x,fd_string_stream svoid
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 |

FunctionArgumentsReturns
fd_init_oid_choiceint nlisp
a sizeAn 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_heterogenousfd_choice chvoid
a pointer to a choicenothing
Makes a homogenous choice into a heterogenous one
_fd_binary_choicelisp x,lisp ylisp
two lisp objectsa 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_choicefd_lisp argint
a pointer to a choice1/0
Sorts the elements of a heterogenous choice, returns 1 if the choice was successfully sorted, 0 otherwise
fd_list_to_choicelisp lstlisp
a lisp listan 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_choiceint nlisp
a sizeAn empty non-deterministic set
This returns an empty set with reserved space for a certain number of elements.
fd_remove_from_choicelisp x,lisp choicelisp
a lisp object and a lisp non-deterministic seta non-deterministic set without any occurences of the object
_fd_make_choice_homogenousfd_choice chvoid
a pointer to a choicenothing
Makes a heterogenous choice into a homogenous one
fd_choice_containsplisp sub,lisp superint
two lisp objects1 or 0
Returns 1 if the first argument is a subset of the second. of the choice which is the second argument.
_fd_unquote_choicefd_lisp xfd_lisp
a lisp object (possibly a choice)a lisp object
Returns a lisp object will be a quoted choice if appropriate
_fd_merge_choiceslisp x,lisp ylisp
two objectsa non-deterministic set which contains the elements of both
This implicitly frees y (its second argument), while adding its elements to x.
fd_merge_choiceslisp x,lisp ylisp
two objectsa 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_choiceplisp valueint
a lisp pointer1 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_choicelisp valueslisp
a lisp pointeranother lisp pointer
If the argument is a non-deterministic set, this returns a "proper set" which contains no duplicate elements.
fd_choice_overlapsplisp ch1,lisp ch2int
two lisp objects1 or 0
Returns 1 if any elements of the first argument overlap elements of the second.
fd_intersect_choiceslisp *choices,int sizelisp
a C array of LISP pointers and a sizea lisp object
Returns the intersection of all the choices in the array. This is optimized to take advantage of sorted choices.
_fd_add_to_choicelisp x,lisp setvoid
a lisp object and a lisp non-deterministic setnothing
Adds the object (not a copy!) to the non-deterministic set.
_fd_quote_choicefd_lisp xfd_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 |

FunctionArgumentsReturns
fd_make_rationallisp num,lisp denomlisp
two lisp numbersa lisp rational
fd_lisp_hashset_eltslisp tablelisp
a lisp pointer to a hashseta lisp pointer
Returns all the elements of a hashset as a choice.
fd_quote_lisplisp xlisp
a lisp objectanother object, which when evaluated, returns the first
This also copies any structure copied to it.
fd_make_complexlisp real,lisp imaglisp
two numbersa lisp complex
fd_conschar *format,...fd_lisp
a format string and a number of argsa 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_vectorint len,short *datalisp
a floata LISP floating point number
fd_make_hashtable_for_lispint sizelisp
an integera lisp pointer to a hashtable
fd_make_double_vectorint len,double *datalisp
a int length and a pointer to an array of doublesa homongenous double floating point vector
fd_make_hashset_for_lispint sizelisp
an integera lisp pointer to a hashtable
fd_make_float_vectorint len,float *datalisp
a int length and a pointer to an array of floatsa homongenous floating point vector
fd_make_flonumdouble flisp
a floata LISP floating point number
fd_make_int_vectorint len,int *datalisp
an int length and a pointer to an array of intsa homongenous lisp vector of ints
fd_compare_cptrslisp x,lisp yunsigned int
two cptr objectsan unsigned int
Compares the pointers underlying two cptrs. Returns 1 if they are the same.
fd_hashtable_to_alistlisp tablelisp
a lisp pointer to a hashtablea lisp association list
Converts a hashtable to an association list
fd_make_timestamptime_t momentlisp
a time_t valuea lisp record whose tag is the symbol timestamp
fd_alist_to_hashtablelisp alistlisp
a lisp association lista lisp pointer to a hashtable
Converts an association list to a hashtable
fd_make_xtimestamptime_t moment,int nsecs,fd_tmprec prec,int tzofflisp
a time_t value, a nanoseconds value, a precision, and a timezone stringa lisp record whose tag is the symbol timestamp
fd_copy_cptrlisp xlisp
a cptr objectanother cptr object
Makes a new reference counting CONS for a wrapped cptr.
fd_parse_packetfd_u8char *stringlisp
a utf8 stringa lisp pointer to a packet structure
Takes a long hex string and turns it into a packet
fd_make_errorlisp datalisp
another lisp object describing some erroran error object whose *details* are the given arguments
Note: the details are not copied
fd_make_packetint len,unsigned char *datalisp
an integer and a pointer to an array of bytesa "packet object" containing the array of bytes
Note: the details are not copied
fd_make_exceptionlisp datalisp
another lisp object describing some exceptionan 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 |

FunctionArgumentsReturns
fd_probe_oidFD_OID idlisp
an OIDa 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_oidlisp xstruct FD_CONSOID *
a lisp pointernever, but pretends to return an FD_OID pointer
fd_grow_oid_tableunsigned int sizevoid
an unsigned int sizenothing
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_oidFD_OID idlisp
an OID address structurea 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

FunctionArgumentsReturns

Functions defined in src/cons/libdtypes.c

FunctionArgumentsReturns

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 |

FunctionArgumentsReturns
_fd_decref_conslisp xvoid
a lisp objectvoid
Increments the GC count for x and reclaims it if appropriate.
_fd_copy_lisp_proclisp xlisp
a lisp objecta 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_equallisp key0, lisp key1int
two lisp objectsthe integer 1 if they're EQUAL, 0 if they're not.
_fd_incref_conslisp xlisp
a lisp pointerits argument
Increments the reference count associated with a cons
fd_make_vectorint sizelisp
a C integera 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_cptrfd_lisp_type tp,void *datafd_lisp
a lisp type and a data pointera lisp pointer with the type and an allocated refcounter for
the cpointer
fd_copy_stringfd_u8char *stringlisp
a null-terminated utf8 stringa lisp object describing the string
This copies the string argument and also determines if it is UTF-8 or not.
fd_make_substringfd_u8char *start,fd_u8char *endlisp
two pointers into the same utf-8 stringa lisp object describing the substring between them
fd_make_pairlisp x, lisp ylisp
two lisp objectsa cons pair whose CAR and CDR are the arguments
the arguments *are* incref'd
fd_lower_stringfd_u8char *stringlisp
a null-terminated utf-8 C stringa 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_stringfd_u8char *string,int sizelisp
a null-terminated utf8 stringa 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_characterunsigned int clisp
a characterthe LISP version of the character
fd_utf8_string_reffd_u8char *strint
a pointer to a UTF-encoded stringreturns the first unicode character in the string
fd_memberplisp x,lisp listint
a lisp object and a list of such objects1 if the object is in the list and 0 otherwise
fd_make_stringchar *stringlisp
a null-terminated localized C stringa lisp object describing the string
This does UTF-8 conversion and doesn't use the direct pointer to string.
FD_MAKE_LISTint length,...lisp
an integer followed by several elementsa list of elements in order
fd_utf8_strlenfd_u8char *str,int slenint
a pointer to a UTF-encoded string and a lengthan integer indicating the number of unicode characters
in the string it represents
fd_list_lengthlisp xunsigned int
a lisp objectthe number of elements in the object, if it is a list,
or 1 otherwise.
fd_lookup_compoundlisp tagstruct FD_TYPE_REGISTRY *
a lisp taga pointer to a record entry or NULL
Returns the record entry for types with the specified compound tag
fd_make_recordlisp type_name, void *datalisp
a type specifier (a lisp object), and a pointer to some dataa lisp record
fd_free_proclisp xvoid
a lisp objectnothing
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_PAIRlisp x, lisp ylisp
two lisp objectsa 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 subcodestruct FD_TYPE_REGISTRY *
a package code and subcodea 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_typecodefd_lisp_type tpstruct FD_TYPE_REGISTRY *
a lisp typecodea 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_LIST1lisp xlisp
a lisp objecta list whose first and only element is the argument
fd_for_eltsvoid (*fcnvoid
a function which returns void from a lisp object and a list of lisp objectsnothing
This applies the function to all the elements of the list.
fd_stream_stringstruct FD_STRING_STREAM *slisp
a pointer to a string streama 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_filechar *name,char *date,char *detailsvoid
three strings -- name, date, and detailsvoid
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_vectorint size,lisp *eltslisp
a C integer and a pointer to a vector of LISP objectsa 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_lrecordlisp type_name, lisp datalisp
a type specifier (a lisp object), and another lisp objecta lisp record
fd_lookup_recordlisp tagstruct FD_TYPE_REGISTRY *
a lisp pointera 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_substringfd_u8char *str,int indexchar *
a pointer to a UTF-encoded string and an integerthe substring starting at the interger-th character
fd_register_recordlisp tagstruct FD_TYPE_REGISTRY *
a lisp pointera 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_bufferunsigned int *bufsizechar *
a pointer to an inta 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 |

FunctionArgumentsReturns
fd_reinit_hashtablefd_hashtable h,int minsize,int lockedvoid
a pointer to a hashtable and an int minsizenothing
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_eltsfd_hashset hlisp
a pointer to a hashseta lisp object (possibly a non-deterministic set)
This returns all the values in the hashset and frees the hashset.
fd_init_hashtablefd_hashtable h,int minsizevoid
a pointer to a hashtable and an int minsizenothing
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_symbolconst fd_u8char *pnamelisp
a stringa 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_getfd_hashtable h,lisp key,lisp dfltlisp
a pointer to a hashtable, a lisp key, and a defaulta 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_skimfd_hashtable h,int thresholdlisp
a hashtable and an integral thresholda lisp pointer
Returns (as a choice) all the keys in the hashtable whose values are greater than the numeric threshold.
fd_free_hashsetstruct FD_HASHSET *hvoid
a pointer to a hashsetnothing
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_lisplisp xunsigned int
a lisp pointeran unsigned int
Returns the hash for a lisp object. This hash is *not* portable across sessions.
fd_make_hashsetint minsizestruct FD_HASHSET *
an int minsizea pointer to a hashtable
This mallocs a new hashset and initializes it to have at least minsize elements.
fd_cleanup_locked_hashtablefd_hashtable hvoid
a pointer to a hashtablenothing
Removes empty elements from the hashtable.
fd_hashtable_increment_existingfd_hashtable h,lisp key,int incrementvoid
a pointer to a hashtable, a lisp key, and an intnothing
Increments the value associated with the key by a number, doing nothing if the key does not exist.
fd_grow_hashsetfd_hashset h,int minsizevoid
a pointer to a hashset and an int minsizenothing
Grows the hashset to have at least minsize slots
fd_grow_hashtablestruct FD_HASHTABLE *h,int minsizevoid
a pointer to a hashtable and an int minsizenothing
Grows hashtable to have at least minsize slots
fd_reinit_hashsetfd_hashset h,int minsize,int lockedvoid
a pointer to a hashtable and an int minsizenothing
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_noreflisp x,lisp vvoid
a LISP symbol, another LISP pointernothing
Threadsafe modifier for the value slot of a symbol which does not do any refcounting or uncounting.
fd_probe_symbolconst fd_u8char *pnamelisp
a stringa 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_qstringfd_u8char *string_data,int lenlisp
a string and a lengtha lisp pointer to a qstring that is EQUAL to the string
If the length is negative, it is computed.
_fd_symbol_value_noreflisp xlisp
a LISP symbolthe symbol's value
Threadsafe accessor for the value slot which doesn't incref the value it returns
fd_init_hashsetfd_hashset h,int minsizevoid
a pointer to a hashset and an int minsizenothing
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_zapfd_hashtable h,lisp keyvoid
a pointer to a hashtable and a lisp keynothing
Removes all values associated key in the hashtable.
fd_set_symbol_valuelisp x,lisp vvoid
a LISP symbol, another LISP pointernothing
Threadsafe modifier for the value slot of a symbol.
fd_hashtable_incrementfd_hashtable h,lisp key,int incrementvoid
a pointer to a hashtable, a lisp key, and an intnothing
Increments the value associated with the key by a number, simply storing the number if no value is currently associated.
fd_hashtable_testfd_hashtable h,lisp key,lisp valueint
a pointer to a hashtable, a lisp key, and a lisp value1 or 0
Returns 1 if the value is one of the values associated with the key
fd_hashset_getfd_hashset h,lisp keyint
a pointer to a hashtable and a lisp key1 or 0
Returns 1 if the given key is in the hashset.
fd_free_hashtablestruct FD_HASHTABLE *hvoid
a pointer to a hashtablenothing
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_valuelisp xlisp
a LISP symbolthe symbol's value
Threadsafe accessor for the value slot which increfs the value it returns
fd_hashtable_dropfd_hashtable h,lisp key,lisp valuevoid
a pointer to a hashtable, a lisp key, and a valuenothing
Removes a value from the values associated with key in the hashtable.
fd_hashtable_addfd_hashtable h,lisp key,lisp valuevoid
a pointer to a hashtable, a lisp key, and a valuenothing
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_symbolsvoid (*fcnvoid
a function on lisp pointers which returns voidnothing
Applies the function to every symbol in the symbol table.
fd_hashtable_probefd_hashtable h,lisp keyint
a pointer to a hashtable, a lisp key1 or 0
Returns 1 if the key is associated with some value in the table.
fd_select_table_sizeunsigned int minunsigned int
an unsigned int (min)an unsigned int greater than min
Selects a hashtable/index size greater than min.
fd_hashset_probefd_hashset h,lisp keylisp
a pointer to a hashset and a lisp keya 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_setfd_hashtable h,lisp key,lisp valuevoid
a pointer to a hashtable, a lisp key, and a valuenothing
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_strgetfd_hashset h,fd_u8char *keystring,int lenint
a pointer to a hashtable and a string1 or 0
Returns 1 if the a LISP copy of string is in the hashset.
fd_internconst fd_u8char *name,int lenfd_lisp
a pointer to a string and a int lengtha 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_ncfd_hashset h,lisp keyint
a pointer to a hashset and a lisp key1 if the value wasn't already there
Adds a key (not a copy!) to the hashset.
fd_hashset_eltsfd_hashset hlisp
a pointer to a hashseta lisp object (possibly a non-deterministic set)
This returns all the values in the hashset.
_fd_hashtable_set_nolockfd_hashtable h,lisp key,lisp valuevoid
a pointer to a hashtable, a lisp key, and a valuenothing
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_addfd_hashset h,lisp keyint
a pointer to a hashset and a lisp key1 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_internfd_hashset h,lisp keylisp
a pointer to a hashset and a lisp keya 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_hashtableint minsizestruct FD_HASHTABLE *
an int minsizea pointer to a hashtable
This mallocs a new hashtable and initializes it to have at least minsize elements.
fd_hashset_dropfd_hashset h,lisp keyvoid
a pointer to a hashtable and a lisp keynothing
"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_maxfd_hashtable hlisp
a hashtablea lisp pointer
Returns the keys in the hashtable whose values are numerically maximum.
fd_choice_to_hashsetlisp valuesfd_hashset
a pointer to a hashseta 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 |

FunctionArgumentsReturns
fd_make_file_pool char *filename,FD_OID base, unsigned int capacity, int major_version,fd_lisp metadatavoid
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 loadunsigned int
a filename, a base id, and a loadthe 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 *changefd_lisp
an open file stream to a file pool and pointers to two intsa 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_freespacefd_u8char *filenameunsigned 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_snapshotchar *filename,char *snapshotvoid
two filenamesthe 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_poolfd_file_pool pint
a pointer to a file pool1 on success
Attempts to lock the file storing pool.
fd_new_file_pool char *filename,unsigned int capacity,char *super_poolvoid
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_poolchar *filename,lisp labelvoid
a string, and a lisp objectvoid
Modifies a file pool to have a given label.
fd_make_new_super_poolchar *filenameunsigned int
a filenamethe 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_openerint magic_no,fd_pool (*openervoid
a magic number and an opening functionvoid
This associates an opening function with a number which is the first word of the file to use this opener.
fd_use_file_poolfd_u8char *fnamefd_pool
a string naming a filea 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_loadfd_u8char *filenameunsigned 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_capacityfd_u8char *filenameunsigned 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_poolfd_pool pvoid
pointer to a file pool structurevoid
Initializes a cache for the file pool, reducing the need for disk access and repositioning.

Functions defined in src/index/portahash.c

FunctionArgumentsReturns

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 |

FunctionArgumentsReturns
fd_file_index_collect_values fd_file_index ix,unsigned int loc,unsigned int sizelisp
a file streama "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_statsFILE *streamvoid
nonevoid
Prints a report on hash table chaining behavior.
fd_register_file_index_openerint magic_no,fd_index (*openervoid
a magic number and an opening functionvoid
This associates an opening function with a number which is the first word of the file to use this opener.
objector the empty choiceFRAMERD_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 intsa 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_comparelisp key,FILE *streamint
a lisp object and a file streamboolean (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_indexfd_index idx_argvoid
a pointer to an indexvoid
Reinits the size cache and basically undoes the effects of fd_preload_file_index.
fd_preload_file_indexfd_index idx_argvoid
a pointer to an indexvoid
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 |

FunctionArgumentsReturns
fd_for_slotsvoid (*fcnvoid
a function on three lisp objects and a lisp objectvoid
Applies the function to the frame and each of its attributes and values.
fd_get_slotmaplisp arglisp
a lisp pointera 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_valueslisp root,lisp slotid,lisp throughlisp
a frame and two slotidsa lisp pointer
Searches for a value for the first slotid through the lattice defined by the second slotid.
fd_frame_setlisp frame,lisp slotid,lisp valuevoid
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_droplisp frame,lisp slotid,lisp valuevoid
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_consedlisp frame,lisp slotid,lisp valuevoid
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_getlisp frame,lisp slotidlisp
a frame (slotmap or OID evaluating to one) and a slotida lisp pointer
Does inheritance through OID values on annotated frames.
fd_frame_removelisp frame,lisp slotid,lisp valuevoid
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_addlisp frame,lisp slotid,lisp valuevoid
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_autoindexfd_index ixvoid
a pointer to an indexvoid
Sets up a particular index for automatically recording changed and new slot values.
fd_copy_framelisp original,fd_pool xlisp
a frame and a poola 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_consedlisp frame,lisp slotid,lisp valuevoid
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_slotFILE *stream,lisp slotid,lisp valuevoid
an attribute name and a valuevoid
Describes a slot and its value to a stream.
fd_frame_testlisp frame,lisp slotid,lisp valueint
a frame, a slotid, and a value1 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_cachelisp slotid,lisp framevoid
slotid, framevoid
Clears cached entries for slotid and frame, clearing all entries if frame is FD_VOID
fd_frame_slotslisp framesfd_lisp
a framea set of slot ids
Returns the current slot ids with associations on the frame
fd_prim_getlisp frame,lisp slotidlisp
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_testlisp frame,lisp slotid,lisp valueint
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_pathplisp root,lisp slotid,lisp toint
a frame, a slotid, and a frame1 or 0
Returns 1 if there is a path through slotid between the two frames
fd_overlay_testlisp frame,lisp slotid,lisp valueint
a frame (slotmap or OID evaluating to one), a slotid, and a value1 or 0
Does inheritance through OID values on annotated frames, determining if a slotid is associated with a particular value.
fd_enable_slot_cachelisp slotidvoid
slotidvoid
Enables caching on the slot SLOTID
fd_prim_addlisp frame,lisp slotid,lisp valuevoid
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_createfd_pool x,lisp valuelisp
a pool and a framea 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_createfd_pool xlisp
a poola 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_getlisp frame,lisp slotidlisp
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_setlisp frame,lisp slotid,lisp valuevoid
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_cachelisp slotidvoid
slotidvoid
Disables caching on the slot SLOTID
fd_frame_get_starfd_lisp frames,fd_lisp slotidsfd_lisp
a choice of frames and a choice of slotidsthe kleene star of the slotids on the frames
fd_inherits_valueplisp root,lisp slotid,lisp through,lisp valueint
a frame, two slotids, and a value1 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_pslot_op op,lisp frame,lisp slotid,lisp valueint
a slot operation, a frame, slot, and value1 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 |

FunctionArgumentsReturns
fd_score_from_speclisp indices,lisp frames,lisp specfd_hashtable
an index, a set of frames, and a list of feature setsa 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_similarlisp indices,lisp frames,lisp slotslisp
an index, a set of frames, and a set of slotsa set of frames
Finds all frames in that have some in common with
fd_get_frame_featureslisp frameslisp
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 slotsfd_hashtable
an index, a set of frames, a set of samples, and a set of slotidsa 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_frameslisp indices,...lisp
a set of indices and a series of slot and value sets terminated by a FD_VOIDa 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_framefd_index idx,lisp framevoid
a frame and an indexnothing
Indexes an object based on its slot values.
fd_index_slotsfd_index idx,lisp frame,lisp slotsvoid
a frame (or set of frames), an index, and a set of slotsnothing
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 valuesvoid
a frame (or set of frames), an index, a set of slots, and a set of valuesnothing
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_featureslisp frames,lisp slotslisp
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 valuesvoid
a frame (or set of frames), an index, a set of slots, and a set of valuesnothing
Indexes the frame (or set of frames) based on the specified slots
fd_strict_searchlisp indices,lisp speclisp
an index (or set/choice of indices) and a list of sets/choices of featuresa 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 |

FunctionArgumentsReturns
fd_find_indexfd_u8char *idfd_index
a stringa pointer to an index or NULL
Returns the index whose id matches the given string.
fd_index_dropfd_index x,lisp key,lisp valuevoid
an index pointer, a lisp key, a lisp valuean index
Removes the values from the values associated with the key in the index.
fd_index_get_sizefd_index x,lisp keyunsigned int
an index pointer, a lisp keythe number of values associated with the key in the index
Returns the number of values associated with the key in the index
fd_revert_indexfd_index xvoid
a pointer to an indexnothing
Erases all of the changes made to the specified index.
fd_set_index_zipf_thresholdfd_index ix,int thresholdvoid
an index, an integernothing
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_valuesfd_index xvoid
an index pointervoid
Arranges for an index to intern the values it stores
fd_index_prefetchfd_index x,lisp keysvoid
an index pointer, and a choice of keysan index
Prefetches the values for particular keys.
fd_commit_indexfd_index xvoid
a pointer to an indexnothing
Saves the changes made to the specified index.
fd_interpret_indexlisp specfd_index
an expression and an environmenta 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_sizevoid
a pointer to an indexnothing
Grows the internal tables for an index to accomodate n keys and n mods
fd_index_keysfd_index idxlisp
a pointer to an indexnothing
Non-deterministically returns all the keys in an index.
fd_for_indicesvoid (*fcnvoid
a function on pointers to indicesnothing
Calls the function on all registered indices.
fd_use_indexfd_u8char *specfd_index
a stringan 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_addfd_index x,lisp key,lisp valuevoid
an index pointer, a lisp key, a lisp valuean index
Adds the value to the values associated with the key in the index.
fd_close_indexfd_index idxvoid
a pointer to an indexnothing
Closes an index
fd_index_getfd_index x,lisp key,lisp dfltlisp
an index pointer, a lisp key, and a default valuethe 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_indexfd_index xvoid
a pointer to an indexnothing
Frees most of the space used by the cached values of an index.
fd_index_setfd_index x,lisp key,lisp valuevoid
an index pointer, a lisp key, a lisp valuean 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 |

FunctionArgumentsReturns
fd_allocate_pool char *super_pool,unsigned int capacity,char *labelFD_OID
a super pool id, a capacity, and a string labelan 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_labelFD_OID
a super pool id, a base, a capacity, and a lisp pointer labelan FD_OID
Asserts lost information about a pool in a super pool.
fd_super_pool_topchar *idFD_OID
a super pool idan FD_OID
Returns the highest allocated FD_OID in a super pool
fd_super_pool_loadingchar *idfloat
a super pool ida float
Returns the fraction of the super pool which is allocated
fd_super_pool_basechar *idFD_OID
a super pool idan 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 |

FunctionArgumentsReturns
fd_use_network_poolchar *servername,int port,fd_u8char *idfd_network_pool
a port number, a host name, and an id stringa 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 |

FunctionArgumentsReturns
fd_close_poolfd_pool pvoid
a pointer to a poolvoid
Closes open file pointers or network connections underlying the pool.
fd_control_frame_printingint levelvoid
an integral print levelvoid
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_valuelisp oidlisp
a lisp pointer to an oida lisp pointer
Gets the value of an OID, doing fetching from files or network as neccessary.
fd_set_oid_valuelisp oid,lisp valuevoid
a lisp pointer to an oid and a lisp pointer to a valuenone
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_modifiedlisp oidvoid
a lisp pointer to an oidvoid
Marks the designated OID as modified and signals an error if it cannot be modified.
fd_show_poolidsint use_idsvoid
1 or 0void
Determines if pool ids are used to print OIDs.
fd_swap_out_poolfd_pool pvoid
a pointer to a poolvoid
Frees any space being used for the values of unmodified OIDs in pool. It doesn't do anything about committing changes.
fd_try_oid_valuelisp oidlisp
a lisp pointer to an oida 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_oidlisp oidint
a lisp pointer to an oid1 if successful, 0 otherwise
Commits any changes to an oid using pool specific methods, as appropriate.
fd_print_oidlisp frame,fd_string_stream ssvoid
a lisp pointer (to an `oid') and a string streamnothing
Outputs an external representation of the oid, consisting of its ID followed by its OBJ-NAME slot (if it exists).
fd_swap_outlisp oidvoid
a lisp pointer to an oidnone
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_modifiedplisp oidint
a lisp pointer to an oid1 or 0
Returns 1 if the oid has usaved modifications.
fd_revert_oidlisp oidint
a lisp pointer to an oid1 if successful, 0 otherwise
Erases any uncommited changes to the designated oid.
fd_new_oidfd_pool plisp
a pointer to a pool structurea 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_poolfd_pool pvoid
a pointer to a poolvoid
Erases any uncommited changes to the oids in the pool.
fd_get_modifiedfd_pool p,int *n_oids,int resetfd_lisp *
a pointer to a pool, a result pointer to an int, and a flaga 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 |

FunctionArgumentsReturns
fd_get_poollisp idfd_pool
a lisp pointer to an OIDa pointer to a pool
Finds the pool containing an oid.
fd_random_oidfd_pool plisp
a pointer to a poolan 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_poolsvoid (*fcnvoid
a function on a pool pointer and a void pointer and a void data pointervoid
Applies the function to each known pool and the data pointer passed to the call (got that?).
fd_interpret_poollisp specfd_pool
an expression and an environmenta pointer to a pool
Evaluates the expression in the environment and tries to produce an index object from the result.
fd_commit_poolfd_pool pvoid
a poolnothing
fd_find_pool_namedfd_u8char *namefd_pool
a utf-8 stringa pointer to a pool or NULL
Returns the pool which has been assigned the designated name.
fd_register_poolfd_pool pint
a pointer to a poolvoid
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_locatorfd_pool (*olvoid
a function which maps OIDs to poolsnothing
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_loadfd_pool pint
a pointer to a poolan int
Returns the number of OIDs allocated in pool.
fd_locate_poollisp loidfd_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_poolfd_u8char *cfd_pool
a pool specificationa 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 |

FunctionArgumentsReturns
fd_report_framerd_statsFILE *tovoid
nonevoid
Reports framerd stats to the standard error.

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

fd_use_network_index |

FunctionArgumentsReturns
fd_use_network_indexchar *servname,int port_no,fd_u8char *idfd_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 |

FunctionArgumentsReturns
fd_load_filechar *filename,char *enc,fd_lispenv envlisp
a filename string, an encoding string, an environmenta lisp pointer
Loads a file into a particular environment with a particular encoding.
fd_get_modulefd_u8char *name,fd_u8char *filename,int allfd_lispenv
a module name, a filename, and an int flaga 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_librarychar *filename,char *enc,fd_lispenv envlisp
a filename string, an encoding string, an environmenta 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

FunctionArgumentsReturns

Functions defined in src/eval/threads.c

fd_thread_symbind | fd_thread_symeval |

FunctionArgumentsReturns
fd_thread_symevallisp symlisp
a lisp symbola lisp value
Returns the thread-local value assigned to a symbol. This increfs the value it returns.
fd_thread_symbindlisp sym,lisp valuevoid
a lisp symbol and a lisp valuevoid
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 |

FunctionArgumentsReturns
fd_add_restricted_cprocchar *name,int n_args,lisp (*procvoid
a string, an int, and a function pointervoid
Defines a primitive procedure in the standard restricted environment.
fd_add_restricted_special_form char *name,lisp (*procvoid
a string, an int, and a function pointervoid
Defines a primitive special form in the standard restricted environment.
fd_add_restricted_lexprchar *name,int argcode,lisp (*procvoid
a string, an int, and a function pointervoid
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 |

FunctionArgumentsReturns
fd_set_valuelisp sym,lisp val,lispenv envvoid
a symbol, a value, and an environmentvoid
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_envfd_lispenv envvoid
an environmentvoid
Frees a dynamically allocated environment
fd_mallocd_envfd_lispenv envfd_lispenv
an environmenta dynamically allocated environment
Returns the existing dynamic copy of an environment or makes one if one doesn't exist.
fd_registered_modulefd_u8char *name,int riskyfd_lispenv
a stringa lisp environment
Returns a module environment, register
fd_required_symevalfd_lisp sym,lispenv envfd_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_usesfd_lispenv env,fd_lispenv usevoid
two pointers to modulesvoid
Adds the second argument to the uses for the first argument, if it is not already included.
fd_make_gproclisp lambda,lispenv envlisp
a lisp lambda expression and an environmenta procedure object closing the expression in the environment
fd_make_sproclisp lambda,lispenv envlisp
a lisp lambda expression and an environmenta procedure object closing the expression in the environment
fd_register_modulefd_u8char *name,fd_lispenv menvvoid
a string and an environmentvoid
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_valuelisp sym,lisp val,lispenv envvoid
a symbol, a value, and an environmentvoid
Sets the value for a variable, but never effecting the global environment.
fd_make_envfd_lispenv envfd_lispenv
a parent environmenta new environment
This dynamically allocates a new environment with a specified parent.
fd_symevalfd_lisp sym,lispenv envfd_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_ssproclisp lambda,lispenv envlisp
a lisp lambda expression and an environmenta procedure object closing the expression in the environment
with a lock for synchronizing application.
fd_bind_valuelisp sym,lisp val,lispenv envvoid
a symbol, a value, and an environment1 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_modulefd_u8char *name,fd_lispenv menvvoid
a string and an environmentvoid
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_exportfd_lispenv modenv,lisp symbolvoid
a pointer to a module and a lisp symbolvoid
Arranges for the module to export the specified symbol.

Functions defined in src/eval/mini.c

FunctionArgumentsReturns

Functions defined in src/eval/ndeval.c

FunctionArgumentsReturns

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 |

FunctionArgumentsReturns
fd_make_rprocfd_server s,lisp oplisp
a server id and a remote op name, both lisp pointersan rproc to invoke the op name on the named server
fd_do_applicationlisp fcn,lisp argvalueslisp
two lisp values, a procedure and a list of argumentsa value or a tail call resulting from applying the
procedure to the arguments.
fd_eval_eltslisp lst,lispenv envlisp
a list of expressionsa list of objects
Returns the result of evaluating each element of a list in an environment. Actual implementation is above.
fd_mv_returnlisp *x,int lenfd_lisp
a pointer to an array of lisp pointers and a int lengtha multiple value object whose elements are the elements
of the array (copied into a new array)
fd_evallisp exprlisp
an expressiona lisp pointer
Evaluates an expression in the top level environment. It's argument is not gc'd.
fd_add_aliasfd_lispenv env,char *alias,char *namevoid
a null terminated string, an argument count, and a pointer to a C functionnothing (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 (*procvoid
a null terminated string and a pointer to a C functionnothing (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_strevalchar *inputchar *
a stringa string
Evaluates an expression in the top level environment.
fd_evalstringchar *input,lispenv envchar *
a stringa string
Evaluates an expression in the top level environment.
fd_add_cprocfd_lispenv env,char *name,int n_args,lisp (*procvoid
a null terminated string, an argument count, and a pointer to a C functionnothing (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_typeplisp x,lisp tagint
a lisp record and a tag1 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_evallisp expr,lispenv envlisp
a lisp expression and a lisp environmenta lisp value, possibly a tail call
This starts the evaluation process which can be finished with fd_finish_value
_fd_finalize_static_tail_calllisp tc,fd_lispenv envlisp
a tail call object and an environmentthe results of evaluating the tail call until it no
longer depends on the given environment
fd_finish_valuelisp valuelisp
a lisp pointera lisp pointer which isn't a tail call
This will force any tail call to evaluate to a real value.
fd_eval_in_envlisp expr,lispenv envlisp
a lisp expression and a lisp environmenta 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_reflisp x,unsigned int ifd_lisp
a lisp pointer and an intthe ith value represented by the pointer or FD_VOID otherwise
fd_add_special_form fd_lispenv env,char *name,lisp (*procvoid
a null terminated string and a pointer to a C functionnothing (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_supertypelisp tag,lisp super_tagvoid
two lisp tagsnothing (void)
Records a super type relationship between two tags
fd_mv_aritylisp xint
a lisp pointerthe number of values represented by the pointer
{}

Functions defined in src/scheme/cxr.c

FunctionArgumentsReturns

Functions defined in src/scheme/reflect.c

FunctionArgumentsReturns

Functions defined in src/scheme/pairs.c

FunctionArgumentsReturns

Functions defined in src/scheme/characters.c

FunctionArgumentsReturns

Functions defined in src/scheme/bignum.c

FunctionArgumentsReturns

Functions defined in src/scheme/ioprims.c

FunctionArgumentsReturns

Functions defined in src/scheme/arith.c

FunctionArgumentsReturns

Functions defined in src/scheme/special.c

FunctionArgumentsReturns

Functions defined in src/scheme/libfdscheme.c

FunctionArgumentsReturns

Functions defined in src/scheme/strings.c

fd_string_length | fd_string_ref | fd_string_set |

FunctionArgumentsReturns
fd_string_setfd_lisp str,int index,unichar_t chvoid
a lisp pointer to a string, an int, and a unicode charactervoid
Modifies the string so that a particular character is changed.
fd_string_lengthlisp strint
a lisp pointer to a stringthe length (in unicode characters) of a string
fd_string_reflisp string,int indexunichar_t
a lisp pointer to a string and an intan unsigned int encoding a unicode character

Functions defined in src/scheme/records.c

FunctionArgumentsReturns
{}

Functions defined in src/fdscript/framerd.c

FunctionArgumentsReturns

Functions defined in src/fdscript/osprims.c

fd_register_url_protocol | fd_urlget |

FunctionArgumentsReturns
fd_register_url_protocolchar *protocol,fd_lisp (*gettervoid
a string and a pointer to an URL handlervoid
Registers the handler for a particular protocol name.
fd_urlgetchar *urlfd_lisp
a string and a pointer to an inta 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

FunctionArgumentsReturns

Functions defined in src/fdscript/prims.c

FunctionArgumentsReturns

Functions defined in src/fdscript/seq.c

FunctionArgumentsReturns

Functions defined in src/fdscript/printout.c

FunctionArgumentsReturns

Functions defined in src/fdscript/hashprims.c

FunctionArgumentsReturns

Functions defined in src/fdscript/maint.c

FunctionArgumentsReturns
{}

Functions defined in src/text/match.c

FunctionArgumentsReturns

Functions defined in src/text/mime.c

fd_parse_mime |

FunctionArgumentsReturns
fd_parse_mimechar *packet,int lenfd_lisp
a C string and an integer lengtha 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 |

FunctionArgumentsReturns
fd_text_substfd_lisp pat,fd_lisp stringfd_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 |

FunctionArgumentsReturns
fd_xmltag_namespacefd_lisp tagfd_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_attributesfd_lisp xfd_lisp
a lisp pointera 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_namefd_lisp tagfd_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_tagfd_lisp xfd_lisp
a lisp pointera lisp pointer
Gets the tag (or element type) of an pair or OID describing an XML element.
fd_parse_htmlfd_u8char *stringfd_lisp
a UTF8-stringA 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_xmlfd_u8char *string,int err_level,fd_lisp nsfd_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_xmltagfd_lisp ns,fd_lisp basefd_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_contentfd_lisp xfd_lisp
a lisp pointera 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

FunctionArgumentsReturns

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 |

FunctionArgumentsReturns
fd_unparse_xmlfd_lisp expr,fd_lispenv env,fd_htstream *hsvoid
an xml element rep, an environment, and an http streamvoid
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_outputfd_htstream *svoid
a pointer to an fd_htstreamvoid
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 (*_putsvoid
three functionsvoid
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_httpchar *mimevoid
a string containing a mime type specificationvoid
Outputs a content-type header field, including a charset specifier which refers to the current default character encoding.
fd_http_putschar *s,fd_htstream *streamvoid
a pointer to a null-terminated string and an FD_HTTP_STREAM structvoid
Writes the string to the stream.
fd_http_write_byteschar *s,int n,fd_htstream *streamvoid
a pointer to a null-terminated string and an FD_HTTP_STREAM structvoid
Writes the string to the stream.

Functions defined in src/text/getnames.c

FunctionArgumentsReturns

Functions defined in src/text/stem.c

fd_stem_english_word |

FunctionArgumentsReturns
fd_stem_english_wordfd_u8char *originalchar *
an ASCII stringa 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

FunctionArgumentsReturns

Functions defined in src/misc/cgiparse.c

FunctionArgumentsReturns

Functions defined in src/misc/indextools.c

FunctionArgumentsReturns

Functions defined in src/misc/server.c

FunctionArgumentsReturns
{}