/usr/share/doc/texlive-doc/generic/c-pascal/demo1.tex is in texlive-generic-extra 2013.20140215-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | \input cap_c
\magnification 1440
\BeginC
// this is a short demo program
/* both kinds of comment are recognised */
// some compiler directives
#pragma hdrfile "hello.sym"
#include <stdio.h>
#include <sys/stat.h>
#pragma hdrstop
void hello(int n)
{
// obviously, keywords inside comments or
// texts are not emphasized:
// void return switch for double
for (; n>0; n--)
printf("Hello, void world!\n");
/* ^ isn't that beautiful? */
}
float silly_funct()
{
#define max(a,b) ((a)>(b))?(a):(b)
printf("%7.4lf\n", max(3.14, 012));
}
// words not recognised as keywords are considered
// to be identifiers and are typeset in italic
void main()
{
int n;
hello(0x1C);
silly_funct();
}
\EndC
\bye
|