Transcription of The GNU C Library Reference Manual
1 The GNU C Library Reference ManualThe GNU C LibraryReference ManualSandra LoosemorewithRichard M. Stallman, Roland McGrath, Andrew Oram, and Ulrich Drepperfor version isThe GNU C Library Reference Manual , for version 1993 2021 Free Software Foundation, is granted to copy, distribute and/or modify this document under the terms ofthe GNU Free Documentation License, Version or any later version published by theFree Software Foundation; with the Invariant Sections being Free Software Needs FreeDocumentation and GNU Lesser General Public License , the Front-Cover texts being A GNU Manual , and with the Back-Cover Texts as in (a) below. A copy of the license isincluded in the section entitled"GNU Free Documentation License".(a) The FSF s Back-Cover Text is: You have the freedom to copy and modify this GNUmanual. Buying copies from the FSF supports it in developing GNU and promoting softwarefreedom. iShort Memory Allocation And and Array Set and and Pattern Input/Output Input/Output on Low-Level File System Pipes and Low-Level Terminal Arithmetic Date and Resource Usage And Non-Local Signal The Basic Program/System Inter-Process Job System Databases and Name Service Users and System System Configuration Cryptographic Debugging Internal Language Facilities in the of Library the GNU C to the GNU C Software Needs Free Lesser General Public Free Documentation and Macro and Constant Macro and File of Contents1 Getting Standards and ISO POSIX (The Portable Operating System Interface).
2 POSIX Safety Unsafe Conditionally Safe Other Safety Berkeley SVID (The System V Interface Description).. XPG (The X/Open Portability Guide).. Using the Header Macro Definitions of Reserved Feature Test Roadmap to the Error Checking for Error Error Virtual Memory Allocation And Process Memory Allocating Storage For Program Memory Allocation in C Dynamic Memory The GNU Unconstrained Basic Memory Examples Freeing Memory Allocated Changing the Size of a Allocating Cleared Allocating Aligned Memory Malloc Tunable Heap Consistency Statistics for Memory Allocation Summary ofmalloc-Related Allocation How to install the tracing Example program Some more or less clever Interpreting the Creating Preparing for Using Allocation in an Freeing Objects in an Obstack Functions and Growing Extra Fast Growing Status of an Alignment of Data in Obstack Summary of Obstack Automatic Storage with Variable
3 Advantages Disadvantages GNU C Variable-Size Resizing the Data Memory Memory Protection Locking Why Lock Locked Memory Functions To Lock And Unlock Character Classification of Case Character class determination for wide Notes on using the wide character Mapping of wide String and Array Representation of String and Array String Copying Strings and Concatenating Truncating Strings while String/Array Collation Search Compatibility String Search Finding Tokens in a Erasing Sensitive Shuffling Obfuscating Encode Binary Argz and Envz Argz Envz Character Set Introduction to Extended Overview about Character Handling Restartable Multibyte Conversion Selecting the conversion and its Representing the state of the Converting Single Converting Multibyte and Wide Character A Complete Multibyte Conversion Non-reentrant Conversion Non-reentrant Conversion of Single Non-reentrant Conversion of States in Non-reentrant Generic Charset Generic Character Set Conversion A Some Details about TheiconvImplementation in the GNU C Format Finding the conversion path data Locales and What Effects a Locale Choosing a Locale How Programs Set the Standard Locale Accessing Locale : It is portable but.
4 Generic Numeric Formatting Printing the Currency Printing the Sign of a Monetary Pinpoint Access to Locale A dedicated function to format Yes-or-No Message X/Open Message Catalog Thecatgetsfunction Format of the message catalog Generate Message Catalogs How to use Not using symbolic Using symbolic How does to this allow to The Uniforum approach to Message Thegettextfamily of What has to be done to translate a message?.. How to determine which catalog to be Additional functions for more complicated How to specify the output character How to usegettextin GUI User influence Programs to handle message catalogs Searching and Defining the Comparison Array Search Array Sort Searching and Sorting Pattern Wildcard Flags for More Flags for Regular Expression POSIX Regular Expression Flags for POSIX Regular Matching a Compiled POSIX Regular Match Results with Complications in Subexpression POSIX Regexp Matching Shell-Style Word The Stages of Word Flags for Word Details of Tilde Details of Variable Input/Output Input/Output Streams and File File File File Name File Name Portability of File Input/Output on Standard Opening Closing Streams and Streams in
5 Internationalized Simple Output by Characters or Character Line-Oriented What Unreading UsingungetcTo Do Block Formatted Formatted Output Output Conversion Table of Output Integer Floating-Point Other Output Formatted Output Dynamically Allocating Formatted Variable Arguments Output Parsing a Template Example of Parsing a Template Registering New Conversion Specifier Defining the Output Formatted Formatted Input Input Conversion Table of Input Numeric Input String Input Dynamically Allocating String Other Input Formatted Input Variable Arguments Input End-Of-File and Recovering from Text and Binary File Portable File-Position Stream Buffering Flushing Controlling Which Kind of Other Kinds of String Programming Your Own Custom Custom Streams and Custom Stream Hook Formatted Printing Formatted Adding Severity How to Low-Level Opening and Closing Input and Output Setting the File Position of a Descriptors and Dangers of Mixing Streams and Linked Independent Cleaning Fast Scatter-Gather Copying data between two Memory-mapped Waiting for Input or Synchronizing I/O Perform I/O Operations in Asynchronous Read and Write Getting the Status of AIO Getting into a Consistent Cancellation of AIO How to optimize the AIO Control Operations on Duplicating File Descriptor File Status File Access Open-time I/O Operating Getting and Setting File Status File Open File Description Open File Description Locks Interrupt-Driven Generic I/O Control File System Working Accessing Format of a Directory Opening a
6 Directory Reading and Closing a Directory Simple Program to List a Random Access in a Directory Scanning the Content of a Simple Program to List a Directory, Mark Low-level Directory Working with Directory Hard Symbolic Deleting Renaming Creating File The meaning of the File Reading the Attributes of a Testing the Type of a File The Mode Bits for Access How Your Access to a File is Assigning File Testing Permission to Access a File File Storage Making Special Temporary Pipes and Creating a Pipe to a FIFO Special Atomicity of Pipe Socket Communication Socket Address Setting the Address of a Reading the Address of a Interface The Local Local Namespace Details of Local Example of Local-Namespace The Internet Internet Socket Address Host Internet Host Host Address Data Host Address Host Internet The Services Byte Order Protocols Internet Socket Other Opening and Closing
7 Creating a Closing a Socket Using Sockets with Making a Listening for Accepting Who is Connected to Me?.. Transferring Sending Receiving Socket Data Byte Stream Socket Byte Stream Connection Server Out-of-Band Datagram Socket Sending Receiving Datagram Socket Example of Reading Socket Socket Option Socket-Level Networks Low-Level Terminal Identifying I/O Two Styles of Input: Canonical or Terminal Terminal Mode Data Terminal Mode Setting Terminal Modes Input Output Control Local Line Special Characters for Input Characters that Cause Special Characters for Flow Other Special Noncanonical BSD Terminal Line Control Noncanonical Mode Reading Allocating Opening a Pseudo-Terminal Overview of Submitting Syslog syslog, Syslog Predefined Mathematical Trigonometric Inverse Trigonometric Exponentiation and Hyperbolic Special Known Maximum Errors in Math Pseudo-Random ISO C Random Number BSD Random Number SVID Random Number Is Fast Code or Small Code preferred?
8 59820 Arithmetic Integer Floating Point Floating-Point Number Classification Errors in Floating-Point FP Infinity and Examining the FPU status Error Reporting by Mathematical Rounding Floating-Point Control Arithmetic Absolute Normalization Rounding Remainder Setting and modifying single bits of FP Floating-Point Comparison Miscellaneous FP arithmetic Complex Projections, Conjugates, andDecomposing of Complex Parsing of Parsing of Parsing of Printing of Old-fashioned System V number-to-string Date and Time Time Calculating Elapsed Processor And CPU CPU Time Processor Time Calendar Getting the Setting and Adjusting the Broken-down Formatting Calendar Convert textual time and date information Interpret string according to given A More User-friendly Way to Parse Times and Specifying the Time Zone Functions and Variables for Time Time Functions Setting an Resource Usage And Resource Limiting Resource Process CPU Priority And Absolute Using Absolute Realtime Basic Scheduling Traditional Introduction To Traditional Functions For Traditional Limiting execution to certain Querying memory available Overview about traditional Unix memory How to get information
9 About the memory subsystem?.. Learn about the processors Non-Local Introduction to Non-Local Details of Non-Local Non-Local Exits and Complete Context Signal Basic Concepts of Some Kinds of Concepts of Signal How Signals Are Standard Program Error Termination Alarm Asynchronous I/O Job Control Operation Error Miscellaneous Signal Specifying Signal Basic Signal Advanced Signal Interaction Flags Initial Signal Defining Signal Signal Handlers that Handlers That Terminate the Nonlocal Control Transfer in Signals Arriving While a Handler Signals Close Together Merge into Signal Handling and Nonreentrant Atomic Data Access and Signal Problems with Non-Atomic Atomic Atomic Usage Primitives Interrupted by Generating Signaling Signaling Another Permission for Usingkillfor Blocking Why
10 Blocking Signals is Signal Process Signal Blocking to Test for Delivery of a Blocking Signals for a Checking for Pending Remembering a Signal to Act On Waiting for a Problems Using a Separate Signal BSD Signal The Basic Program/System Program Program Argument Syntax Parsing Program Parsing program options Using Example of Parsing Arguments Parsing Long Options Example of Parsing Long Options Parsing Program Options with Argp Global Specifying Argp Specifying Options in an Argp Flags for Argp Argp Parser Special Keys for Argp Parser Argp Parsing Functions For Use in Argp Combining Multiple Argp Flags Customizing Argp Help Special Keys for Argp Help Filter Flags for Argp A Minimal Program Using A Program Using Argp with Only Default A Program Using Argp with User A Program Using Multiple Combined Argp Argp User Parsing of Parsing of Suboptions Environment Environment Standard Environment Auxiliary Definition System Program Normal Exit Cleanups on Aborting a Termination Running a Process Creation Process Creating a Executing a Process Process Completion BSD Process Wait Process Creation Inter-Process System V POSIX Job Concepts of Job Controlling Terminal of a Access to the Controlling Orphaned Process Implementing a Job Control Data Structures for the Initializing the Launching Foreground and Stopped and Terminated Continuing Stopped The Missing Functions for Job Identifying the Controlling Process Group Functions for Controlling Terminal System Databases and Name Service NSS The NSS Configur