没有合适的资源?快使用搜索试试~ 我知道了~
首页The GNU C Library.pdf 最新版
资源详情
资源评论
资源推荐

1
The GNU C Library
(
Version 2, June 1991
)
Made by Ken.Hsiung from HZNU, China
Copyright (C) 1993 Free Software Foundation, Inc.

2
The GNU C Library
• Introduction
o Getting Started
o Standards and Portability
ANSI C
POSIX (The Portable Operating System Interface)
Berkeley Unix
SVID (The System V Interface Description)
o Using the Library
Header Files
Macro Definitions of Functions
Reserved Names
Feature Test Macros
o Roadmap to the Manual
• Error Reporting
o Checking for Errors
o Error Codes
o Error Messages
• Memory Allocation
o Dynamic Memory Allocation Concepts
o Dynamic Allocation and C
o Unconstrained Allocation
Basic Storage Allocation
Examples of malloc
Freeing Memory Allocated with malloc
Changing the Size of a Block
Allocating Cleared Space
Efficiency Considerations for malloc
Allocating Aligned Memory Blocks
Heap Consistency Checking
Storage Allocation Hooks
Statistics for Storage Allocation with malloc
Summary of malloc-Related Functions
o Obstacks
Creating Obstacks
Preparing for Using Obstacks
Allocation in an Obstack
Freeing Objects in an Obstack
Obstack Functions and Macros
Growing Objects
Extra Fast Growing Objects
Status of an Obstack

3
Alignment of Data in Obstacks
Obstack Chunks
Summary of Obstack Functions
o Automatic Storage with Variable Size
alloca Example
Advantages of alloca
Disadvantages of alloca
GNU C Variable-Size Arrays
o Relocating Allocator
Concepts of Relocating Allocation
Allocating and Freeing Relocatable Blocks
o Memory Usage Warnings
• Character Handling
o Classification of Characters
o Case Conversion
• String and Array Utilities
o Representation of Strings
o String/Array Conventions
o String Length
o Copying and Concatenation
o String/Array Comparison
o Collation Functions
o Search Functions
o Finding Tokens in a String
• Extended Characters
o Introduction to Extended Characters
o Locales and Extended Characters
o Multibyte Characters
o Wide Character Introduction
o Conversion of Extended Strings
o Multibyte Character Length
o Conversion of Extended Characters One by One
o Example of Character-by-Character Conversion
o Multibyte Codes Using Shift Sequences
• Locales and Internationalization
o What Effects a Locale Has
o Choosing a Locale
o Categories of Activities that Locales Affect
o How Programs Set the Locale
o Standard Locales
o Numeric Formatting
Generic Numeric Formatting Parameters
Printing the Currency Symbol
Printing the Sign of an Amount of Money

4
• Searching and Sorting
o Defining the Comparison Function
o Array Search Function
o Array Sort Function
o Searching and Sorting Example
• Pattern Matching
o Wildcard Matching
o Globbing
Calling glob
Flags for Globbing
o Regular Expression Matching
POSIX Regular Expression Compilation
Flags for POSIX Regular Expressions
Matching a Compiled POSIX Regular Expression
Subexpressions Match Results
Complications in Subexpression Matching
POSIX Regexp Matching Cleanup
o Shell-Style Word Expansion
The Stages of Word Expansion
Calling wordexp
Flags for Word Expansion
wordexp Example
• Input/Output Overview
o Input/Output Concepts
Streams and File Descriptors
File Position
o File Names
Directories
File Name Resolution
File Name Errors
Portability of File Names
• Input/Output on Streams
o Streams
o Standard Streams
o Opening Streams
o Closing Streams
o Simple Output by Characters or Lines
o Character Input
o Line-Oriented Input
o Unreading
What Unreading Means
Using ungetc To Do Unreading
o Formatted Output
Formatted Output Basics

5
Output Conversion Syntax
Table of Output Conversions
Integer Conversions
Floating-Point Conversions
Other Output Conversions
Formatted Output Functions
Dynamically Allocating Formatted Output
Variable Arguments Output Functions
Parsing a Template String
Example of Parsing a Template String
o Customizing printf
Registering New Conversions
Conversion Specifier Options
Defining the Output Handler
printf Extension Example
o Formatted Input
Formatted Input Basics
Input Conversion Syntax
Table of Input Conversions
Numeric Input Conversions
String Input Conversions
Dynamically Allocating String Conversions
Other Input Conversions
Formatted Input Functions
Variable Arguments Input Functions
o Block Input/Output
o End-Of-File and Errors
o Text and Binary Streams
o File Positioning
o Portable File-Position Functions
o Stream Buffering
Buffering Concepts
Flushing Buffers
Controlling Which Kind of Buffering
o Temporary Files
o Other Kinds of Streams
String Streams
Obstack Streams
Programming Your Own Custom Streams
Custom Streams and Cookies
Custom Stream Hook Functions
• Low-Level Input/Output
o Opening and Closing Files
o Input and Output Primitives
剩余654页未读,继续阅读













安全验证
文档复制为VIP权益,开通VIP直接复制

评论0