[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

General Programming Concepts: Writing and Debugging Programs


Table of Contents

About This Book

  • Who Should Use This Book
  • Highlighting
  • ISO 9000
  • Related Publications
  • Trademarks
  • Chapter 1. Tools and Utilities

  • Entering a Program into the System
  • Checking a Program
  • Compiling and Linking a Program
  • Correcting Errors in a Program
  • Building and Maintaining a Program
  • Subroutines
  • Shell Commands
  • Related Information
  • Chapter 2. The Curses Library

  • Terminology
  • Naming Conventions
  • Structure of a Curses Program
  • Return Values
  • Related Information
  • Initializing Curses
  • Related Information
  • Windows in the Curses Environment
  • The Default Window Structure
  • The Current Window Structure
  • Subwindows
  • Pads
  • Related Information
  • Manipulating Window Data with Curses
  • Creating Windows
  • Subwindows
  • Pads
  • Removing Windows, Pads, and Subwindows
  • Changing the Screen or Window Images
  • Refreshing Windows
  • Subroutines Used for Refreshing Pads
  • Refreshing Areas that Have Not Changed
  • Garbled Displays
  • Manipulating Window Content
  • Support for Filters
  • Related Information
  • Controlling the Cursor with Curses
  • Related Information
  • Manipulating Characters with Curses
  • Character Size
  • Adding Characters to the Screen Image
  • waddch Subroutines
  • Complex Characters
  • Special Characters
  • waddstr Subroutines
  • winsch Subroutines
  • winsertln Subroutines
  • wprintw Subroutines
  • unctrl Macro
  • Enabling Text Scrolling
  • Deleting Characters
  • werase Subroutines
  • wclear Subroutines
  • wclrtoeol Subroutines
  • wclrtobot Subroutines
  • wdelch Subroutines
  • wdeleteln Subroutines
  • Getting Characters
  • wgetch Subroutines
  • keyname Subroutine
  • winch Subroutines
  • wscanw Subroutines
  • Related Information
  • Understanding Terminals with curses
  • Manipulating Multiple Terminals
  • Determining Terminal Capabilities
  • Setting Terminal Input and Output Modes
  • Input Modes
  • Delay Mode
  • Echo Processing
  • Using the terminfo and termcap Files
  • Writing Programs That Use the terminfo Subroutines
  • Low-Level Screen Subroutines
  • termcap Subroutines
  • Converting termcap Descriptions to terminfo Descriptions
  • Manipulating TTYs
  • Related Information
  • Synchronous and Networked Asynchronous Terminals
  • Output
  • Input
  • Working with Color
  • Related Information
  • Manipulating Video Attributes
  • Video Attributes, Bit Masks, and the Default Colors
  • Setting Video Attributes
  • Working with Color Pairs
  • Extracting Attributes
  • Lights and Whistles
  • Setting Curses Options
  • Related Information
  • Manipulating Soft Labels
  • Related Information
  • Obsolete Curses Subroutines
  • Related Information
  • AIX 3.2 Curses Compatibility
  • List of Additional Curses Subroutines
  • Manipulating Windows
  • Manipulating Characters
  • Manipulating Terminals
  • Manipulating Color
  • Miscellaneous Utilities
  • Chapter 3. Debugging Programs

  • adb Debug Program Overview
  • Getting Started with the adb Debug Program
  • Starting adb with a Program File
  • Starting adb with a Nonexistent or Incorrect File
  • Starting adb with the Default File
  • Starting adb with a Core Image File
  • Starting adb with a Data File
  • Starting adb with the Write Option
  • Using a Prompt
  • Using Shell Commands from within the adb Program
  • Exiting the adb Debug Program
  • Related Information
  • Controlling Program Execution
  • Preparing Programs for Debugging with the adb Program
  • Running a Program
  • Setting Breakpoints
  • Displaying Breakpoints
  • Deleting Breakpoints
  • Continuing Program Execution
  • Single-Stepping a Program
  • Stopping a Program with the Interrupt and Quit Keys
  • Stopping a Program
  • Related Information
  • Using adb Expressions
  • Using Integers in Expressions
  • Using Symbols in Expressions
  • Using Operators in Expressions
  • Related Information
  • Customizing the adb Debug Program
  • Combining Commands on a Single Line
  • Creating adb Scripts
  • Setting Output Width
  • Setting the Maximum Offset
  • Setting Default Input Format
  • Changing the Disassembly Mode
  • Related Information
  • Computing Numbers and Displaying Text
  • Related Information
  • Displaying and Manipulating the Source File with the adb Program
  • Displaying Instructions and Data
  • Forming Addresses
  • Displaying an Address
  • Displaying the C Stack Backtrace
  • Choosing Data Formats
  • Changing the Memory Map
  • Patching Binary Files
  • Locating Values in a File
  • Writing to a File
  • Making Changes to Memory
  • Using adb Variables
  • Finding the Current Address
  • Displaying External Variables
  • Displaying the Address Maps
  • Related Information
  • adb Debug Program Reference Information
  • adb Debug Program Addresses
  • adb Debug Program Expressions
  • adb Debug Program Operators
  • adb Debug Program Subcommands
  • adb Debug Program Variables
  • Related Information
  • Example adb Program: adbsamp
  • Related Information
  • Example adb Program: adbsamp2
  • Related Information
  • Example adb Program: adbsamp3
  • Related Information
  • Example of Directory and i-node Dumps in adb Debugging
  • Related Information
  • Example of Data Formatting in adb Debugging
  • Related Information
  • Example of Tracing Multiple Functions in adb Debugging
  • Starting the adb Program
  • Setting Breakpoints
  • Displaying a Set of Instructions
  • Starting the adsamp3 Program
  • Removing a Breakpoint
  • Continuing the Program
  • Tracing the Path of Execution
  • Displaying a Variable Value
  • Skipping Breakpoints
  • Related Information
  • dbx Symbolic Debug Program Overview
  • Related Information
  • Using the dbx Debug Program
  • Starting the dbx Debug Program
  • Running Shell Commands from dbx
  • Command Line Editing in dbx
  • Using Program Control
  • Setting and Deleting Breakpoints
  • Running a Program
  • Separating dbx Output from Program Output
  • Tracing Execution
  • Related Information
  • Displaying and Manipulating the Source File with the dbx debug Program
  • Changing the Source Directory Path
  • Displaying the Current File
  • Changing the Current File or Procedure
  • Debugging Programs Involving Multiple Threads
  • Identifying Thread-Related Objects
  • Breakpoints and Threads
  • Thread-Related subcommands
  • Debugging Programs Involving Multiple Processes
  • Related Information
  • Examining Program Data
  • Handling Signals
  • Calling Procedures
  • Displaying a Stack Trace
  • Displaying and Modifying Variables
  • Displaying Thread-Related Information
  • Scoping of Names
  • Using Operators and Modifiers in Expressions
  • Checking of Expression Types
  • Folding Variables to Lowercase and Uppercase
  • Changing Print Output with Special Debug Program Variables
  • Related Information
  • Debugging at the Machine Level with dbx
  • Using Machine Registers
  • General-purpose registers
  • Floating-point registers
  • System-control registers
  • Examining Memory Addresses
  • Running a Program at the Machine Level
  • Debugging fdpr Reordered Executables
  • Displaying Assembly Instructions
  • Related Information
  • Customizing the dbx Debugging Environment
  • Defining a New dbx Prompt
  • Creating dbx Subcommand Aliases
  • Using the .dbxinit File
  • Reading dbx Subcommands from a File
  • Related Information
  • List of dbx Subcommands
  • Setting and Deleting Breakpoints
  • Running Your Program
  • Tracing Program Execution
  • Ending Program Execution
  • Displaying the Source File
  • Printing and Modifying Variables, Expressions, and Types
  • Thread Debugging
  • Multiprocess Debugging
  • Procedure Calling
  • Signal Handling
  • Machine-Level Debugging
  • Debugging Environment Control
  • Related Information
  • Chapter 4. Error Notification

  • Security
  • Examples
  • Related Information
  • Error Logging Facility
  • Error Logging Overview
  • Managing Error Logging
  • Transferring Your Error Log to Another System
  • Configuring Error Logging
  • Listing the Current Settings
  • Customizing the Log File Location
  • Customizing the Log File Size
  • Customizing the Buffer Size
  • Customizing Duplicate Error Handling
  • Removing Error Log Entries
  • Automatic Removal
  • errclear Command
  • Enabling and Disabling Logging for an Event
  • Showing Events for Which Logging is Disabled
  • Showing Events for which Reporting is Disabled
  • Changing the Current Setting for an Event
  • Setting Up Error Notification
  • Logging Maintenance Activities
  • Redirecting syslog Messages to Error Log
  • Directing Error Log Messages to Syslog
  • Error Logging Tasks
  • Reading an Error Report
  • Examples of Detailed Error Reports
  • Example of a Summary Error Report
  • Generating an Error Report
  • Stopping an Error Log
  • Cleaning an Error Log
  • Copying an Error Log to Diskette or Tape
  • Error Logging and Alerts
  • Error Logging Controls
  • Error Logging Commands
  • Error Logging Subroutines and Kernel Services
  • Error Logging Files
  • Related Information
  • Chapter 5. File Systems and Directories

  • Related Information
  • File Types
  • Working with Files
  • Creating Files
  • Manipulating Files (Programming)
  • Related Information
  • JFS Directories
  • JFS Directory Structures
  • Working with Directories (Programming)
  • Changing Current Directory of a Process
  • Changing the Root Directory of a Process
  • Subroutines That Control Directories
  • Related Information
  • JFS2 Directories
  • JFS2 Directory Structures
  • Working with Directories (Programming)
  • Changing Current Directory of a Process
  • Changing the Root Directory of a Process
  • Subroutines That Control Directories
  • Related Information
  • Working with JFS i-nodes
  • Disk i-node Structure for JFS
  • In-core i-node Structure
  • Related Information
  • Working with JFS2 i-nodes
  • Disk i-node Structure for JFS2
  • In-core i-node Structure
  • Related Information
  • JFS File Space Allocation
  • Full and Partial Logical Blocks
  • Allocation in Fragmented File Systems
  • Allocation in Compressed File Systems
  • Allocation in File Systems Enabled for Large Files
  • Disk Address Format
  • Indirect Blocks
  • Direct Method
  • Single Indirect Method
  • Double Indirect Method
  • Quotas
  • Related Information
  • JFS2 File Space Allocation
  • Full and Partial Logical Blocks
  • JFS2 File Space Allocation
  • Extents
  • B+ Trees
  • Related Information
  • Writing Programs That Access Large Files
  • Implications for Existing Programs
  • Open Protection
  • Porting Applications to the Large File Environment
  • Using _LARGE_FILES
  • Using the 64-Bit File System Subroutines
  • Common Pitfalls using the Large File Environment
  • Improper Use of Data Types
  • Parameter Mismatches
  • Arithmetic Overflows
  • Fseek/Ftell
  • Failure to Include Proper Header Files
  • String Conversions
  • Imbedded File Offsets
  • File Size Limits
  • JFS File Size Limits
  • JFS2 File Size Limits
  • Related Information
  • Linking for Programmers
  • Hard Links
  • Symbolic Links
  • Directory Links
  • Related Information
  • Using File Descriptors
  • System File and File Descriptor Tables
  • Managing File Descriptors
  • Sharing Open Files
  • Duplicating File Descriptors
  • Preset File Descriptor Values
  • File Descriptor Resource Limit
  • Related Information
  • File Creation and Removal
  • Creating a File
  • Creating a Regular File (creat, open, or mknod Subroutines)
  • Creating a Special File (mknod or mkfifo Subroutine)
  • Opening a File
  • Closing a File
  • Related Information
  • Working with File I/O
  • Manipulating the Current Offset
  • Reading a File
  • Writing a File
  • Delayed Write
  • Truncating Files
  • Writing Programs to Use Direct I/O
  • Direct I/O vs. Normal Cached I/O
  • Benefits of Direct I/O
  • Performance Costs of Direct I/O
  • Direct I/O Reads
  • Direct I/O Writes
  • Conflicting File Access Modes
  • Enabling Applications to use Direct I/O
  • Offset/Length/Address Alignment Requirements of the Target Buffer
  • Direct I/O Limitations
  • Direct I/O and Data I/O Integrity Completion
  • Working with Pipes
  • Using Pipe Subroutines
  • Synchronous I/O
  • Related Information
  • File Status
  • Related Information
  • File Accessibility
  • Related Information
  • JFS File System Layout
  • Boot Block
  • Superblock
  • Allocation Bitmaps
  • Fragments
  • Disk I-Nodes
  • Allocation Groups
  • Using File System Subroutines
  • Related Information
  • JFS2 File System Layout
  • Superblock
  • Allocation Maps
  • Disk I-Nodes
  • Allocation Groups
  • Allocation Group Sizes
  • Partial Allocation Groups
  • Using File System Subroutines
  • Related Information
  • Creating New File System Types
  • File System Helpers
  • Obsolete File System Helper mechanism
  • File System Helper Operations
  • File System Helper Execution Syntax
  • Sample Helper Invocations
  • Mount Helpers
  • Mount Helper Execution Syntax
  • Related Information
  • Major Control Block Header Files
  • Related Information
  • Chapter 6. Floating-Point Exceptions

  • Floating-Point Exception Subroutines
  • Floating-Point Trap Handler Operation
  • Exceptions: Disabled and Enabled Comparison
  • Exceptions-Disabled Model
  • Exceptions-Enabled Model
  • Imprecise Trapping Modes
  • Precise Traps
  • Imprecise Traps
  • Hardware-Specific Subroutines
  • Related Information
  • Example of a Floating-Point Trap Handler
  • Related Information
  • Chapter 7. Input and Output Handling

  • Low-Level I/O Interfaces
  • Stream I/O Interfaces
  • Terminal I/O Interfaces
  • Asynchronous I/O Interfaces
  • Chapter 8. Large Program Support

  • Understanding the Large Address-Space Model
  • Understanding the Very Large Address-Space Model
  • Enabling the Large Address-Space Models
  • Executing Programs with Large Data Areas
  • Special Considerations
  • Related Information
  • Chapter 9. Parallel Programming

  • Related Information
  • Understanding Threads
  • Threads and Processes
  • Process Properties
  • Thread Properties
  • The Initial Thread
  • Threads Implementation
  • Kernel Threads and User Threads
  • Thread Models and Virtual Processors
  • Contention Scope and Concurrency Level
  • libpthreads.a POSIX Threads Library
  • libpthreads_compat.a POSIX Draft 7 Threads Library
  • Related Information
  • Thread Programming Concepts
  • Basic Operations
  • Thread Creation
  • Thread Termination
  • Synchronization
  • Mutexes and Race Conditions
  • Waiting for Threads
  • Scheduling
  • Scheduling Parameters
  • Synchronization Scheduling
  • Other Facilities
  • Advanced Facilities
  • Threads-Processes Interactions
  • Threads Library API
  • Object-Oriented Interface
  • Naming Convention
  • Related Files
  • Related Information
  • Writing Reentrant and Thread-Safe Code
  • Understanding Reentrance and Thread-Safety
  • Reentrance
  • Thread-Safety
  • Making a Function Reentrant
  • Returning Data
  • Keeping Data over Successive Calls
  • Making a Function Thread-Safe
  • Locking Shared Resources
  • A Workaround for Thread-Unsafe Functions
  • Reentrant and Thread-Safe Libraries
  • Using Libraries
  • Converting Libraries
  • Related Information
  • Developing Multi-Threaded Programs
  • Compiling a Multi-Threaded Program
  • Header File
  • Compiler Invocation
  • Compiler Invocation for Draft 7 of POSIX 1003.1c
  • Porting Draft 7 applications to the X/Open Version 5 Standard
  • Memory Requirements of a Multi-Threaded Program
  • Debugging a Multi-Threaded Program
  • Using dbx
  • Using the Kernel Debug Program
  • Core File Requirements of a Multi-Threaded Program
  • Related Information
  • Developing Multi-Threaded Program which examines and modifies pthread library objects
  • Initialization
  • Call Back Functions
  • Update Function
  • Context Functions
  • List Functions
  • Field Functions
  • Customizing the Session
  • Session Termination
  • Related Information
  • Developing Multi-Threaded Program Debuggers
  • Initialization
  • Call Back Functions
  • Update Function
  • Hold and Unhold Functions
  • Context Functions
  • List Functions
  • Field Functions
  • Customizing the Session
  • Session Termination
  • Example
  • Related Information
  • Multi-Threaded Call Back Functions
  • Purpose
  • Library
  • Syntax
  • Description
  • Parameters
  • Return Values
  • Related Information
  • Benefits of Threads
  • Parallel Programming Concepts
  • Modularity
  • Software Models
  • Master/Slave Model
  • Divide-and-Conquer Models
  • Producer/Consumer Models
  • Performance Consideration
  • Managing Threads
  • Inter-Thread Communications
  • Multiprocessor Systems
  • Limitations
  • Related Information
  • Chapter 10. Programming on Multiprocessor Systems

  • Related Information
  • Identifying Processors
  • ODM Processor Names
  • Logical Processor Numbers
  • ODM Processor States
  • Related Information
  • Controlling Processor Use
  • The cpu_state Command
  • Example Processor Configurations
  • Simple Processor Configurations
  • Complex Processor Configurations
  • Binding Processes and Kernel Threads
  • Related Information
  • Dynamic Processor Deallocation
  • Potential Impact to Applications
  • Processor Deallocation: Flow of Events
  • Programming Interfaces
  • Existing AIX Interfaces Dealing with Individual Processors
  • Interfaces to Determine the Number if CPUs on a System
  • Interfaces to Bind Threads to a Specific Processor
  • Interfaces for Processor Deallocation Notification
  • Notification in User Mode
  • Notification in Kernel Mode
  • Test Environment
  • Creating Locking Services
  • Multiprocessor-Safe Locking Services
  • Locking Services Example
  • Related Information
  • Kernel Programming
  • 32-bit and 64-bit Addressability
  • Performance
  • 64-bit objects and archive file types
  • Differences between 32-bit and 64-bit execution environments
  • Tools support for 64-bit development
  • Porting source code from 32-bit to 64-bit execution environments
  • 64-bit application development
  • 64-bit library development
  • 64-bit kernel extension development
  • Performance Monitor API Programming Concepts
  • Introduction
  • Performance Monitor Accuracy Warning
  • Performance Monitor Context and State
  • Thread and thread group accumulation
  • Security Considerations
  • Common Definitions
  • The Seven Basic API Calls
  • Examples
  • Simple thread counting group example
  • Thread counting example with reset
  • Related Information
  • Chapter 11. Threads Programming Guidelines

  • Related Information
  • Thread Implementation Model
  • Thread-safe and Threaded Libraries in AIX
  • Threads Versions On AIX
  • Threads Basic Operation Overview
  • Related Information
  • Creating Threads
  • Thread Attributes Object
  • Thread Attributes Object Creation and Destruction
  • Detachstate Attribute
  • Other Attributes
  • Thread Creation
  • Using the Thread Attributes Object
  • Entry Point Routine
  • Returned Information
  • Handling Thread IDs
  • A First Multi-Threaded Program
  • Related Information
  • Terminating Threads
  • Exiting a Thread
  • Canceling a Thread
  • Cancelability State and Type
  • Async-Cancel Safety
  • Cancellation Points
  • Cancellation Example
  • Using Cleanup Handlers
  • Calling Cleanup Handlers
  • Balancing the Push and Pop Operations
  • Related Information
  • List of Threads Basic Operation Subroutines
  • Related Information
  • Synchronization Overview
  • Related Information
  • Using Mutexes
  • Mutex Attributes Object
  • Mutex Attributes Object Creation and Destruction
  • Mutex Attributes
  • Creating and Destroying Mutexes
  • Locking and Unlocking Mutexes
  • Protecting Data with Mutexes
  • Mutex Usage Example
  • Avoiding Deadlocks
  • Related Information
  • Using Condition Variables
  • Condition Attributes Object
  • Condition Attributes Object Creation and Destruction
  • Condition Attribute
  • Creating and Destroying Condition Variables
  • Using Condition Variables
  • Waiting for a Condition
  • Signaling a Condition
  • Synchronizing Threads with Condition Variables
  • Condition Wait Semantics
  • Timed Wait Semantics
  • Condition Variables Usage Example
  • Related Information
  • Joining Threads
  • Waiting for a Thread
  • Calling the pthread_join Subroutine
  • Multiple Joins
  • Join Example
  • Returning Information from a Thread
  • Related Information
  • List of Synchronization Subroutines
  • Related Information
  • Scheduling Overview
  • Related Information
  • Threads Scheduling
  • Basic Scheduling Facilities
  • Inheritsched Attribute
  • Scheduling Policy and Priority
  • Setting the Scheduling Policy and Priority at Creation Time
  • Setting the Scheduling Attributes at Execution Time
  • Considerations about Scheduling Policies
  • Contention Scope
  • Setting the Contention Scope
  • Impacts of Contention Scope on Scheduling
  • sched_yield Subroutine
  • Related Information
  • Synchronization Scheduling
  • Priority Inversion
  • Mutex Protocols
  • Priority Inheritance Protocol
  • Priority Protection Protocol
  • Choosing a Mutex Protocol
  • Protocol Attribute
  • Inheritance or Protection
  • Related Information
  • List of Scheduling Subroutines
  • Related Information
  • Threads Advanced Features
  • Related Information
  • One-Time Initializations
  • One-Time Initialization Object
  • One-Time Initialization Routine
  • Related Information
  • Thread-Specific Data
  • Creating and Destroying Keys
  • Key Creation
  • Destructor Routine
  • Key Destruction
  • Using Thread-Specific Data
  • Setting Successive Values
  • Taking Care about Destructor Routines
  • Using Non-Pointer Values
  • Related Information
  • Advanced Attributes
  • Stack Attributes
  • Stack Size
  • Stack Address
  • Process Sharing
  • Making Complex Synchronization Objects
  • Long Locks
  • Semaphores
  • Write-Priority Read/Write Locks
  • Related Information
  • List of Threads Advanced-Feature Subroutines
  • Related Information
  • Threads-Processes Interactions Overview
  • Related Information
  • Signal Management
  • Signal Handlers and Signal Masks
  • Signal Generation
  • Handling Signals
  • Signal Delivery
  • Related Information
  • Process Duplication and Termination
  • Forking
  • Fork Handlers
  • Process Termination
  • Related Information
  • Scheduling
  • Process-Level Scheduling
  • Timer and Sleep Subroutines
  • Related Information
  • List of Threads-Processes Interactions Subroutines
  • Related Information
  • Threads Library Options
  • List of Options
  • Stack Address POSIX Option
  • Stack Size POSIX Option
  • Priority Scheduling POSIX Option
  • Checking the Availability of an Option
  • Compile Time Checking
  • Run Time Checking
  • Related Information
  • Threads Library Quick Reference
  • Supported Interfaces
  • POSIX Interfaces
  • Single UNIX Specification Interfaces
  • Thread-safety
  • Threads Data Types
  • Limits and Default Values
  • Maximum Number of Threads per Process
  • Minimum Stack Size
  • Maximum Number of Thread-Specific Data Keys
  • Default Attribute Values
  • Related Information
  • Chapter 12. lex and yacc Program Information

  • Creating an Input Language with the lex and yacc Commands
  • Writing a Lexical Analyzer Program with the lex Command
  • How the lex Command Operates
  • How the Lexical Analyzer Works
  • Extended Regular Expressions in the lex Command
  • Operators
  • lex Actions
  • Null Action
  • Same As Next Action
  • Printing a Matched String
  • Finding the Length of a Matched String
  • Matching Strings within Strings
  • Getting More Input
  • Putting Characters Back
  • Input/Output Subroutines
  • Character Set
  • End-of-File Processing
  • Passing Code to the Generated lex Program
  • Defining lex Substitution Strings
  • lex Start Conditions
  • Compiling the Lexical Analyzer
  • lex Library
  • Related Information
  • Using the lex Program with the yacc Program
  • Creating a Parser with the yacc Program
  • yacc Grammar File
  • main and yyerror Subroutines
  • yylex Subroutine
  • Using the yacc Grammar File
  • Using Comments
  • Using Literal Strings
  • Formatting the Grammar File
  • Errors in the Grammar File
  • yacc Declarations
  • Defining Global Variables
  • Start Conditions
  • Token Numbers
  • yacc Rules
  • Repeating Nonterminal Names
  • Using Recursion in a Grammar File
  • Empty String
  • End-of-Input Marker
  • yacc Error Handling
  • Providing for Error Correction
  • Clearing the Look-Ahead Token
  • Lexical Analysis for the yacc Command
  • yacc-Generated Parser Operation
  • Shift
  • Reduce
  • Using Ambiguous Rules in the yacc Program
  • Parser Conflicts
  • How the Parser Responds to Conflicts
  • Turning on Debug Mode for a yacc-Generated Parser
  • Related Information
  • Example Program for the lex and yacc Programs
  • Compiling the Example Program
  • Parser Source Code
  • Lexical Analyzer Source Code
  • Related Information
  • Chapter 13. Logical Volume Programming

  • Related Information
  • List of Logical Volume Subroutines
  • Chapter 14. make Command

  • Creating a Description File
  • Format of a make Description File Entry
  • Using Commands in a make Description File
  • Calling the make Program from a Description File
  • Preventing the make Program from Writing Commands
  • Preventing the make Program from Stopping on Errors
  • Example of a Description File
  • Making the Description File Simpler
  • Internal Rules for the make Program
  • Example of Default Rules File
  • Single-Suffix Rules
  • Using the Make Command with Archive Libraries
  • Changing Macros in the Rules File
  • Defining Default Conditions in a Description File
  • Including Other Files in a Description File
  • Defining and Using Macros in a Description File
  • Using Macros in a Description File
  • Internal Macros
  • Target File Name
  • Label Name
  • Younger Files
  • First Out-of-Date File
  • Current File-Name Prefix
  • Archive Library Member
  • Changing Macro Definitions in a Command
  • How the make Command Creates a Target File
  • Using the make Command with Source Code Control System (SCCS) Files
  • Description Files Stored in the Source Code Control System (SCCS)
  • Using the make Command with Non-Source Code Control System (SCCS) Files
  • How the make Command Uses the Environment Variables
  • Example of a Description File
  • Chapter 15. m4 Macro Processor Overview

  • Using the m4 Macro Processor
  • Creating a User-Defined Macro
  • Using the Quote Characters
  • Changing the Quote Characters
  • Arguments
  • Using a Built-In m4 Macro
  • Removing a Macro Definition
  • Checking for a Defined Macro
  • Using Integer Arithmetic
  • Manipulating Files
  • Redirecting Output
  • Using System Programs in a Program
  • Using Unique File Names
  • Using Conditional Expressions
  • Manipulating Strings
  • Printing
  • List of Additional m4 Macros
  • Chapter 16. National Language Support

  • NLS Capabilities
  • Locale-Specific and Culture-Specific Conventions
  • User Messages in Native Languages
  • Code Set Support
  • Input Method Support
  • Overview of Chapter Contents
  • Related Information
  • Locale Overview for Programming
  • Working with Code Sets
  • Single-Byte and Multibyte Code Sets
  • The Unique Code-Point Range
  • Data Representation
  • Multibyte Character Code Data Representation
  • Wide Character Code Data Representation
  • Character Properties
  • Collation-Order Properties
  • Code-Set Width
  • Code-Set Display Width
  • Localization
  • Locale Categories
  • Understanding Locale
  • Environment Variables Precedence Example
  • Multibyte Subroutines
  • Wide Character Subroutines
  • Bidirectionality and Character Shaping
  • Code Set Independence
  • Determining Maximum Number of Bytes in Code Sets
  • Determining Character and String Display Widths
  • Exceptions to Code Set Knowledge: Unique Code-Point Range
  • File Name Matching
  • Radix Character Handling
  • Programming Model
  • Related Information
  • National Language Support Subroutines Overview
  • Introducing Locale Subroutines
  • Introducing Time Formatting Subroutines
  • Introducing Monetary Formatting Subroutines
  • Introducing Multibyte and Wide Character Subroutines
  • wchar.h Header File
  • Introducing Internationalized Regular Expression Subroutines
  • Locale Subroutines
  • Setting the Locale
  • Accessing Locale Information
  • Examples
  • Related Information
  • Time Formatting Subroutines
  • Examples
  • Related Information
  • Monetary Formatting Subroutines
  • Euro Currency Support via the @euro Modifier
  • Examples
  • Related Information
  • Multibyte and Wide Character Subroutines
  • Multibyte Code and Wide Character Code Conversion Subroutines
  • Multibyte Code to Wide Character Code Conversion Subroutines
  • Wide Character Code to Multibyte Code Conversion Subroutines
  • Examples
  • Wide Character Classification Subroutines
  • Generic Wide Character Classification Subroutines
  • Standard Wide Character Classification Subroutines
  • Wide Character Case Conversion Subroutines
  • Example
  • Wide Character Display Column Width Subroutines
  • Examples
  • Multibyte and Wide Character String Collation Subroutines
  • Examples
  • Multibyte and Wide Character String Comparison Subroutines
  • Example
  • Wide Character String Conversion Subroutines
  • Examples
  • Wide Character String Copy Subroutines
  • Example
  • Wide Character String Search Subroutines
  • Examples
  • Wide Character Input/Output Subroutines
  • Formatted Wide Character I/O
  • Unformatted Wide Character I/O
  • Examples
  • Working with the Wide Character Constant
  • Related Information
  • Internationalized Regular Expression Subroutines
  • Examples
  • Related Information
  • Layout (Bidirectional Text and Character Shaping) Overview
  • Data Streams
  • Cursor Movement
  • Character Shaping
  • Methods of Character Shaping
  • Contextual Character Shaping
  • Introducing Layout Library Subroutines
  • Use of the libcur Package
  • Related Information
  • Code Set Overview
  • ASCII Characters
  • ASCII Characters in the Unique Code-Point Range
  • Other ASCII Characters
  • Code Set Strategy
  • Code Set Structure
  • Control Characters
  • Graphic Characters
  • Single-Byte and Multibyte Code Sets
  • ISO Code Sets
  • ISO646-IRV
  • ISO8859 Family
  • Code Set ISO8859-1
  • Code Set ISO8859-2
  • Code Set ISO8859-5
  • Code Set ISO8859-6
  • Code Set ISO8859-7
  • Code Set ISO8859-8
  • Code Set ISO8859-9
  • Code Set ISO8859-15
  • Extended UNIX Code (EUC) Encoding Scheme
  • IBM-eucJP
  • IBM-eucCN
  • GBK
  • IBM-eucTW
  • Big5
  • IBM-eucKR
  • IBM PC Code Sets
  • IBM-850
  • IBM-856
  • IBM-921
  • IBM-922
  • IBM-943 and IBM-932
  • IBM-1046
  • IBM-1124
  • IBM-1129
  • TIS-620
  • UCS-2 and UTF-8
  • ISO10646 UCS-2 (Unicode)
  • UTF-8 (UCS Transformation Format)
  • Related Information
  • Converters Overview for Programming
  • Converters Introduction
  • Standard Converters
  • Understanding libiconv
  • Using the iconv_open Subroutine
  • How the iconv_open Subroutine Finds Converters
  • Converter Programs versus Tables
  • Unicode and Universal Converters
  • Using Converters
  • Code Set Conversion Filter Example
  • Naming Converters
  • List of Converters
  • List of PC, ISO, and EBCDIC Code Set Converters
  • List of Multibyte Code Set Converters
  • List of Interchange Converters--7-bit
  • List of Interchange Converters--8-bit
  • List of Interchange Converters--Compound Text
  • List of Interchange Converters--uucode
  • List of UCS-2 Interchange Converters
  • List of UTF-8 Interchange Converters
  • List of Miscellaneous Converters
  • Related Information
  • Writing Converters Using the iconv Interface
  • Code Sets and Converters
  • Stateful Code Sets and Converters
  • Stateless Code Sets and Converters
  • iconv Framework - Overview of Structures
  • iconv.h File and Structures
  • iconv Control Flow
  • Writing a Code Set Converter
  • Stateless Converters - Algorithm Based
  • Stateful Converters
  • Examples
  • Related Information
  • Input Method Overview
  • Input Method Introduction
  • Input Method Names
  • Input Method Areas
  • Related Information
  • Programming Input Methods
  • Initialization
  • Input Method Management
  • IM Keymap Management
  • Key Event Processing
  • Callbacks
  • Input Method Structures
  • Related Information
  • Working with Keyboard Mapping
  • IM Keymaps
  • Inbound and Outbound Mapping
  • Related Information
  • Using Callbacks
  • Initializing Callbacks
  • Related Information
  • Bidirectional Input Method
  • Cyrillic Input Method (CIM)
  • Keymap:
  • Keysyms:
  • Reserved Keysyms:
  • Modifiers
  • Related Information
  • Greek Input Method (GIM)
  • Keymap:
  • Keysyms:
  • Reserved keysyms:
  • Related Information
  • Japanese Input Method (JIM)
  • Japanese Character Processing
  • Kana-To-Kanji Conversion (KKC) Technology
  • Input Modes
  • Keyboard Mapping
  • Character Size
  • Romaji-To-Kana Conversion (RKC)
  • Kanji Pre-edit
  • Keymaps:
  • Keysyms:
  • Reserved Keysyms:
  • Related Information
  • Korean Input Method (KIM)
  • Related Information
  • Latvian Input Method (LVIM)
  • Keymap:
  • Lithuanian Input Method (LTIM)
  • Keymap:
  • Thai Input Method (THIM)
  • Keymap:
  • Vietnamese Input Method (VNIM)
  • Keymap:
  • Simplified Chinese Input Method (ZIM)
  • Simplified Chinese Character Processing
  • Simplified Chinese Input Method (ZIM-UCS)
  • Chinese (CJK) Character Processing
  • Related Information
  • Single-Byte Input Method
  • Traditional Chinese Input Method (TIM)
  • TIM Features
  • Traditional Chinese Character Processing
  • Related Information
  • Universal Input Method
  • Keymap:
  • List of Reserved Keysyms
  • Reserved Keysyms for Traditional Chinese
  • Reserved Keysyms for Simplified Chinese (ZIM and ZIM-UCS)
  • Message Facility Overview for Programming
  • Creating a Message Source File
  • Usage Considerations
  • Adding Comments to the Message Source File
  • Continuing Messages on the Next Line
  • Including Special Characters in the Message Text
  • Defining a Character to Delimit Message Text
  • Assigning Message Set Numbers and Message ID Numbers
  • Removing Messages from a Catalog
  • Length of Message Text
  • Content of Message Text
  • Examples of Message Source Files
  • Creating a Message Catalog
  • Catalog Sizing
  • Examples
  • Displaying Messages outside of an Application Program
  • Displaying Messages with an Application Program
  • Understanding the NLSPATH Environment Variable
  • Retrieving Program-Supplied Default Messages
  • Setting the Language Hierarchy
  • Example of Retrieving a Message from a Catalog
  • Related Information
  • Culture-Specific Data Processing
  • Culture-Specific Tables
  • Culture-Specific Algorithms
  • Example: Load a Culture-Specific Module for Arabic Text for an Application
  • Header File
  • The Main Program
  • Methods
  • Include File: textpr
  • Related Information
  • NLS Sample Program
  • Message Source File for foo
  • Creation of Message Header File for foo
  • Single Path Code Set Independent Version
  • Dual-Path Version Optimized for Single-Byte Code Sets
  • National Language Support (NLS) Quick Reference
  • National Language Support Do's and Don'ts
  • National Language Support Checklist
  • Program Operation Checklist:
  • AIXwindows CheckList
  • Message Suggestions
  • Describing Command Syntax in Messages
  • Writing Style of Messages
  • Related Information
  • Related Information
  • List of National Language Support Subroutines
  • List of Locale Subroutines
  • List of Time and Monetary Formatting Subroutines
  • List of Multibyte Character Subroutines
  • List of Wide Character Subroutines
  • List of Layout Library Subroutines
  • List of Message Facility Subroutines
  • List of Converter Subroutines
  • List of Input Method Subroutines
  • List of Regular Expression Subroutines
  • Chapter 17. Object Data Manager (ODM)

  • ODM Object Classes and Objects
  • Creating an Object Class
  • Prerequisite Tasks or Conditions
  • Procedure
  • Adding Objects to an Object Class
  • Prerequisite Tasks or Conditions
  • Procedure
  • Locking Object Classes
  • Storing Object Classes and Objects
  • Prerequisite Tasks or Condition
  • Procedure
  • Using ODM Commands
  • Using the odm_create_class or odm_add_obj Subroutines
  • ODM Descriptors
  • ODM Terminal Descriptors
  • ODM Link Descriptor
  • ODM Method Descriptor
  • ODM Object Searches
  • Descriptor Names in ODM Predicates
  • Comparison Operators in ODM Predicates
  • LIKE Comparison Operator
  • Constants in ODM Predicates
  • Numeric Constants in ODM Predicates
  • Character String Constants in ODM Predicates
  • AND Logical Operator for Predicates
  • Related Information
  • List of ODM Commands and Subroutines
  • Commands
  • Subroutines
  • Related Information
  • ODM Example Code and Output
  • ODM Example Input Code for Creating Object Classes
  • ODM Example Output for Object Class Definitions
  • ODM Example Code for Adding Objects to Object Classes
  • Related Information
  • Chapter 18. sed Program Information

  • Manipulating Strings with sed
  • Starting the Editor
  • How sed Works
  • Using Regular Expressions
  • Using the sed Command Summary
  • Line Manipulation
  • Substitution
  • Input and Output
  • Matching Across Lines
  • Pick up and Put down
  • Control
  • Using Text in Commands
  • Using String Replacement
  • Chapter 19. Shared Libraries, Shared Memory, and The malloc Subsystem

  • Related Information
  • Shared Objects and Runtime Linking
  • Operation of the Runtime Linker
  • Creating a Shared Object with Runtime Linking Enabled
  • Related Information
  • Shared Libraries and Lazy Loading
  • Lazy Loading Execution Tracing
  • Related Information
  • Creating a Shared Library
  • Prerequisite Tasks
  • Procedure
  • Related Information
  • Program Address Space Overview
  • System Memory Architecture Introduction
  • The Physical Address Space of 32-bit Systems
  • The Physical Address Space of 64-bit Systems
  • Segment Register Addressing
  • Paging Space
  • Memory Management Policy
  • Memory Allocation
  • Related Information
  • Understanding Memory Mapping
  • mmap Comparison with shmat
  • mmap Compatibility Considerations
  • Using the Semaphore Subroutines
  • Mapping Files with the shmat Subroutine
  • Copy-on-Write Mapped Files
  • Mapping Shared Memory Segments with the shmat Subroutine
  • Related Information
  • IPC (Inter-Process Communication) Limits
  • Shared Memory Segments
  • Before AIX 4.2.1
  • AIX 4.2.1
  • AIX 4.3
  • AIX 4.3.1
  • AIX 4.3.2
  • Creating a Mapped Data File with the shmat Subroutine
  • Prerequisite Condition
  • Procedure
  • Related Information
  • Creating a Copy-On-Write Mapped Data File with the shmat Subroutine
  • Prerequisite Condition
  • Procedure
  • Related Information
  • Creating a Shared Memory Segment with the shmat Subroutine
  • Prerequisite Tasks or Conditions
  • Procedure
  • Related Information
  • System Memory Allocation Using the malloc Subsystem
  • Working with the Heap
  • Working with the Heap
  • Understanding System Allocation Policy
  • Understanding the Default Allocation Policy
  • Allocation
  • Deallocation
  • Reallocation
  • Understanding the 3.1 Allocation Policy
  • Allocation
  • Deallocation
  • Reallocation
  • Limitations
  • Comparison of the Default and 3.1 Allocation Policies
  • Related Information
  • User Defined Malloc Replacement
  • Enablement
  • 32/64bit Considerations
  • Thread Considerations
  • Limitations
  • Error Reporting
  • Related Information