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

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 free 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 file, suitable for printing.

The SFL is written in ANSI C and has been ported to MS-DOS, Windows, UNIX systems (Linux, 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 300 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.  

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
  • 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_write
  • file_copy
  • file_rename
  • file_delete
  • file_exists
  • file_where
  • file_cycle
  • file_cycle_needed
  • file_has_changed
  • safe_to_extend
  • default_extension
  • fixed_extension
  • strip_extension
  • strip_file_path
  • strip_file_name
  • file_is_readable
  • file_is_writeable
  • file_is_executable
  • file_is_program
  • file_is_directory
  • file_exec_name
  • get_file_size
  • get_file_time
  • file_slurp
  • file_lines
  • file_set_eoln
  • get_tmp_file_name
  • Initialisation file access functions
  • ini_find_section
  • ini_scan_section
  • ini_dyn_load
  • ini_dyn_save
  • ini_dyn_changed
  • ini_dyn_refresh
  • ini_dyn_value
  • ini_dyn_values
  • 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
  • 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
  • SMTP mailer function
  • smtp_send_mail
  • srcdoc W (sflmail.c 336): function uuencode not known
  • srcdoc W (sflmail.c 361): function putgroup not known
  • srcdoc W (sflmail.c 391): function getreply not known
  • srcdoc W (sflmail.c 421): function getfilename not known
  • get_last_smtp_message
  • 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_used
  • mem_allocs
  • mem_frees
  • mem_display
  • mem_scavenger
  • 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
  • resolve_path
  • locate_path
  • clean_path
  • get_curdir
  • set_curdir
  • file_matches
  • make_dir
  • remove_dir
  • Process control functions
  • process_create
  • 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
  • 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_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_unescape
  • http_query2strt
  • http_query2symb
  • http_query2descr
  • http_encode_meta
  • cgi_parse_query_vars
  • cgi_parse_file_vars
  • http_multipart_decode
  • is_full_url
  • 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
  • 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
  • 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
  • XML (Extensible Markup Language) access functions
  • xml_new
  • xml_modify_value
  • xml_item_name
  • xml_item_value
  • xml_free
  • xml_first_child
  • xml_next_sibling
  • xml_parent
  • xml_put_attr
  • xml_attr
  • xml_attr_name
  • xml_attr_value
  • xml_get_attr
  • xml_free_attr
  • xml_first_attr
  • xml_next_attr
  • xml_changed
  • xml_refresh
  • xml_save
  • xml_load

  • | << | < | > | >> iMatix Copyright © 1996-98 iMatix