summaryrefslogtreecommitdiff
path: root/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-10-25 21:00:20 +0100
committerHarald Welte <laforge@gnumonks.org>2015-10-25 21:00:20 +0100
commitfca59bea770346cf1c1f9b0e00cb48a61b44a8f3 (patch)
treea2011270df48d3501892ac1a56015c8be57e8a7d /2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode
import of old now defunct presentation slides svn repo
Diffstat (limited to '2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode')
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.c18
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.ll22
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Makefile41
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/complexFigure.tex88
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/cprog.sty249
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-c.tex22
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-ll.tex24
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/lgrind.sty228
-rw-r--r--2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/llvm.lst15
l---------2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols-fonts.tex1
l---------2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols.sty1
l---------2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/zrl.sty1
12 files changed, 710 insertions, 0 deletions
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.c b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.c
new file mode 100644
index 0000000..34d1726
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.c
@@ -0,0 +1,18 @@
+typedef struct QuadTree {
+ double Data;
+ struct QuadTree *Children[4];
+} QT;
+
+void Sum3rdChildren(QT *T,
+ double *Result) {
+ double Ret;
+ if (T == 0) { Ret = 0;
+ } else {
+ QT *Child3 =
+ T[0].Children[3];
+ double V;
+ Sum3rdChildren(Child3, &V);
+ Ret = V + T[0].Data;
+ }
+ *Result = Ret;
+}
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.ll b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.ll
new file mode 100644
index 0000000..f9ce373
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Figures/example.ll
@@ -0,0 +1,22 @@
+%struct.QuadTree = type { double, [4 x %QT*] }
+%QT = type %struct.QuadTree
+
+void %Sum3rdChildren(%QT* %T, double* %Result) {
+entry: %V = alloca double ;; %V is type 'double*'
+ %tmp.0 = seteq %QT* %T, null ;; type 'bool'
+ br bool %tmp.0, label %endif, label %else
+
+else: ;;tmp.1 = &T[0].Children[3] 'Children' = Field #1
+ %tmp.1 = getelementptr %QT* %T, long 0, ubyte 1, long 3
+ %Child3 = load %QT** %tmp.1
+ call void %Sum3rdChildren(%QT* %Child3, double* %V)
+ %tmp.2 = load double* %V
+ %tmp.3 = getelementptr %QT* %T, long 0, ubyte 0
+ %tmp.4 = load double* %tmp.3
+ %tmp.5 = add double %tmp.2, %tmp.4
+ br label %endif
+
+endif: %Ret = phi double [ %tmp.5, %else ], [ 0.0, %entry ]
+ store double %Ret, double* %Result
+ ret void ;; Return with no value
+}
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Makefile b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Makefile
new file mode 100644
index 0000000..9777b58
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/Makefile
@@ -0,0 +1,41 @@
+
+.SUFFIXES: .tex .dvi .aux .eps .fig .dia .ps .pdf .bib .bbl
+
+TOP=complexFigure
+TEXFILES=$(TOP).tex
+FIGFILES:=$(wildcard *.fig)
+EPSFILES:=$(wildcard *.eps)
+EPSFILES+=$(FIGFILES:.fig=.eps)
+PDFFILES=$(EPSFILES:.eps=.pdf)
+
+.fig.eps:
+ fig2dev -L eps $< >$@
+
+.fig.pdf:
+ fig2dev -L pdf $< >$@
+
+.eps.pdf:
+ epstopdf $<
+
+all: $(TOP).ps $(TOP).pdf
+
+$(TOP).ps: $(TOP).dvi
+ dvips -o $(TOP).ps $(TOP)
+
+$(TOP).dvi: $(TEXFILES) $(EPSFILES)
+ latex $(TOP) || true
+ bibtex $(TOP) || true
+ latex $(TOP) || true
+ latex $(TOP)
+
+$(TOP).pdf: $(TEXFILES) $(PDFFILES)
+ pdflatex $(TOP) || true
+ bibtex $(TOP) || true
+ pdflatex $(TOP) || true
+ pdflatex $(TOP)
+
+clean:
+ rm -f *.aux *.dvi *.log
+ rm -f $(TOP).ps $(TOP).pdf $(TOP).bbl $(TOP).blg
+
+
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/complexFigure.tex b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/complexFigure.tex
new file mode 100644
index 0000000..6fe6c94
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/complexFigure.tex
@@ -0,0 +1,88 @@
+\documentclass[twocolumn,12pt]{article}
+\usepackage{ols}
+\ifpdf
+\usepackage[pdftex]{epsfig}
+\else
+\usepackage{epsfig}
+\fi
+\input{ols-fonts}
+
+% These packages are Proceedings-friendly.
+\usepackage{cprog}
+\usepackage[nolineno,norules]{lgrind}
+\usepackage[hang,scriptsize]{subfigure}
+
+% These ones are only suitable for standalone
+\usepackage{subfigure}
+%%% both of these break the Proceedings and are thus evil
+\usepackage{listings}
+\input{llvm.lst} % Get listing support for llvm code
+%%%%
+
+
+\begin{document}
+
+\date{}
+
+%make title bold and 14 pt font (Latex default is non-bold, 16 pt)
+\title{Architecture for a Next-Generation GCC}
+
+\author{
+Chris Lattner \hspace*{0.5in} Vikram Adve\\
+\emph{University of Illinois at Urbana, Champaign}\\
+\texttt{\em\normalsize \{lattner, vadve\}@cs.uiuc.edu}\\
+\emph{\normalsize \url{http://llvm.cs.uiuc.edu}}}
+
+\maketitle
+
+% You have to do this to suppress page numbers. Don't ask.
+\thispagestyle{empty}
+
+Formatting team's note: The two figures here illustrate two ways of presenting
+the same information, and are hopefully more complex
+than you'll require. The first is set using Proceedings-friendly
+packages; the second works only as a standalone paper.
+
+%%% Figure typeset in a Proceedings-friendly fashion
+%%% (thanks to Diego Novillo for inspiration)
+\begin{figure*}[t]
+\scriptsize
+%%% \centering
+\subfigure[Example function]{%
+\label{figure:example_c}
+\parbox{0.65\columnwidth}{\input{example-c}}
+}\hspace*{5pt}\vrule\hspace*{5pt}
+\subfigure[Corresponding LLVM code] {%
+\label{figure:example_llvm}
+\parbox{1.35\columnwidth}{\input{example-ll}}}
+%%% }%
+\caption{C and LLVM code for a function}
+\label{figure:example}
+\end{figure*}
+
+%%===------------------------
+% Code example figure
+%
+\begin{figure*} [t]
+\scriptsize
+\centering
+\subfigure[Example function] {
+\label{figure2:example_c}
+\lstset{language=c}
+\lstinputlisting{Figures/example.c}
+}\hspace*{5pt}\vrule\hspace*{5pt}
+\subfigure[Corresponding LLVM code] {
+\label{figure2:example_llvm}
+\lstset{language=LLVM}
+\lstinputlisting{Figures/example.ll}
+}%
+\caption{C and LLVM code for a function}
+\label{figure2:example}
+\end{figure*}
+%
+%%===------------------------
+
+
+\end{document}
+
+
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/cprog.sty b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/cprog.sty
new file mode 100644
index 0000000..a336397
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/cprog.sty
@@ -0,0 +1,249 @@
+% This is CSTY.STY as received by email at december 1990
+%
+% The cprog macros allow programs in C, C++, Pascal, and Modula-2 to be
+% included directly into TeX documents. Program text is set in a Roman
+% font, comments in slanted, and strings in typewriter. Operators such as
+% <= are optionally combined into single symbols like $\le$. Keywords are
+% *not* emphasised---I find this ugly and distracting. (By purest
+% coincidence it would also be very hard to do.)
+%
+% These macros can be \input in plain TeX or used as a style file in LaTeX.
+% They provide a convenient alternative to tgrind, particularly for program
+% fragments embedded in documents. Full instructions for use appear in the
+% macro package itself.
+%
+%
+% \'Eamonn McManus <emcmanus@cs.tcd.ie> <emcmanus%cs.tcd.ie@cunyvm.cuny.edu>
+%
+% ASCII: !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
+%
+
+% BEGIN: cprog.tex (or cprog.sty) - formatting of C programs
+% By \'Eamonn McManus <emcmanus@cs.tcd.ie>. This file is not copyrighted.
+% $Id: cprog.tex,v 1.4 90/09/12 23:21:26 emcmanus Exp $
+
+% This allows C programs to be formatted directly by TeX. It can be
+% invoked by \cprogfile{filename} or (in LaTeX) \begin{cprog} ...
+% \end{cprog} or (in plain TeX) \cprog ... \end{cprog}. In LaTeX, the
+% alternative form \begin{cprog*} is allowed, where spaces in C strings
+% are printed using the `square u' character (like LaTeX {verbatim*}).
+% In plain TeX, you have to use \csname cprog*\endcsname for this (sorry).
+% If you are using \cprogfile, say \cprogttspacetrue beforehand if you
+% want this effect.
+
+% The formatting is (necessarily) simple. C text is set in a normal Roman
+% font, comments in a slanted font, and strings in a typewriter font, with
+% spaces optionally made visible as the `square u' symbol. Tabs are
+% expanded to four spaces (this does not look good when comments are
+% aligned to the right of program text). Some pairs of input characters
+% appear as single output characters: << <= >> >= != -> are respectively
+% TeX's \ll \le \gg \ge \ne \rightarrow. Say \cprogpairsfalse to disable
+% this.
+
+% You can escape to TeX within cprog text by defining an escape character.
+% The character @ is suitable for C and Pascal. I have not tested other
+% characters so they may interact badly with their existing definitions here.
+% To define @ as the escape character, do \cprogescape@. Then within text
+% you can do @ followed by TeX commands. These commands will be in a TeX
+% group with the \catcodes of \{}% as normal. The commands are terminated
+% by a newline, which is not considered part of the program text.
+
+% The fonts below can be changed to alter the setting of the various parts
+% of the program. The \cprogbaselineskip parameter can be altered to
+% change the line spacing. LaTeX's \baselinestretch is taken into account
+% too. The indentation applied to the whole program is \cprogindent,
+% initially 0. Before and after the program there are skips of
+% \beforecprogskip and \aftercprogskip; the default values are \parskip
+% and 0 respectively (since there will often be a \parskip after the
+% program anyway).
+
+% If the source text is Pascal or Modula-2, say \pascaltrue or \modulatrue
+% (respectively) before formatting it. This makes (* *) be recognised for
+% comments instead of /* */. Braces {} are also recognised for Pascal.
+% \pascalfalse or \modulafalse as appropriate restores the default of C.
+
+% This package works by making a large number of characters active. Since
+% even spaces are active, it is possible to examine the next character in
+% a macro by making it a parameter, rather than using \futurelet as one
+% would normally do. This is more convenient, but the coding does mean
+% that if the next character itself wants to examine a character it may
+% look at a token from the macro rather than the input text. I think that
+% all cases that occur in practice have been looked after.
+
+% The macros could still do with some work. For example, the big macro
+% defined with [] taking the place of {} could be recoded to use {} and so
+% be more legible. The internal macros etc should have @ in their names,
+% and should be checked against LaTeX macros for clashes.
+
+% Allow multiple inclusion to go faster.
+
+\ifx\undefined\cprogsetup % The whole file.
+
+% Define the fonts used for program text, comments, and strings.
+% Note that if \it is used for \ccommentfont, something will need to
+% be done about $ signs, which come out as pounds sterling.
+\let\ctextfont=\tt \let\ccommentfont=\sl \let\cstringfont=\tt
+
+% Parameters. Unfortunately \newdimen is \outer (\outerness is a mistake)
+% so we need a subterfuge in case we are skipping the file.
+\csname newdimen\endcsname\cprogbaselineskip \cprogbaselineskip=\baselineskip
+\csname newdimen\endcsname\cprogindent \cprogindent=0pt
+\csname newdimen\endcsname\cprogwidth % Gets default=\hsize when cprog invoked.
+\csname newskip\endcsname\beforecprogskip \beforecprogskip=\parskip
+\csname newskip\endcsname\aftercprogskip \aftercprogskip=0pt
+\csname newif\endcsname\ifcprogttspace
+\csname newif\endcsname\ifcprogpairs \cprogpairstrue
+\csname newif\endcsname\ifpascal
+\csname newif\endcsname\ifmodula % Same as Pascal but no {comments}.
+{\def\junk{\fi\fi\fi\fi}} % If skipping.
+
+\let\cprogesc\relax
+\begingroup \catcode`~=\active
+\gdef\cprogescape#1{%
+ {\catcode`~=\active \uccode`~=`#1 \aftergroup\cprogescont
+ \uppercase{\aftergroup~}}}
+\gdef\cprogescont#1{%
+ \def\cprogesc{%
+ \makeactive#1\def#1{%
+ \begingroup \catcode`\\0 \catcode`{1 \catcode`}2 \catcode`\%14
+ \catcode` 10 \clinegroup{}}}}
+\endgroup
+
+\def\makeactive#1{\catcode`#1=\active} \def\makeother#1{\catcode`#1=12}
+{\obeyspaces\gdef\activespace{ } \obeylines\gdef\activecr{^^M}}
+{\catcode`|=\catcode`\\ \makeactive\\ |gdef|activebackslash{\}}
+{\catcode9=\active \gdef\activetab{^^I}}
+
+% The following group makes many characters active, so that their catcodes
+% in the \cprogchars macro are active, allowing them to be defined. We
+% could alternatively define more stuff like \activebackslash and use
+% \expandafter or (carefully) \edef to expand these in the macro.
+\begingroup
+\catcode`[=\catcode`{ \catcode`]=\catcode`}
+\makeactive! \makeactive" \makeactive' \makeactive( \makeactive* \makeactive-
+\makeactive/ \makeactive< \makeactive> \makeactive? \makeactive^ \makeactive_
+\makeactive\{ \makeactive| \makeactive\}
+\gdef\activestar[*]
+\gdef\cprogchars[%
+ \makeother##\makeother$\makeother&\makeother\%\makeother^%
+ \makeactive"\makeactive'\makeactive*\makeactive?\makeactive{\makeactive}%
+ \makeactive}\makeactive\\\makeactive_\expandafter\makeactive\activetab%
+ \makeactive!\makeactive<\makeactive>\makeactive-\makeactive|%
+ \ifcprogpairs
+ \def!##1[\ifx=##1$\ne$\else\string!\null##1\fi]%
+ \def-##1[\ifx>##1$\rightarrow$\else$\string-$##1\fi]%
+ % We use \aftergroup in < and > to deal with the fact that #1 might
+ % itself examine the following character.
+ \def<##1[[$\ifx<##1\ll$\else\ifx=##1\le$\else
+ \ifx>##1\ifpascal\ne$\else\string<$\aftergroup>\fi
+ \else \string<$\aftergroup##1\fi\fi\fi]]%
+ \def>##1[[$\ifx>##1\gg$\else\ifx=##1\ge$\else
+ \string>$\aftergroup##1\fi\fi]]%
+ \else \def![\string!\null]% Avoid !` ligature.
+ \def-[$\string-$]\def<[$\string<$]\def>[$\string>$]%
+ \fi
+ \def?[\string?\null]% Avoid ?` ligature.
+ \def"[\cquote"[\tt\string"]]\def'[\cquote'[\tt\ttquote]]\def*[$\string*$]%
+ \ifmodula \pascaltrue \fi % Except that {...} is used for sets.
+ \ifpascal
+ \ifmodula \dulllbrace \else
+ \def{[\begingroup \dulllbrace{\ccommentsetup\def}[\/\endgroup }]]%
+ \fi \makeactive(\let(=\pascalcomment \makeactive^\def^[$\uparrow$]%
+ \else \dulllbrace\makeactive/\let/=\ccomment
+ \fi
+ \def}[$\}$]\def|[$\string|$]\def~[$\sim$]\let_\_%
+ \expandafter\def\activebackslash[$\backslash$]%
+ \obeyspaces \expandafter\def\activespace[\leavevmode\space]%
+ \expandafter\def\activetab[\ \ \ \ ]%
+ \obeylines \expandafter\def\activecr[\strut\par]]
+\gdef\cprogarg[\expandafter\def\activebackslash##1[\ifx##1e\let\next\cprogend
+ \else$\backslash$\let\next##1\fi\next]\eatcr]
+\gdef\cprogend nd#1{cprog#2}[\endcprogarg] % #1 can be space, #2 *.
+\gdef\dulllbrace[\def{[$\{$]]
+\endgroup
+
+\chardef\ttquote=13 % Undirected single quote.
+\begingroup \makeactive" \makeactive' \makeactive!
+\gdef\cquote#1#2{% #1 is the quote, " or ', #2 how to set it.
+ \begingroup #2\cstringfont \makeactive\\%
+ \ifpascal \makeother\\\makeother^%
+ \else \expandafter\let\activebackslash\quotebackslash
+ \fi
+ \expandafter\edef\activespace{\ifcprogttspace\char`\ \else\ \fi}%
+ \expandafter\let\activecr=\unclosedstring
+ \def!{\string!\null}% No !` ligature.
+ \makeother*\makeother-\makeother/\makeother<\makeother>%
+ \makeother_\makeother\{\makeother\}\makeother|\makeother~%
+ \ifx"#1\let'\ttquote \else \makeother"\fi
+ \def#1{#2\endgroup}}
+\endgroup
+\csname newhelp\endcsname\cprogunclosedstr{%
+A string or character constant earlier in the line was unclosed.^^JSo
+I'm closing it now.}
+\def\unclosedstring{%
+ \escapechar-1%
+ \errhelp\cprogunclosedstr
+ \errmessage{Unclosed string}%
+ \endgroup}
+\newlinechar=`^^J
+\def\quotebackslash#1{\char`\\%
+ \expandafter\ifx\activecr#1\strut\par
+ \else\if'\noexpand#1\ttquote\else\string#1\fi\fi}
+
+% In a comment, we shrink the width of the opening / to that of a space so
+% that the stars in multiline comments will line up. We also shrink the
+% closing * for symmetry, but not in Pascal where it looks nasty.
+% Note that \end{cprog} is not recognised in strings or comments.
+\def\spacebox#1{\leavevmode \hbox to \spaceskip{#1\hss}}
+
+\begingroup \makeactive* \makeactive! \makeother/
+\gdef\ccommentsetup{\ccommentfont \makeother-\makeother'\makeother"\makeother/%
+ \def!{\string!\null}\expandafter\def\activebackslash{$\backslash$}}
+\gdef\ccomment#1{%
+ \let\next\relax
+ \ifx#1*\bgroup \ccommentsetup
+ \spacebox{\ctextfont\string/}*%
+ \makeactive*\def*{\commentstar/}%
+ \else\if\noexpand#1/\begingroup //\ccommentsetup \clinegroup\activecr
+ \else \string/\let\next#1%
+ \fi\fi\next}
+\gdef\pascalcomment#1{%
+ \ifx#1*\bgroup \ccommentsetup \let\next\dulllbrace \makeother(%
+ \spacebox{\ctextfont\string(}*\makeactive*\def*{\commentstar)}%
+ \else (\let\next#1\fi \next}
+\obeylines \long\gdef\clinegroup#1#2^^M{#2\endgroup#1}%
+\endgroup
+\def\commentstar#1#2{%
+ {\if#1\noexpand#2\egroup \ifpascal\else\aftergroup\spacebox\fi\fi}{$*$}#2}
+
+% We usually have an active ^^M after \cprog or \begin{cprog}.
+\def\eatcr#1{{\expandafter\ifx\activecr#1\else\aftergroup#1\fi}}
+
+% Expand to stretch and shrink (plus and minus) of parameter #1.
+\def\stretchshrink#1{\expandafter\eatdimenpart\the#1 \end}
+\def\eatdimenpart#1 #2\end{#2}
+
+\ifx\undefined\baselinestretch \def\baselinestretch{1}\fi
+
+\def\cprogsetup{\ctextfont \cprogchars \parskip=0pt\stretchshrink\parskip
+ \ifdim \cprogwidth=0pt \else \hsize\cprogwidth \fi
+ \cprogesc \spaceskip\fontdimen2\font \xspaceskip\spaceskip
+ \baselineskip=\baselinestretch\cprogbaselineskip \parindent=\cprogindent
+ \vskip\beforecprogskip}
+\def\endcprog{\endgroup \vskip\aftercprogskip}
+\def\cprogfile#1{\begingroup \cprogsetup \input#1\endcprog}
+\def\cprog{\begingroup \cprogttspacefalse \cprogsetup \cprogarg}
+% Like {verbatim*}, {cprog*} uses `square u' for spaces in quoted strings.
+\expandafter\def\csname cprog*\endcsname{%
+ \begingroup \cprogttspacetrue \cprogsetup \cprogarg}
+\expandafter\let\csname endcprog*\endcsname=\endcprog
+% In LaTeX we need to call \end{cprog} properly to close the environment,
+% whereas in plain TeX this will end the job. The test for LaTeX is not
+% bulletproof, but most plain TeX documents don't refer to the LaTeX logo.
+\ifx\undefined\LaTeX \let\endcprogarg=\endcprog
+\else \def\endcprogarg{\ifcprogttspace\end{cprog*}\else\end{cprog}\fi}
+\fi
+
+\fi % \ifx\undefined\cprogsetup
+
+\endinput
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-c.tex b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-c.tex
new file mode 100644
index 0000000..2f8bf0d
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-c.tex
@@ -0,0 +1,22 @@
+\begin{cprog}
+typedef struct QuadTree {
+ double Data;
+ struct QuadTree
+ *Children[4];
+} QT;
+
+void Sum3rdChildren(QT *T,
+ double *Result) {
+ double Ret;
+ if (T == 0) { Ret = 0;
+ } else {
+ QT *Child3 =
+ T[0].Children[3];
+ double V;
+ Sum3rdChildren(Child3,
+ &V);
+ Ret = V + T[0].Data;
+ }
+ *Result = Ret;
+}
+\end{cprog}
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-ll.tex b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-ll.tex
new file mode 100644
index 0000000..681b759
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/example-ll.tex
@@ -0,0 +1,24 @@
+\begin{verbatim}
+%struct.QuadTree = type { double, [4 x %QT*] }
+%QT = type %struct.QuadTree
+
+void %Sum3rdChildren(%QT* %T, double* %Result) {
+entry: %V = alloca double ;; %V is type 'double*'
+ %tmp.0 = seteq %QT* %T, null ;; type 'bool'
+ br bool %tmp.0, label %endif, label %else
+
+else: ;;tmp.1 = &T[0].Children[3] 'Children' = Field #1
+ %tmp.1 = getelementptr %QT* %T, long 0, ubyte 1, long 3
+ %Child3 = load %QT** %tmp.1
+ call void %Sum3rdChildren(%QT* %Child3, double* %V)
+ %tmp.2 = load double* %V
+ %tmp.3 = getelementptr %QT* %T, long 0, ubyte 0
+ %tmp.4 = load double* %tmp.3
+ %tmp.5 = add double %tmp.2, %tmp.4
+ br label %endif
+
+endif: %Ret = phi double [ %tmp.5, %else ], [ 0.0, %entry ]
+ store double %Ret, double* %Result
+ ret void ;; Return with no value
+}
+\end{verbatim}
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/lgrind.sty b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/lgrind.sty
new file mode 100644
index 0000000..2d04753
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/lgrind.sty
@@ -0,0 +1,228 @@
+%%
+%% This is file `lgrind.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lgrind.dtx (with options: `package')
+%%
+%% LGrind is used to format source code of different programming
+%% languages for LaTeX.
+%%
+%% LGrind is a minor adaptation of Jerry Leichter's tgrind for LaTeX,
+%% which was a notable improvement upon Van Jacobsen's tgrind for
+%% plain TeX, which was adapted from vgrind, a troff prettyprinter.
+%%
+%% Based on Van Jacobson's ``tgrindmac'', a macro package for TeX.
+%% Modified, 1987 by Jerry Leichter. Put '@' in all internal names.
+%% Modified, 1991 by George Reilly. Changed name from tgrind to lgrind.
+%% Modified, 1995 by Michael Piefel. Made it work with \LaTeXe.
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+\ProvidesPackage{lgrind}
+ [1997/01/30 v3.4 LGrind environment and supporting stuff]
+\newcount\lc@unt
+\newcount\ln@xt
+\newcount\LGnuminterval
+\LGnuminterval=10
+\DeclareOption{nolineno}{\LGnuminterval=50000}
+\DeclareOption{lineno5}{\LGnuminterval=5}
+\newif\ifLGleftnum
+\DeclareOption{leftnum}{\LGleftnumtrue}
+\newskip\LGindent
+\LGindent=1.6667\parindent
+\DeclareOption{noindent}{\LGindent=0pt}
+\newif\ifLGnorules
+\DeclareOption{norules}{\LGnorulestrue}
+\newlength{\LGsloppy}
+\setlength{\LGsloppy}{7.2pt}
+\DeclareOption{fussy}{\LGsloppy=0pt}
+\newcommand{\DefaultProc}{\@gobble}
+\newcommand{\DefaultProcCont}{\@gobble}
+\DeclareOption{procnames}{
+\renewcommand{\DefaultProc}[1]{\renewcommand{\Procname}{#1}%
+\global\setbox\procbox=\hbox{\PNsize #1}}
+\renewcommand{\DefaultProcCont}[1]{\renewcommand\Procname{#1}
+\global\setbox\procbox=\hbox{\PNsize\dots #1}}}
+\newbox\procbox
+\newcommand{\Procname}{}
+\ProcessOptions
+\def\BGfont{\sffamily}
+\def\CMfont{\rmfamily\itshape}
+\def\NOfont{\sffamily}
+\def\KWfont{\rmfamily\bfseries}
+\def\STfont{\ttfamily}
+\def\VRfont{\rmfamily}
+\def\PNsize{\BGfont\small}
+\def\LGsize{\small}
+\def\LGfsize{\footnotesize}
+\newif\ifLGinline
+\newif\ifLGd@fault
+\def\LGbegin{\ifLGinline$\hbox\else$$\vbox\fi\bgroup\LGd@faulttrue}
+\def\LGend{\ifLGd@fault\egroup\ifLGinline$\else$$\fi\LGd@faultfalse\fi}
+\newif\ifc@mment
+\newif\ifstr@ng
+\newif\ifright@
+\newbox\ls@far
+\newbox\tb@x
+\newdimen\TBw@d
+\newdimen\@ts
+{\catcode`\_=\active \gdef\@setunder{\let_=\sp@ce}}
+\newcommand{\lgrindheader}{}
+\newcommand{\lgrindfilename}{}\newcommand{\lgrindfilesize}{}
+\newcommand{\lgrindmodyear}{}\newcommand{\lgrindmodmonth}{}
+\newcommand{\lgrindmodday}{}\newcommand{\lgrindmodtime}{}
+\newenvironment{lgrind}[1][1]{%
+\def\Line##1{\L{\LB{##1}}}%
+\newcommand{\Head}[1]{\gdef\lgrindhead{##1}}%
+\newcommand{\File}[6]{\gdef\lgrindfilename{##1}\message{(LGround: ##1)}%
+ \gdef\lgrindmodyear{##2}\gdef\lgrindmodmonth{##3}%
+ \gdef\lgrindmodday{##4}\gdef\lgrindmodtime{##5}%
+ \gdef\lgrindfilesize{##6}}%
+\let\Proc=\DefaultProc%
+\let\ProcCont=\DefaultProcCont%
+\hfuzz=\LGsloppy
+\def\NewPage{\filbreak\bigskip}%
+\ifLGinline
+ \def\L##1{\setbox\ls@far\null{\CF\strut##1}\ignorespaces}%
+\else
+ \let\r@ghtlno\relax\let\l@ftlno\relax
+ \ifnum\LGnuminterval>\z@
+ \ifLGleftnum
+ \def\l@ftlno{\ifvoid\procbox\ifnum\lc@unt>\ln@xt
+ \global\advance\ln@xt by\LGnuminterval
+ \llap{{\normalfont\scriptsize\the\lc@unt\quad}}\fi
+ \else\llap{\box\procbox\quad}\fi}%
+ \else
+ \def\r@ghtlno{\ifvoid\procbox\ifnum\lc@unt>\ln@xt
+ \global\advance\ln@xt by\LGnuminterval
+ \rlap{{\normalfont\scriptsize\enspace\the\lc@unt}}\fi
+ \else\rlap{\enspace\box\procbox}\fi}%
+ \fi
+ \fi
+ \def\L##1{\@@par\setbox\ls@far=\null\strut
+ \global\advance\lc@unt by1%
+ \hbox to \hsize{\hskip\LGindent\l@ftlno ##1\egroup%
+ \hfil\r@ghtlno}%
+ \ignorespaces}%
+\fi
+\lc@unt=#1\advance\lc@unt by-1%
+\ln@xt=\LGnuminterval\advance\ln@xt by-1%
+\loop\ifnum\lc@unt>\ln@xt\advance\ln@xt by\LGnuminterval\repeat%
+\def\LB{\hbox\bgroup\bgroup\box\ls@far\CF\let\next=}%
+\def\Tab##1{\egroup\setbox\tb@x=\lastbox\TBw@d=\wd\tb@x%
+ \advance\TBw@d by 1\@ts\ifdim\TBw@d>##1\@ts
+ \setbox\ls@far=\hbox{\box\ls@far \box\tb@x \sp@ce}\else
+ \setbox\ls@far=\hbox to ##1\@ts{\box\ls@far \box\tb@x \hfil}\fi\LB}%
+\ifLGinline\def\sp@ce{\hskip .3333em}%
+\else \setbox\tb@x=\hbox{\texttt{0}}%
+ \@ts=0.8\wd\tb@x \def\sp@ce{\hskip 1\@ts}\fi
+\catcode`\_=\active \@setunder
+\def\CF{\ifc@mment\CMfont\else\ifstr@ng\STfont\fi\fi}
+\def\N##1{{\NOfont ##1}\global\futurelet\next\ic@r}%
+\def\K##1{{\KWfont ##1}\global\futurelet\next\ic@r}%
+\def\V##1{{\VRfont ##1}\global\futurelet\next\ic@r}%
+\def\ic@r{\let\@tempa\/\ifx.\next\let\@tempa\relax%
+ \else\ifx,\next\let\@tempa\relax\fi\fi\@tempa}%
+\def\C{\egroup\bgroup\CMfont \global\c@mmenttrue \global\right@false}%
+\def\CE{\egroup\bgroup \global\c@mmentfalse}%
+\def\S{\egroup\bgroup\STfont \global\str@ngtrue}%
+\def\SE{\egroup\bgroup \global\str@ngfalse}%
+\def\,{\relax \ifmmode\mskip\thinmuskip \else\thinspace \fi}%
+\def\!{\relax \ifmmode\mskip-\thinmuskip \else\negthinspace \fi}%
+\def\CH##1##2##3{\relax\ifmmode ##1\relax
+\else\ifstr@ng ##2\relax\else$##3$\fi\fi }%
+\def\{{\CH\lbrace {\char'173}\lbrace }%
+\def\}{\CH\rbrace {\char'175}\rbrace }%
+\def\1{\CH///}% % /
+\def\2{\CH\backslash {\char'134}\backslash }% % \
+\def\|{\CH|{\char'174}|}%
+\def\<{\CH<<<}%
+\def\>{\CH>>>}%
+\def\*{\CH***}\relax %\relax for DOCSTY
+\def\-{\CH---}%
+\def\_{\ifstr@ng {\char'137}\else
+ \leavevmode \kern.06em \vbox{\hrule width.35em}%
+ \ifdim\fontdimen\@ne\font=\z@ \kern.06em \fi\fi }%
+\def\&{\textsf{\char'046}}%
+\def\#{{\STfont\char'043}}%
+\def\%{{\char'045}}%
+\def\~{{\char'176}}%
+\def\3{\ifc@mment\ifright@ ''\global\right@false%
+ \else``\global\right@true \fi
+ \else{\texttt{\char'042}}\fi}%
+\def\4{\ifc@mment'\else {\texttt{\char'015}}\fi}%
+\def\5{{\texttt{\char'136}}}%
+\def\${{\ifmmode\slshape\else\ifdim\fontdimen\@ne\font>\z@\slshape\fi\fi
+ \char'044}}% %No $ in \it, use \sl
+\parindent\z@\parskip\z@ plus 1pt\hsize\linewidth%
+\bgroup\BGfont
+}
+{\egroup\@@par} % end of environment lgrind
+\def\lgrinde{\ifLGinline\else\LGsize\fi\begin{lgrind}}
+\def\endlgrinde{\end{lgrind}}
+\def\lagrind{\@ifstar{\@slagrind}{\@lagrind}}
+
+\def\@lagrind{\@ifnextchar[{\@@lagrind}{\@@lagrind[t]}}
+\def\@slagrind{\@ifnextchar[{\@@slagrind}{\@@slagrind[t]}}
+\def\@@lagrind[#1]#2#3#4{%
+ \begin{figure}[#1]
+\ifLGnorules\else\hrule\fi
+\vskip .5\baselineskip
+\begin{minipage}\columnwidth\LGsize\LGindent\z@
+ \begin{lgrind}
+\input #2\relax
+ \end{lgrind}
+\end{minipage}
+\vskip .5\baselineskip plus .5\baselineskip
+\ifLGnorules\else\hrule\fi\vskip .5\baselineskip
+\begingroup
+ \setbox\z@=\hbox{#4}%
+ \ifdim\wd\z@>\z@
+\caption{#3}%
+\label{#4}%
+ \else
+\captcont{#3}%
+ \fi
+\endgroup
+\vskip 2pt
+ \end{figure}
+}
+\def\@@slagrind[#1]#2#3#4{%
+ \begin{figure*}[#1]
+\ifLGnorules\else\hrule\fi
+\vskip .5\baselineskip
+\begin{minipage}\linewidth\LGsize\LGindent\z@
+ \begin{lgrind}
+\input #2\relax
+ \end{lgrind}
+\end{minipage}
+\vskip .5\baselineskip plus .5\baselineskip
+\ifLGnorules\else\hrule\fi\vskip .5\baselineskip
+\begingroup
+ \setbox\z@=\hbox{#4}%
+ \ifdim\wd\z@>\z@
+\caption{#3}%
+\label{#4}%
+ \else
+\captcont{#3}%
+ \fi
+\endgroup
+\vskip 2pt
+ \end{figure*}
+}
+\def\lgrindfile#1{%
+ \par\addvspace{0.1in}
+ \ifLGnorules\else\hrule\fi
+ \vskip .5\baselineskip
+ \begingroup\LGfsize\LGindent\z@
+\begin{lgrind}
+ \input #1\relax
+\end{lgrind}
+ \endgroup
+ \vskip .5\baselineskip
+ \ifLGnorules\else\hrule\fi
+ \addvspace{0.1in}
+}
+\endinput
+%%
+%% End of file `lgrind.sty'.
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/llvm.lst b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/llvm.lst
new file mode 100644
index 0000000..8adbb23
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/llvm.lst
@@ -0,0 +1,15 @@
+\lstdefinelanguage{LLVM}
+ {morekeywords={
+ begin,end,true,false,declare,global,constant,const,internal,implementation,
+ null,to,except,not,
+ void,bool,sbyte,ubyte,short,ushort,int,uint,long,ulong,float,double,type,label,opaque,
+ add,sub,mul,div,rem,and,or,xor,setne,seteq,setlt,setgt,setle,setge,
+ phi,call,cast,shl,shr,
+ ret,br,switch,invoke,
+ malloc,alloca,free,load,store,getelementptr
+ },
+ sensitive=true,
+% morecomment=[l]{;},
+% morestring=[b]",
+ }
+
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols-fonts.tex b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols-fonts.tex
new file mode 120000
index 0000000..adfec4b
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols-fonts.tex
@@ -0,0 +1 @@
+../../TEMPLATES/ols-fonts.tex \ No newline at end of file
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols.sty b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols.sty
new file mode 120000
index 0000000..d8c7f0c
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/ols.sty
@@ -0,0 +1 @@
+../../TEMPLATES/ols.sty \ No newline at end of file
diff --git a/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/zrl.sty b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/zrl.sty
new file mode 120000
index 0000000..d96dacf
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/EXAMPLE/complexCode/zrl.sty
@@ -0,0 +1 @@
+../../TEMPLATES/zrl.sty \ No newline at end of file
personal git repositories of Harald Welte. Your mileage may vary