the standard function library

来源:百度文库 编辑:神马文学网 时间:2024/04/27 22:37:59
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 theTable of Contents. Also, this documentation is available as a single compressedzip file orgzipped 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: Compression, encryption, and encoding; Datatype conversion and formatting; Dates, times, and calendars; Directory and environment access; User and process groups; Inverted bitmap indices; Symbol tables; Error message files; Configuration files; String manipulation and searching; File access; Internet socket access; Internet programming (MIME, CGI); SMTP (e-mail) access; Server (batch) programming; Program tracing.
The SFL is free software that you may use and distribute for private or commercial purposes according to theSFL License Agreement.
Send comments about the SFL, bug reports, and submissions tosfl@imatix.com. Table of Contents
What Is The SFLOriginsObjectivesPortability
Installing The SFLAvailability and DistributionInstallation for UNIX SystemsInstallation for Digital VMS SystemsInstallation for WindowsInstallation for MS-DOS
Using The SFLThe Universal Header File - prelude.hThe Library Header File - sfl.hSystem NotesTo Do List
Contributors and ReferencesThe SFL License AgreementUniversal Header File for C programmingDefine SFL versionLarge bitstring manipulation functionsbits_initbits_termbits_createbits_destroybits_setbits_clearbits_testbits_fputbits_fget
Compression functionscompress_blockexpand_blockcompress_rleexpand_rlecompress_nullsexpand_nullscompress_bitsexpand_bits
Console output functionsconsole_sendconsole_enableconsole_disableconsole_set_modeconsole_capturecoprintfcoputscoputc
Conversion functionsconv_bool_strconv_date_pictconv_date_strconv_number_strconv_str_boolconv_str_dateconv_str_dayconv_str_numberconv_str_timeconv_time_pictconv_time_str
Encryption and decryption functionscrypt_encodecrypt_decodecalculate_crc
Date and time functionsdate_nowtime_nowleap_yearjulian_dateday_of_weeknext_weekdayprev_weekdayweek_of_yearyear_quarterdefault_centurypack_datepack_timeunpack_dateunpack_timedate_to_daysdays_to_datedate_to_timertimer_to_datetimer_to_timetimer_to_gmdatetimer_to_gmtimetime_to_csecscsecs_to_timefuture_datepast_datedate_diffvalid_datevalid_timedate_is_futuredate_is_pasttimezone_stringlocal_to_gmtgmt_to_localsafe_localtimesafe_gmtime
External data representation functionsexdr_writeexdr_writedexdr_read
Fast string searching functionsstrfindstrfind_rstrfind_rbmemfindmemfind_rmemfind_rbtxtfind
File-access functionsfile_openfile_locatefile_closefile_readfile_readnfile_writefile_copyfile_concatfile_renamefile_deletefile_existsfile_wherefile_where_extfile_cyclefile_cycle_neededfile_has_changedsafe_to_extenddefault_extensionfixed_extensionstrip_extensionadd_extensionstrip_file_pathstrip_file_nameget_new_filenamefile_is_readablefile_is_writeablefile_is_executablefile_is_programfile_is_directoryfile_is_legalfile_exec_nameget_file_sizeget_file_timeget_file_linesfile_slurpfile_slurplfile_set_eolnget_tmp_file_namefile_fhredirectfile_fhrestoreftmp_openftmp_close
Fortune-cookie functionsfortune_buildfortune_read
Initialisation file access functionsini_find_sectionini_scan_sectionini_dyn_loadini_dyn_loadeini_dyn_saveini_dyn_changedini_dyn_refreshini_dyn_valueini_dyn_valuessrcdoc W (sflini.c 649): function ini_dyn_default not known
Multilanguage supportset_userlangset_userlang_strget_userlangget_userlang_strset_accentsget_accentsget_units_nameget_tens_nameget_day_nameget_day_abbrevget_month_nameget_month_abbrevtimestamp_string
Line buffering functionslinebuf_createlinebuf_destroylinebuf_resetlinebuf_appendlinebuf_firstlinebuf_nextlinebuf_lastlinebuf_prev
Linked-list functionslist_unlinklist_relinklist_addlist_removelist_sort
SMTP mailer functionsmtp_send_mail_exsmtp_send_mail
Mathematic functionspoint_in_rectpoint_in_circlepoint_in_poly
Message-file access functionsopen_message_fileclose_message_fileprint_messagemessage_text
Memory allocation functionsmem_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_usedmem_allocsmem_freesmem_displaymem_scavengermem_freeall
MIME support functionsencode_base64decode_base64decode_mime_timeencode_mime_time
Linked-list functionsnode_createnode_destroynode_relink_afternode_relink_beforenode_unlinknode_relink
Directory access functionsopen_dirread_dirclose_dirformat_dirfix_dirfree_dirload_dir_listfree_dir_listsort_dir_listadd_dir_listresolve_pathlocate_pathclean_pathget_curdirset_curdirfile_matchesmake_dirremove_dirdir_usagedir_files
Process control functionsprocess_create_fullprocess_createprocess_setinfoprocess_open_ioprocess_close_ioprocess_statusprocess_killprocess_closeprocess_serverprocess_alarmprocess_escprocess_unescprocess_priority
Time-slot functionsyear_range_emptyyear_range_fillyear_slot_clearyear_slot_setyear_slot_filledday_range_emptyday_range_fillday_slot_clearday_slot_setday_slot_filleddate_to_daytime_to_min
String-handling functionsstrduplstrfreestrskpstrcsetstrpadstrlwcstrupcstrcropstropenstrclosestruniquestrmatchstrprefixedstrprefixstrdefixstrhashstrconvchxstrcatxstrcpylexcmplexncmplexwcmpsoundexsoundexnstrt2descrdescr2strtstrtfreestrcntchstrlookupstrreformatremovecharsreplacechrswithinsertstringinsertcharleftfillrightfilltrimltrimsearchreplacedeletestringgetstrfldsetstrfldgetstrfldlenfindstrinfilegetequvalmatchtablestringreplacewordwrapstrstricstrstrtempcmpistokeneatstreatstrpastmovestrpasteatcharisoneoftokens
TCP/IP, UDP/IP socket functionssock_initsock_termpassive_TCPpassive_UDPpassive_socketcreate_socketconnect_TCPconnect_UDPconnect_TCP_fastconnect_UDP_fastconnect_socketconnect_to_peeraddress_end_pointbuild_sockaddrsocket_localaddrsocket_peeraddrsocket_nodelaysocket_is_alivesocket_erroraccept_socketconnect_errorget_sock_addrget_peer_addrread_TCPwrite_TCPread_UDPwrite_UDPclose_socketsock_selectget_hostnameget_hostaddrget_hostaddrssock_ntoasockmsgwinsock_last_errorsocket_is_permittedget_host_fileget_name_server
Symbol-table functionssym_create_table_sym_delete_tablesym_empty_tablesym_merge_tablessym_lookup_symbolsym_create_symbol_sym_assume_symbol_sym_delete_symbolsym_exec_allsym_hashsym_get_namesym_get_valuesym_get_numbersym_get_booleansym_set_valuesym_sort_tablesymb2strt_strt2symb_symb2descr_descr2symb_
System-level functions (assertions,...)sys_assertsys_name
HTTP and CGI Support functionshttp_escapehttp_escape_sizehttp_escape_hexhttp_unescapehttp_unescape_hexhttp_query2strthttp_query2symbhttp_query2descrhttp_encode_metaencode_meta_charhttp_decode_metadecode_meta_charncgi_parse_query_varscgi_parse_file_varshttp_multipart_decodeis_full_urlbuild_full_urlhttp_time_strcgi_get_inputcgi_fld_by_namecgi_fld_by_indexcgi_fld_len_by_indexdisplayform
Environment variable functionsenv_get_stringenv_get_numberenv_get_booleanenv2descrdescr2envenv2symbsymb2envenv_copy
String token manipulation functions.tok_splittok_split_richtok_freetok_pushtok_sizetok_text_sizetok_subst
Linked-list functionstree_inittree_inserttree_deletetree_find_eqtree_find_lttree_find_letree_find_gttree_find_getree_traversetree_firsttree_lasttree_nexttree_prev
Tracing functionsenable_tracedisable_tracepush_tracepop_traceset_trace_filetrace
Process user id (uid) and group id (gid) functionsget_uid_nameget_gid_nameset_uid_userset_uid_rootset_gid_userset_gid_rootset_uid_gidget_login
XML (Extensible Markup Language) access functionsxml_createxml_newxml_modify_valuexml_renamexml_item_namexml_item_valuexml_freexml_attach_childxml_attach_siblingxml_detachxml_first_childxml_last_childxml_next_siblingxml_prev_siblingxml_parentxml_put_attr_icxml_attr_icxml_attr_namexml_attr_valuexml_get_attr_icxml_free_attrxml_first_attrxml_last_attrxml_next_attrxml_prev_attrxml_changedxml_refresh
XML serialisation functionsxml_save_filexml_save_stringxml_errorxml_seems_to_bexml_load_filexml_load_string