Beginning Linux Programming Third Edition phần 1 ppsx

89 364 0
Beginning Linux Programming Third Edition phần 1 ppsx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... Try It Out—Total Terminal Control Detecting Keystrokes Try It Out—Your Very Own kbhit Virtual Consoles Pseudo Terminals Summary xii 16 0 16 2 16 3 16 4 16 7 16 9 17 1 17 1 17 2 17 3 17 4 17 5 17 6 17 6 17 8 17 8 17 9 18 0 18 1 18 2 18 3 18 3 18 4 18 5 18 5 18 6 18 7 18 7 18 8 18 9 19 0 19 1 19 1 19 2 19 5 19 8 200 200 202 204 204 Contents Chapter 6: Managing Text-Based Screens with curses Compiling with curses Concepts Try It Out—A Simple... 94 95 96 96 97 98 10 0 10 0 10 1 10 2 10 2 10 4 lseek fstat, stat, and lstat dup and dup2 10 4 10 4 10 6 The Standard I/O Library 10 7 fopen fread fwrite fclose fflush fseek fgetc, getc, and getchar fputc, putc, and putchar fgets and gets 10 8 10 8 10 9 10 9 10 9 11 0 11 0 11 0 11 1 Formatted Input and Output 11 1 printf, fprintf, and sprintf scanf, fscanf, and sscanf Other Stream Functions 11 2 11 4 11 6 Try It Out—Another... strptime Temporary Files Try It Out—tmpnam and tmpfile User Information Try It Out—User Information Host Information Try It Out—Host Information 12 5 12 6 12 6 13 0 13 0 13 1 13 2 13 4 13 5 13 5 13 7 13 8 13 9 14 0 14 2 14 3 14 4 14 5 14 5 14 6 14 6 14 8 15 0 15 2 15 3 15 4 15 5 15 6 15 8 15 9 xi Contents Logging Try It Out—syslog Try It Out—logmask Resources and Limits Try It Out—Resource Limits Summary Chapter 5: Terminals Reading... Try It Out—Another File Copy Program 11 6 Stream Errors Streams and File Descriptors 11 7 11 8 File and Directory Maintenance 11 8 chmod chown x 11 8 11 9 Contents unlink, link, and symlink mkdir and rmdir chdir and getcwd Scanning Directories opendir readdir telldir seekdir closedir Try It Out—A Directory-Scanning Program Errors 11 9 11 9 12 0 12 0 12 1 12 1 12 2 12 2 12 2 12 2 12 5 strerror perror The /proc File System... Types Boolean Character Number Temporal Creating a Table Graphical Tools Accessing MySQL Data from C Connection Routines Error Handling 2 81 2 81 2 81 282 283 283 284 285 295 302 303 304 304 306 310 310 310 311 311 312 313 314 314 314 314 316 316 317 318 318 318 318 319 319 322 325 326 330 xv Contents Executing SQL Statements SQL Statements That Return No Data Discovering What You Inserted Try It Out Try... Other Environments Summary Chapter 10 : Debugging Types of Errors General Debugging Techniques A Program with Bugs Code Inspection Instrumentation Try It Out—Debug Information Debugging without Recompiling Controlled Execution 3 81 382 383 383 385 385 385 386 386 386 387 390 390 3 91 3 91 395 395 397 399 400 400 4 01 4 01 403 407 410 410 410 411 412 414 415 417 417 418 418 4 21 422 423 424 424 xvii Contents... and Updating a Window Try It Out—Multiple Windows Optimizing Screen Refreshes Subwindows Try It Out—Subwindows The Keypad Try It Out—Using the Keypad Color 205 206 207 208 210 210 211 211 212 212 212 214 215 215 216 217 217 218 218 219 222 223 223 225 226 227 Try It Out—-Colors Redefining Colors Pads 229 230 230 Try It Out—Using a Pad The CD Collection Application Try It Out—A New CD Collection Application... 509 509 510 510 511 512 513 514 515 516 517 517 518 520 5 21 522 522 523 524 525 526 526 527 529 530 533 534 534 536 538 538 542 543 544 544 548 549 549 549 5 51 Contents Client-Side Functions Try It Out—Client Functions Try It Out—Getting Server Results Application Summary Summary Chapter 14 : Semaphores, Shared Memory, and Message Queues Semaphores Semaphore Definition A Theoretical Example Linux Semaphore... Application Using KDE/Qt Try It Out—MainWindow Try It Out—AddCdDialog Try It Out—LogonDialog Try It Out—main.cpp Summary Chapter 18 : Device Drivers 689 6 91 6 91 692 692 693 694 695 697 699 700 7 01 702 702 703 703 704 705 707 708 709 711 712 715 717 719 720 7 21 Writing Device Drivers Devices 7 21 722 Device Classes User and Kernel Space 723 724 What Goes Where? Building Modules Data Types Try It Out—A Kernel Module... Client/Server Datagrams Summary Chapter 16 : Programming GNOME Using GTK+ Introducing X X Server X Client X Protocol Xlib Toolkits Window Managers Other Ways to GUI—Platform-Independent Windowing APIs Introducing GTK+ GLib Type System GTK+ Object System xxii 592 592 593 594 594 595 596 596 597 597 598 598 599 600 6 01 602 604 606 608 609 610 610 613 614 616 616 619 622 623 623 624 624 624 624 625 625 . Library 10 7 fopen 10 8 fread 10 8 fwrite 10 9 fclose 10 9 fflush 10 9 fseek 11 0 fgetc, getc, and getchar 11 0 fputc, putc, and putchar 11 0 fgets and gets 11 1 Formatted Input and Output 11 1 printf, fprintf,. 11 8 chmod 11 8 chown 11 9 a544977 FM.qxd 12 /1/ 03 8:55 AM Page x xi Contents unlink, link, and symlink 11 9 mkdir and rmdir 11 9 chdir and getcwd 12 0 Scanning Directories 12 0 opendir 12 1 readdir 12 1 telldir. sprintf 11 2 scanf, fscanf, and sscanf 11 4 Other Stream Functions 11 6 Try It Out—Another File Copy Program 11 6 Stream Errors 11 7 Streams and File Descriptors 11 8 File and Directory Maintenance 11 8 chmod

Ngày đăng: 09/08/2014, 14:21

Từ khóa liên quan

Mục lục

  • Beginning Linux Programming

    • Cover

    • About Neil Matthew

    • About Rick Stones

    • Contents

    • Foreword by Alan Cox

    • Introduction

    • Chapter 1: Getting Started

      • An Introduction to UNIX, Linux, and GNU

        • What Is UNIX?

          • A Brief History of UNIX

          • UNIX Philosophy

          • What Is Linux?

          • The GNU Project and the Free Software Foundation

          • Linux Distributions

          • Programming Linux

            • Linux Programs

            • The C Compiler

              • Try It Out-Our First Linux C Program

              • Development System Roadmap

              • Applications

              • Header Files

              • Library Files

              • Static Libraries

                • Try It Out-Static Libraries

                • Shared Libraries

                • Getting Help

                  • Try It Out-Manual Pages and info

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan