⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.svn-base

📁 纯C数据结构
💻 SVN-BASE
字号:
This hierarchy contains all the source code in the forthcoming book`C Interfaces and Implementations' by David Hanson. For more information,see World-Wide Web page at http://www.cs.princeton.edu/software/cii/.Contents~~~~~~~~A distribution includes the following files and directories.README	this file.CPYRIGHT	copyright statement.packing.lst	a list of the files in the distribution.history.txt	describes the distribution's revision history; an ASCII version	of http://www.cs.princeton.edu/software/cii/history.html.include	interfaces (.h files) for the CII library.src	implementations (.c files) for the CII library.These directories hold the examples from the chapters indicated andadditional examples:double	 1/Introduction: doublewf	 8/Tablesxref	 9/Setsids	15/Low-Level Stringscalc	18/Arbitrary-Precision Arithmeticmpcalc	19/Multiple-Precision Arithmeticsieve	20/Threadssort	20/Threadsspin	20/Threadscref	version of xref that uses Text and Ringkref	version of cref that uses Str and Seqiref	version of cref that uses Text, Array, and MPidents	version of ids that uses Str_r* and Seqwords	version of ids that uses Text_r* and RingInstallation and Use~~~~~~~~~~~~~~~~~~~~The CII distributions are numbered X.Y where X is the major releasenumber and Y is the minor release number. Starting with major release1, minor releases fix bugs and perhaps make improvements, but do *not*change interfaces. The interfaces and the compiled library arecompatible with earlier and later minor releases; for example, aprogram compiled with the 1.3 release is compatible with release 1.8and vice versa. Major releases occur when one or more interfaces arechanged or extended, or when new interfaces are added. These invariantsdo *not* apply to the 0.9 beta releases.It's usually best to follow a similar naming scheme when installingCII so that programs compiled with one major release can berecompiled even after a subsequent major release has been installed.The minor release number can be omitted. On UNIX, this can beaccomplished by installing the interfaces in, say,/usr/local/lib/cii/X/include, where X is the major release number,and installing the library, libcii.a, in/usr/local/lib/cii/X/libcii.a.At sites with multiple platforms (architectures and OSes) and asingle /usr/local hierarchy, the library can be installed in aplatform-specific location below /usr/local/cii/X, e.g.,/usr/local/lib/cii/X/alpha-osf/libcii.a. The interfaces are machineindependent and thus don't need platform-specific locations.Following this scheme permits the actual installation locations to beconfined to specifying prefixes, like /usr/local/lib/cii/X/include and/usr/local/lib/cii/X/, in makefiles; programs can include interfaces bygiving just the names of their header files.NB: If you use several compilers, you may need compiler-specificvariants of libcii.a, and thus use platform names that denote aspecific architecture, OS, *and* compiler. For example, the Textinterface uses small structures and passes them by value, and, on someplatforms, gcc generates code for text.c that is incompatible with lccand the vendor-supplied cc. This problem is not specific to CII; it canoccur with any library.Installation Details~~~~~~~~~~~~~~~~~~~~To build and install libcii.a on a UNIX system, perform the followingsteps. The commands shown assume that you have chdir'd to thedistribution directory in this README appears.The distribution includes implementations of strncmp, memmove, andmemcmp, because some vendor implementations are incorrect: theseroutines must compare bytes as unsigned chars. If your vendor'simplementations are correct, you can edit these out of the makefile.1. Create the installation directories, if necessary:mkdir /usr/local/lib/cii/X /usr/local/lib/cii/X/includewhere X is the major release number. Change these directories toreflect your local conventions.2. Install the interfaces:cd includecp -p *.h /usr/local/lib/cii/X/include3. Build and install libcii.a and (optionally) memchk.o:cd srcmake CC="lcc -A"cp libcii.a /usr/local/lib/cii/Xranlib /usr/local/lib/cii/X/libcii.aIf you don't have lcc, use another ANSI C compiler, e.g., gcc. Thereshould be no errors or warnings, except for src/thread.c on somesystems. You should be able to ignore the warnings. src/thread.ccompiles only on SPARCs under SunOS 4.1.3 and on MIPSes under ULTRIXV4.3 or IRIX 5.3.If you want to make the checking implementation of the Mem interfaceavailable (see Sec. 5.3), compile and install memchk.o:make CC="lcc -A" memchk.ocp memchk.o /usr/local/lib/cii/X4. Clean up: "make clean" cleans up, but does not remove libcii.a;"make clobber" cleans up and removes libcii.a.Compiling the Examples~~~~~~~~~~~~~~~~~~~~~~The examples can be built by simply compiling them with compileroptions that specify the locations of the interfaces and library, e.g.,if release 1 has been installed in /usr/local/lib/cii/1, double can bebuilt with the commandscd doublelcc -o double -I/usr/local/lib/cii/1/include *.c /usr/local/lib/cii/1/libcii.aSome compilation systems accept a -L option to specify the location ofadditional libraries, e.g.,cd sievegcc -o sieve -I/usr/local/lib/cii/1/include *.c -L/usr/local/lib/cii/1 -lciiReporting Bugs~~~~~~~~~~~~~~Devise the shortest possible example program that elicits the bug.Prune your example until it can be pruned no more without sending theerror into hiding. I prune most error demonstrations to only a fewlines. Annotate your example with C comments that describe the bug andyour suggested fix, if you have one. If the example crashes, pleasereport the last part of the call chain if you can.Send your example by electronic mail to cii-bugs@cs.princeton.edu andto drh@cs.princeton.edu. Please send only valid C programs; put allremarks in C comments so that I can process reports semiautomatically.Keeping in Touch~~~~~~~~~~~~~~~~There is a mailing list for general information about C Interfaces andImplementation. To join the list, send a message with the 1-line bodysubscribe ciito majordomo@cs.princeton.edu. This line must appear in the messagebody; `Subject:' lines are ignored. Mail sent to cii@cs.princeton.eduis forwarded to everyone on the mailing list.There is also an cii-bugs mailing list for reporting bugs; subscribe toit by sending a message with the 1-line body "subscribe cii-bugs" tomajordomo@cs.princeton.edu. Mail addressed to cii-bugs@cs.princeton.eduis forwarded to everyone on this list.To unsubscribe, send "unsubscribe cii" or "unsubscribe cii-bugs" tomajordomo@cs.princeton.edu. To learn more about mailing lists served bymajordomo, send a message with the 1-word body "help" tomajordomo@cs.princeton.edu.David R. Hanson / drh@cs.princeton.edu / http://www.cs.princeton.edu/~drh/$Id: README,v 1.7 1996/05/30 00:08:22 drh Exp drh $

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -