% % This file was automatically produced at Feb 27 2003, 22:51:56 by % c2latex fork-example-1.c % \expandafter\ifx\csname indentation\endcsname\relax% \newlength{\indentation}\fi \setlength{\indentation}{0.5em} \begin{flushleft} {\tt \#include} $<${\tt{}sys/types.h}$>$\mbox{}\\ {\tt \#include} $<${\tt{}unistd.h}$>$\mbox{}\\ {\tt \#include} $<${\tt{}stdio.h}$>$\mbox{}\\ {\bf int} glob = 6;\mbox{}\\ {\bf char} buf[] = {\tt"a write to standard output$\backslash$n"};\mbox{}\\ {\bf int} main( {\bf void} )\mbox{}\\ \{\mbox{}\\ \hspace*{8\indentation}{\bf int} var = 88; \hfill{$/\ast$\it{} local variable on the stack $\ast/$}\mbox{}\\ \hspace*{8\indentation}pid\_t pid;\mbox{}\\ \hspace*{8\indentation}{\bf if} ( write( STDOUT\_FILENO, buf, {\bf sizeof} (buf) $-$ 1 )\mbox{}\\ \hspace*{13\indentation}$\neq$ {\bf sizeof}( buf ) $-$ 1 ) \{\mbox{}\\ \hspace*{16\indentation}fprintf( stderr, {\tt"write error"} );\mbox{}\\ \hspace*{16\indentation}exit( 1 );\mbox{}\\ \hspace*{8\indentation}\}\mbox{}\\ \end{flushleft}