Technical Standard

Total Page:16

File Type:pdf, Size:1020Kb

Technical Standard Technical Standard X/Open Curses, Issue 7 The Open Group ©November 2009, The Open Group All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior permission of the copyright owners. Technical Standard X/Open Curses, Issue 7 ISBN: 1-931624-83-6 Document Number: C094 Published in the U.K. by The Open Group, November 2009. This standardhas been prepared by The Open Group Base Working Group. Feedback relating to the material contained within this standardmay be submitted by using the web site at http://austingroupbugs.net with the Project field set to "Xcurses Issue 7". ii Technical Standard 2009 Contents Chapter 1 Introduction........................................................................................... 1 1.1 This Document ........................................................................................ 1 1.1.1 Relationship to Previous Issues ......................................................... 1 1.1.2 Features Introduced in Issue 7 ........................................................... 2 1.1.3 Features Withdrawn in Issue 7........................................................... 2 1.1.4 Features Introduced in Issue 4 ........................................................... 2 1.2 Conformance............................................................................................ 3 1.2.1 Base Curses Conformance .................................................................. 3 1.2.2 Enhanced Curses Conformance......................................................... 4 1.3 Terminology ............................................................................................. 4 1.3.1 Shaded Text ........................................................................................... 5 1.4 Format of Entries..................................................................................... 6 Chapter 2 General Information ......................................................................... 9 2.1 Use and Implementation of Interfaces................................................. 9 2.1.1 Use and Implementation of Functions.............................................. 9 2.1.2 Use and Implementation of Macros .................................................. 9 2.2 The Compilation Environment ............................................................. 10 2.2.1 The X/Open Name Space (ENHANCED CURSES) ....................... 10 2.3 Data Types ................................................................................................ 12 Chapter 3 Interface Overview ............................................................................ 13 3.1 Components............................................................................................. 13 3.1.1 Relationship to the XSH Specification............................................... 13 3.1.2 Relationship to the XBD Specification .............................................. 13 3.2 Screens, Windows, and Terminals ........................................................ 14 3.3 Characters................................................................................................. 15 3.3.1 Character Storage Size......................................................................... 15 3.3.2 Multi-Column Characters ................................................................... 16 3.3.3 Attributes............................................................................................... 16 3.3.4 Rendition ............................................................................................... 16 3.3.5 Non-Spacing Characters ..................................................................... 16 3.3.6 Window Properties .............................................................................. 17 3.4 Conceptual Operations ........................................................................... 18 3.4.1 Screen Addressing ............................................................................... 18 3.4.2 Basic Character Operations ................................................................ 18 3.4.3 Special Characters ................................................................................ 20 3.4.4 Rendition of Characters Placed into a Window ............................... 21 3.5 Input Processing ...................................................................................... 22 3.5.1 Keypad Processing ............................................................................... 22 3.5.2 Input Mode ........................................................................................... 23 3.5.3 Delay Mode ........................................................................................... 24 3.5.4 Echo Processing .................................................................................... 24 3.6 The Set of Curses Functions .................................................................. 24 3.6.1 Function Name Conventions.............................................................. 24 X/Open Curses, Issue 7 iii Contents 3.6.2 Function Families Provided ................................................................ 25 3.7 Interfaces Implemented as Macros ....................................................... 26 3.8 Initialized Curses Environment ............................................................ 27 3.9 Synchronous and Networked Asynchronous Terminals .................. 27 Chapter 4 Curses Interfaces................................................................................. 29 Chapter 5 Headers .................................................................................................... 305 <curses.h>................................................................................................... 306 <term.h>...................................................................................................... 320 <unctrl.h> ................................................................................................... 321 Chapter 6 Utilities..................................................................................................... 323 infocmp ......................................................................................................... 324 tic .................................................................................................................. 328 tput ............................................................................................................... 330 untic .............................................................................................................. 335 Chapter 7 Terminfo Source Format (ENHANCED CURSES) ........... 337 7.1 Source File Syntax ................................................................................... 337 7.1.1 Minimum Guaranteed Limits ............................................................ 338 7.1.2 Formal Grammar .................................................................................. 338 7.1.3 Defined Capabilities ............................................................................ 340 7.1.4 Sample Entry ......................................................................................... 349 7.1.5 Types of Capabilities in the Sample Entry........................................ 349 Appendix A Application Usage.............................................................................. 353 A.1 Device Capabilities ................................................................................. 353 A.1.1 Basic Capabilities ................................................................................. 353 A.1.2 Parameterized Strings ......................................................................... 354 A.1.3 Cursor Motions ..................................................................................... 355 A.1.4 Area Clears............................................................................................ 356 A.1.5 Insert/Delete Line ................................................................................ 356 A.1.6 Insert/Delete Character ...................................................................... 357 A.1.7 Highlighting, Underlining, and Visible Bells................................... 358 A.1.8 Keypad................................................................................................... 360 A.1.9 Tabs and Initialization ......................................................................... 360 A.1.10 Delays .................................................................................................... 361 A.1.11Status Lines ........................................................................................... 361 A.1.12 Line Graphics ........................................................................................ 361 A.1.13 Color Manipulation ............................................................................. 363 A.1.14 Miscellaneous ....................................................................................... 364 A.1.15 Special Cases ......................................................................................... 365 A.1.16 Similar Terminals ................................................................................. 366 A.2 Printer Capabilities ................................................................................. 366 A.2.1
Recommended publications
  • Synchronizing Threads with POSIX Semaphores
    3/17/2016 POSIX Semaphores Synchronizing Threads with POSIX Semaphores 1. Why semaphores? 2. Posix semaphores are easy to use sem_init sem_wait sem_post sem_getvalue sem_destroy 3. Activities 1 2 Now it is time to take a look at some code that does something a little unexpected. The program badcnt.c creates two new threads, both of which increment a global variable called cnt exactly NITER, with NITER = 1,000,000. But the program produces unexpected results. Activity 1. Create a directory called posixsem in your class Unix directory. Download in this directory the code badcnt.c and compile it using gcc badcnt.c -o badcnt -lpthread Run the executable badcnt and observe the ouput. Try it on both tanner and felix. Quite unexpected! Since cnt starts at 0, and both threads increment it NITER times, we should see cnt equal to 2*NITER at the end of the program. What happens? Threads can greatly simplify writing elegant and efficient programs. However, there are problems when multiple threads share a common address space, like the variable cnt in our earlier example. To understand what might happen, let us analyze this simple piece of code: THREAD 1 THREAD 2 a = data; b = data; a++; b--; data = a; data = b; Now if this code is executed serially (for instance, THREAD 1 first and then THREAD 2), there are no problems. However threads execute in an arbitrary order, so consider the following situation: Thread 1 Thread 2 data a = data; --- 0 a = a+1; --- 0 --- b = data; // 0 0 --- b = b + 1; 0 data = a; // 1 --- 1 --- data = b; // 1 1 So data could end up +1, 0, -1, and there is NO WAY to know which value! It is completely non- deterministic! http://www.csc.villanova.edu/~mdamian/threads/posixsem.html 1/4 3/17/2016 POSIX Semaphores The solution to this is to provide functions that will block a thread if another thread is accessing data that it is using.
    [Show full text]
  • Openextensions POSIX Conformance Document
    z/VM Version 7 Release 1 OpenExtensions POSIX Conformance Document IBM GC24-6298-00 Note: Before you use this information and the product it supports, read the information in “Notices” on page 73. This edition applies to version 7, release 1, modification 0 of IBM z/VM (product number 5741-A09) and to all subsequent releases and modifications until otherwise indicated in new editions. Last updated: 2018-09-12 © Copyright International Business Machines Corporation 1993, 2018. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents List of Tables........................................................................................................ ix About This Document............................................................................................xi Intended Audience......................................................................................................................................xi Conventions Used in This Document.......................................................................................................... xi Where to Find More Information.................................................................................................................xi Links to Other Documents and Websites.............................................................................................. xi How to Send Your Comments to IBM....................................................................xiii Summary of Changes for z/VM
    [Show full text]
  • So You Think You Know C? [Pdf]
    So You Think You Know C? And Ten More Short Essays on Programming Languages by Oleksandr Kaleniuk Published in 2020 This is being published under the Creative Commons Zero license. I have dedicated this work to the public domain by waiving all of my rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. Table of Contents Introduction......................................................................................................... 4 So you think you know C?..................................................................................6 APL deserves its renaissance too.......................................................................13 Going beyond the idiomatic Python..................................................................30 Why Erlang is the only true computer language................................................39 The invisible Prolog in C++..............................................................................43 One reason you probably shouldn’t bet your whole career on JavaScript.........54 You don't have to learn assembly to read disassembly......................................57 Fortran is still a thing........................................................................................64 Learn you a Lisp in 0 minutes...........................................................................68 Blood, sweat,
    [Show full text]
  • Software Engineering Standards Introduction
    6/21/2008 Software Engineering Standards Introduction 1028 9126 730 12207 9000 CMM 15288 CMMI J-016 1679 Outline 1. Definitions 2. Sources of Standards 3. Why Use Standards ? 4. ISO and Software Engineering Standards 5. IEEE Software Engineering Collection Sources: IEEE Standards, Software Engineering, Volume Three: Product Standards, Introduction to the1999 Edition, pages i to xxiii. Horch, J., ‘Practical Guide to Software Quality management’, Artech House, 1996, chap 2. Wells, J., ‘An Introduction to IEEE/EIA 12207’, US DoD, SEPO, 1999. Moore, J., ‘Selecting Software Engineering Standards’, QAI Conference, 1998. Moore, J., ‘The Road Map to Software Engineering: A Standards-Based Guide’, Wiley-IEEE Computer Society Press, 2006. Moore, J.,’An Integrated Collection of Software Engineering Standards’, IEEE Software, Nov 1999. Gray, L., ‘Guidebook to IEEE/EIA 12207 Standard for Information Technology, Software Life Cycle Processes’, Abelia Corporation, Fairfax, Virginia, 2000. Coallier, F.; International Standardization in Software and Systems Engineering, Crosstalk, February 2003, pp. 18-22. 6/21/2008 2 1 6/21/2008 Exemple d’un système complexe Système de transport aérien Système de transport Système de Transport Aérien terrestre Système de Système de gestion du trafic réservation aérien Système Système aéroportuaire de distribution du kérosène SystèmeSystème avionique avion Système de Système de gestion de la Structure vie à bord SystèmeSystème de de équipage propulsionpropulsion Système SystèmeNavigation de de SystèmeVisualisation Système de navigationsystem de visualisation contrôle de vol SystèmeSystème de de réception réception Système de GPSGPS transport terrestremaritime 6/21/2008 3 Toward a Software Engineering Profession • What does it take ? 1. Body of Knowledge (e.g. SWEBOK) 2.
    [Show full text]
  • JTC1 and SC22 - Terminology
    JTC1 AD Hoc Terminology, August 2005 1 JTC1 and SC22 - Terminology Background Following my offer to collect together the definitions from SC22 standards, SC22 accepted my offer and appointed me as its terminology representative (I was later also asked to represent UK and BSI) on the JTC1 ad hoc group on terminology. These notes summarise the results of collecting the SC22 definitions, and my impressions of the JTC1 ad hoc group. Roger Scowen August 2005 A collection of definitions from SC22 standards SC22 asked me to prepare a collected terminology for SC22 containing the definitions from standards for which SC22 is responsible, and asked the project editors to send me the definitions in text form. Many, but not all, project editors did so. However there are sufficient for SC22 to judge whether to complete the list or abandon it as an interesting but unprofitable exercise. Adding definitions to the database The project editor of a standard typically sends the definitions from the standard as a Word file, but it may be plain text or in Latex or nroff format. These definitions are transformed into a uniform format by a series of global ‘find & replace’ operations to produce a Word file where each definition is represented as a row of a table with three columns: the term, its definition, and any notes and/or examples. It is often easier to check this has been accomplished by copying and pasting successive attempts into Excel than examining the Word file itself. Sometimes there are special cases such as exotic characters (for example Greek or mathematical characters), special fonts, illustrations, diagrams, or tables.
    [Show full text]
  • File Systems: Semantics & Structure What Is a File
    5/15/2017 File Systems: Semantics & Structure What is a File 11A. File Semantics • a file is a named collection of information 11B. Namespace Semantics • primary roles of file system: 11C. File Representation – to store and retrieve data – to manage the media/space where data is stored 11D. Free Space Representation • typical operations: 11E. Namespace Representation – where is the first block of this file 11L. Disk Partitioning – where is the next block of this file 11F. File System Integration – where is block 35 of this file – allocate a new block to the end of this file – free all blocks associated with this file File Systems Semantics and Structure 1 File Systems Semantics and Structure 2 Data and Metadata Sequential Byte Stream Access • File systems deal with two kinds of information int infd = open(“abc”, O_RDONLY); int outfd = open(“xyz”, O_WRONLY+O_CREATE, 0666); • Data – the contents of the file if (infd >= 0 && outfd >= 0) { – e.g. instructions of the program, words in the letter int count = read(infd, buf, sizeof buf); Metadata – Information about the file • while( count > 0 ) { e.g. how many bytes are there, when was it created – write(outfd, buf, count); sometimes called attributes – count = read(infd, inbuf, BUFSIZE); • both must be persisted and protected } – stored and connected by the file system close(infd); close(outfd); } File Systems Semantics and Structure 3 File Systems Semantics and Structure 4 Random Access Consistency Model void *readSection(int fd, struct hdr *index, int section) { struct hdr *head = &hdr[section];
    [Show full text]
  • Comparative Analysis of Distributed and Parallel File Systems' Internal Techniques
    Comparative Analysis of Distributed and Parallel File Systems’ Internal Techniques Viacheslav Dubeyko Content 1 TERMINOLOGY AND ABBREVIATIONS ................................................................................ 4 2 INTRODUCTION......................................................................................................................... 5 3 COMPARATIVE ANALYSIS METHODOLOGY ....................................................................... 5 4 FILE SYSTEM FEATURES CLASSIFICATION ........................................................................ 5 4.1 Distributed File Systems ............................................................................................................................ 6 4.1.1 HDFS ..................................................................................................................................................... 6 4.1.2 GFS (Google File System) ....................................................................................................................... 7 4.1.3 InterMezzo ............................................................................................................................................ 9 4.1.4 CodA .................................................................................................................................................... 10 4.1.5 Ceph.................................................................................................................................................... 12 4.1.6 DDFS ..................................................................................................................................................
    [Show full text]
  • OSE/RM Model Specification on a Basis the Reference Models of the Internet of Things
    OSE/RM model specification on a basis the reference models of the Internet of things A.V. Boichenko PhD, Plekhanov Russian Academy of Economics, tel +7 916 624 267, [email protected],[email protected] V.A. Kazakov PhD, Plekhanov Russian Academy of Economics, tel. 8-903-148-10-44 [email protected] O.V. Lukinova, Doctor of Engineering, Trapeznikov Institute of control sciences of Russian Academy of Sciences, tel. 916-707-13-90 [email protected] Abstract. In work the specification in projects the Internet of Things standard- ized reference model of the environment of the open systems OSE/RM (Open System Environment/Reference Model) on a basis the reference models of the Internet of things is considered. Also use of the OSE/RM model in integration projects of the Internet of things on the basis of the European interoperability framework EIF (European Interoperability Framework) is considered. Keywords: Internet of things, reference models of the Internet of things, refer- ence model of the environment of the open OSE/RM systems, integration Inter- net of things, European interoperability framework of EIF. Within the last several decades in world practice of system and program engineer- ing at design of information systems the referensy model of the environment of open systems was widely used (in the Russian practice, unfortunately, significantly more rare) OSE/RM (Open System Environment / Reference Model). This model describes basic functionality of any information system. The main maintenance of this model is described in the document ISO/IEC TR 14252:1996 Information technology – Guide to the POSIX Open System Environment (OSE) [1].
    [Show full text]
  • Blessed Documentation Release 1.11.0
    Blessed Documentation Release 1.11.0 Erik Rose, Jeff Quast October 10, 2015 Contents 1 Introduction 3 1.1 Brief Overview..............................................3 1.2 Before And After.............................................4 1.3 Requirements...............................................5 1.4 Further Documentation..........................................5 1.5 Bugs, Contributing, Support.......................................5 1.6 License..................................................5 1.7 Forked..................................................5 2 Overview 7 2.1 Styling and Formatting..........................................7 2.2 Moving The Cursor........................................... 10 2.3 Height And Width............................................ 11 2.4 Clearing The Screen........................................... 12 2.5 Full-Screen Mode............................................ 12 2.6 Pipe Savvy................................................ 13 2.7 Sequence Awareness........................................... 13 2.8 Keyboard Input.............................................. 14 3 Examples 17 3.1 editor.py................................................. 17 3.2 keymatrix.py............................................... 17 3.3 on_resize.py............................................... 17 3.4 progress_bar.py.............................................. 17 3.5 tprint.py................................................. 18 3.6 worms.py................................................. 18 4 Further Reading 19
    [Show full text]
  • Chapter 18 Terminal I/O
    Chapter 18 Terminal I/O Cheng-Hsin Hsu National Tsing Hua University Department of Computer Science Parts of the course materials are courtesy of Prof. Chun-Ying Huang CS5432 Advanced UNIX Programming 1 Outline • Introduction and overview • Special input characters • Getting and setting terminal attributes • Terminal option flags • stty command • Line control functions • Terminal identification • Terminal modes: Canonical, non-canonical mode, cbreak, and raw • Terminal window size • termcap, terminfo, and curses Terminal I/O 2 Introduction • The handling of terminal I/O is a messy area • The manual page for terminal I/O is usually one of the longest in the programmer’s manuals • We look at all the POSIX.1 terminal functions and some of the platform-specific additions in this chapter • Terminal I/O has two modes • Canonical mode input processing – Terminal input is processed as lines – For example, read functions return a single line • Non-canonical mode input processing – Input characters are not assembled into lines – For example, full screen editors like vi works in this mode Terminal I/O 3 Introduction (Cont’d) • Older BSD-style terminal drivers supported three modes for terminal input • (a) cooked mode – Input is collected into lines, and the special characters are processed • (b) raw mode – Input is not assembled into lines, and there is no processing of special characters • (c) cbreak mode – Input is not assembled into lines, but some of the special characters are processed • POSIX.1 defines 11 special input characters, e.g., Ctrl-D
    [Show full text]
  • Man Pages Section 3: Curses Library Functions
    man pages section 3: Curses Library Functions Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. Part No: 816–0215–10 May 2002 Copyright 2002 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, docs.sun.com, AnswerBook, AnswerBook2, and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun™ Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.
    [Show full text]
  • Linux Backspace/Delete Mini-HOWTO Sebastiano Vigna [email protected]
    Linux Backspace/Delete mini-HOWTO Sebastiano Vigna [email protected] Revision History Revision v1.6 19 Jan 2002 Included many comments from Alex Boldt and Chung-Rui Kao. Revision v1.5 3 May 2000 Updated for new distros and the tput trick. Revision v1.4 7 December 2000 Updated for Red Hat 7.0 and Helix Gnome conflicts. Revision v1.3 18 October 2000 Name change. Revision v1.2 15 October 2000 Updated. Added "What If Nothing Works" section. Revision v1.1 13 September 2000 Added tcsh fixes Revision v1.0 5 September 2000 First release Table of Contents Introduction ...........................................................................................................................3 How Keys Are Turned Into Actions ..................................................................................3 Why It Doesn’t (Always) Work ..........................................................................................4 X................................................................................................................................................4 What You Should Do When Writing Applications ........................................................5 What You Should Do On Your System.............................................................................5 What If Nothing Works .......................................................................................................9 More Hacking........................................................................................................................9 Conclusions..........................................................................................................................10
    [Show full text]