Difference between revisions of "Typesetter C"

From Computer History Wiki
Jump to: navigation, search
m (rm dup link)
m (new cat)
 
(One intermediate revision by the same user not shown)
Line 31: Line 31:
 
<!-- * [http://ana-3.lcs.mit.edu/~jnc/history/unix/CChanges.txt  Changes to C]
 
<!-- * [http://ana-3.lcs.mit.edu/~jnc/history/unix/CChanges.txt  Changes to C]
 
* [http://ana-3.lcs.mit.edu/~jnc/history/unix/COChanges.txt Older changes to C] -->
 
* [http://ana-3.lcs.mit.edu/~jnc/history/unix/COChanges.txt Older changes to C] -->
 +
 +
[[Category: C Language]]

Latest revision as of 01:21, 17 December 2018

'Typesetter C' (and variants thereof) is a name given to an extended version of C which appeared after V6 Unix and its somewhat primitive (by modern standards) C and compiler thereof were released, but before V7 Unix and its C/compiler. (The name was given to it because many of the extensions were allegedly needed for 'troff', although an examination of the source code of an early version shows that in fact it used very few.)

These were additions to the language implemented by the original Ritchie compiler of V6. Among the first round of changes to C for this version were:

  • Long (32-bit) integers
  • Unsigned integers
  • Inner blocks can have private local variables
  • Structures and other aggregates can be initialized
  • Local variables can be initialized
  • Bit fields
  • Macros with arguments (actually, this was in V6 C, but not documented)
  • Conditional compilation (again, present previously but not documented)
  • Function arguments can have 'register' type
  • 'typedef'
  • 'static' intra-file scope

The second round included:

  • Expressions in conditional compilation directives
  • Unions
  • Type coercions
  • Assignment operators ('+=', etc) have the character order reversed

For details, see the original notes (below).

See also