📄 readme
字号:
This directory hierarchy has the source of Sfio, the Safe/Fast I/O library.Sfio provides all aspects of buffered I/O. Its interface is saner and itsimplementation is better than existing versions of the ANSI-C Stdio library.For backward compatibility, Sfio also provides packages allowing existingcode based on Stdio to either recompile or relink using Sfio.DIRECTORY HIERARCHY:. : source code for Sfio../sfio.3: manual page for Sfio../features: source code for generating configuration parameters../Sfio_f: function versions of sfio macros../Stdio_s: the source level <stdio> compatibility package../Stdio_b: the binary level <stdio> compatibility package../Sfio_dc: a collection of functions to create useful disciplines../Sfio_t: a set of regression tests for the Sfio library../Stdio_t: a set of regression tests for certain Stdio behaviors and for the compatibility packages.SOFTWARE CONSTRUCTION:The build procedure is based on the iffe language for automaticconfiguration. An iffe interpreter and its manual pages are included inthis code distribution. See the files in ./features for examples of iffeprobes to generate configuration parameters.There are two sets of libraries libsfio.a and libstdio.a: for uni-threaded applications, and libsfio-mt.a and libstdio-mt.a: for multi-threaded applications.To build the uni-threaded libraries, run the below command: make -f Makefile installTo build the multi-threaded libraries, run the below command: make -f Makefile install_mtDepending on the local platform, an application using the multi-threadedlibraries may need to specify a thread library at linkage time. For example,below are the known requirements for a few popular platforms: Irix, Linux, Solaris systems: -lpthread Hpux: -lcma BSD: noneREGRESSION TESTING:To run the regression tests of Sfio only, first do "cd Sfio_t", then do: runtest this tests the uni-threaded library runtest -mt [-lthread_library as discussed above] this tests the multi-threaded libraryThere are also a few regression tests for Stdio. To run these,first do "cd Stdio_t", then do: runtest this tests the native Stdio library. runtest -src this tests the uni-threaded library using the source compatibility mode. runtest -bin this tests the uni-threaded library using the binary compatibility mode. runtest -src -mt [-lthread_library as discussed above] this tests the multi-threaded library using the source compatibility mode. runtest -bin -mt [-lthread_library as discussed above] this tests the multi-threaded library using the binary compatibility mode.SFIO DISCIPLINES:IO disciplines allow applications to extend stream data processing.See the Sfio manual pages for detail on creating discipline structuresand inserting them into streams. The directory Sfio_dc contains a numberof useful disciplines, including one to uncompress a file compressedby the Unix compress program and one to make reading DOS text files morecomfortable by translating \r\n to \n.Disciplines are reusable code, please contribute any interesting disciplinesthat you come up with. This is best done by sending such code to me atthe address below. Sharing reusable code means that the name space mustbe managed. Therefore, I recommend that each discipline package providesthe following public interface:Sfdisc_t* sfdcXXX(Sfio_t* f, other arguments): Create a discipline of the type XXX and insert it into the stream f. For example, the below call create a discipline that make the stream "f" act as if it's the union of the "n" streams given in "array". sfdcunion(Sfio_t* f, Sfio_t** array, int n);CORRESPONDENCE:Comments, etc. should be sent to: Phong Vo AT&T Labs - Research 180 Park Avenue Florham Park, NJ 07932 e-mail: kpv@research.att.com
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -