www.riscos.com Technical Support:
Acorn C/C++
Acorn C/C++ Reference Manual
Referenced Index of Contents
Acorn C/C++: Chapter 1: Introduction
Acorn C/C++: Chapter 2: CC and C++
Acorn C/C++: Chapter 3: CMHG
Acorn C/C++: Chapter 4: ToANSI
Acorn C/C++: Chapter 5: ToPCC
Acorn C/C++: Chapter 6: C implementation details
Acorn C/C++: Chapter 7: The C library
Acorn C/C++: Chapter 8: The ANSI library
Acorn C/C++: Chapter 9: The Event library
Acorn C/C++: Chapter 10: The Wimp library
Acorn C/C++: Chapter 11: The Toolbox library
Acorn C/C++: Chapter 12: The Render library
Acorn C/C++: Chapter 13: C++ implementation details
Acorn C/C++: Chapter 14: The Streams library
Acorn C/C++: Chapter 15: The Complex Math library
Acorn C/C++: Chapter 16: Portability
Acorn C/C++: Chapter 17: Assembly language interface
Acorn C/C++: Chapter 18: How to write relocatable modules in C
Acorn C/C++: Chapter 19: Overlays
Acorn C/C++: Appendix A: Changes to the C compiler
Acorn C/C++: Appendix B: C errors and warnings
Acorn C/C++: Appendix C: C++ errors and warnings
Acorn C/C++: Chapter 1: Introduction
Introduction
Installation of Acorn Desktop C
The C compiler
The C++ translator
This user guide
Part 1 - Using the C tools
Part 2 - C language issues
Part 3 - C++ language issues
Part 4 - Developing software for RISC OS
Part 5 - Appendixes
Conventions used
Useful references
C programming
C++ Programming
RISC OS
The ANSI C standard
The ANSI C++ standard
Acorn C/C++: Chapter 2: CC and C++
CC and C++
The underlying programs
How the tools use them
A note about Make
Getting started with CC and C++
Libraries
C libraries
C++ libraries
File naming and placing conventions
Work directory
Filename conventions
Rooted filenames
Source files
Include files
Object files
Program files
Compilation list files
Assembly list files
Filename validity
Include file searching
Reference section
Search path
Nested includes
Use of :mem
Use of C$Libroot
The SetUp dialogue box
Source
Include
Compile only
Preprocess only
Debug
Throwback
The SetUp menu
The command line
Controlling the preprocessor
Default path
Keep comments
Define
Undefine
Controlling code generation
Debug options
Profile
Assembler
Module code
Controlling the linker
Libraries
Using the Features menu option
Features
Handling warnings and errors
Suppress warnings
Suppress errors
UNIX pcc
Errors to file
Listings
Listing
Choosing your work directory
Work directory
Specifying other command line options
Others
Output messages
The icon bar menu
Command lines
Keyword options
Preprocessor options
Translator options
Code generation options
Linker options
Warning and error message options
Additional feature options
Worked examples
CHello
C++Hello
Sieve
Dhrystone 2.1
CModule
Desktop application examples
Acorn C/C++: Chapter 3: CMHG
CMHG
A note about Make
Starting CMHG
The icon bar menu
Example output
Command line interface
Acorn C/C++: Chapter 4: ToANSI
ToANSI
ToANSI C translation
A note about Make
Starting ToANSI
The icon bar menu
Example output
Command line interface
Acorn C/C++: Chapter 5: ToPCC
ToPCC
ToPCC C translation
A note about Make
Starting ToPCC
The icon bar menu
Example output
Command line interface
Acorn C/C++: Chapter 6: C implementation details
C implementation details
Implementation details
Identifiers
Data elements
Limits: limits.h and float.h
Structured data types
Pointers
Pointer subtraction
Arithmetic operations
Expression evaluation
Implementation limits
Standard implementation definition
Translation (A.6.3.1)
Environment (A.6.3.2)
Identifiers (A.6.3.3)
Characters (A.6.3.4)
Integers (A.6.3.5)
Floating point (A.6.3.6)
Arrays and pointers (A.6.3.7)
Registers (A.6.3.8)
Structures, unions, enumerations and bitfields (A.6.3.9)
Qualifiers (A.6.3.10)
Declarators (A.6.3.11)
Statements (A.6.3.12)
Preprocessing directives (A.6.3.13)
Library functions (A.6.3.14)
Extra features
#pragma directives
Pragmas controlling the preprocessor
Pragmas controlling printf/scanf argument checking
Pragmas controlling optimisation
Pragmas controlling code generation
Stack limit checking
Memory access checking
Global (program-wide) register variables
Special function declaration keywords
__value_in_regs
__pure
Special variable declaration keywords
__global_reg(n)
__global_freg(n)
Acorn C/C++: Chapter 7: The C library
The C library
assert.h
ctype.h
errno.h
EDOM
ERANGE
ESIGNUM
float.h
limits.h
locale.h
setlocale
lconv
math.h
setjmp.h
setjmp
longjmp
signal.h
raise
stdarg.h
va_list
va_start
va_arg
va_end
stddef.h
stdio.h
remove
rename
tmpfile
tmpnam
fclose
fflush
fopen
freopen
setbuf
setvbuf
fprintf
printf
sprintf
fscanf
scanf
sscanf
vprintf
vfprintf
vsprintf
fgetc
fgets
fputc
fputs
getc
getchar
gets
putc
putchar
puts
ungetc
fread
fwrite
fgetpos
fseek
fsetpos
ftell
rewind
clearerr
feof
ferror
perror
stdlib.h
atof
atoi
atol
strtod
strtol
strtoul
rand
srand
calloc
free
malloc
realloc
abort
atexit
exit
getenv
system
bsearch
qsort
abs
div
labs
ldiv
Multibyte character functions
mblen
mbtowc
wctomb
Multibyte string functions
mbstowcs
wcstombs
string.h
memcpy
memmove
strcpy
strncpy
strcat
strncat
memcmp
strcmp
strncmp
strcoll
strxfrm
memchr
strchr
strcspn
strpbrk
strrchr
strspn
strstr
strtok
memset
strerror
strlen
time.h
struct tm
clock
difftime
mktime
time
asctime
ctime
gmtime
localtime
strftime
Acorn C/C++: Chapter 8: The ANSI library
The ANSI library
Extra functions
__heap_checking_on_all_allocates / __heap_checking_on_all_deallocates
_mapstore / _fmapstore
Acorn C/C++: Chapter 9: The Event library
The Event library
Introduction
Registering and deregistering event handlers
Registering and deregistering message handlers
Quitting applications
Programmer interface
Initialisation
event_initialise
event_set_mask
event_get_mask
Polling
event_poll
event_poll_idle
Registering handlers
event_register_wimp_handler
event_register_toolbox_handler
event_register_message_handler
event_deregister_wimp_handler
event_deregister_toolbox_handler
event_deregister_message_handler
Handlers
WimpEventHandler
ToolboxEventHandler
WimpMessageHandler
Example
Acorn C/C++: Chapter 10: The Wimp library
The Wimp library
Programmer interface
wimp_add_messages
wimp_base_of_sprites
wimp_block_copy
wimp_claim_free_memory
wimp_close_down
wimp_close_template
wimp_close_window
wimp_command_window
wimp_create_icon
wimp_create_menu, CloseMenu
wimp_create_submenu
wimp_create_window
wimp_decode_menu
wimp_delete_icon
wimp_delete_window
wimp_drag_box, CancelDrag
wimp_extend
wimp_force_redraw
wimp_get_caret_position
wimp_get_icon_state
wimp_get_menu_state
wimp_get_pointer_info
wimp_get_rectangle
wimp_get_window_info
wimp_get_window_outline
wimp_get_window_state
wimp_initialise
wimp_load_template
wimp_open_template
wimp_open_window
wimp_plot_icon
wimp_poll
wimp_poll_idle
wimp_process_key
wimp_read_palette
wimp_read_pix_trans
wimp_read_sys_info, WimpSysInfo
wimp_redraw_window
wimp_register_filter
wimp_remove_messages
wimp_report_error
wimp_resize_icon
wimp_send_message
wimp_set_caret_position
wimp_set_colour, Wimp_BackgroundColour
wimp_set_colour_mapping
wimp_set_extent
wimp_set_font_colours
wimp_set_icon_state
wimp_set_mode
wimp_set_palette, Palette
wimp_set_pointer_shape
wimp_set_watchdog_state
wimp_slot_size
wimp_sprite_op, SpriteParams
wimp_start_task
wimp_text_colour
wimp_text_op
wimp_transfer_block
wimp_update_window
wimp_which_icon
Acorn C/C++: Chapter 11: The Toolbox library
The Toolbox library
Acorn C/C++: Chapter 12: The Render library
The Render library
Acorn C/C++: Chapter 13: C++ implementation details
C++ implementation details
Translation Limits
Identifiers (2.3)
Identifiers reserved by Release 3.0
Character Constants (2.5.2)
Value of multicharacter constants
Value of (single) character constants
Wide character constants
Floating Constants (2.5.3)
Long double floating constants
String Literals (2.5.4)
Distinct string literals
Wide character strings
Start and Termination (3.4)
Type of main()
Linkage of main()
Fundamental Types (3.6.1)
Signed integral types
Long double type
Alignment requirements
Integral Conversions (4.2)
Conversion to a signed type
Expressions (5)
Overflow and divide check
Function Call (5.2.2)
Evaluation order
Explicit Type Conversion (5.4)
Explicit conversions between pointer and integral types
Multiplicative Operators (5.6)
Sign of the remainder
Shift Operators (5.8)
Result of right shift
Relational Operators (5.9)
Pointer comparisons
Storage Class Specifiers (7.1.1)
Inline functions
Type Specifiers (7.1.6)
Volatile
Signed
Asm Declarations (7.3)
Effect of an asm declaration
Linkage Specifications (7.4)
Languages supported
Linkage to functions
Linkage to non-functions
Class Members (9.2)
Allocation of non-static data members
Bitfields (9.6)
Allocation and alignment of bitfields
Sign of 'plain' bitfields
Multiple Base Classes (10.1)
Allocation of base classes
Argument Matching (13.2)
Integral arguments
Exception Handling (experimental) (15)
Predefined Names (16.10)
Predefined macros
Acorn C/C++: Chapter 14: The Streams library
The Streams library
Introduction
Synopsis
Description
Core Classes
Predefined streams
Classes derived from streambuf
Classes derived from istream, ostream, and iostream
See also
filebuf
Synopsis
Description
Constructors
Members
See also
fstream
Synopsis
Description
Constructors
Member functions
See also
ios
Synopsis
Description
Constructors and assignment
Error states
Operators
Formatting
User-defined Format Flags
Other members
Built-in Manipulators
See also
istream
Synopsis
Description
Constructors and assignment
Input prefix function
Formatted input functions (extractors)
Unformatted input functions
Other members
Member functions related to positioning
Manipulator
Caveats
See also
manipulators
Synopsis
Description
See also
ostream
Synopsis
Description
Constructors and assignment
Output prefix function
Output suffix function
Formatted output functions (inserters)
Unformatted output functions
Other member functions
Positioning functions
Manipulators
See also
stdiobuf
Synopsis
Description
Caveats
See also
streambuf - protected
Synopsis
Description
Constructors
The Get, Put, and Reserver area
Functions to examine the pointers
Functions for setting the pointers
Other non-virtual members
Virtual member functions
See also
streambuf - public
Synopsis
Description
See also
strstream
Synopsis
Description
Constructors
istrstream members
ostrstream members
strstream members
See also
strstreambuf
Synopsis
Description
Constructors
Member functions
See also
Acorn C/C++: Chapter 15: The Complex Math library
The Complex Math library
Introduction
Synopsis
Description
Diagnostics
See also
cartesian/polar
Synopsis
Description
See also
complex_error
Synopsis
Description
See also
exp, log, pow, sqrt
Synopsis
Description
Diagnostics
See also
complex operators
Synopsis
Description
Arithmetic operators:
Comparison operators
Assignment operators
Warning
See also
cplxtrig
Synopsis
Description
Diagnostics
See also
Acorn C/C++: Chapter 16: Portability
Portability
General portability considerations
Fundamental data types
Byte ordering
Store alignment
Pointers and pointer arithmetic
Function argument evaluation
System-specific code
ANSI C vs K&R C
Lexical elements
Conversions
Expressions
Declarations
Statements
Preprocessor
The ToPCC and ToANSI tools
pcc compatibility mode
Language and preprocessor compatibility
Standard headers and libraries
ctype.h
errno.h
math.h
signal.h
stdio.h
string.h
stdlib.h
float.h
limits.h
locale.h
Environmental aspects
Acorn C/C++: Chapter 17: Assembly language interface
Assembly language interface
Register names
Register usage
Control arrival
Passing arguments
Return link
Structure results
Storage of variables
Function workspace
Examples
Acorn C/C++: Chapter 18: How to write relocatable modules in C
How to write relocatable modules in C
Getting started
Constraints on modules written in C
Overview of modules written in C
Functional components of modules written in C
The C module header generator
The format of input to CMHG
Runnable application code
Initialisation code
Finalisation code
Service call handler
Title string
Help string
Help and command keyword table
SWI chunk base number
SWI handler code
SWI decoding table
SWI decoding code
Turning interrupts on and off
IRQ handlers
Event handler
Library initialisation code
Acorn C/C++: Chapter 19: Overlays
Overlays
Paging vs overlays
When to use overlays
Acorn C/C++: Appendix A: Changes to the C compiler
Changes to the C compiler
Acorn C/C++: Appendix B: C errors and warnings
C errors and warnings
Interpreting CC errors and warnings
Warnings
Warning messages
Non-serious errors
Serious errors
Fatal errors
System errors
Acorn C/C++: Appendix C: C++ errors and warnings
C++ errors and warnings
'Not implemented' messages
© 3QD Developments Ltd 2013