A68TOC(1)

NAME
a68toc - Algol 68 to C translator

SYNOPSIS
a68toc [ options ] sourcefile

DESCRIPTION

OPTIONS

-verbose (-v)
    Causes some potentially helpful C comments to be generated.

-line (-n)
    Causes the generation of C pre-processor #line directives. In its absence the option -verbose, causes comments containing Algol 68 line number and source file to be generated.

-long (-l)
    Causes the translator to accept long long modes. This is the default.

-short (-s)
    Causes the translator to accept short short modes.

-return_structs (-r)
    Prevents generated C functions from returning structure results directly, it uses an extra pointer parameter instead.

-mark_closures (-c)
    Causes closures to be marked with a special value for debugging purposes.

-stack_closures (-C)
    Causes closures to be (unsafely) stacked rather than heaped.

-filename_truncate (-f) integer
    Truncates module names to integer characters long when searching for USE and library modules. eg. -f 8 for DOS FAT files.

-staredit starflags
    Sets the required staredit characters to starflags. The characters specified in the A68_STAREDIT environment variable are overriden unless starflags starts with "+" or "-" in which cases the starflags are added to, or removed from, those specifed in A68_STAREDIT .

-dir directory
    Add directory to the front of the list of directories, specified in the A68_DIR environment variable, in which the translator searches for module information (.m) files.

-cdir directory
    Add directory to the front of the list of directories, specified in the A68_CDIR environment variable, in which the translator searches for previously generated (.c) files when the -uname cfile option is specified.

-lib directory
    Directory contains the modinfo (.m) files corresponding to library modules. This overrides any value set in the A68_LIB environment variable.

-nolib
    Turns off the library lookup mechanism.

-stream
    Causes RS stream language to be printed on standard output.

-dot
    Use dot stropping. (Note 2)

-quote
    Use quote stropping. (Note 2)

-skip
    Suppresses run-time error when missing non-void out part selected.

-tilde
    Allows tilde as valid character in identifiers. (Note 2)

-optbool
    Uses the optimised versions of and(bool,bool) and or(bool,bool).

-keeplist
    Allows extension of a keeplist to maintain compatibility. (Note 2)

-trace (-t) level
    Controls level of expression tree diagnostics.

-debug_level (-d) level
    Controls level of general diagnostics.

-debug_module (-m) module
    Turns on general diagnostics in module.

-cstream [ file | memory ]
    Controls how the translator's C streams are implemented.

    file
        Each C stream is a file.

    memory
        Each C stream is an area of memory. This is the default.

-unameuname-option
    Controls how the translator's unique name generator is seeded. If any error is detected, a warning is issued, and the translator proceeds as if -uname AAAAAAA had been specified. The possible values of uname-option are

    seedfile
        Read the seed from the file $A68_NAMESEED . This is the default. The specified file is updated after translation.

    cfile
        The seed is read from the configuration information contained in the C file produced by a previous translation of the current module. The C file is found by searching the directories specified using the -cdir option or $A68_CDIR environment variable.

    uname
        The specified unique name is used as the seed. The unique name should consist of seven uppercase letters. It is an error if the specified unique name contains invalid characters. If more than seven characters are specified, the extra ones are silently ignored. If fewer than seven characters are specified, the unique name is padded on the right with 'A's.

-tmp
    The generated C file, and C stream files (if -cstream file has been specified), are placed in /tmp rather than the current directory. This may improve performance on systems where /tmp is mapped into virtual memory. Beware of concurrent builds using this option.

-check
    Check ALGOL 68 syntax. No C file is generated, but module information is generated normally.

-V  Outputs the current version of Ctrans to standard output.

-version -Version
    Outputs detailed configuration information to standard output.

-oldalien
    Allow obsolete alien declaration semantics, i.e. right-hand side of #define follows first space. If right-hand side is empty, an extern declaration is automatically generated.

FILES
name.c
    The C file generated from name.a68. The a68 suffix is not mandatory.
name.m
    Module information generated for decs module name.
$A68_NAMESEED
    The file containing the unique name seed.

ENVIRONMENT
A68_NAMESEED
    The name of the file containing the unique name seed. The environment variable CTRANS_NAMESEED may also be used for backwards compatibility.
A68_STAREDIT
    The set of required staredit characters. This may be over-riden or modified by the -staredit option.
A68_DIR
    A colon-separated list of directories in which the translator will look for module information (.m) files. This may be modified by the -dir option.
A68_CDIR
    A colon-separated list of directories in which the translator will look for previously generated (.c) files when the -uname cfile option has been specified. This may be modified by the -cdir option.
A68_LIB
    The name of directory in which the translator will look for module information (.m) files corresponding to library modules. This may be overridden by the -lib or -nolib options.
A68_GC_DEBUG
    Controls the amount of debugging information produced by the heap management functions of the Algol 68 run-time library.
A68_GC_POLICY
    Controls behaviour when a memory allocation cannot be satisfied. The specified behaviour may be overriden by the Algol68 program. Possible values are as follows
    0   The garbage collector is called if the heap usage is above a certain threshold. This is the default.
    1   The garbage collector is never called (i.e. the heap is grown).
    2   The garbage collector is always called. The heap is grown only if absolutely necessary.

NOTES
1   Not yet implemented.
2   This option is a relic of the Multics compiler; it has not been tested and maybe should be removed.