Calendar - for "REAL" programmers: Difference between revisions

(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
Line 653:
 
=={{header|C}}==
Upper-case C version of the C Calendar task. Relies on the ability of most C compilers to specify #defines on the command line and declares the putchar function to avoid needing any #includes. E.g. for tcc:.
 
**Note:** Historically, some UNIX systems were connected to upper-case only terminals, and users of those systems needed to write C programs. One could configure the terminal using the "stty" command, setting the olcuc and iuclc options to translate uppercase to lowercase on input, and convert lowercase to uppercase on output (although typically the setting was applied by the "getty" program so that logging in would be possible).
 
So the text that was actually saved in the C source code would be lowercase, but it would appear on the terminal as uppercase.
 
Modern versions of Linux and MacOS have preserved this feature.
 
<pre>
tcc -DSTRUCT=struct -DCONST=const -DINT=int -DCHAR=char -DVOID=void -DMAIN=main -DIF=if -DELSE=else -DWHILE=while -DFOR=for -DDO=do -DBREAK=break -DRETURN=return -DPUTCHAR=putchar UCCALENDAR.c
Anonymous user