Index: doc/LaTeXmacros/common.tex
===================================================================
--- doc/LaTeXmacros/common.tex	(revision ab84e8aaac226083364bb775615829e6a4677a68)
+++ doc/LaTeXmacros/common.tex	(revision 2b93c5acc31e6016a00a2b4665148136e0c28bc8)
@@ -1,11 +1,11 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% 
+%%
 %% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
 %%
 %% The contents of this file are covered under the licence agreement in the
 %% file "LICENCE" distributed with Cforall.
-%% 
-%% common.tex -- 
-%% 
+%%
+%% common.tex --
+%%
 %% Author           : Peter A. Buhr
 %% Created On       : Sat Apr  9 10:06:17 2016
@@ -41,4 +41,6 @@
 \newcommand{\CCeleven}{\rm C\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name
 \newcommand{\Celeven}{C11\xspace}		% C11 symbolic name
+\newcommand{\Csharp}{\rm C\hbox{\#}\xspace} % C# symbolic name
+
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -124,7 +126,7 @@
 \newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
 
-% inline text and code index (cannot use ©)
+% inline text and code index (cannot use ï¿½)
 \newcommand{\Indexc}[1]{\lstinline$#1$\index{#1@\lstinline$#1$}}
-% code index (cannot use ©)
+% code index (cannot use ï¿½)
 \newcommand{\indexc}[1]{\index{#1@\lstinline$#1$}}
 
@@ -227,8 +229,9 @@
 % CFA programming language, based on ANSI C (with some gcc additions)
 \lstdefinelanguage{CFA}[ANSI]{C}{
-	morekeywords={_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
+	morekeywords=[1]{_Alignas,_Alignof,__alignof,__alignof__,asm,__asm,__asm__,_At,_Atomic,__attribute,__attribute__,auto,
 		_Bool,catch,catchResume,choose,_Complex,__complex,__complex__,__const,__const__,disable,dtype,enable,__extension__,
 		fallthrough,fallthru,finally,forall,ftype,_Generic,_Imaginary,inline,__label__,lvalue,_Noreturn,otype,restrict,_Static_assert,
 		_Thread_local,throw,throwResume,trait,try,typeof,__typeof,__typeof__,},
+	morekeywords=[2]{mutex,nomutex,thread,wait,signal,accept,monitor}
 }%
 
@@ -236,15 +239,17 @@
 language=CFA,
 columns=fullflexible,
-basicstyle=\linespread{0.9}\sf,			% reduce line spacing and use sanserif font
-stringstyle=\tt,						% use typewriter font
-tabsize=4,								% 4 space tabbing
+basicstyle=\linespread{0.9}\tt\small,		% reduce line spacing and use typewriter font
+keywordstyle=[2]\color{blue},				% second set of keywords for concurency
+stringstyle=\sf\color{Mahogany},			% use sanserif font
+commentstyle=\itshape\color{OliveGreen},		% green and italic comments
+tabsize=4,							% 4 space tabbing
 xleftmargin=\parindentlnth,				% indent code to paragraph indentation
-extendedchars=true,						% allow ASCII characters in the range 128-255
-escapechar=§,							% escape to latex in CFA code
+extendedchars=true,					% allow ASCII characters in the range 128-255
+escapechar=ï¿½,						% escape to latex in CFA code
 mathescape=true,						% allow $...$ LaTeX math escapes in code
-%keepspaces=true,						% 
+%keepspaces=true,						%
 showstringspaces=false,					% do not show spaces with cup
-showlines=true,							% show blank lines at end of code
-aboveskip=4pt,							% spacing above/below code block
+showlines=true,						% show blank lines at end of code
+aboveskip=4pt,						% spacing above/below code block
 belowskip=3pt,
 moredelim=**[is][\color{red}]{®}{®},	% red highlighting
@@ -253,5 +258,5 @@
 moredelim=[is][\lstset{keywords={}}]{¶}{¶}, % temporarily turn off keywords
 % replace/adjust listing characters that look bad in sanserif
-literate={-}{\raisebox{-0.15ex}{\texttt{-}}}1 {^}{\raisebox{0.6ex}{$\scriptscriptstyle\land\,$}}1
+literate={-}{\raisebox{-0.15ex}{\texttt{-}}}1 {^}{\raisebox{0.6ex}{$\scriptscriptstyle\land\,$}}1 {Â©}{{\"u}}1
 	{~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 {_}{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}1 {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
 	{<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2,
