pdclib-0.4.1

所属分类:数据结构
开发工具:C/C++
文件大小:64KB
下载次数:33
上传日期:2008-04-12 16:49:16
上 传 者heiyeluren
说明:  一组基础的C库的实现,包括了 字符串操作、内存操作、数学操作、排序、查找 等基础数据结构和算法的实现,可以替代标准的C库函数,跨平台运行
(One group C based on the realization of the Treasury, including string operations, memory operations, mathematical operations, sorting, search and other basic data structures and algorithms realize, can replace the standard C library function, cross-platform operation)

文件列表:
pdclib-0.4.1\pdclib\functions\stdlib\abort.c (714, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\abs.c (580, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\atexit.c (1045, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\atoi.c (497, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\atol.c (507, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\atoll.c (520, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\bsearch.c (1759, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\calloc.c (1077, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\div.c (992, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\exit.c (958, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\free.c (1041, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\labs.c (605, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\ldiv.c (1011, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\llabs.c (625, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\lldiv.c (1042, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\malloc.c (8497, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\qsort.c (4729, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\rand.c (707, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\realloc.c (1270, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\srand.c (478, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\strtol.c (4505, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\strtoll.c (4785, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\strtoul.c (2523, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\strtoull.c (2552, 2006-11-16)
pdclib-0.4.1\pdclib\functions\stdlib\_Exit.c (636, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\memchr.c (926, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\memcmp.c (953, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\memcpy.c (887, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\memmove.c (1031, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\memset.c (839, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strcat.c (1002, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strchr.c (851, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strcmp.c (840, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strcoll.c (831, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strcpy.c (799, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strcspn.c (1123, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strlen.c (580, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strncat.c (1348, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strncmp.c (1186, 2006-11-16)
pdclib-0.4.1\pdclib\functions\string\strncpy.c (1440, 2006-11-16)
... ...

$Id: Readme.txt 262 2006-11-16 07:34:57Z solar $ PDCLib - Public Domain C Library ================================ License ------- Permission is granted to use, modify, and / or redistribute at will. This includes removing authorship notices, re-use of code parts in other software (with or without giving credit), and / or creating a commercial product based on it. This software is provided as-is. Use it at your own risk. There is no warranty whatsoever, neither expressed nor implied, and by using this software you accept that the author(s) shall not be held liable for any loss of data, loss of service, or other damages, be they incidental or consequential. Your only option other than accepting this is not to use the software at all. A case for Public Domain ------------------------ There was a time when you could just post a piece of code to usenet and say, "I give it away for free; perhaps it's useful for you." Then came the lawyers. There are building blocks in software engineering that are so basic that everyone should have free access to them without having to employ a complete legal department for advice. They should be FREE. Available for free, free of licensing implications, free of attached propaganda, free of everything but their useful self. Today, even the term "free" has to be defined by several paragraphs of legal blah-blah. Sick and tired of it, the author brought you this piece of software under a "license" that should not be neccessary in the first place: "Free" should have been enough. What is it ---------- This is a C Standard Library. Nothing more, nothing less. No POSIX or other extensions, just what's defined in ISO/IEC ***99. (Well, this is what it will be when the 1.0 release comes out. See the "Development Status" section to see what's implemented so far.) Internals --------- As a namespace convention, everything (files, typedefs, functions, macros) not defined in ISO/IEC ***99 is prefixed with _PDCLIB_*. As identifiers starting with '_' and a capital letter are reserved for the implementation, and the chances of you compiler using an identifier in the _PDCLIB_* range are slim, any strictly conforming application should work with PDCLib. PDCLib consists of several parts: 1) standard headers; 2) implementation files for standard functions; 3) internal header files keeping complex stuff out of the standard headers; 4) the central, platform-specific file _PDCLIB_config.h; 5) optimization overlay implementation files (optional). The standard headers only contain what they are defined to contain. Where additional logic or macro magic is necessary, that is deferred to the internal files. This has been done so that the headers are actually educational as to what they provide (as opposed to how the library does it). There is a seperate implementation file for every function defined by the standard, named {function}.c. Not only does this avoid linking in huge amounts of unused code when you use but a single function, it also allows the optimization overlay to work (see below). Then there are internal header files, which contain all the "black magic" and "code fu" that were kept out of the standard headers. You should not have to touch them if you want to adapt PDCLib to a new platform. If you do, note that the PDCLib author would consider it a serious design flaw, and would be happy to fix it in the next PDCLib release. Any adaption work should be covered by the config header (and, possibly, the optimization overlay). For adapting PDCLib to a new platform (the trinity of CPU, operating system, and compiler), open _PDCLIB_config.h in your favourite text editor, have a look at the comments, and modify it as appropriate for your platform. That should be all that is actually required for such an adaption (see previous paragraph). Of course, your platform might provide more efficient replacements for the generic implementations offered by PDCLib. The math functions are an especially "juicy" target for optimization - while PDCLib does provide generic implementations for each of them, there are usually FPU opcodes that do the same job, only orders of magnitude faster. For this, you might want to create an "optimization overlay" for PDCLib. Optimization Overlay -------------------- The idea is to provide a generic implementation that is useable even on platforms the author never heard of - for example, the OS and/or compiler *you* just wrote and now need a C library for. That is actually what PDCLib was written for: To provide a C library for compiler and OS builders that do not want the usual baggage of POSIX and GNU extensions, licensing considerations etc. etc. Thus, PDCLib provides generic implementations. They do work, and do so correctly, but they are not very efficient when compared to hand- crafted assembler or compiler build-ins. So the author wanted to provide a means to modify PDCLib to run more efficiently on a given platform, without cluttering the main branch with tons of #ifdef statements and "featureset defines" that grow stale quickly. The solution is the "optimization overlay". Every function has its own implementation file, and _PDCLIB_config.h should be the only header that must be modified. So, a platform-specific overlay is copied over the main PDCLib branch - replacing _PDCLIB_config.h and any number of implementation files - to create a PDCLib adapted / optimized for the platform in question. That overlay could be part of the PDCLib source tree (for established platforms where maintainers won't bother with PDCLib), or part of that platform's source tree (for under-development platforms PDCLib maintainers won't bother with). So, to use PDCLib on your given platform, you unpack PDCLib (as you obviously have done already since you are reading this), and copy the overlay for your platform over the PDCLib source tree structure. Development Status ------------------ v0.1 - 2004-12-12 Freestanding-only C99 implementation without any overlay, and missing the INTN_C() / UINTN_C() macros. still has the enquire.c values hardcoded into it; not sure whether to include enquire.c in the package, to leave to the overlay, or devise some parameterized macro magic as for / . Not thoroughly tested, but I had to make the 0.1 release sometime so why not now. v0.2 - 2005-01-12 Adds implementations for (excluding strerror()), INTN_C() / UINTN_C() macros, and some improvements in the internal headers. Test drivers still missing, but added warnings about that. v0.3 - 2005-11-21 Adds test drivers, fixes some bugs in . v0.4 - 2006-02-06 Implementations for parts of . Still missing are the floating point conversions, and the wide-/multibyte-character functions. v0.4.1 - 2006-11-16 With v0.5 () taking longer than expected, v0.4.1 was set up as a backport of bugfixes in the current development code. - #1427211 realloc( NULL, size ) fails (fixed) - #1427548 stdlib.h - insufficient documentation (fixed) - #1428100 Misspelled name in credits (fixed) - #1428101 malloc() splits off too-small nodes (fixed) - #1494254 qsort() stack overflow (fixed) - #1514883 malloc() bug in list handling (fixed) - #1527437 strncmp() does not terminate at '\0' (fixed) - #1529792 stdint.h dysfunctional (fixed) - #1529796 NULL redefinition warnings (fixed)

近期下载者

相关文件


收藏者