Open-source software is much more open-source software, and it is inevitable to have some ideas. A tool chain has been being abstracted. The slow development speed of C language should also be related to the low degree of code reuse. However, each software should have a series
Auxiliary Tools.
Below we will sort out the abstract content:
Log function: supports logging to syslog, file, and console.
Console functions: You can remotely log on to the system, set the log level, view the system running status at any time, and debug problems.
File Parsing: supports parsing configuration files, which are classified by directories and can be annotated.
Universal linked list: You can use a universal linked list instead of a self-reference in the C language structure. The linked list is subject to a lock, no lock, or a read/write lock.
Time Functions: encapsulate common time functions
String processing packaging: due to historical reasons, many string processing functions in C language are not very useful, including thread security and NULL pointer problems. At the same time, some string parsing functions are provided.
Database Engine Abstraction: Abstract Database Operation interfaces. You can register common database engines and use the client database provided by the database to perform specific operations. File Parsing is an implementation of this engine.
Thread encapsulation: encapsulate the pthread lib library, including the lock, read/write lock, condition variable, and attribute. The thread private data provided by the pthread lib library is used to implement thread security encapsulation.
Socket encapsulation: Socket System Call encapsulation, asynchronous mechanism encapsulation of poll, select epoll, kqueue, libevent is a good example.
Hash Table Implementation: implement container and large object access and search.
Simple Database: implements a single database. It only provides simple functions, relational databases, and permanent data access. Family/key can be used for reference in SQLite.
Memory Pool: in high-performance systems, the allocation and recovery of memory should all discard malloc. The out-of-the-box allocation policy is free, and the memory pool is the only way to go.
General task implementation: implements the task queue interface and processes the task queue.
This project is created on googlecode, where the code is hosted. Currently, only some functions are implemented.
Http://code.google.com/p/spider-tool/