GNU C 库函数

4星(超过85%的资源)
所需积分/C币:32 2012-07-20 15:42:43 4.81MB PDF
6
收藏 收藏
举报

有关GNU C的库函数使用手册。 在linux 下C的开发或者纯C开发的过程中,必不可少的C库函数查阅手册。
The GNU C Library Reference manual Sandra loosemore Richard m. stallman, Roland McGrath, Andrew Oram, and Ulrich Drepper Edition 0.12 last updated 2007-10-27 for version 2.8 This file documents the gnu c library This is Edition 0. 12, last updated 2007-10-27, of Thc GNU C Library rcfcrcncc Manual for version 2.8 Copyright(C)1993,1994,1995,1996,1997,1998,1999,2001,2002,2003,2007,2008Free Software Foundation. Inc Permission is granted to copy, distribute and /or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being"Free Software Needs Free Documentation"and GNU Lesser General Public license", the Front-Cover texts being included in the section entitled "GNU Free Documentation License Cc A GNU Manual, and with the Back-Cover Texts as in(a) below. A copy of the license is (a)The FSF's Back-Cover Text is: You have the freedom to copy and modify this GNU manual. Buying copies from the FsF supports it in developing gnu and promoting software eedom Published by the Free Software Foundation 59 Temple Place- Suite 330 Boston MA 02111-1307 USA Cover art for the Free Software Foundation's printed edition by Etienne Suvasa Short contents 1 Introduction 2 Error Reporting 3 Virtual Memory Allocation And Paging ,,,,,30 4 Character Handling .,64 String and array utilities 72 6 Character set handling 108 7 Locales and internationalization .149 8 Message translation 167 rching and Sorting 191 10 Pattern Matching 11 Input/Output Overview 220 12 Input/Output on Strearns ..225 13 LoW-Level Input/Output 295 14 File System Interface 342 15 Pipes and FiFos 383 16 Sockets 388 17 Low-Level Terminal Interface 433 18 Syslog 459 19 Mathematics ..466 20 Arithmetic Functions 497 21 Date and time 528 22 Resource Usage And Limitation.....……,561 23 Non-Local exits 581 24 Signal handling ·垂鲁非看 ..,.590 25 The Basic Program/System Interface 634 26 Processes ...,,,,,.676 27 Job Control 687 28 System Databases and Name Service Switch 706 29 Users and groups 715 30 System management 742 31 System Configuration Parameters 32 DES Encryption and Password handlin 33 Debugging support 8 a C Language Facilities in the Library ..787 b Summary of Library facilities C Installing the GNU C Library 906 d Library maintenance 914 E Contributors to the g-U C library 921 F Free Software Needs Free Documentation......... 924 G GNU Lesser general public license 926 H GNU Free Documentation license ,,,,,,,,,935 Concept 942 Type Index 952 Function and macro index 954 Variable and constant macro index 966 Program and file index 976 Table of Contents 1 Introduction 1.1 Getting Started 1.2 Standards and Portability 1.2.1 ISO C 1.2.2 POSIX(The Portable Operating System Interface) 1.2.3 Berkeley Unix 1.2.4 SVID(The System V Interface Description 1122233 1.2.5 XPG(The X/Open Portabilily Guide 1.3 Using the Library 1.3.1 Header Files 1.3.2 Macro definitions of functions 1.3.3 Reserved names 333557 1.3.4 Fcaturc Test macros 1.4 Roadmap to the manual 2 Error Reporting ·· 13 2.1 Checking for Errors 2.2 Error Codes 1 4 2.3 Error Messages ∴...24 3 Virtual Memory Allocation And Paging.. 30 3.1 Proccss Memory Concepts .30 3.2 Allocating Storage For Program Data 31 3.2.1 Memory Allocation in C Programs ∴,32 3.2.1.1 Dynamic Memory Allocation 32 3.2.2 Unconstrained Allocation.................33 3.2.2.1 Basic Memory Allocation 33 3.2.2.2 Examples of malloc ..33 3.2.2.3 Freeing Allocated with mallo 34 3.2.2.4 Changing the Size of a Block 35 3.2.2.5 Allocating Cleared Space 36 3.2.2.6 Efficiency Considerations for malloc ·. 36 3.2.2.7 Allocating Aligned Memory Blocks 36 3.2.2. 8 Malloc Tunable parameters 37 3.2.2.9 Heap Consistency Checking 38 3.2.2.10 Meory Alloca lion Hooks............. 39 3.2.2.11 Statistics for Memory Allocation with malloc.... 12 3.2.2. 12 Summary of malloc-Related Functions 43 3.2.3 Allocation Debugging 3.2.3.1 How to install the tracing functionality 44 3.2.3.2 Example program excerpts 44 3.2.3.3 Some more or less clever ideas 45 3.2.3.4 Interpreting the trac 46 3.2.4 Obstacks 47 3.2.4.1 Creating Obstacks 48 3.2.4.2 Preparing for Using Obstacks 48 3.2.4.3 Allocation in an Obstack ., 49 3.2.4. Freeing Objects in an Obstack 50 3.2.4.5 Obstack Functions and macros ..51 3.2.1.6 Growing Objects 51 3.2.4.7 Extra Fast Growing Objects 3.2.4.8 Status of an Obstack 54 3.2. 4.9 Alignment of Data in obstacks 55 3.2. 4.10 Obstack Chunks 0 3.2.4.1 1 Summary of obstack Functions .56 3.2.5 Automatic Storagc with Variable sizc ..57 3.2.5.1 alloca Example 58 3.2.5.2 Advantagcs of alloca ∴.58 3.2.5.3 Disadvantages of alloca 59 3.2.5. 4 GNU C Variable-Size arrays ∴..59 3.3 Resizing the Data Segment 59 3.4 Locking Pages........................60 3.4.1 Why Lock Pages 60 3.4.2 Locked Memory Details 61 3.4.3 Functions To Lock And Unlock Pages 62 4 Character Handling 64 4.1 Classification of characters .,,64 4.2 Casc C 66 4.3 Character class determination for wide characters 66 4.4 Notes on using the widc charactcr classes 70 4.5 Mapping of wide characters 70 5 String and Array utilities 72 5.1 Representation of Strings.............. 72 5.2 String and Array Conventions 5.3 String length 74 5.4 Copying and Concatenation 76 5.5 String/Array CoInparison 5.6 Collation Functions......................89 5.7 Search functions 93 5.7.1 Compatibility string Scarch Functions 97 5.8 Finding Tokens in a string 97 5. 9 strfry 101 5.10 Trivial Encryption 101 5.11 Encode Binary Data ∴.102 5.12 Argz and Envz Vectors 104 5.12.1 Argz Functions 104 5.12.2 Envz Functions 106 6 Character Set handling 108 6.1 Introduction to Extended characters ∴,108 6.2 Overview about Character Handling functions 112 6. 3 Restartable multibyte conversion Functions. .................112 6.3.1 Selecting the conversion and its properties........ 112 6.3.2 Representing the state of the conversion ∴..113 6.3.3 Converting Single Characters 114 6.3.4 Converting multibyte and wide character strings . ......120 6.3.5 A Complctc Multibyte Conversion Examplc....... 123 6.4 Non-reentrant Conversion Function ......124 6.4. 1 Non-reentrant Conversion of Single Characters 125 6.4.2 Non-reentrant Conversion of strings 126 6.4.3 States in Non-reentrant Functions 127 6.5 Generic Charset Conversion 128 6.5.1 Generic Character Set Conversion Interface ...129 6.5.2 A complete iconv example ....132 6.5.3 Some Details about other iconv Implementations 134 6.5. 4 The iconv Implementation in the gnu C library.... 135 6.5.4.1 Format of 'gconv-modules' files 136 6.5.4.2 Finding the conversion path in iconv........ 137 6.5.4.3 iconv module data structures 138 6.5.4.4 iconv module interfaces ,,,,,,,,141 7 Locales and internationalization 149 7.1 What Effects a locale has 149 7.2 Choosing a Locale 150 7. 3 Categories of Activities that Locales Affect ..150 7.4 How Programs set the locale..………… ..151 7.5 Standard locales 153 7.6 Accessing locale Information 153 7.6. 1 localeconv: It is portable but 153 7.6.1.1 Generic Numeric Formatting Parameters ...... 154 7.6.1.2 Printing the Currency Symbol ∴....,155 7.6.1.3 Printing the Sign of a Monetary Amount...... 156 7.6.2 Pinpoint Access to Locale Data ..157 7. 7 A dedicated Function to format numbers. .....................162 7. 8 Yes-or-No Questions 165 8 Message Translation .167 8.1 X/Open Message Catalog Handling 167 8.1.1 The catgets function family 167 8.1.2 Format of the message catalog files ........170 8.1.3 Generate Message Catalogs files 172 8.1.4 How to use the catgets interface ...173 8.1.4.1 Not using symbolic names ..173 8.1.4.2 Using symbolic names .174 8. 1.4.3 Ilow does to this allow to develop......... 175 8.2 The Uniforum approach to Message Translation ....... 176 8.2.1 The gettext family of functions 176 8.2.1.1 What has to be done to translate a message? 176 8.2.1. 2 How to determine which catalog to be used .178 8.2.1.3 Additional functions for more complicated situations 180 8.2.1. How to specify the output character set gettext uses ..185 8.2. 1.5 How lo use gettext in GUi progralnls....... 185 821.6 User influence on gettext∴……… ,187 8.2.2 Programs to handle message catalogs for gettext ... 190 9 Searching and sorting .....191 9.1 Defining the Comparison Function ,191 9.2 Array Search Function 191 9. 3 Array Sort Function 192 9. 4 Searching and sorting example ..193 9.5 The hsearch function .:.··: 195 9. 6 The tsearch function ∴.....197 10 Pattern Matching 200 10.1 Wildcard matching 200 10.2 Globbing .201 10.2.1 Calling glob 201 10.2.2 Flags for globbing 20 10.2.3 More Flags for Globbing ...206 10.3 Regular Expression Matching 208 10.3.1 POSIX Regular Expression Compilation 208 10.3.2 Flags for POSiX Regular Expressions 10.3.3 Matching a Compiled POsiX Regular Expression .210 10.3.4 Match Results with Subexpressions 211 10.3.5 Complications in Subexpression Matching ,,,212 10.3.6 POSIX Regexp Matching Cleanup 10.4 Shell-Style Word Expansion 3 10.4. 1 The Stages of Word Expansion .213 10.4.2 Calling wordexp 214 10.4.3 Flags for Word Expansion 10.4.4 wordexp Example ∴.216 10.4.5 Details of tilde expansion 17 10.4.6 Dctails of variable Substitution............. 217

...展开详情
试读 127P GNU C 库函数
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
bingbung 英文版的,哎,水平有限,勉强看着
2014-12-26
回复
shgzs0 有用的资料,不过需要花时间看,全英文的
2014-07-23
回复
nansishan 不错,很好呀
2014-07-05
回复
liqiuguo 很实用的资料啊,不错
2014-04-14
回复
yueying_java_oracle 这是帮别人下载的,反馈说不错,内容比较全面
2013-10-14
回复
superdiamond 这是英文版的
2013-07-12
回复
imGala 很有用的手册,就是不知道有没实体书
2013-04-24
回复
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
关注 私信
上传资源赚钱or赚积分
最新推荐
GNU C 库函数 32积分/C币 立即下载
1/127
GNU C 库函数第1页
GNU C 库函数第2页
GNU C 库函数第3页
GNU C 库函数第4页
GNU C 库函数第5页
GNU C 库函数第6页
GNU C 库函数第7页
GNU C 库函数第8页
GNU C 库函数第9页
GNU C 库函数第10页
GNU C 库函数第11页
GNU C 库函数第12页
GNU C 库函数第13页
GNU C 库函数第14页
GNU C 库函数第15页
GNU C 库函数第16页
GNU C 库函数第17页
GNU C 库函数第18页
GNU C 库函数第19页
GNU C 库函数第20页

试读结束, 可继续阅读

32积分/C币 立即下载 >