| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

The Standard Function Library

The SFL (Standard Function Library) from iMatix is a portable function library for C/C++ programs. The SFL is the result of many years' development, and is provided as Open Source software for the benefit of the Internet community.

You may want to go straight to the Table of Contents. Also, this documentation is available as a single compressed zip file or gzipped tar file, suitable for printing.

The SFL is written in ANSI C and has been ported to MS-DOS, Windows, OS/2, Linux and other UNIX systems (IBM AIX, SunOS, HP/UX, Solaris, NetBSD, FreeBSD, SCO OpenServer, Digital UNIX) and Digital OpenVMS. It comes with complete sources and documentation in HTML.

The SFL provides about 450 functions that cover these areas:

The SFL is free software that you may use and distribute for private or commercial purposes according to the SFL License Agreement.

Send comments about the SFL, bug reports, and submissions to sfl@imatix.com.  

Table of Contents

  • What Is The SFL
  • Origins
  • Objectives
  • Portability
  • Installing The SFL
  • Availability and Distribution
  • Installation for UNIX Systems
  • Installation for Digital VMS Systems
  • Installation for Windows
  • Installation for MS-DOS
  • Using The SFL
  • The Universal Header File - prelude.h
  • The Library Header File - sfl.h
  • System Notes
  • To Do List
  • Contributors and References
  • The SFL License Agreement
  • Universal Header File for C programming
  • Define SFL version
  • Large bitstring manipulation functions
  • bits_init
  • bits_term
  • bits_create
  • bits_destroy
  • bits_set
  • bits_clear
  • bits_test
  • bits_fput
  • bits_fget
  • Compression functions
  • compress_block
  • expand_block
  • compress_rle
  • expand_rle
  • compress_nulls
  • expand_nulls
  • compress_bits
  • expand_bits
  • Console output functions
  • console_send
  • console_enable
  • console_disable
  • console_set_mode
  • console_capture
  • coprintf
  • coputs
  • coputc
  • Conversion functions
  • conv_bool_str
  • conv_date_pict
  • conv_date_str
  • conv_number_str
  • conv_str_bool
  • conv_str_date
  • conv_str_day
  • conv_str_number
  • conv_str_time
  • conv_time_pict
  • conv_time_str
  • Encryption and decryption functions
  • crypt_encode
  • crypt_decode
  • calculate_crc
  • Date and time functions
  • date_now
  • time_now
  • leap_year
  • julian_date
  • day_of_week
  • next_weekday
  • prev_weekday
  • week_of_year
  • year_quarter
  • default_century
  • pack_date
  • pack_time
  • unpack_date
  • unpack_time
  • date_to_days
  • days_to_date
  • date_to_timer
  • timer_to_date
  • timer_to_time
  • timer_to_gmdate
  • timer_to_gmtime
  • time_to_csecs
  • csecs_to_time
  • future_date
  • past_date
  • date_diff
  • valid_date
  • valid_time
  • date_is_future
  • date_is_past
  • timezone_string
  • local_to_gmt
  • gmt_to_local
  • safe_localtime
  • safe_gmtime
  • External data representation functions
  • exdr_write
  • exdr_writed
  • exdr_read
  • Fast string searching functions
  • strfind
  • strfind_r
  • strfind_rb
  • memfind
  • memfind_r
  • memfind_rb
  • txtfind
  • File-access functions
  • file_open
  • file_locate
  • file_close
  • file_read
  • file_readn
  • file_write
  • file_copy
  • file_concat
  • file_rename
  • file_delete
  • file_exists
  • file_where
  • file_where_ext
  • file_cycle
  • file_cycle_needed
  • file_has_changed
  • safe_to_extend
  • default_extension
  • fixed_extension
  • strip_extension
  • add_extension
  • strip_file_path
  • strip_file_name
  • get_new_filename
  • file_is_readable
  • file_is_writeable
  • file_is_executable
  • file_is_program
  • file_is_directory
  • file_is_legal
  • file_exec_name
  • get_file_size
  • get_file_time
  • get_file_lines
  • file_slurp
  • file_slurpl
  • file_set_eoln
  • get_tmp_file_name
  • file_fhredirect
  • file_fhrestore
  • ftmp_open
  • ftmp_close
  • Fortune-cookie functions
  • fortune_build
  • fortune_read
  • Initialisation file access functions
  • ini_find_section
  • ini_scan_section
  • ini_dyn_load
  • ini_dyn_loade
  • ini_dyn_save
  • ini_dyn_changed
  • ini_dyn_refresh
  • ini_dyn_value
  • ini_dyn_values
  • srcdoc W (sflini.c 649): function ini_dyn_default not known
  • Multilanguage support
  • set_userlang
  • set_userlang_str
  • get_userlang
  • get_userlang_str
  • set_accents
  • get_accents
  • get_units_name
  • get_tens_name
  • get_day_name
  • get_day_abbrev
  • get_month_name
  • get_month_abbrev
  • timestamp_string
  • Line buffering functions
  • linebuf_create
  • linebuf_destroy
  • linebuf_reset
  • linebuf_append
  • linebuf_first
  • linebuf_next
  • linebuf_last
  • linebuf_prev
  • Linked-list functions
  • list_unlink
  • list_relink
  • list_add
  • list_remove
  • list_sort
  • SMTP mailer function
  • smtp_send_mail_ex
  • smtp_send_mail
  • Mathematic functions
  • point_in_rect
  • point_in_circle
  • point_in_poly
  • Message-file access functions
  • open_message_file
  • close_message_file
  • print_message
  • message_text
  • Memory allocation functions
  • mem_alloc_
  • mem_realloc_
  • mem_strdup_
  • mem_strfree_
  • mem_free_
  • mem_assert_
  • mem_checkall_
  • mem_check_
  • mem_descr_
  • mem_new_trans_
  • mem_commit_
  • mem_rollback_
  • mem_size_
  • mem_used
  • mem_allocs
  • mem_frees
  • mem_display
  • mem_scavenger
  • mem_freeall
  • MIME support functions
  • encode_base64
  • decode_base64
  • decode_mime_time
  • encode_mime_time
  • Linked-list functions
  • node_create
  • node_destroy
  • node_relink_after
  • node_relink_before
  • node_unlink
  • node_relink
  • Directory access functions
  • open_dir
  • read_dir
  • close_dir
  • format_dir
  • fix_dir
  • free_dir
  • load_dir_list
  • free_dir_list
  • sort_dir_list
  • add_dir_list
  • resolve_path
  • locate_path
  • clean_path
  • get_curdir
  • set_curdir
  • file_matches
  • make_dir
  • remove_dir
  • dir_usage
  • dir_files
  • Process control functions
  • process_create_full
  • process_create
  • process_setinfo
  • process_open_io
  • process_close_io
  • process_status
  • process_kill
  • process_close
  • process_server
  • process_alarm
  • process_esc
  • process_unesc
  • process_priority
  • Time-slot functions
  • year_range_empty
  • year_range_fill
  • year_slot_clear
  • year_slot_set
  • year_slot_filled
  • day_range_empty
  • day_range_fill
  • day_slot_clear
  • day_slot_set
  • day_slot_filled
  • date_to_day
  • time_to_min
  • String-handling functions
  • strdupl
  • strfree
  • strskp
  • strcset
  • strpad
  • strlwc
  • strupc
  • strcrop
  • stropen
  • strclose
  • strunique
  • strmatch
  • strprefixed
  • strprefix
  • strdefix
  • strhash
  • strconvch
  • xstrcat
  • xstrcpy
  • lexcmp
  • lexncmp
  • lexwcmp
  • soundex
  • soundexn
  • strt2descr
  • descr2strt
  • strtfree
  • strcntch
  • strlookup
  • strreformat
  • removechars
  • replacechrswith
  • insertstring
  • insertchar
  • leftfill
  • rightfill
  • trim
  • ltrim
  • searchreplace
  • deletestring
  • getstrfld
  • setstrfld
  • getstrfldlen
  • findstrinfile
  • getequval
  • matchtable
  • stringreplace
  • wordwrapstr
  • stricstr
  • strtempcmp
  • istoken
  • eatstr
  • eatstrpast
  • movestrpast
  • eatchar
  • isoneoftokens
  • TCP/IP, UDP/IP socket functions
  • sock_init
  • sock_term
  • passive_TCP
  • passive_UDP
  • passive_socket
  • create_socket
  • connect_TCP
  • connect_UDP
  • connect_TCP_fast
  • connect_UDP_fast
  • connect_socket
  • connect_to_peer
  • address_end_point
  • build_sockaddr
  • socket_localaddr
  • socket_peeraddr
  • socket_nodelay
  • socket_is_alive
  • socket_error
  • accept_socket
  • connect_error
  • get_sock_addr
  • get_peer_addr
  • read_TCP
  • write_TCP
  • read_UDP
  • write_UDP
  • close_socket
  • sock_select
  • get_hostname
  • get_hostaddr
  • get_hostaddrs
  • sock_ntoa
  • sockmsg
  • winsock_last_error
  • socket_is_permitted
  • get_host_file
  • get_name_server
  • Symbol-table functions
  • sym_create_table_
  • sym_delete_table
  • sym_empty_table
  • sym_merge_tables
  • sym_lookup_symbol
  • sym_create_symbol_
  • sym_assume_symbol_
  • sym_delete_symbol
  • sym_exec_all
  • sym_hash
  • sym_get_name
  • sym_get_value
  • sym_get_number
  • sym_get_boolean
  • sym_set_value
  • sym_sort_table
  • symb2strt_
  • strt2symb_
  • symb2descr_
  • descr2symb_
  • System-level functions (assertions,...)
  • sys_assert
  • sys_name
  • HTTP and CGI Support functions
  • http_escape
  • http_escape_size
  • http_escape_hex
  • http_unescape
  • http_unescape_hex
  • http_query2strt
  • http_query2symb
  • http_query2descr
  • http_encode_meta
  • encode_meta_char
  • http_decode_meta
  • decode_meta_charn
  • cgi_parse_query_vars
  • cgi_parse_file_vars
  • http_multipart_decode
  • is_full_url
  • build_full_url
  • http_time_str
  • cgi_get_input
  • cgi_fld_by_name
  • cgi_fld_by_index
  • cgi_fld_len_by_index
  • displayform
  • Environment variable functions
  • env_get_string
  • env_get_number
  • env_get_boolean
  • env2descr
  • descr2env
  • env2symb
  • symb2env
  • env_copy
  • String token manipulation functions.
  • tok_split
  • tok_split_rich
  • tok_free
  • tok_push
  • tok_size
  • tok_text_size
  • tok_subst
  • Linked-list functions
  • tree_init
  • tree_insert
  • tree_delete
  • tree_find_eq
  • tree_find_lt
  • tree_find_le
  • tree_find_gt
  • tree_find_ge
  • tree_traverse
  • tree_first
  • tree_last
  • tree_next
  • tree_prev
  • Tracing functions
  • enable_trace
  • disable_trace
  • push_trace
  • pop_trace
  • set_trace_file
  • trace
  • Process user id (uid) and group id (gid) functions
  • get_uid_name
  • get_gid_name
  • set_uid_user
  • set_uid_root
  • set_gid_user
  • set_gid_root
  • set_uid_gid
  • get_login
  • XML (Extensible Markup Language) access functions
  • xml_create
  • xml_new
  • xml_modify_value
  • xml_rename
  • xml_item_name
  • xml_item_value
  • xml_free
  • xml_attach_child
  • xml_attach_sibling
  • xml_detach
  • xml_first_child
  • xml_last_child
  • xml_next_sibling
  • xml_prev_sibling
  • xml_parent
  • xml_put_attr_ic
  • xml_attr_ic
  • xml_attr_name
  • xml_attr_value
  • xml_get_attr_ic
  • xml_free_attr
  • xml_first_attr
  • xml_last_attr
  • xml_next_attr
  • xml_prev_attr
  • xml_changed
  • xml_refresh
  • XML serialisation functions
  • xml_save_file
  • xml_save_string
  • xml_error
  • xml_seems_to_be
  • xml_load_file
  • xml_load_string

  • | << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation