MSL C Reference 9.0

Total Page:16

File Type:pdf, Size:1020Kb

MSL C Reference 9.0 MSL C Reference 9.0 Revised <Date> Revised <Date> Metrowerks and the Metrowerks logo are registered trademarks of Metrowerks Corporation in the United States and/or other countries. CodeWarrior is a trademark or registered trademark of Metrowerks Corporation in the United States and/or other countries. All other trade names and trademarks are the property of their respective owners. Copyright © 2004 Metrowerks Corporation. ALL RIGHTS RESERVED. No portion of this document may be reproduced or transmitted in any form or by any means, electronic or me- chanical, without prior written permission from Metrowerks. Use of this document and related materials are governed by the license agreement that accompanied the product to which this manual pertains. This document may be printed for non-commercial personal use only in accordance with the aforementioned license agreement. If you do not have a copy of the license agreement, contact your Metrowerks representative or call 1-800-377- 5416 (if outside the U.S., call +1-512-996-5300). Metrowerks reserves the right to make changes to any product described or referred to in this document without further notice. Metrowerks makes no warranty, representation or guarantee regarding the merchantability or fitness of its prod- ucts for any particular purpose, nor does Metrowerks assume any liability arising out of the application or use of any product described herein and specifically disclaims any and all liability. Metrowerks software is not authorized for and has not been designed, tested, manufactured, or intended for use in developing applications where the fail- ure, malfunction, or any inaccuracy of the application carries a risk of death, serious bodily injury, or damage to tangible property, including, but not limited to, use in factory control systems, medical devices or facilities, nuclear facilities, aircraft navigation or communication, emergency systems, or other applications with a similar degree of potential hazard. How to Contact Metrowerks Corporate Headquarters Metrowerks Corporation 7700 West Parmer Lane Austin, TX 78729 U.S.A. World Wide Web http://www.metrowerks.com Sales United States Voice: 800-377-5416 United States Fax: 512-996-4910 International Voice: +1-512-996-5300 E-mail: [email protected] Technical Support United States Voice: 800-377-5416 International Voice: +1-512-996-5300 E-mail: [email protected] Table of Contents 1 Introduction 23 Organization of Files. 23 ANSI C Standard . 25 The ANSI C Library and Apple Macintosh . 25 MSL Extras Library . 26 POSIX Functionality. 26 Console I/O and the Macintosh. 26 Console I/O and Windows. 27 Using Mac OS X and the Extras Library . 27 Compatibility . 27 Intrinsic Functions . 27 2 MSL C and Multithreading 29 Introduction to Multithreading . 29 Definitions. 30 Reentrancy Functions . 32 3 alloca.h 33 Overview of alloca.h. 33 alloca . 33 4 assert.h 35 Overview of assert.h . 35 assert . 35 5 conio.h 37 Overview of conio.h . 37 _clrscr . 38 getch . 38 getche . 39 _gotoxy . 39 _initscr. 40 MSL C Reference 1 Table of Contents inp . .40 inpd . .41 inpw . .41 kbhit. .42 outp . .42 outpd . .43 outpw . .44 _textattr . .44 _textbackground . .45 _textcolor . .45 _wherex . .46 _wherey . .46 6 console.h 49 Overview of console.h. .49 ccommand . .49 clrscr . .51 getch. .51 InstallConsole . .52 kbhit. .52 ReadCharsFromConsole . .53 RemoveConsole. .53 __ttyname . .54 WriteCharsToConsole . .54 7 crtl.h 57 Overview of crtl.h . .57 Argc . .57 Argv . .58 _DllTerminate . .58 environ . .58 _HandleTable. .59 _CRTStartup . .59 _RunInit. .60 _SetupArgs . .60 2 MSL C Reference Table of Contents 8ctype.h 61 Overview of ctype.h . 61 Character testing and case conversion. 61 Character Sets Supported . 62 isalnum . 63 isalpha . 65 isblank . 65 iscntrl. 66 isdigit. 66 isgraph . ..
Recommended publications
  • Huawei Announces EROFS Linux File-System, Might Eventually Be Used
    ARTICLES & REVIEWS NEWS ARCHIVE FORUMS PREMIUM CATEGORIES Custom Search Search Latest Linux News Huawei Announces EROFS Linux File-System, Might Huawei Announces EROFS Linux File- Eventually Be Used By Android Devices System, Might Eventually Be Used By Android Devices Written by Michael Larabel in Linux Storage on 31 May 2018 at 09:00 AM EDT. 3 Comments Mesa 18.0.5 Is The Last Planned Release In Huawei's Gao Xiang has announced the EROFS open-source Linux file-system The Series intended for Android devices, but still at its very early stages of AMD K8 Support Stripped Out Of Coreboot development. NVIDIA’s Next Generation Mainstream GPU Will At Least Be Detailed In August EROFS is the company's new approach for a read-only file-system that would work well for Android devices. EROFS is short for the Extendable Read-Only GNOME 3 Might Be Too Resource Hungry To File-System and they began developing it with being unsatisfied with other read-only file- Ever Run Nicely On The Raspberry Pi system alternatives. XWayland Gets Patch To Automatically Use EGLStreams For NVIDIA Support When EROFS is designed to offer better performance than other read-only alternatives while still Needed focusing upon saving storage space. As part of EROFS is also a compression mode pursuing BPFILTER Landing For Linux 4.18 For a different design approach than other file-systems: the compression numbers shared in Eventually Better Firewall / Packet Filtering today's announcement on both server hardware and a Kirin 970 are compelling for being in AMDGPU Patches Prepping JPEG Support For the early stages of development.
    [Show full text]
  • Download the Specification
    Internationalizing and Localizing Applications in Oracle Solaris Part No: E61053 November 2020 Internationalizing and Localizing Applications in Oracle Solaris Part No: E61053 Copyright © 2014, 2020, Oracle and/or its affiliates. License Restrictions Warranty/Consequential Damages Disclaimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Restricted Rights Notice If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial
    [Show full text]
  • Chapter 2 Working with Characters and Strings
    C02624245.fm Page 11 Friday, October 19, 2007 7:46 PM Chapter 2 Working with Characters and Strings In this chapter: Character Encodings. 12 ANSI and Unicode Character and String Data Types. 13 Unicode and ANSI Functions in Windows . 15 Unicode and ANSI Functions in the C Run-Time Library . 17 Secure String Functions in the C Run-Time Library. 18 Why You Should Use Unicode. 26 How We Recommend Working with Characters and Strings. 26 Translating Strings Between Unicode and ANSI. 27 With Microsoft Windows becoming more and more popular around the world, it is increasingly important that we, as developers, target the various international markets. It was once common for U.S. versions of software to ship as much as six months prior to the shipping of international ver- sions. But increasing international support for the operating system is making it easier to produce applications for international markets and therefore is reducing the time lag between distribution of the U.S. and international versions of our software. Windows has always offered support to help developers localize their applications. An application can get country-specific information from various functions and can examine Control Panel set- tings to determine the user’s preferences. Windows even supports different fonts for our applica- tions. Last but not least, in Windows Vista, Unicode 5.0 is now supported. (Read “Extend The Global Reach Of Your Applications With Unicode 5.0” at http://msdn.microsoft.com/msdnmag/ issues/07/01/Unicode/default.aspx for a high-level presentation of Unicode 5.0.) Buffer overrun errors (which are typical when manipulating character strings) have become a vec- tor for security attacks against applications and even against parts of the operating system.
    [Show full text]
  • Unicode and Code Page Support
    Natural for Mainframes Unicode and Code Page Support Version 4.2.6 for Mainframes October 2009 This document applies to Natural Version 4.2.6 for Mainframes and to all subsequent releases. Specifications contained herein are subject to change and these changes will be reported in subsequent release notes or new editions. Copyright © Software AG 1979-2009. All rights reserved. The name Software AG, webMethods and all Software AG product names are either trademarks or registered trademarks of Software AG and/or Software AG USA, Inc. Other company and product names mentioned herein may be trademarks of their respective owners. Table of Contents 1 Unicode and Code Page Support .................................................................................... 1 2 Introduction ..................................................................................................................... 3 About Code Pages and Unicode ................................................................................ 4 About Unicode and Code Page Support in Natural .................................................. 5 ICU on Mainframe Platforms ..................................................................................... 6 3 Unicode and Code Page Support in the Natural Programming Language .................... 7 Natural Data Format U for Unicode-Based Data ....................................................... 8 Statements .................................................................................................................. 9 Logical
    [Show full text]
  • Z/OS Distributed File Service Zseries File System Implementation Z/OS V1R13
    Front cover z/OS Distributed File Service zSeries File System Implementation z/OS V1R13 Defining and installing a zSeries file system Performing backup and recovery, sysplex sharing Migrating from HFS to zFS Paul Rogers Robert Hering ibm.com/redbooks International Technical Support Organization z/OS Distributed File Service zSeries File System Implementation z/OS V1R13 October 2012 SG24-6580-05 Note: Before using this information and the product it supports, read the information in “Notices” on page xiii. Sixth Edition (October 2012) This edition applies to version 1 release 13 modification 0 of IBM z/OS (product number 5694-A01) and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2010, 2012. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xiii Trademarks . xiv Preface . .xv The team who wrote this book . .xv Now you can become a published author, too! . xvi Comments welcome. xvi Stay connected to IBM Redbooks . xvi Chapter 1. zFS file systems . 1 1.1 zSeries File System introduction. 2 1.2 Application programming interfaces . 2 1.3 zFS physical file system . 3 1.4 zFS colony address space . 4 1.5 zFS supports z/OS UNIX ACLs. 4 1.6 zFS file system aggregates. 5 1.6.1 Compatibility mode aggregates. 5 1.6.2 Multifile system aggregates. 6 1.7 Metadata cache. 7 1.8 zFS file system clones . 7 1.8.1 Backup file system . 8 1.9 zFS log files.
    [Show full text]
  • A Study of Failure Recovery and Logging of High-Performance Parallel File Systems
    1 A Study of Failure Recovery and Logging of High-Performance Parallel File Systems RUNZHOU HAN, OM RAMESHWAR GATLA, MAI ZHENG, Iowa State University JINRUI CAO, State University of New York at Plattsburgh DI ZHANG, DONG DAI, North Carolina University at Charlotte YONG CHEN, Texas Tech University JONATHAN COOK, New Mexico State University Large-scale parallel file systems (PFSes) play an essential role in high performance computing (HPC). However, despite the importance, their reliability is much less studied or understood compared with that of local storage systems or cloud storage systems. Recent failure incidents at real HPC centers have exposed the latent defects in PFS clusters as well as the urgent need for a systematic analysis. To address the challenge, we perform a study of the failure recovery and logging mechanisms of PFSes in this paper. First, to trigger the failure recovery and logging operations of the target PFS, we introduce a black- box fault injection tool called PFault, which is transparent to PFSes and easy to deploy in practice. PFault emulates the failure state of individual storage nodes in the PFS based on a set of pre-defined fault models, and enables examining the PFS behavior under fault systematically. Next, we apply PFault to study two widely used PFSes: Lustre and BeeGFS. Our analysis reveals the unique failure recovery and logging patterns of the target PFSes, and identifies multiple cases where the PFSes are imperfect in terms of failure handling. For example, Lustre includes a recovery component called LFSCK to detect and fix PFS-level inconsistencies, but we find that LFSCK itself may hang or trigger kernel panicswhen scanning a corrupted Lustre.
    [Show full text]
  • Lustre* Software Release 2.X Operations Manual Lustre* Software Release 2.X: Operations Manual Copyright © 2010, 2011 Oracle And/Or Its Affiliates
    Lustre* Software Release 2.x Operations Manual Lustre* Software Release 2.x: Operations Manual Copyright © 2010, 2011 Oracle and/or its affiliates. (The original version of this Operations Manual without the Intel modifications.) Copyright © 2011, 2012, 2013 Intel Corporation. (Intel modifications to the original version of this Operations Man- ual.) Notwithstanding Intel’s ownership of the copyright in the modifications to the original version of this Operations Manual, as between Intel and Oracle, Oracle and/or its affiliates retain sole ownership of the copyright in the unmodified portions of this Operations Manual. Important Notice from Intel INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IM- PLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSO- EVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR IN- FRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. A "Mission Critical Application" is any application in which failure of the Intel Product could result, directly or indirectly, in personal injury or death. SHOULD YOU PURCHASE OR USE INTEL'S PRODUCTS FOR ANY SUCH MISSION CRITICAL APPLICATION, YOU SHALL IN- DEMNIFY AND HOLD INTEL AND ITS SUBSIDIARIES, SUBCONTRACTORS AND AFFILIATES, AND THE DIRECTORS, OFFICERS, AND EMPLOYEES OF EACH, HARMLESS AGAINST ALL CLAIMS COSTS, DAMAGES, AND EXPENSES AND REASONABLE AT- TORNEYS' FEES ARISING OUT OF, DIRECTLY OR INDIRECTLY, ANY CLAIM OF PRODUCT LIABILITY, PERSONAL INJURY, OR DEATH ARISING IN ANY WAY OUT OF SUCH MISSION CRITICAL APPLICATION, WHETHER OR NOT INTEL OR ITS SUBCON- TRACTOR WAS NEGLIGENT IN THE DESIGN, MANUFACTURE, OR WARNING OF THE INTEL PRODUCT OR ANY OF ITS PARTS.
    [Show full text]
  • AIX Globalization
    AIX Version 7.1 AIX globalization IBM Note Before using this information and the product it supports, read the information in “Notices” on page 233 . This edition applies to AIX Version 7.1 and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2010, 2018. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this document............................................................................................vii Highlighting.................................................................................................................................................vii Case-sensitivity in AIX................................................................................................................................vii ISO 9000.....................................................................................................................................................vii AIX globalization...................................................................................................1 What's new...................................................................................................................................................1 Separation of messages from programs..................................................................................................... 1 Conversion between code sets.............................................................................................................
    [Show full text]
  • Introduction
    01-P1437 9/8/00 4:54 PM Page 1 ONE Introduction Around twenty years ago a computer revolution started when the IBM PC was released. The IBM PC took computing away from the air-conditioned environ- ment of the mainframe and minicomputer and put it onto the desk of poten- tially everyone. Nowadays most workers have a PC on their desk, and many have a PC at home, too. Laptop computers allow users to have one computer that can be used both at home and at work, as well as on the road. PCs are ge- neric computing devices providing tremendous computing power and flexibil- ity, and all PCs in the world from laptops to desktop PCs and through to servers have fundamentally the same architecture. Living through the PC era has been fun, frustrating, and exciting. However, there is an even bigger revolution on the way with more potential and even more challenges—the move to truly mobile-device-based computing. In the last few years computing devices have been coming onto the mar- ket that provide unparalleled portability and accessibility. Microsoft Windows CE devices, such as the palm-size device and handheld PC, provide cutdown desktop PC capabilities in a really small footprint, and Palm Pilot has been a very successful PDA (Personal Digital Assistant). Microsoft Pocket PC has tremen- dous features for enterprise computing, games, and entertainment. The Win- dows CE operating system has been embedded into many appliances (such as gas pumps and productions systems) for monitoring and control. Unlike the generic PC, these computing devices are not all the same and are designed for specific purposes.
    [Show full text]
  • An Introduction to Ada's Predefined Packages
    John McCormick Fall 2004 An Introduction to Ada's Predefined Packages The Annexes of the Ada Reference Manual (ARM) provides descriptions of the packages that every conforming Ada compiler vendor must provide (Chapters 1-13 and Annex A) and those that they usually provide. Here is a list of the names of those packages along with the location of their specifications in the ARM. Standard -- A.1 Strings (continued) Ada -- A.2 Unbounded -- A.4.5 Asynchronous_Task_Control -- D.11 Wide_Bounded -- A.4.7 Calendar -- 9.6 Wide_Fixed -- A.4.7 Characters -- A.3.1 Wide_Maps -- A.4.7 Handling -- A.3.2 Wide_Constants -- A.4.7 Latin_1 -- A.3.3 Wide_Unbounded -- A.4.7 Command_Line -- A.15 Synchronous_Task_Control -- D.10 Decimal -- F.2 Tags -- 3.9 Direct_IO -- A.8.4 Task_Attributes -- C.7.2 Dynamic_Priorities -- D.5 Task_Identification -- C.7.1 Exceptions -- 11.4.1 Text_IO -- A.10.1 Finalization -- 7.6 Complex_IO -- G.1.3 Interrupts -- C.3.2 Editing -- F.3.3 Names -- C.3.2 Text_Streams -- A.12.2 IO_Exceptions -- A.13 Unchecked_Conversion -- 13.9 Numerics -- A.5 Unchecked_Deallocation -- 13.11.2 Complex_Elementary_Functions -- G.1.2 Wide_Text_IO -- A.11 Complex_Types -- G.1.1 Complex_IO -- G.1.3 Discrete_Random -- A.5.2 Editing -- F.3.4 Elementary_Functions -- A.5.1 Text_Streams -- A.12.3 Float_Random -- A.5.2 Generic_Complex_Elementary_Functions -- G.1.2 Interfaces -- B.2 Generic_Complex_Types -- G.1.1 C -- B.3 Generic_Elementary_Functions -- A.5.1 Pointers -- B.3.2 Real_Time -- D.8 Strings -- B.3.1 Sequential_IO -- A.8.1 COBOL -- B.4 Storage_IO -- A.9 Fortran -- B.5 Streams -- 13.13.1 Stream_IO -- A.12.1 System -- 13.7 Strings -- A.4.1 Address_To_Access_Conversions -- 13.7.2 Bounded -- A.4.4 Machine_Code -- 13.8 Fixed -- A.4.3 RPC -- E.5 Maps -- A.4.2 Storage_Elements -- 13.7.1 Constants -- A.4.6 Storage_Pools -- 13.11 The purpose of this guide is to help you learn how to read the specifications for these packages.
    [Show full text]
  • Wording Improvements for Encodings and Character Sets
    Wording improvements for encodings and character sets Document #: P2297R0 Date: 2021-02-19 Project: Programming Language C++ Audience: SG-16 Reply-to: Corentin Jabot <[email protected]> Abstract Summary of behavior changes Alert & backspace The wording mandated that the executions encoding be able to encode ”alert, backspace, and carriage return”. This requirement is not used in the core wording (Tweaks of [5.13.3.3.1] may be needed), nor in the library wording, and therefore does not seem useful, so it was not added in the new wording. This will not have any impact on existing implementations. Unicode in raw string delimiters Falls out of the wording change. should we? New terminology Basic character set Formerly basic source character set. Represent the set of abstract (non-coded) characters in the graphic subset of the ASCII character set. The term ”source” has been dropped because the source code encoding is not observable nor relevant past phase 1. The basic character set is used: • As a subset of other encodings • To restric accepted characters in grammar elements • To restrict values in library literal character set, literal character encoding, wide literal character set, wide lit- eral character encoding Encodings and associated character sets of narrow and wide character and string literals. implementation-defined, and locale agnostic. 1 execution character set, execution character encoding, wide execution character set, wide execution character encoding Encodings and associated character sets of the encoding used by the library. isomorphic or supersets of their literal counterparts. Separating literal encodings from libraries encoding allows: • To make a distinction that exists in practice and which was not previously admitted by the standard previous.
    [Show full text]
  • Programming Languages Ð C
    Programming languages Ð C ABSTRACT (Cover sheet to be provided by ISO Secretariat.) This International Standard speci®es the form and establishes the interpretation of programs expressed in the programming language C. Its purpose is to promote portability, reliability, maintainability, and ef®cient execution of C language programs on a variety of computing systems. Clauses are included that detail the C language itself and the contents of the C language execution library. Annexes summarize aspects of both of them, and enumerate factors that in¯uence the portability of C programs. Although this International Standard is intended to guide knowledgeable C language programmers as well as implementors of C language translation systems, the document itself is not designed to serve as a tutorial. -- -- Introduction 1 With the introduction of new devices and extended character sets, new features may be added to this International Standard. Subclauses in the language and library clauses warn implementors and programmers of usages which, though valid in themselves, may con¯ict with future additions. 2 Certain features are obsolescent, which means that they may be considered for withdrawal in future revisions of this International Standard. They are retained because of their widespread use, but their use in new implementations (for implementation features) or new programs (for language [6.9] or library features [7.20]) is discouraged. 3 This International Standard is divided into four major subdivisions: Ð the introduction and preliminary elements; Ð the characteristics of environments that translate and execute C programs; Ð the language syntax, constraints, and semantics; Ð the library facilities. 4 Examples are provided to illustrate possible forms of the constructions described.
    [Show full text]