% This document was generated automagically by lgrind.  DO NOT EDIT.

\Head{}
%%
%% This is file `doc-lgrind.lg',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lgrind.dtx  (with options: `example')
%% 
%% 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.
\documentclass{report}
\usepackage{lgrind}

\begin{document}

\chapter{Introduction}
This is a \LaTeX file with embedded code. Process it with \textsf{LGrind}
and its option -e.

\appendix
\chapter{lgrind.c}
% start of `lgrind.c'
\LGinlinefalse\begin{lgrind}
\L{\LB{\C{}\1\*_lgrind.c,_a_{\LaTeX}_version_of_tgrind,_which_is_a_{\TeX}_version}}
\L{\LB{_\*_of_vgrind.__Used_to_{`}grind_nice_program_listings\4.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#ifndef}_\V{lint}}}
\L{\LB{\K{static}_\K{char}_\V{sccsid}[\,]_=_\S{}\3@(\#)lgrind.c}\Tab{40}{3.4_(MPi)_27\11\197\3\SE{};}}
\L{\LB{\K{static}_\K{char}_\V{Version}[\,]_=}}
\L{\LB{___\S{}\3\$Id:_lgrind.c,v_1.4_91\110\101_00:36:11_gvr_Exp_\$\3\SE{};}}
\L{\LB{\K{\#endif}}}
\L{\LB{}}
\L{\LB{\C{}\1\*_lgrind_---_general_purpose_\3pretty_printer\3_for_use_with_{\LaTeX}.}}
\L{\LB{_\*}}
\L{\LB{_\*_Copyright_{\copyright}_1985_by_Van_Jacobson,_Lawrence_Berkeley_Laboratory}}
\L{\LB{_\*_This_program_may_be_freely_used_and_copied_but_may_not_be_sold}}
\L{\LB{_\*_without_the_author\4s_written_permission.__This_notice_must_remain}}
\L{\LB{_\*_in_any_copy_or_derivative.}}
\L{\LB{_\*}}
\L{\LB{_\*_This_program_is_an_adaptation_of_\3vfontedpr\3_v4.2_(12\111\184)_from}}
\L{\LB{_\*_the_4.2bsd_Unix_distribution.__Vfontedpr_was_written_by_Dave}}
\L{\LB{_\*_Presotto_(based_on_an_earlier_program_of_the_same_name_written_by}}
\L{\LB{_\*_Bill_Joy).}}
\L{\LB{_\*}}
\L{\LB{_\*_I_would_welcome_comments,_enhancements,_bug_fixes,_etc.__Please}}
\L{\LB{_\*_mail_them_to:}}
\L{\LB{_\*}\Tab{8}{van\CE{}\C{}@lbl-rtsg.arpa}\Tab{32}{(from_arpanet,_milnet,_csnet,_etc.)}}
\L{\LB{_\*}\Tab{8}{.\,.!ucbvax!lbl-csam!van}\Tab{32}{(from_Usenet\1UUCP)}}
\L{\LB{_\*}}
\L{\LB{_\*}}
\L{\LB{_\*_Copyright_{\copyright}_1996_by_Michael_Piefel,}}
\L{\LB{_\*_Humboldt-University_at_Berlin,_piefel\CE{}\V{cs}.\V{tu}\-\V{berlin}.\V{de}}}
\L{\LB{_\*_}}
\L{\LB{_\*_\V{This}_\V{derivative}_\V{may}_\V{be}_\V{freely}_\V{used}_\V{and}_\V{copied}_\V{but}_\V{may}_\V{not}_\V{be}_\V{sold}}}
\L{\LB{_\*_\V{without}_\V{the}_\V{author}\S{}\4s_written_permission.__This_notice_must_remain}}
\L{\LB{_\*_in_any_copy.}}
\L{\LB{\Proc{package}_\*_Derivatives_of_this_program_and_the_LGrind_package_(including,_but_not}}
\L{\LB{_\*_restricted_to,_the_documentation)_may_only_be_produced_after_agreement}}
\L{\LB{_\*_with_the_author._This_notice_will_remain_here_until_I_give_up_the_main\-}}
\L{\LB{_\*_tenance_of_the_package.}}
\L{\LB{_\*_}}
\L{\LB{_\*_Modifications.}}
\L{\LB{_\*_\-\-\-\-\-\-\-\-\-\-\-\-\-\-}}
\L{\LB{_\*_10_Feb_85}\Tab{16}{Van}\Tab{32}{Written.}}
\L{\LB{\Proc{Torek}_\*_29_Mar_85}\Tab{16}{Chris_Torek}\Tab{32}{(chris@@maryland):__Bug_fixes_for_\%\|\~\|\%_and}}
\L{\LB{_\*}\Tab{32}{\%\|\5L\|\%_output.}\Tab{48}{Most_cpu\-time_eaters_recoded}}
\L{\LB{_\*}\Tab{32}{to_improve_efficiency.}}
\L{\LB{_\*_30_Mar_85}\Tab{16}{Chris_\&_Van_Fixed_\%\|\2C\|\%_\&_\%\|\2S\|\%_(comment_\&_string_start}}
\L{\LB{_\*}\Tab{32}{indicators_to_really_appear_at_the_start_of}}
\L{\LB{_\*}\Tab{32}{comments_\&_strings.__Changes_for_speeded\-up}}
\L{\LB{\Proc{expmatch}_\*}\Tab{32}{@expmatch()@.}}
\L{\LB{_\*__8_Oct_87}\Tab{16}{JSL}\Tab{32}{Modified_so_as_to_compile_on_VMS.__On_VMS,_we}}
\L{\LB{_\*}\Tab{32}{don\4\SE{}\V{t}_\V{use}_\V{a}_\V{surrounding}_\V{shell}_\V{script},_\V{so}_\V{the}}}
\L{\LB{_\*}\Tab{32}{\V{options}_\V{are}_\V{a}_\V{bit}_\V{different}_\-\-\-_\V{added}_\%\|\-\V{i}\|\%_\V{to}}}
\L{\LB{_\*}\Tab{32}{\V{make}_\V{a}_\V{file}_\V{to}_\V{be}_\%\|\2\V{input}\|\%_\V{in}_\V{a}_\%\%\2\V{LaTeX}\%\%}}
\L{\LB{_\*}\Tab{32}{\V{environment}.__\V{Changed}_\V{some}_\V{of}_\V{the}_\V{characters}}}
\L{\LB{_\*}\Tab{32}{\V{around}_\-\-\-_\V{e}.\V{g}.,_\V{we}_\V{always}_\V{take}_\%\|\*\|\%_\V{in}_\V{math}}}
\L{\LB{\Proc{mode}_\*}\Tab{32}{\V{mode}_(\V{to}_\V{make}_\V{it}_\V{centered})_\V{so}_\V{we}_\V{have}_\V{to}}}
\L{\LB{_\*}\Tab{32}{\V{write}_\%\|\*\|\%_\V{as}_\%\|\2\*\|\%.}\Tab{56}{\V{Etc}.}}
\L{\LB{_\*____\V{Jan}_\N{88}}\Tab{16}{\V{JSL}}\Tab{32}{\%\|\-\V{e}\|\%_\V{option}_\K{for}_\V{embedded}_\V{code}.}}
\L{\LB{_\*____\V{Sep}_\N{91}}\Tab{16}{\V{George}_\V{V}_\V{Reilly}_\V{Reformated}_\V{and}_\V{cleaned}_\V{up}_\V{code},_\V{including}}}
\L{\LB{_\*}\Tab{32}{\V{naughtiness}_\V{with}_\C{}NULL\CE{}.__\V{Added}_\%\|\C{}\,\|\%,}}
\L{\LB{_\*}\Tab{32}{\texttt{\%\%},_\texttt{\%\$},_and_{\tt \%|}_features.}}
\L{\LB{_\*}\Tab{32}{Also_the_\texttt{\%\<},_\texttt{\%!},_and_\texttt{\%\#}_features.}}
\L{\LB{_\*____Oct_94}\Tab{16}{Matthias_Eckermann_(\texttt{ud311aa@sunmail.lrz-muenchen.de})}}
\L{\LB{_\*}\Tab{32}{fixed_a_little_bug,_added:_Internal\_Help,}}
\L{\LB{_\*____Sep_95}\Tab{16}{Michael_Piefel}\Tab{32}{Modified_for_{\LaTeXe}}}
\L{\LB{_\*____Feb_96}\Tab{16}{Michael_Piefel}\Tab{32}{Restructured_into_ANSI_C}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#include}_\<\V{stdio}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{stdlib}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{ctype}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{string}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{malloc}.\V{h}\>}}
\L{\LB{\C{}\1\*_One_of_the_following_two_(depending_on_your_system)_\*\1\CE{}}}
\L{\LB{\K{\#include}_\<\V{unistd}.\V{h}\>}}
\L{\LB{\C{}\1\*_\#include_\<io.h\>_\*\1\CE{}}}
\L{\LB{\K{\#include}_\S{}\3lgrindef.h\3\SE{}}}
\L{\LB{\K{\#include}_\S{}\3regexp.h\3\SE{}}}
\L{\LB{}}
\L{\LB{\K{\#ifndef}_\V{vms}}}
\L{\LB{\K{\#}__\K{include}_\<\V{sys}\1\V{types}.\V{h}\>}}
\L{\LB{\K{\#}__\K{include}_\<\V{sys}\1\V{stat}.\V{h}\>}}
\L{\LB{\K{\#}__\K{include}_\<\V{time}.\V{h}\>}}
\L{\LB{\K{\#else}}}
\L{\LB{\K{\#}__\K{include}_\<\V{types}.\V{h}\>}}
\L{\LB{\K{\#}__\K{include}_\<\V{stat}.\V{h}\>}}
\L{\LB{\K{\#endif}}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{STANDARD}_\N{0}}}
\L{\LB{\K{\#define}_\V{ALTERNATE}_\N{1}}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{NOTCODE}_\N{0}}\Tab{32}{\C{}\1\*_the_three_states_of_\CE{}\V{incode}\C{}_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{INITCODE}_\N{1}}}
\L{\LB{\K{\#define}_\V{OTHERCODE}_\N{2}}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{PNAMELEN}_\N{80}}\Tab{32}{\C{}\1\*_length_of_a_function\1procedure_name_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{PSMAX}_\N{20}}\Tab{32}{\C{}\1\*_size_of_procedure_name_stacking_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#ifndef}_\V{vms}}}
\L{\LB{\K{\#}__\K{define}_\V{OKEXIT}}\Tab{24}{\N{0}}}
\L{\LB{\K{\#}__\K{define}_\V{BADEXIT}}\Tab{24}{\N{1}}}
\L{\LB{\K{\#}__\K{ifndef}_\V{DEFSFILE}}}
\L{\LB{\K{\#}____\K{define}_\V{DEFSFILE}}\Tab{24}{\S{}\3\1usr\1lib\1lgrindef\3\SE{}}}
\L{\LB{\K{\#}__\K{endif}}}
\L{\LB{\K{\#else}}}
\L{\LB{\K{\#}__\K{define}_\V{OKEXIT}}\Tab{24}{\N{1}}}
\L{\LB{\K{\#}__\K{define}_\V{BADEXIT}}\Tab{24}{\N{0}}}
\L{\LB{\K{\#}__\K{define}_\V{DEFSFILE}}\Tab{24}{\S{}\3TEX\$INPUTS:lgrindef.src\3\SE{}}}
\L{\LB{\K{\#endif}}}
\L{\LB{}}
\L{\LB{\C{}\1\*_forward_declarations_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{int}}\Tab{8}{\V{getredirection}(\K{int}_\V{argc},_\K{char}_\*\*\V{argv});}}
\L{\LB{\K{void}}\Tab{8}{\V{setlang}();}}
\L{\LB{\K{void}}\Tab{8}{\V{Internal\_Help}();}}
\L{\LB{\K{void}}\Tab{8}{\V{Internal\_Help\_Language\_List}();}}
\L{\LB{\K{void}}\Tab{8}{\V{readfile}(\V{FILE}_\*);}}
\L{\LB{\K{void}}\Tab{8}{\V{putScp}(\K{char}_\*);}}
\L{\LB{\K{void}}\Tab{8}{\V{putKcp}(\K{char}_\*,_\K{char}_\*,_\V{boolean});}}
\L{\LB{\K{void}}\Tab{8}{\V{putVcp}(\K{char}_\*,_\K{char}_\*);}}
\L{\LB{\K{void}}\Tab{8}{\V{putstr}(\K{char}_\*);}}
\L{\LB{\V{boolean}}\Tab{8}{(\*\V{isproc})(\K{char}_\*);}}
\L{\LB{\V{boolean}}\Tab{8}{\V{isprocNorm}(\K{char}_\*);}}
\L{\LB{\V{boolean}}\Tab{8}{\V{isprocC}(\K{char}_\*);}}
\L{\LB{\K{void}}\Tab{8}{\V{outchar}(\K{int});}}
\L{\LB{\K{void}}\Tab{8}{\V{parsechartab}(\K{void});}}
\L{\LB{\K{void}}\Tab{8}{\V{parsepreamble}(\K{char}_\*);}}
\L{\LB{\K{void}}\Tab{8}{\V{setpreambles}(\K{void});}}
\L{\LB{\K{void}}\Tab{8}{\V{printpreamble}(\K{char}_\*);}}
\L{\LB{\K{void}____\V{writeDefsfileInExe}(\K{char}_\*,_\K{char}_\*);}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*}\Tab{8}{The_state_variables}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\V{boolean}_\V{incomm};________}\Tab{32}{\C{}\1\*_in_a_comment_of_the_primary_type_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{instr};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_in_a_string_constant_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{inchr};}\Tab{32}{\C{}\1\*_in_a_character_constant_\*\1\CE{}}}
\L{\LB{\K{int}}\Tab{8}{\V{incode};________}\Tab{32}{\C{}\1\*_in_program_text_within_a_comment_\*\1\CE{}}}
\L{\LB{\K{int}}\Tab{8}{\V{latexcode};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_in_program_text_within_{\LaTeX}_\*\1\CE{}}}
\L{\LB{\K{int}}\Tab{8}{\V{latex\_tt};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_in_\texttt{\2texttt}_text_within_{\LaTeX}_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{use\_tt};_}\Tab{24}{_______}\Tab{32}{\C{}\1\*_use_\texttt{\2texttt}_everywhere_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{do\_at};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_pay_attention_to_\texttt{@}s_in_{\LaTeX}_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{do\_tt};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_pay_attention_to_\texttt{\|}s_in_{\LaTeX}_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{nokeyw}_=_\V{FALSE};_}\Tab{32}{\C{}\1\*_no_keywords_being_flagged_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{prccont};}\Tab{32}{\C{}\1\*_continue_last_procedure_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{code\_cmnts}_=_\V{TRUE};}\Tab{32}{\C{}\1\*_Treat_\texttt{@},_etc_specially_in_comments_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{code\_latex}_=_\V{TRUE};}\Tab{32}{\C{}\1\*_Treat_\texttt{@},_etc_specially_in_{\LaTeX}_\*\1\CE{}}}
\L{\LB{\K{\#if}_\V{nospaceincomment}}}
\L{\LB{\V{boolean}_\V{linehead};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_at_beginning_of_line_or_after_whitespace_\*\1\CE{}}}
\L{\LB{\K{\#endif}}}
\L{\LB{\K{int}}\Tab{8}{\V{lastout};_______}\Tab{32}{\C{}\1\*_(extended)_last_character_to_outchar_\*\1\CE{}}}
\L{\LB{\K{int}}\Tab{8}{\V{comtype};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_type_of_comment_\*\1\CE{}}}
\L{\LB{\K{int}}\Tab{8}{\V{psptr};}\Tab{32}{\C{}\1\*_the_stack_index_of_the_current_procedure_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{pstack}[\V{PSMAX}][\V{PNAMELEN}+\N{1}];_\C{}\1\*_the_procedure_name_stack_\*\1\CE{}}}
\L{\LB{\K{int}}\Tab{8}{\V{plstack}[\V{PSMAX}];_}\Tab{32}{\C{}\1\*_the_procedure_nesting_level_stack_\*\1\CE{}}}
\L{\LB{\K{int}____}\Tab{8}{\V{blklevel};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_current_nesting_level_\*\1\CE{}}}
\L{\LB{\K{int}____}\Tab{8}{\V{reclevel};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_current_\CE{}\V{record}\C{}_nesting_level_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{fname}_=_\S{}\3\3\SE{};}\Tab{32}{\C{}\1\*_File_being_read_\*\1\CE{}}}
\L{\LB{\K{int}____}\Tab{8}{\V{lineno};_}\Tab{24}{_______}\Tab{32}{\C{}\1\*_Line_number_in_that_file_\*\1\CE{}}}
\L{\LB{\K{int}____}\Tab{8}{\V{linenocode};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_Line_number_of_the_source_code_worked_on_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{pname}[\V{BUFFERSIZE}+\N{1}];____\C{}\1\*_Current_procedure_name_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*}\Tab{8}{The_language_specific_globals}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\K{\#ifdef}_\V{NO\_PERM\_D}}}
\L{\LB{\K{char}}\Tab{8}{\V{defsfile}[\N{200}]=\V{DEFSFILE};}}
\L{\LB{\K{\#else}}}
\L{\LB{\K{char}____\V{defsbuf}[\N{200}]=\S{}\3mPi\3\SE{}\V{DEFSFILE};}}
\L{\LB{\K{char}____\*\V{defsfile}=\&\V{defsbuf}[\N{3}];__\C{}\1\*_name_of_language_definitions_file_\*\1\CE{}}}
\L{\LB{\K{\#endif}}}
\L{\LB{\K{char}}\Tab{8}{\V{language}[\V{PNAMELEN}]=\S{}\3mPi\3\SE{};}\Tab{40}{\C{}\1\*_the_language_indicator_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{the\_buf}[\V{BUFFERSIZE}+\N{1}];}\Tab{32}{\C{}\1\*_general_purpose_buffer_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{buf}_=_\V{the\_buf}_+_\N{1};}\Tab{32}{\C{}\1\*_\CE{}\V{buf}\-\N{1}\C{}_must_be_valid_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{strings};______}\Tab{32}{\C{}\1\*_store_the_keywords_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{defs};}\Tab{16}{_______}\Tab{32}{\C{}\1\*_language_definitions_from_lgrindef_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{preamble}[\V{BUFFERSIZE}\1\N{4}];}\Tab{32}{\C{}\1\*_first_preamble_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{preambl2}[\V{BUFFERSIZE}\1\N{4}];}\Tab{32}{\C{}\1\*_file_preamble_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{config}[\V{BUFFERSIZE}\1\N{4}];}\Tab{32}{\C{}\1\*_redefinitions_within_lgrind-environment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{chartab}[\V{BUFFERSIZE}\1\N{4}];}\Tab{32}{\C{}\1\*_buffer_for_chartab_modifications_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_keywds}[\V{BUFFERSIZE}\1\N{2}];\C{}\1\*_keyword_table_address_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_prcbeg};}\Tab{32}{\C{}\1\*_regular_expr_for_procedure_begin_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_noproc};}\Tab{32}{\C{}\1\*_regexp_for_lines_with_NO_procedure_begin_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_combeg};}\Tab{32}{\C{}\1\*_regexp_introducing_a_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_comend};}\Tab{32}{\C{}\1\*_regexp_ending_a_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_acmbeg};}\Tab{32}{\C{}\1\*_regexp_introducing_a_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_acmend};}\Tab{32}{\C{}\1\*_regexp_ending_a_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_blkbeg};}\Tab{32}{\C{}\1\*_regexp_beginning_of_a_block_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_blkend};}\Tab{32}{\C{}\1\*_regexp_ending_a_block_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_strbeg};}\Tab{32}{\C{}\1\*_regexp_starting_string_constant_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_strend};}\Tab{32}{\C{}\1\*_regexp_ending_string_constant_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_chrbeg};}\Tab{32}{\C{}\1\*_regexp_starting_character_constant_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_chrend};}\Tab{32}{\C{}\1\*_regexp_ending_character_constant_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_cdebeg};}\Tab{32}{\C{}\1\*_regexp_starting_prog_text_within_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{_\V{s\_cdebeg}[\V{PNAMELEN}+\N{1}];}\Tab{32}{\C{}\1\*_actual_string_corresponding_to_\CE{}\V{l\_cdebeg}\C{}_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_cdeend};}\Tab{32}{\C{}\1\*_regexp_ending_prog_text_within_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_texbeg};}\Tab{32}{\C{}\1\*_regexp_starting_{\TeX}_text_in_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_texend};}\Tab{32}{\C{}\1\*_regexp_ending_{\TeX}_text_in_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_txmbeg};}\Tab{32}{\C{}\1\*_regexp_starting_{\TeX}_math_in_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_txmend};}\Tab{32}{\C{}\1\*_regexp_ending_{\TeX}_math_in_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_tt\_beg};}\Tab{32}{\C{}\1\*_regexp_starting_verbatim_text_in_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_tt\_end};}\Tab{32}{\C{}\1\*_regexp_ending_typewriter_text_in_comment_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_at};}\Tab{32}{\C{}\1\*_regexp_for_\texttt{@}_in_{\LaTeX}_text_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_tt};}\Tab{32}{\C{}\1\*_regexp_for_\texttt{\|}_in_{\LaTeX}_text_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_pc};}\Tab{32}{\C{}\1\*_regexp_for_\texttt{\%}_in_{\LaTeX}_text_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_id};}\Tab{32}{\C{}\1\*_string_containing_valid_identifier_chars_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\*\V{l\_record};}\Tab{32}{\C{}\1\*_start_of_lexical_block_outside_functions_\*\1\CE{}}}
\L{\LB{\K{char}}\Tab{8}{\V{l\_escape};}\Tab{32}{\C{}\1\*_character_used_to_escape_characters_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{l\_toplex};}\Tab{32}{\C{}\1\*_procedures_only_defined_at_top_lex_level_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{l\_onecase};}\Tab{32}{\C{}\1\*_upper_\&_lower_case_equivalent_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{embed}_=_\V{FALSE};}\Tab{24}{________\C{}\1\*_-e_seen_---_do_embedded_code_\*\1\CE{}}}
\L{\LB{\V{boolean}_\V{code}_=_\V{TRUE};}\Tab{24}{________\C{}\1\*_Looking_at_code_\*\1\CE{}}}
\L{\LB{\K{int}}\Tab{16}{\V{TabWidth}_=_\N{8};}\Tab{32}{\C{}\1\*_Default_width_of_a_tab_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*__global_variables_also_used_by_expmatch}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{extern}__\V{boolean}_\V{\_escaped};_______\C{}\1\*_if_last_character_was_an_escape_\*\1\CE{}}}
\L{\LB{\K{extern}}\Tab{8}{\K{char}_\*\V{\_sstart};}\Tab{24}{_______}\Tab{32}{\C{}\1\*_start_of_the_current_string_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{extern}}\Tab{8}{\K{int}_(\*\V{re\_strncmp})(\V{const}_\K{char}\*,_\V{const}_\K{char}\*,_\V{size\_t});}}
\L{\LB{}\Tab{24}{_______}\Tab{32}{\C{}\1\*_function_to_do_string_compares_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\Proc{main}\K{int}_\V{main}(\K{int}_\V{argc},_\K{char}_\*\*\V{argv})}}
\L{\LB{\{}}
\L{\LB{___\K{struct}_\V{stat}__\V{stbuf};}}
\L{\LB{___\V{boolean}}\Tab{16}{\V{hseen}_=_\V{FALSE};}\Tab{40}{\C{}\1\*_-h_seen}\Tab{64}{\*\1\CE{}}}
\L{\LB{___\K{char}}\Tab{16}{\*\V{hstring};}\Tab{32}{_______}\Tab{40}{\C{}\1\*_header_string_to_use_\*\1\CE{}}}
\L{\LB{___\K{char}}\Tab{16}{\*\V{programname};}\Tab{40}{\C{}\1\*_the_zeroeth_argument_\*\1\CE{}}}
\L{\LB{___\V{boolean}}\Tab{16}{\V{iseen}_=_\V{FALSE};}\Tab{40}{\C{}\1\*_-i_seen}\Tab{64}{\*\1\CE{}}}
\L{\LB{___\K{int}}\Tab{16}{\V{files\_done}_=_\N{0};}}
\L{\LB{}}
\L{\LB{___\V{defs}=(\K{char}\*)\V{malloc}(\N{2}\*\V{BUFFERSIZE});}}
\L{\LB{___\V{strings}=(\K{char}\*)\V{malloc}(\N{2}\*\V{BUFFERSIZE});}}
\L{\LB{___\V{argc}_=_\V{getredirection}(\V{argc},_\V{argv});}}
\L{\LB{}}
\L{\LB{___\V{programname}=\V{argv}[\N{0}];}}
\L{\LB{___\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}}
\L{\LB{___\K{if}_(\V{argc}==\N{0})_\{}}
\L{\LB{_______\V{Internal\_Help}();}}
\L{\LB{}\Tab{8}{___\K{return}_\V{OKEXIT};}}
\L{\LB{___\}}}
\L{\LB{}}
\L{\LB{___\K{do}_\{}}
\L{\LB{______\K{char}\*_\V{cp}_=_\S{}\3N\1A\20N\1A\200000\200000:00\200000\20000000\3\SE{};}}
\L{\LB{}}
\L{\LB{______\K{if}_(\V{argc}_\>_\N{0})_\{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Help-facility_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\V{HELPOPTION}))_\{}}
\L{\LB{}\Tab{16}{____\V{Internal\_Help}();}}
\L{\LB{_______}\Tab{8}{____\K{return}_\V{OKEXIT};}}
\L{\LB{_______}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-s\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{____\V{Internal\_Help\_Language\_List}();}}
\L{\LB{_______}\Tab{8}{____\K{return}_\V{OKEXIT};}}
\L{\LB{_______}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-h\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{hseen}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{\K{if}_(\V{argc}_==_\N{1})_\{}}
\L{\LB{}\Tab{16}{___\V{hstring}_=_\S{}\3\3\SE{};}}
\L{\LB{}\Tab{16}{___\V{argc}_=_\N{0};}}
\L{\LB{}\Tab{16}{___\K{goto}_\V{rest};}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\V{hstring}_=_\V{argv}[\N{1}];}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{if}_(\V{argc}_\>_\N{0})}}
\L{\LB{}\Tab{16}{___\K{continue};}}
\L{\LB{}\Tab{16}{\K{goto}_\V{rest};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_take_input_from_the_standard_place_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{argc}_=_\N{0};}}
\L{\LB{}\Tab{16}{\K{goto}_\V{rest};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Process_embedded_text_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-e\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{embed}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_format_for_inclusion_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-i\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{iseen}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_indicate_no_keywords_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-n\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{nokeyw}++;}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Don\4t_treat_\texttt{@},_etc._specially_in_comments_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-c\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{code\_cmnts}_=_\V{FALSE};}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Do_treat_\texttt{@},_etc._specially_in_comments_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3+c\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{code\_cmnts}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Don\4t_treat_\texttt{@},_etc._specially_in}}
\L{\LB{}\Tab{8}{__\*_{\LaTeX}_text_(\CE{}\V{embed}\C{}_only)_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-a\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{code\_latex}_=_\V{FALSE};}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Do_treat_\texttt{@},_etc._specially_in}}
\L{\LB{}\Tab{8}{__\*_{\LaTeX}_text_(\CE{}\V{embed}\C{}_only)_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3+a\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{code\_latex}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Use_\texttt{\2texttt}_for_all_fonts_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strcmp}(\V{argv}[\N{0}],_\S{}\3\-t\3\SE{}))_\{}}
\L{\LB{}\Tab{16}{\V{sscanf}(\V{argv}[\N{1}],_\S{}\3\%d\3\SE{},_\&\V{TabWidth});}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_specify_the_language_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strncmp}(\V{argv}[\N{0}],_\S{}\3\-l\3\SE{},_\N{2}))_\{}}
\L{\LB{}\Tab{16}{\V{strcpy}(\V{language},_\V{argv}[\N{0}]+\N{2});}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{\K{\#ifndef}_\V{NO\_PERM\_D}}}
\L{\LB{}\Tab{8}{_\C{}\1\*_specify_the_language_description_file_for_permanent_use_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strncmp}(\V{argv}[\N{0}],_\S{}\3\-d!\3\SE{},_\N{3}))}}
\L{\LB{}\Tab{24}{\V{writeDefsfileInExe}(\V{programname},_\V{argv}[\N{1}]);}}
\L{\LB{\K{\#endif}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_specify_the_language_description_file_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{strncmp}(\V{argv}[\N{0}],_\S{}\3\-d\3\SE{},_\N{2}))_\{}}
\L{\LB{}\Tab{16}{\V{strcpy}(\V{defsfile},_\V{argv}[\N{1}]);}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_open_the_file_for_input_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{freopen}(\V{argv}[\N{0}],_\S{}\3r\3\SE{},_\V{stdin})_==_\V{NULL})_\{}}
\L{\LB{}\Tab{16}{\V{perror}(\V{argv}[\N{0}]);}}
\L{\LB{}\Tab{16}{\K{return}_\V{BADEXIT};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\V{fname}_=_\V{argv}[\N{0}];}}
\L{\LB{}\Tab{8}{_\V{argc}\-\-,_\V{argv}++;}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{___\V{rest}:}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\V{lineno}_=_\N{0};}}
\L{\LB{}\Tab{8}{__\V{setpreambles}();}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\C{}\1\*_get_config_data_from_\texttt{lgrindef}_\*\1\CE{}}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{tgetent}(\V{buf},_\S{}\3firstpreamble\3\SE{},_\V{defsfile})\>\N{0})}}
\L{\LB{}\Tab{16}{_\V{parsepreamble}(\V{preamble});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{tgetent}(\V{buf},_\S{}\3filepreamble\3\SE{},_\V{defsfile})\>\N{0})}}
\L{\LB{}\Tab{16}{_\V{parsepreamble}(\V{preambl2});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{tgetent}(\V{buf},_\S{}\3configuration\3\SE{},_\V{defsfile})\>\N{0})}}
\L{\LB{}\Tab{16}{_\V{parsepreamble}(\V{config});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{tgetent}(\V{buf},_\S{}\3chartab\3\SE{},_\V{defsfile})\>\N{0})}}
\L{\LB{}\Tab{16}{_\V{parsechartab}();}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{iseen}_\&\&_\V{embed})_\{}}
\L{\LB{}\Tab{8}{_\V{fprintf}(\V{stderr},_\S{}\3\-i_makes_no_sense_with_\-e;_\-e_ignored\2n\3\SE{});}}
\L{\LB{}\Tab{8}{_\V{embed}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(!\V{iseen}_\&\&_!\V{embed})_\{}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{files\_done}_==_\N{0})_\V{printpreamble}(\V{preamble});}}
\L{\LB{}\Tab{8}{_\V{printpreamble}(\V{preambl2});}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{files\_done}_==_\N{0})_\{}}
\L{\LB{}\Tab{16}{\V{printf}(\S{}\3\2\2begin\{document\}\2n\3\SE{});}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2begin\{lgrind\}\2n\3\SE{});}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\V{printpreamble}(\V{config});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{embed})}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\%\%_This_document_was_generated_automagically_by_lgrind.__DO_NOT_EDIT.\2n\2n\3\SE{});}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{iseen})}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\%\%_Remember_to_use_the_lgrind_style\2n\2n\3\SE{});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\V{printf}(\S{}\3\2\2Head\{\3\SE{});}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{hseen})_\V{putstr}(\V{hstring});}}
\L{\LB{}\Tab{8}{__\V{printf}(\S{}\3\}\2n\3\SE{});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\V{setlang}();}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\C{}\1\*_initialize_the_program_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\V{incomm}_=_\V{instr}_=_\V{inchr}_=_\V{\_escaped}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{__\V{incode}_=_\V{latexcode}_=_\V{latex\_tt}_=_\V{NOTCODE};}}
\L{\LB{}\Tab{8}{__\V{do\_at}_=_\V{do\_tt}_=_\V{TRUE};}}
\L{\LB{}\Tab{8}{__\V{blklevel}_=_\N{0};}}
\L{\LB{}\Tab{8}{__\V{reclevel}_=_\N{0};}}
\L{\LB{}\Tab{8}{__\K{for}_(\V{psptr}_=_\N{0};_\V{psptr}_\<_\V{PSMAX};_\V{psptr}++)_\{}}
\L{\LB{}\Tab{8}{_\V{pstack}[\V{psptr}][\N{0}]_=_\S{}\4\20\4\SE{};}}
\L{\LB{}\Tab{8}{_\V{plstack}[\V{psptr}]_=_\N{0};}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{}\Tab{8}{__\V{psptr}_=_\-\N{1};}}
\L{\LB{}\Tab{8}{__\K{if}_(\*\V{fname}==\S{}\4\20\4\SE{})_\V{stbuf}.\V{st\_size}=\N{0};}}
\L{\LB{}\Tab{8}{__\K{else}_\{}}
\L{\LB{}\Tab{8}{______\V{stat}(\V{fname},_\&\V{stbuf});}}
\L{\LB{}\Tab{8}{______\V{cp}_=_\V{ctime}(\&\V{stbuf}.\V{st\_mtime});}}
\L{\LB{}\Tab{8}{______\V{cp}[\N{7}]_=_\V{cp}[\N{10}]_=_\V{cp}[\N{16}]_=_\V{cp}[\N{24}]_=_\S{}\4\20\4\SE{};}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(!\V{embed})_\{}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2File\{\3\SE{});}}
\L{\LB{}\Tab{8}{_\V{putstr}(\V{fname});}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\}\{\%s\}\{\%s\}\{\%s\}\{\%s\}\{\%ld\}\2n\3\SE{},_\V{cp}+\N{20},_\V{cp}+\N{4},_\V{cp}+\N{8},_\V{cp}+\N{11},}}
\L{\LB{}\Tab{40}{___\V{stbuf}.\V{st\_size});}}
\L{\LB{}\Tab{8}{_\C{}\1\*_file_name,_mod_year,_mod_month,_mod_day,_mod_time,_size_\*\1\CE{}}}
\L{\LB{______\}}}
\L{\LB{}}
\L{\LB{______\V{code}_=_\V{FALSE};}}
\L{\LB{______\V{readfile}(\V{stdin});}}
\L{\LB{______\V{files\_done}++;}}
\L{\LB{}}
\L{\LB{______\K{if}_(!\V{iseen}_\&\&_!\V{embed})_\{}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2end\{lgrind\}\2n\3\SE{});}}
\L{\LB{______\}}}
\L{\LB{}}
\L{\LB{______\K{if}_(\V{code})}}
\L{\LB{}\Tab{8}{_\V{fprintf}(\V{stderr},_\S{}\3Reached_EOF_within_code_in_file_\%s\2n\3\SE{},_\V{fname});}}
\L{\LB{___\}_\K{while}_(\V{argc}_\>_\N{0});}}
\L{\LB{}}
\L{\LB{___\K{if}_(!\V{iseen}_\&\&_!\V{embed})_\{}}
\L{\LB{______\V{printf}(\S{}\3\2\2end\{document\}\2n\3\SE{});}}
\L{\LB{___\}}}
\L{\LB{___\K{return}_\V{OKEXIT};}}
\L{\LB{\}}}
\ProcCont{mode}\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Internal\_Help()_---_show_help}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\Proc{Internal\_Help}\K{void}_\V{Internal\_Help}()}}
\L{\LB{\{}}
\L{\LB{___\V{printf}(\S{}\3lgrind_\-\-_general_purpose_\2\3pretty_printer\2\3_for_use_with_LaTeX.\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3usage:__lgrind__[options]_\<name\>_.\,.\,.\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-e_____process_embedded_text_in_a_LaTeX_file\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-i_____format_source_code_for_inclusion_in_a_LaTeX_document.\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-______take_input_from_standard_input.\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-n_____don\4t_boldface_keywords.\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-c_____don\4t_treat_@,_etc._specially_in_comments.\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-t_\<width\>____change_tab_width_(default_8).\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-h_\<header\>___specifies_text_in_header_(default:_none).\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-d_\<deffile\>__use_another_language_definitions_file,_default:\2}}
\L{\LB{\2n______________\2\3\%s\2\3\2n\3\SE{},_\V{defsfile});}}
\L{\LB{\K{\#ifndef}_\V{NO\_PERM\_D}}}
\L{\LB{___\V{printf}(\S{}\3\-d!_\<deffile\>_same_as_above,_but_permanently_(modifies_executable)\2n\3\SE{});}}
\L{\LB{\K{\#endif}}}
\L{\LB{___\V{printf}(\S{}\3\-l\<language\>__choose_the_language_to_use.\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3\-s_____show_a_list_of_currently_known_languages.\2n\2n\3\SE{});}}
\L{\LB{___\V{printf}(\S{}\3If_neither_\-e_nor_\-i_are_specified,_a_complete_LaTeX\-file_is_produced.\2n\3\SE{});}}
\L{\LB{\}}}
\ProcCont{mode}\L{\LB{}}
\L{\LB{}}
\L{\LB{\K{typedef}_\K{struct}_\V{langRec}_\{}}
\L{\LB{}\Tab{8}{\K{char}_\*\V{name};}}
\L{\LB{}\Tab{8}{\K{char}_\*\V{alternatives};}}
\L{\LB{}\Tab{8}{\K{struct}_\V{langRec}_\*\V{next};_\}_\V{langRec};}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{\Proc{AddToLList}\K{void}_\V{AddToLList}(\K{char}_\*\V{line},_\V{langRec}_\*\*\V{into},_\K{int}_\*\V{chainLength})}}
\L{\LB{\{}}
\L{\LB{}\Tab{8}{\K{char}_\*\V{token},_\*\V{item},_\*\V{alts};}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\K{if}_(\*\V{line}!=\S{}\4\#\4\SE{}_\&\&_\*\V{line}!=\S{}\4\2n\4\SE{})}}
\L{\LB{}\Tab{8}{\{}}
\L{\LB{}\Tab{16}{\V{item}=\V{strdup}(\V{line});}}
\L{\LB{}\Tab{16}{\K{if}_((\V{token}=\V{strtok}(\V{item},_\S{}\3\|:\2\2\2n\3\SE{}))_==_\V{NULL})_\K{return};}}
\L{\LB{}\Tab{16}{(\*\*\V{into}).\V{next}=(\V{langRec}\*)\V{malloc}(\K{sizeof}(\V{langRec}));}}
\L{\LB{}\Tab{16}{\*\V{into}=(\*\*\V{into}).\V{next};}}
\L{\LB{}\Tab{16}{(\*\*\V{into}).\V{name}=\V{strdup}(\V{token});}}
\L{\LB{}\Tab{16}{(\*\V{chainLength})++;}}
\L{\LB{}\Tab{16}{\K{if}_((\V{token}=\V{strtok}(\V{NULL},_\S{}\3\|:\2\2\2n\3\SE{}))_==_\V{NULL})}}
\L{\LB{}\Tab{16}{\{}}
\L{\LB{}\Tab{24}{(\*\*\V{into}).\V{alternatives}=\S{}\3\20\3\SE{};}}
\L{\LB{}\Tab{24}{\K{return};}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{(\*\*\V{into}).\V{alternatives}=\V{strdup}(\V{token});}}
\L{\LB{}\Tab{16}{\K{while}_((\V{token}=\V{strtok}(\V{NULL},_\S{}\3\|:\2\2\2n\3\SE{}))_!=_\V{NULL})}}
\L{\LB{}\Tab{16}{\{}}
\L{\LB{}\Tab{24}{\V{alts}=(\*\*\V{into}).\V{alternatives};}}
\L{\LB{}\Tab{24}{(\*\*\V{into}).\V{alternatives}=(\K{char}\*)\V{malloc}(}}
\L{\LB{}\Tab{32}{\V{strlen}((\*\*\V{into}).\V{alternatives})+\V{strlen}(\V{token})+\N{1});}}
\L{\LB{}\Tab{24}{\C{}\1\*_This_is_extremely_poor_style_and_dangerous._I_leave_memory}}
\L{\LB{}\Tab{24}{_\*_allocated_here_because_after_invocation_of_this_help_facility}}
\L{\LB{}\Tab{24}{_\*_the_program_will_stop_anyway._In_this_context_it_is_safe._\*\1\CE{}}}
\L{\LB{}\Tab{24}{\V{strcpy}((\*\*\V{into}).\V{alternatives},_\V{alts});}}
\L{\LB{}\Tab{24}{\V{strcat}((\*\*\V{into}).\V{alternatives},_\S{}\3,_\3\SE{});}}
\L{\LB{}\Tab{24}{\V{strcat}((\*\*\V{into}).\V{alternatives},_\V{token});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{\Proc{Internal\_Help\_Language\_List}\K{void}_\V{Internal\_Help\_Language\_List}()}}
\L{\LB{\{}}
\L{\LB{}\Tab{8}{\V{FILE}_\*\V{tf};}}
\L{\LB{}\Tab{8}{\K{int}_\V{check},_\V{i},_\V{llch};}}
\L{\LB{}\Tab{8}{\V{langRec}_\*\V{lch},_\*\V{rch},_\*\V{currlch};}}
\L{\LB{}\Tab{8}{\C{}\1\*}\Tab{16}{\CE{}\V{lch2}\C{}_was_originally_\3language_chain\3,_but_I_guess}}
\L{\LB{}\Tab{16}{it\4s_\3left\3_as_well_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3When_specifying_a_language_case_is_insignificant._You_can_use_the\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3name_of_the_language,_or,_where_available,_one_of_the_synonyms_in\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3parantheses._Thus_the_following_are_legal_and_mark_Tcl\1Tk,_Pascal\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3and_Fortran_input,_respectively:\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3___lgrind_\-ltcl\1tk_.\,.\,.\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3___lgrind_\-lpaSCAL_.\,.\,.\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3___lgrind_\-lf_.\,.\,.\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{printf}(\S{}\3The_list_of_languages_currently_available_in_your_lgrindef_file:\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\V{tf}_=_\V{fopen}(\V{defsfile},_\S{}\3rt\3\SE{});}}
\L{\LB{}\Tab{8}{\K{if}_(\V{tf}_==_\V{NULL})}}
\L{\LB{}\Tab{8}{\{}}
\L{\LB{}\Tab{16}{\V{fprintf}(\V{stderr},__\S{}\3cannot_find_lgrindef_file_{`}\%s\4\2n\3\SE{},_\V{defsfile});}}
\L{\LB{}\Tab{16}{\K{return};}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\V{llch}=\N{0};}}
\L{\LB{}\Tab{8}{\V{currlch}=\V{lch}=(\V{langRec}\*)\V{malloc}(\K{sizeof}(\V{langRec}));}}
\L{\LB{}\Tab{8}{(\*\V{currlch}).\V{name}=\S{}\3\3\SE{};}}
\L{\LB{}\Tab{8}{\*\V{config}=\S{}\4\2n\4\SE{};}}
\L{\LB{}\Tab{8}{\K{do}_\{}}
\L{\LB{}\Tab{16}{\V{check}=\N{0};}}
\L{\LB{}\Tab{16}{\K{if}_(\*\V{config}==\S{}\4\2n\4\SE{}_\|\,\|_\V{config}[\V{strlen}(\V{config})\-\N{2}]!=\S{}\4\2\2\4\SE{})}}
\L{\LB{}\Tab{24}{\V{check}=\N{1};}}
\L{\LB{}\Tab{16}{\K{if}_(\V{fgets}(\V{config},_\V{BUFFERSIZE},_\V{tf})==\V{NULL})_\K{break};}}
\L{\LB{}\Tab{16}{\K{if}_(\V{check}!=\N{0})_\V{AddToLList}(\V{config},_\&\V{currlch},_\&\V{llch});}}
\L{\LB{}\Tab{8}{\}_\K{while}_(\V{strcmp}((\*\V{currlch}).\V{name},_\S{}\3EndOfLanguageDefinitions\3\SE{})!=\N{0});}}
\L{\LB{}\Tab{8}{\V{rch}=\V{lch};}}
\L{\LB{}\Tab{8}{\K{for}_(\V{check}=\N{0};_\V{check}\<\V{llch}\1\N{2};_\V{check}++)}}
\L{\LB{}\Tab{16}{\V{rch}=(\*\V{rch}).\V{next};}}
\L{\LB{}\Tab{8}{\K{for}_(\V{check}=\N{0};_\V{check}\<\V{llch}\1\N{2};_\V{check}++)}}
\L{\LB{}\Tab{8}{\{}}
\L{\LB{}\Tab{16}{\V{lch}=(\*\V{lch}).\V{next};}}
\L{\LB{}\Tab{16}{\V{rch}=(\*\V{rch}).\V{next};}}
\L{\LB{}\Tab{16}{\V{printf}(\S{}\3____\%s\3\SE{},_(\*\V{lch}).\V{name});}}
\L{\LB{}\Tab{16}{\K{if}_(\*((\*\V{lch}).\V{alternatives}))_\V{printf}(\S{}\3__(\%s)\3\SE{},_(\*\V{lch}).\V{alternatives});}}
\L{\LB{}\Tab{16}{\K{else}_\V{printf}(\S{}\3____\3\SE{});}}
\L{\LB{}\Tab{16}{\K{for}_(\V{i}=\V{strlen}((\*\V{lch}).\V{name})+\V{strlen}((\*\V{lch}).\V{alternatives});}}
\L{\LB{}\Tab{32}{\V{i}\<\N{30};_\V{i}++)_\V{putchar}(\S{}\4_\4\SE{});}}
\L{\LB{}\Tab{16}{\K{if}_(\V{rch}!=\V{currlch})}}
\L{\LB{}\Tab{16}{\{}}
\L{\LB{}\Tab{24}{\V{printf}(\S{}\3\%s\3\SE{},_(\*\V{rch}).\V{name});}}
\L{\LB{}\Tab{24}{\K{if}_(\*((\*\V{rch}).\V{alternatives}))_\V{printf}(\S{}\3__(\%s)\3\SE{},_(\*\V{rch}).\V{alternatives});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\V{printf}(\S{}\3\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_\CE{}\V{readfile}()\C{}_---_read_and_process_a_file}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{readfile}\K{void}_\V{readfile}(\V{FILE}_\*\V{fp})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{cp};}}
\L{\LB{___\V{boolean}}\Tab{16}{\V{LGinline}=\V{FALSE};}\Tab{32}{\C{}\1\*_Doing_\%(_--_\%)}\Tab{56}{\*\1\CE{}}}
\L{\LB{___\K{char}_}\Tab{16}{\V{term};}\Tab{40}{\C{}\1\*_\4]\4_or_\4)\4___________\*\1\CE{}}}
\L{\LB{___\K{char}_}\Tab{16}{\*\V{atptr};_}\Tab{40}{\C{}\1\*_start_of_\texttt{@}_within_{\LaTeX}_text_\*\1\CE{}}}
\L{\LB{___\K{char}_}\Tab{16}{\*\V{atendptr};}\Tab{40}{\C{}\1\*_end_of_\texttt{@}_within_{\LaTeX}_text_\*\1\CE{}}}
\L{\LB{___\K{char}_}\Tab{16}{\*\V{pcptr};_}\Tab{40}{\C{}\1\*_start_of_\texttt{\%}_within_{\LaTeX}_text_\*\1\CE{}}}
\L{\LB{_\C{}\1\*char_}\Tab{16}{\*pcendptr;\*\1}\Tab{32}{\1\*_end_of_\texttt{\%}_within_{\LaTeX}_text_\*\1\CE{}}}
\L{\LB{___\K{char}_}\Tab{16}{\V{temp}[\V{BUFFERSIZE}];}}
\L{\LB{___\K{char}}\Tab{16}{\V{fnamebak}[\N{100}];}}
\L{\LB{___\K{int}}\Tab{16}{\V{linenobak};}}
\L{\LB{}}
\L{\LB{___\K{while}_(\V{fgets}(\V{buf},_\V{BUFFERSIZE},_\V{fp})_!=_\V{NULL})_\{}}
\L{\LB{______\V{cp}_=_\&\V{buf}[\V{strlen}(\V{buf})\-\N{1}];}}
\L{\LB{______\K{if}_(\*\V{cp}_!=_\S{}\4\2n\4\SE{})_\{\*(++\V{cp})_=_\S{}\4\2n\4\SE{};_\*(++\V{cp})_=_\S{}\4\20\4\SE{};_\}}}
\L{\LB{}\Tab{8}{__\V{lineno}++;}}
\L{\LB{______\V{cp}_=_\V{buf};}}
\L{\LB{\K{\#if}_\V{nospaceincomment}}}
\L{\LB{______\V{linehead}_=_\V{TRUE};}}
\L{\LB{\K{\#endif}}}
\L{\LB{______\V{lastout}_=_\S{}\4\20\4\SE{};}}
\L{\LB{______\K{if}_(\V{embed})_\{}}
\L{\LB{}\Tab{8}{_\K{if}_(!\V{code})_\{}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{buf}[\N{0}]_==_\S{}\4\%\4\SE{}_\&\&}}
\L{\LB{}\Tab{16}{(\V{buf}[\N{1}]_==_\S{}\4[\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4(\4\SE{}}}
\L{\LB{}\Tab{16}{_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4\#\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4\<\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4!\4\SE{}}}
\L{\LB{}\Tab{16}{_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4@\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4\|\4\SE{}))_\{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_______\K{for}_(\V{cp}_=_\V{buf}_+_\N{2};_\*\V{cp}_==_\S{}\4_\4\SE{}_\|\,\|_\*\V{cp}_==_\S{}\4\2t\4\SE{};_\V{cp}++)}}
\L{\LB{}\Tab{16}{__;}}
\L{\LB{}}
\L{\LB{}\Tab{16}{___\C{}\1\*_Change_the_language_\*\1\CE{}}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{buf}[\N{1}]_==_\S{}\4\#\4\SE{})_\{}}
\L{\LB{}\Tab{16}{__\K{if}_(\*\V{cp}_==_\S{}\4\2n\4\SE{})}}
\L{\LB{}\Tab{24}{_\V{fprintf}(\V{stderr},_\S{}\3no_language_seen_after_\%\%\#_in_file\2}}
\L{\LB{_\%s_at_line_\%d\2n\3\SE{},_\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{16}{__\K{else}_\{}}
\L{\LB{}\Tab{24}{_\V{cp}[\V{strlen}(\V{cp})_\-_\N{1}]_=_\S{}\4\20\4\SE{};_\C{}\1\*_nuke_the_\CE{}\S{}\4\2n\4\SE{}\C{}_\*\1\CE{}}}
\L{\LB{}\Tab{24}{_\K{while}_((\*\V{cp}==\S{}\4_\4\SE{})_\|\,\|_(\*\V{cp}==\S{}\4\2t\4\SE{}))_\V{cp}++;}}
\L{\LB{}\Tab{24}{_\V{strcpy}(\V{language},_\V{cp});}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\%\%_switching_to_\%s\2n\3\SE{},_\V{language});}}
\L{\LB{}\Tab{24}{_\V{setlang}();}}
\L{\LB{}\Tab{16}{__\}}}
\L{\LB{}\Tab{16}{__\K{continue};}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}}
\L{\LB{}\Tab{16}{___\C{}\1\*_Turn_\texttt{@}_or_\texttt{\|}_processing_within_{\LaTeX}}}
\L{\LB{}\Tab{16}{\*_text_on_or_off._\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{buf}[\N{1}]_==_\S{}\4@\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4\|\4\SE{})_\{}}
\L{\LB{}\Tab{16}{__\K{if}_(\*\V{cp}_==_\S{}\4\2n\4\SE{})}}
\L{\LB{}\Tab{24}{_\V{fprintf}(\V{stderr},_\S{}\3no_setting_seen_after_\%\%\%c_in_file\2}}
\L{\LB{_\%s_at_line_\%d\2n\3\SE{},_\V{buf}[\N{1}],_\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{16}{__\K{else}_\{}}
\L{\LB{}\Tab{24}{_\K{int}_\V{flag}_=_(\*\V{cp}_==_\S{}\41\4\SE{}_\|\,\|_\*\V{cp}_==_\S{}\4+\4\SE{});}}
\L{\LB{}\Tab{24}{_\K{if}_(\V{buf}[\N{1}]_==_\S{}\4@\4\SE{})}}
\L{\LB{}\Tab{24}{\V{do\_at}_=_\V{flag};}}
\L{\LB{}\Tab{24}{_\K{else}}}
\L{\LB{}\Tab{24}{\V{do\_tt}_=_\V{flag};}}
\L{\LB{}\Tab{16}{__\}}}
\L{\LB{}\Tab{16}{__\K{continue};}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}}
\L{\LB{}\Tab{16}{___\V{code}_=_\V{TRUE};}}
\L{\LB{}}
\L{\LB{}\Tab{16}{___\C{}\1\*_take_input_from_another_file_or_from_a_shell_command_\*\1\CE{}}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{buf}[\N{1}]_==_\S{}\4\<\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4!\4\SE{})_\{}}
\L{\LB{}\Tab{16}{__\V{FILE}_\*\V{fp};}}
\L{\LB{}\Tab{16}{__\K{char}_\V{source}_=_\V{buf}[\N{1}];}}
\L{\LB{}}
\L{\LB{}\Tab{16}{__\V{cp}[\V{strlen}(\V{cp})_\-_\N{1}]_=_\S{}\4\20\4\SE{};____\C{}\1\*_nuke_the_\CE{}\S{}\4\2n\4\SE{}\C{}_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\K{if}_(\V{source}_==_\S{}\4\<\4\SE{})}}
\L{\LB{}\Tab{24}{_\V{fp}_=_\V{fopen}(\V{cp},_\S{}\3r\3\SE{});}}
\L{\LB{}\Tab{16}{__\K{else}_\C{}\1\*_\CE{}\V{source}_==_\S{}\4!\4\SE{}\C{}_\*\1\CE{}}}
\L{\LB{}\Tab{24}{_\V{fp}_=_\V{popen}(\V{cp},_\S{}\3r\3\SE{});}}
\L{\LB{}}
\L{\LB{}\Tab{16}{__\K{if}_(\V{fp}_==_\V{NULL})_\{}}
\L{\LB{}\Tab{24}{_\V{sprintf}(\V{temp},_\S{}\3\%\%\%c_on_{`}\%s\4_failed\3\SE{},_\V{source},_\V{cp});}}
\L{\LB{}\Tab{24}{_\V{perror}(\V{temp});}}
\L{\LB{}\Tab{16}{__\}_\K{else}_\{}}
\L{\LB{}\Tab{24}{_\V{strcpy}(\V{temp},_\V{cp});}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\%\%_start_of_{`}\%s\4\2n\3\SE{},_\V{temp});}}
\L{\LB{}\Tab{24}{_\C{}\1\*_printf(\3\2\2LGinlinefalse\2\2LGbegin\2\2lgrinde\2n\3);_\*\1\CE{}}}
\L{\LB{}\Tab{24}{_\C{}\1\*_the_above_was_not_{all}_incorrect_.\,.\,._\*\1\CE{}}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\2\2LGinlinefalse\3\SE{});}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\2\2begin\{lgrind\}\2n\3\SE{});}}
\L{\LB{}\Tab{24}{_\V{embed}_=_\V{FALSE};}}
\L{\LB{}\Tab{24}{_\V{linenobak}=\V{lineno};_\V{strcpy}(\V{fnamebak},_\V{fname});}}
\L{\LB{}\Tab{24}{_\V{lineno}=\N{0};_\V{strcpy}(\V{fname},_\V{temp});}}
\L{\LB{}\Tab{24}{_\V{linenocode}=\N{0};}}
\L{\LB{}\Tab{24}{_\V{readfile}(\V{fp});}}
\L{\LB{}\Tab{24}{_\V{lineno}=\V{linenobak};_\V{strcpy}(\V{fname},_\V{fnamebak});}}
\L{\LB{}\Tab{24}{_\V{embed}_=_\V{TRUE};}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\2\2end\{lgrind\}\2n\3\SE{});}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\%\%_end_of_{`}\%s\4\2n\3\SE{},_\V{temp});}}
\L{\LB{}\Tab{24}{_\K{if}_(\V{source}_==_\S{}\4\<\4\SE{})}}
\L{\LB{}\Tab{24}{\V{fclose}(\V{fp});}}
\L{\LB{}\Tab{24}{_\K{else}}}
\L{\LB{}\Tab{24}{\V{pclose}(\V{fp});}}
\L{\LB{}\Tab{16}{__\}}}
\L{\LB{}\Tab{16}{__\V{code}_=_\V{FALSE};}}
\L{\LB{}\Tab{16}{__\K{continue};}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}}
\L{\LB{}\Tab{16}{___\C{}\1\*_embedded_inline_or_displayed_code_\*\1\CE{}}}
\L{\LB{}\Tab{16}{___\V{linenocode}=\N{0};}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{buf}[\N{1}]_==_\S{}\4(\4\SE{})_\{}}
\L{\LB{}\Tab{16}{__\V{LGinline}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{__\V{term}_=_\S{}\4)\4\SE{};}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2LGinlinetrue\3\SE{});}}
\L{\LB{}\Tab{16}{___\}_\K{else}_\{_\C{}\1\*_\CE{}\V{buf}[\N{1}]_==_\S{}\4[\4\SE{}\C{}_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\V{LGinline}_=_\V{FALSE};}}
\L{\LB{}\Tab{16}{__\V{term}_=_\S{}\4]\4\SE{};}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2LGinlinefalse\3\SE{});}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{buf}[\N{2}]_==_\S{}\4\2n\4\SE{})_\{}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2LGbegin\2\2lgrinde\2n\3\SE{});}}
\L{\LB{}\Tab{16}{___\}_\K{else}_\{}}
\L{\LB{}\Tab{16}{__\V{buf}[\V{strlen}(\V{buf})\-\N{1}]_=_\S{}\4\20\4\SE{};}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\%s\2\2lgrinde\2n\3\SE{},_\&\V{buf}[\N{2}]);}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}\Tab{16}{___\K{continue};}}
\L{\LB{}}
\L{\LB{}\Tab{16}{\}_\K{else}_\K{if}_(\V{do\_at}_\&\&}}
\L{\LB{}\Tab{24}{___(\V{atendptr}_=_\V{expmatch}(\V{buf},_\V{l\_at},_\&\V{atptr},}}
\L{\LB{}\Tab{48}{(\K{char}_\*)_\V{NULL}))_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{16}{___\C{}\1\*_This_is_a_gross_hack.__Fix_it,_dammit_\*\1\CE{}}}
\L{\LB{}\Tab{16}{\V{restart\_at}:}}
\L{\LB{}\Tab{16}{___\C{}\1\*pcendptr_=\*\1\CE{}_\V{expmatch}(\V{cp},_\V{l\_pc},_\&\V{pcptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{pcptr}_==_\V{NULL}_\|\,\|_\V{atptr}_\<_\V{pcptr})_\{}}
\L{\LB{}\Tab{16}{__\V{putVcp}(\V{cp},_\V{atptr}\-\N{1});}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2LGinlinetrue\2\2LGbegin\2\2lgrinde\3\SE{});}}
\L{\LB{}\Tab{16}{__\V{cp}_=_\V{atendptr};}}
\L{\LB{}\Tab{16}{__\V{atendptr}_=_\V{expmatch}(\V{cp},_\V{l\_at},_\&\V{atptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{16}{__\K{if}_(\V{atptr}_!=_\V{NULL}_\&\&_(\V{pcptr}_==_\V{NULL}_\|\,\|_\V{atptr}_\<_\V{pcptr}))_\{}}
\L{\LB{}\Tab{24}{_\V{strncpy}(\V{temp},_\V{cp},_(\V{size\_t})(\V{atptr}\-\V{cp}));}}
\L{\LB{}\Tab{24}{_\V{temp}[(\K{int})(\V{atptr}\-\V{cp})]_=_\S{}\4\20\4\SE{};}}
\L{\LB{}\Tab{24}{_\V{cp}_=_\V{atendptr};}}
\L{\LB{}\Tab{24}{_\V{linenocode}++;}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\2\2L\{\2\2LB\{\3\SE{});}}
\L{\LB{}\Tab{24}{_\V{putScp}(\V{temp});}}
\L{\LB{}\Tab{24}{_\V{printf}(\S{}\3\}\}\2\2egroup\2\2endlgrinde\2\2LGend\{\}\3\SE{});}}
\L{\LB{}\Tab{24}{_\V{atendptr}_=_\V{expmatch}(\V{cp},_\V{l\_at},_\&\V{atptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{24}{_\K{if}_(\V{atptr}_!=_\V{NULL})}}
\L{\LB{}\Tab{24}{\K{goto}_\V{restart\_at};}}
\L{\LB{}\Tab{24}{_\K{else}_\{}}
\L{\LB{}\Tab{24}{\V{fputs}(\V{cp},_\V{stdout});_\K{continue};}}
\L{\LB{}\Tab{24}{_\}}}
\L{\LB{}\Tab{16}{__\}_\K{else}_\{}}
\L{\LB{}\Tab{24}{_\C{}\1\*_multiline_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\}}}
\L{\LB{}\Tab{16}{___\}_\K{else}_\{}}
\L{\LB{}\Tab{16}{__\V{fputs}(\V{buf},_\V{stdout});}}
\L{\LB{}\Tab{16}{__\K{continue};}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{24}{__\K{else}_\{}}
\L{\LB{}\Tab{16}{___\V{fputs}(\V{buf},_\V{stdout});}}
\L{\LB{}\Tab{16}{___\K{continue};}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{8}{_\}_\C{}\1\*_\CE{}\K{if}_(!\V{code})\C{}_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*}}
\L{\LB{}\Tab{8}{__\*_We\4re_in_embedded_code.}}
\L{\LB{}\Tab{8}{__\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{buf}[\N{0}]_==_\S{}\4\%\4\SE{})_\{}}
\L{\LB{}\Tab{16}{\K{if}_(\V{buf}[\N{1}]_==_\S{}\4\*\4\SE{})_\{}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{term}_!=_\S{}\4]\4\SE{})}}
\L{\LB{}\Tab{16}{__\V{fprintf}(\V{stderr},_\S{}\3\%\%\*_only_makes_sense_in_display_mode\2}}
\L{\LB{_in_file_\%s_at_line_\%d\2n\3\SE{},_\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{16}{___\K{else}_\{}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2endlgrinde\2\2LGend\2n\3\SE{});}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2LGinlinefalse\2\2LGbegin\2\2lgrinde[\%d]\2n\3\SE{},_\V{linenocode}+\N{1});}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}\Tab{16}{___\K{continue};}}
\L{\LB{}\Tab{16}{\}_\K{else}_\K{if}_(\V{buf}[\N{1}]_==_\V{term})_\{}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{term}_==_\S{}\4)\4\SE{})_\V{printf}(\S{}\3\2\2egroup\3\SE{});}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{buf}[\N{2}]_==_\S{}\4\2n\4\SE{})}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2endlgrinde\2\2LGend\2n\3\SE{});}}
\L{\LB{}\Tab{16}{___\K{else}}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2endlgrinde\%s\3\SE{},_\&\V{buf}[\N{2}]);}}
\L{\LB{}\Tab{16}{___\V{code}_=_\V{FALSE};}}
\L{\LB{}\Tab{16}{___\K{continue};}}
\L{\LB{}\Tab{16}{\}_\K{else}_\K{if}_(\V{buf}[\N{1}]_==_\S{}\4=\4\SE{})_\{_\C{}\1\*_Send_literal_\*\1\CE{}}}
\L{\LB{}\Tab{16}{___\V{fputs}(\&\V{buf}[\N{2}],_\V{stdout});}}
\L{\LB{}\Tab{16}{___\K{continue};}}
\L{\LB{}\Tab{16}{\}_\K{else}_\K{if}_(\V{buf}[\N{1}]_==_\S{}\4[\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4(\4\SE{}}}
\L{\LB{}\Tab{24}{___\|\,\|_\V{buf}[\N{1}]_==_\S{}\4]\4\SE{}_\|\,\|_\V{buf}[\N{1}]_==_\S{}\4)\4\SE{})_\{}}
\L{\LB{}\Tab{16}{___\V{fprintf}(\V{stderr},}}
\L{\LB{}\Tab{24}{___\S{}\3Possible_nested_embedded_code_in_file_\%s_at_line_\%d\2n\3\SE{},}}
\L{\LB{}\Tab{24}{___\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*}}
\L{\LB{}\Tab{8}{__\*_Inline_code_---_suppress_leading_whitespace}}
\L{\LB{}\Tab{8}{__\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{LGinline})_\{}}
\L{\LB{}\Tab{16}{\K{while}_(\V{isspace}(\*\V{cp}))}}
\L{\LB{}\Tab{16}{___\V{cp}++;}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{__\}_\C{}\1\*_\CE{}\K{if}_(\V{embed})\C{}_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{if}_(\*\V{cp}_==_\S{}\4\2f\4\SE{})_\{}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2NewPage\2n\3\SE{});}}
\L{\LB{}\Tab{8}{_\V{cp}++;}}
\L{\LB{}\Tab{8}{_\K{if}_(\*\V{cp}_==_\S{}\4\2n\4\SE{})__\C{}\1\*_some_people_like_\5Ls_on_their_own_line_\*\1\CE{}}}
\L{\LB{}\Tab{16}{\K{continue};}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{}\Tab{8}{__\V{prccont}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{__\V{linenocode}++;}}
\L{\LB{}\Tab{8}{__\V{printf}(\S{}\3\2\2L\{\2\2LB\{\3\SE{});}}
\L{\LB{}\Tab{8}{__\V{putScp}(\V{cp});}}
\L{\LB{}\Tab{8}{__\K{if}_(!\V{embed}_\&\&_\V{prccont}_\&\&_(\V{psptr}_\>=_\N{0}))_\{}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2ProcCont\{\3\SE{});}}
\L{\LB{}\Tab{8}{_\V{putstr}(\V{pstack}[\V{psptr}]);}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\}\3\SE{});}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{\K{\#ifdef}_\V{DEBUG}}}
\L{\LB{}\Tab{8}{__\V{printf}(\S{}\3com_\%o_str_\%o_chr_\%o_ptr_\%d\2n\3\SE{},_\V{incomm},_\V{instr},_\V{inchr},_\V{psptr});}}
\L{\LB{\K{\#endif}}}
\L{\LB{___\}_\C{}\1\*_\CE{}\K{while}_\V{fgets}()\C{}_\*\1\CE{}}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Set_all_of_the_language-dependent_variables}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{setlang}\K{void}_\V{setlang}(\K{void})}}
\L{\LB{\{}}
\L{\LB{___\K{char}_\*\V{p},_\*\V{cp};}}
\L{\LB{___\K{int}_\V{i};}}
\L{\LB{}}
\L{\LB{___\C{}\1\*}}
\L{\LB{}\Tab{8}{\*__get_the_language_definition_from_the_defs_file}}
\L{\LB{}\Tab{8}{\*\1\CE{}}}
\L{\LB{___\K{if}_(\V{strcmp}(\V{language},_\S{}\3mPi\3\SE{})_==_\N{0})___\C{}\1\*_none_yet_defined_\*\1\CE{}}}
\L{\LB{___\{}}
\L{\LB{}\Tab{8}{___\V{i}_=_\V{tgetent}(\V{defs},_\S{}\3extensions\3\SE{},_\V{defsfile});}}
\L{\LB{}\Tab{8}{___\K{if}_(\V{i}_==_\N{0})_\V{strcpy}(\V{language},_\S{}\3c\3\SE{});}}
\L{\LB{}\Tab{8}{___\K{else}}}
\L{\LB{}\Tab{8}{___\{}}
\L{\LB{}\Tab{16}{___\V{cp}_=_\V{strrchr}(\V{fname},_\S{}\4.\4\SE{});}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{cp}_!=\V{NULL})}}
\L{\LB{}\Tab{16}{___\{}}
\L{\LB{}\Tab{24}{___\V{p}=\V{buf};_\V{cp}_=_\V{tgetstr}(\V{cp}+\N{1},_\&\V{p});}}
\L{\LB{}\Tab{16}{___\}}}
\L{\LB{}\Tab{16}{___\K{if}_(\V{cp}_!=_\V{NULL})_\V{strcpy}(\V{language},_\V{cp});}}
\L{\LB{}\Tab{16}{___\K{else}_\V{strcpy}(\V{language},_\S{}\3c\3\SE{});}}
\L{\LB{}\Tab{8}{___\}}}
\L{\LB{___\}}}
\L{\LB{___\V{i}_=_\V{tgetent}(\V{defs},_\V{language},_\V{defsfile});}}
\L{\LB{___\K{if}_(\V{i}_==_\N{0})_\{}}
\L{\LB{}\Tab{8}{__\V{fprintf}(\V{stderr},_\S{}\3no_entry_for_language_\%s\2n\3\SE{},_\V{language});}}
\L{\LB{}\Tab{8}{__\V{exit}(\V{BADEXIT});}}
\L{\LB{___\}_\K{else}_\K{if}_(\V{i}_\<_\N{0})_\{}}
\L{\LB{}\Tab{8}{__\V{fprintf}(\V{stderr},__\S{}\3cannot_find_lgrindef_file_{`}\%s\4\2n\3\SE{},_\V{defsfile});}}
\L{\LB{}\Tab{8}{__\V{exit}(\V{BADEXIT});}}
\L{\LB{___\}}}
\L{\LB{}}
\L{\LB{___\V{p}_=_\V{strings};}}
\L{\LB{___\K{if}_(\V{tgetstr}(\S{}\3kw\3\SE{},_\&\V{p})_==_\V{NULL})}}
\L{\LB{______\V{nokeyw}_=_\V{TRUE};}}
\L{\LB{___\K{else}__\{}}
\L{\LB{______\K{char}_\*\*\V{cpp};}}
\L{\LB{}}
\L{\LB{______\V{cpp}_=_\V{l\_keywds};}}
\L{\LB{______\V{cp}_=_\V{strings};}}
\L{\LB{______\K{while}_(\*\V{cp})_\{}}
\L{\LB{}\Tab{8}{_\K{while}_(\*\V{cp}_==_\S{}\4_\4\SE{}_\|\,\|_\*\V{cp}_==\S{}\4\2t\4\SE{})}}
\L{\LB{}\Tab{8}{____\*\V{cp}++_=_\S{}\4\20\4\SE{};}}
\L{\LB{}\Tab{8}{_\K{if}_(\*\V{cp})}}
\L{\LB{}\Tab{8}{____\*\V{cpp}++_=_\V{cp};}}
\L{\LB{}\Tab{8}{_\K{while}_(\*\V{cp}_!=_\S{}\4_\4\SE{}_\&\&_\*\V{cp}__!=_\S{}\4\2t\4\SE{}_\&\&_\*\V{cp})}}
\L{\LB{}\Tab{8}{____\V{cp}++;}}
\L{\LB{______\}}}
\L{\LB{______\*\V{cpp}_=_\V{NULL};}}
\L{\LB{___\}}}
\L{\LB{}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_prcbeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3pb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_noproc}_=_\V{convexp}(\V{tgetstr}(\S{}\3np\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_combeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3cb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_comend}_=_\V{convexp}(\V{tgetstr}(\S{}\3ce\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_acmbeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3ab\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_acmend}_=_\V{convexp}(\V{tgetstr}(\S{}\3ae\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_strbeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3sb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_strend}_=_\V{convexp}(\V{tgetstr}(\S{}\3se\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_blkbeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3bb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_blkend}_=_\V{convexp}(\V{tgetstr}(\S{}\3be\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_chrbeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3lb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_chrend}_=_\V{convexp}(\V{tgetstr}(\S{}\3le\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{s\_cdebeg};__\V{l\_cdebeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3zb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_cdeend}_=_\V{convexp}(\V{tgetstr}(\S{}\3ze\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_texbeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3tb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_texend}_=_\V{convexp}(\V{tgetstr}(\S{}\3te\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_txmbeg}_=_\V{convexp}(\V{tgetstr}(\S{}\3mb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_txmend}_=_\V{convexp}(\V{tgetstr}(\S{}\3me\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_tt\_beg}_=_\V{convexp}(\V{tgetstr}(\S{}\3vb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_tt\_end}_=_\V{convexp}(\V{tgetstr}(\S{}\3ve\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{l\_record}_=_\V{convexp}(\V{tgetstr}(\S{}\3rb\3\SE{},_\&\V{p}));}}
\L{\LB{___\V{p}_=_\V{buf};__\V{cp}_______=_________\V{tgetstr}(\S{}\3id\3\SE{},_\&\V{p})_;}}
\L{\LB{___\K{if}_(\V{cp})}}
\L{\LB{___\{}}
\L{\LB{_____\V{l\_id}_=_(\K{char}\*)\V{malloc}(\V{strlen}(\V{cp}));}}
\L{\LB{_____\V{strcpy}(\V{l\_id},_\V{cp});}}
\L{\LB{___\}}}
\L{\LB{___\K{else}____\V{l\_id}_=_\S{}\3\_\3\SE{};}}
\L{\LB{}}
\L{\LB{___\V{l\_tt}_=_\V{convexp}(\S{}\3\2\2\|\3\SE{});}}
\L{\LB{___\V{l\_at}_=_\V{convexp}(\S{}\3@\3\SE{});}}
\L{\LB{___\V{l\_pc}_=_\V{convexp}(\S{}\3\%\3\SE{});}}
\L{\LB{}}
\L{\LB{___\V{l\_escape}_=_\S{}\4\2\2\4\SE{};}}
\L{\LB{___\C{}\1\*_abuse_of_l\_onecase_\*\1\CE{}}}
\L{\LB{___\V{l\_onecase}_=_\V{tgetflag}(\S{}\3cf\3\SE{});}}
\L{\LB{___\V{isproc}_=_\V{l\_onecase}_?_\V{isprocC}_:_\V{isprocNorm};}}
\L{\LB{}}
\L{\LB{___\V{l\_onecase}_=_\V{tgetflag}(\S{}\3oc\3\SE{});}}
\L{\LB{___\V{re\_strncmp}_=_\V{l\_onecase}_?_\V{lc\_strncmp}_:_\V{strncmp};}}
\L{\LB{___\V{l\_toplex}_=_\V{tgetflag}(\S{}\3tl\3\SE{});}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Write_out_a_formatted_line_of_program_text}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{putScp}\K{void}_\V{putScp}(\K{char}_\*\V{os})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{s}_=_\V{os};_\C{}\1\*_pointer_to_unmatched_string_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{char}_\*\V{s1};}\Tab{24}{\C{}\1\*_temp._string_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{comptr};}\Tab{24}{\C{}\1\*_start_of_a_comment_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{comendptr};}\Tab{24}{\C{}\1\*_end_of_a_comment_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{acmptr};}\Tab{24}{\C{}\1\*_start_of_an_alt._comment_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{acmendptr};}\Tab{24}{\C{}\1\*_end_of_an_alt._comment_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{strptr};}\Tab{24}{\C{}\1\*_start_of_a_string_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{strendptr};}\Tab{24}{\C{}\1\*_end_of_a_string_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{chrptr};}\Tab{24}{\C{}\1\*_start_of_a_char._const_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{chrendptr};}\Tab{24}{\C{}\1\*_end_of_a_char._const_delimiter_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{cdeptr};}\Tab{24}{\C{}\1\*_start_of_prog_text_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{cdeendptr};}\Tab{24}{\C{}\1\*_end_of_prog_text_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{cdbptr};}\Tab{24}{\C{}\1\*_start_of_prog_text_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{cdbendptr};}\Tab{24}{\C{}\1\*_end_of_prog_text_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{texptr};}\Tab{24}{\C{}\1\*_start_of_{\TeX}_text_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{texendptr};}\Tab{24}{\C{}\1\*_end_of_{\TeX}_text_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{txmptr};}\Tab{24}{\C{}\1\*_start_of_{\TeX}_math_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{txmendptr};}\Tab{24}{\C{}\1\*_end_of_{\TeX}_math_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{tt\_ptr};}\Tab{24}{\C{}\1\*_start_of_typewriter_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{tt\_endptr};}\Tab{24}{\C{}\1\*_end_of_typewriter_delim_within_a_comment_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{blksptr};}\Tab{24}{\C{}\1\*_start_of_a_lexical_block_start_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{blksendptr};}\Tab{24}{\C{}\1\*_end_of_a_lexical_block_start_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{recsptr};}\Tab{24}{\C{}\1\*_start_of_a_lexical_block_outside_functions_start_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{recsendptr};}\Tab{24}{\C{}\1\*_end_of_a_lexical_block_outside_functions_start_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{blkeptr};}\Tab{24}{\C{}\1\*_start_of_a_lexical_block_end_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{blkeendptr};}\Tab{24}{\C{}\1\*_end_of_a_lexical_block_end_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{___\V{\_sstart}_=_\V{os};_}\Tab{24}{\C{}\1\*_remember_the_start_for_\CE{}\V{expmatch}()\C{}_\*\1\CE{}}}
\L{\LB{___\V{\_escaped}_=_\V{FALSE};}}
\L{\LB{___\K{if}_(\V{nokeyw}_\|\,\|_\V{incomm}_\|\,\|_\V{instr})}}
\L{\LB{______\K{goto}_\V{skip};}}
\L{\LB{___\K{if}_((\*\V{isproc})(\V{s})_\&\&_\V{reclevel}_==_\N{0})_\{}}
\L{\LB{______\V{printf}(\S{}\3\2\2Proc\{\3\SE{});}}
\L{\LB{______\K{if}_(\V{strlen}(\V{pname})\>\N{30})}}
\L{\LB{______\{}}
\L{\LB{_________\V{s1}=\V{pname}+\V{strlen}(\V{pname})\-\N{1};}}
\L{\LB{_________\K{while}_(\V{s1}\>\V{pname}_\&\&_(\V{isalnum}(\*\V{s1})_\|\,\|_\*\V{s1}==\S{}\4\_\4\SE{}))_\V{s1}\-\-;}}
\L{\LB{_________\K{if}_(\V{s1}!=\V{pname})_\V{strcpy}(\V{pname},_\V{s1}+\N{1});}}
\L{\LB{______\}}}
\L{\LB{______\K{if}_(\V{strlen}(\V{pname})\>\N{32})_\{_}}
\L{\LB{_________\V{strcpy}(\V{pname},_\V{pname}+\V{strlen}(\V{pname})\-\N{28});}}
\L{\LB{_________\V{printf}(\S{}\3\2\2dots_\3\SE{});_\}}}
\L{\LB{______\V{putstr}(\V{pname});}}
\L{\LB{______\V{printf}(\S{}\3\}\3\SE{});}}
\L{\LB{______\K{if}_(!\V{embed}_\&\&_\V{psptr}_\<_\V{PSMAX}\-\N{1})_\{}}
\L{\LB{}\Tab{8}{_++\V{psptr};}}
\L{\LB{}\Tab{8}{_\V{strncpy}(\V{pstack}[\V{psptr}],_\V{pname},_\V{PNAMELEN});}}
\L{\LB{}\Tab{8}{_\V{pstack}[\V{psptr}][\V{PNAMELEN}]_=_\S{}\4\20\4\SE{};}}
\L{\LB{}\Tab{8}{_\V{plstack}[\V{psptr}]_=_\V{blklevel};}}
\L{\LB{______\}}}
\L{\LB{___\}}}
\L{\LB{_\V{skip}:}}
\L{\LB{___\K{do}_\{}}
\L{\LB{______\C{}\1\*_check_for_string,_comment,_blockstart,_etc_\*\1\CE{}}}
\L{\LB{______\K{if}_(!\V{incomm}_\&\&_!\V{instr}_\&\&_!\V{inchr})_\{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\V{blkeendptr}_=_\V{expmatch}(\V{s},_\V{l\_blkend},_\&\V{blkeptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{blksendptr}_=_\V{expmatch}(\V{s},_\V{l\_blkbeg},_\&\V{blksptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{recsendptr}_=_\V{expmatch}(\V{s},_\V{l\_record},_\&\V{recsptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{comendptr}_=__\V{expmatch}(\V{s},_\V{l\_combeg},_\&\V{comptr},__(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{acmendptr}_=__\V{expmatch}(\V{s},_\V{l\_acmbeg},_\&\V{acmptr},__(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{strendptr}_=__\V{expmatch}(\V{s},_\V{l\_strbeg},_\&\V{strptr},__(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{chrendptr}_=__\V{expmatch}(\V{s},_\V{l\_chrbeg},_\&\V{chrptr},__(\K{char}_\*)_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_check_for_end_of_program_text_in_comment_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{incode}_!=_\V{NOTCODE})_\{}}
\L{\LB{}\Tab{8}{____\V{cdeendptr}_=_\V{expmatch}(\V{s},_\V{l\_cdeend},_\&\V{cdeptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\K{if}_((\V{cdeptr}_==_\V{NULL}_\&\&_(\V{comptr}_!=_\V{NULL}_\|\,\|_\V{acmptr}_!=_\V{NULL}))}}
\L{\LB{}\Tab{16}{\|\,\|_(\V{cdeptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{16}{____\&\&_((\V{comptr}_!=_\V{NULL}_\&\&_\V{comptr}_\<_\V{cdeptr})}}
\L{\LB{}\Tab{24}{\|\,\|_((\V{acmptr}_!=_\V{NULL}_\&\&_\V{acmptr}_\<_\V{cdeptr})))))_\{}}
\L{\LB{}\Tab{8}{_______\V{fprintf}(\V{stderr},_\S{}\3Comments_may_not_be_nested_within\2}}
\L{\LB{_program_text_within_comments_in_file_\%s_at\2}}
\L{\LB{_line_\%d\2n\3\SE{},_\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{8}{_______\V{s}_=_(\V{comptr}_!=_\V{NULL})_?_\V{comptr}_:_\V{acmptr};}}
\L{\LB{}\Tab{8}{_______\V{incode}_=_\V{NOTCODE};}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\C{}\1\*_look_to_see_if_there\4s_a_\2\<zb\>_in_the_program_text_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{cdbendptr}_=_\V{expmatch}(\V{s},_\V{l\_cdebeg},_\&\V{cdbptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{cdeptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{16}{\&\&_(\V{strptr}__==_\V{NULL}_\|\,\|_\V{cdbptr}_\<_\V{strptr})}}
\L{\LB{}\Tab{16}{\&\&_(\V{chrptr}__==_\V{NULL}_\|\,\|_\V{cdbptr}_\<_\V{chrptr})}}
\L{\LB{}\Tab{16}{\&\&_(\V{blksptr}_==_\V{NULL}_\|\,\|_\V{cdbptr}_\<_\V{blksptr})}}
\L{\LB{}\Tab{16}{\&\&_(\V{recsptr}_==_\V{NULL}_\|\,\|_\V{cdbptr}_\<_\V{recsptr})}}
\L{\LB{}\Tab{16}{\&\&_(\V{blkeptr}_==_\V{NULL}_\|\,\|_\V{cdbptr}_\<_\V{blkeptr}))_\{}}
\L{\LB{}\Tab{8}{_______\K{if}_(\V{cdbptr}_\>_\V{s}_\&\&_\V{cdbptr}[\-\N{1}]_==_\V{l\_escape})_\{}}
\L{\LB{}\Tab{16}{__\V{putKcp}(\V{s},_\V{cdbptr}\-\N{2},_\V{FALSE});}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2C\{\}\3\SE{});}}
\L{\LB{}\Tab{16}{__\V{putKcp}(\V{s\_cdebeg},_\V{s\_cdebeg}_+_\V{strlen}(\V{s\_cdebeg})_\-_\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2CE\{\}\3\SE{});}}
\L{\LB{}\Tab{16}{__\V{s}_=_\V{cdbendptr};}}
\L{\LB{}\Tab{16}{__\V{incode}_=_\V{OTHERCODE};}}
\L{\LB{}\Tab{16}{__\K{continue};}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\V{comendptr}_=}}
\L{\LB{}\Tab{8}{_______\V{expmatch}(\V{s},_(\V{comtype}_==_\V{STANDARD})_?_\V{l\_comend}_:_\V{l\_acmend},}}
\L{\LB{}\Tab{24}{\&\V{comptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\K{if}_((\V{cdeptr}_==_\V{NULL}_\&\&_\V{comptr}_!=_\V{NULL})}}
\L{\LB{}\Tab{16}{\|\,\|_(\V{cdeptr}_!=_\V{NULL}_\&\&_(\V{comptr}_!=_\V{NULL}_\&\&_\V{comptr}_\<_\V{cdeptr})))_\{}}
\L{\LB{}\Tab{8}{_______\V{fprintf}(\V{stderr},_\S{}\3Unterminated_program_text_within_comment\2}}
\L{\LB{_in_file_\%s_at_line_\%d\2n\3\SE{},_\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{8}{_______\V{printf}(\S{}\3\2\2C\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{_______\V{s}_=_\V{comptr};}}
\L{\LB{}\Tab{8}{_______\V{incode}_=_\V{NOTCODE};_\V{incomm}_=_\V{TRUE};}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{cdeendptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{_______\K{if}_((\V{strptr}__==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{strptr})}}
\L{\LB{}\Tab{16}{___\&\&_(\V{chrptr}__==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{chrptr})}}
\L{\LB{}\Tab{16}{___\&\&_(\V{blksptr}_==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{blksptr})}}
\L{\LB{}\Tab{16}{___\&\&_(\V{recsptr}_==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{recsptr})}}
\L{\LB{}\Tab{16}{___\&\&_(\V{blkeptr}_==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{blkeptr}))_\{}}
\L{\LB{}\Tab{16}{__\K{if}_(\V{incode}_==_\V{INITCODE}_\&\&_\V{cdeptr}_==_\V{s})_\{}}
\L{\LB{}\Tab{16}{_____\V{printf}(\S{}\3\2\2C\{\}\3\SE{});}}
\L{\LB{}\Tab{16}{_____\V{putKcp}(\V{s\_cdebeg},_\V{s\_cdebeg}_+_\V{strlen}(\V{s\_cdebeg})_\-_\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{16}{__\}_\K{else}_\{}}
\L{\LB{}\Tab{16}{_____\V{putKcp}(\V{s},_\V{cdeptr}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{16}{_____\V{printf}(\S{}\3\2\2C\{\}\3\SE{});}}
\L{\LB{}\Tab{16}{__\}}}
\L{\LB{}\Tab{16}{__\V{s}_=_\V{cdeendptr};}}
\L{\LB{}\Tab{16}{__\V{incode}_=_\V{NOTCODE};_\V{incomm}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{__\K{continue};}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\V{strptr}_==_\V{NULL}_\&\&_\V{chrptr}_==_\V{NULL}}}
\L{\LB{}\Tab{16}{_______\&\&_\V{blksptr}_==_\V{NULL}_\&\&_\V{recsptr}_==_\V{NULL}_}}
\L{\LB{}\Tab{16}{_______\&\&_\V{blkeptr}_==_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{_______\V{cdeptr}_=_\V{s};}}
\L{\LB{}\Tab{8}{_______\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{}\Tab{8}{_______\V{putKcp}(\V{cdeptr},_\V{s}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{_______\V{incode}_=_\V{OTHERCODE};}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}_\C{}\1\*_else_there_is_a_string\1char\1block_on_this_line_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\V{incode}_=_\V{OTHERCODE};}}
\L{\LB{}\Tab{8}{_\}_\C{}\1\*_\CE{}\K{if}_(\V{incode})\C{}_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_start_of_a_comment?_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{comptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{strptr}__==_\V{NULL}_\|\,\|_\V{comptr}_\<_\V{strptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{acmptr}__==_\V{NULL}_\|\,\|_\V{comptr}_\<_\V{acmptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{chrptr}__==_\V{NULL}_\|\,\|_\V{comptr}_\<_\V{chrptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blksptr}_==_\V{NULL}_\|\,\|_\V{comptr}_\<_\V{blksptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{recsptr}_==_\V{NULL}_\|\,\|_\V{comptr}_\<_\V{recsptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blkeptr}_==_\V{NULL}_\|\,\|_\V{comptr}_\<_\V{blkeptr}))_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{comptr}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{printf}(\S{}\3\2\2C\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{comendptr};}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{comptr},_\V{comendptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{____\V{incomm}_=_\V{TRUE};}}
\L{\LB{}\Tab{8}{____\V{comtype}_=_\V{STANDARD};}}
\L{\LB{}\Tab{8}{____\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_start_of_an_alternate-form_comment?_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{acmptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{strptr}__==_\V{NULL}_\|\,\|_\V{acmptr}_\<_\V{strptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{chrptr}__==_\V{NULL}_\|\,\|_\V{acmptr}_\<_\V{chrptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blksptr}_==_\V{NULL}_\|\,\|_\V{acmptr}_\<_\V{blksptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{recsptr}_==_\V{NULL}_\|\,\|_\V{acmptr}_\<_\V{recsptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blkeptr}_==_\V{NULL}_\|\,\|_\V{acmptr}_\<_\V{blkeptr}))_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{acmptr}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{printf}(\S{}\3\2\2C\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{acmendptr};}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{acmptr},_\V{acmendptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{____\V{incomm}_=_\V{TRUE};}}
\L{\LB{}\Tab{8}{____\V{comtype}_=_\V{ALTERNATE};}}
\L{\LB{}\Tab{8}{____\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_start_of_a_string?_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{strptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{chrptr}__==_\V{NULL}_\|\,\|_\V{strptr}_\<_\V{chrptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blksptr}_==_\V{NULL}_\|\,\|_\V{strptr}_\<_\V{blksptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{recsptr}_==_\V{NULL}_\|\,\|_\V{strptr}_\<_\V{recsptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blkeptr}_==_\V{NULL}_\|\,\|_\V{strptr}_\<_\V{blkeptr}))_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{strptr}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{printf}(\S{}\3\2\2S\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{strendptr};}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{strptr},_\V{strendptr}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{instr}_=_\V{TRUE};}}
\L{\LB{}\Tab{8}{____\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_start_of_a_character_string?_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{chrptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blksptr}_==_\V{NULL}_\|\,\|_\V{chrptr}_\<_\V{blksptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{recsptr}_==_\V{NULL}_\|\,\|_\V{chrptr}_\<_\V{recsptr})}}
\L{\LB{}\Tab{8}{_____\&\&_(\V{blkeptr}_==_\V{NULL}_\|\,\|_\V{chrptr}_\<_\V{blkeptr}))_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{chrptr}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{printf}(\S{}\3\2\2S\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{chrendptr};}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{chrptr},_\V{chrendptr}\-\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{inchr}_=_\V{TRUE};}}
\L{\LB{}\Tab{8}{____\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_end_of_a_lexical_block_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{blkeptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\K{if}_((\V{blksptr}_==_\V{NULL}_\|\,\|_\V{blkeptr}_\<_\V{blksptr})_\&\&}}
\L{\LB{}\Tab{8}{________(\V{recsptr}_==_\V{NULL}_\|\,\|_\V{blkeptr}_\<_\V{recsptr}))_\{}}
\L{\LB{}\Tab{8}{_______\V{putKcp}(\V{s},_\V{blkeendptr}_\-_\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{_______\V{s}_=_\V{blkeendptr};}}
\L{\LB{}\Tab{8}{_______\V{blklevel}\-\-;}}
\L{\LB{}\Tab{8}{_______\K{if}_(\V{reclevel})_\V{reclevel}\-\-;}}
\L{\LB{}\Tab{8}{_______\K{else}_\K{if}_(\V{psptr}_\>=_\N{0}_\&\&_\V{plstack}[\V{psptr}]_\>=_\V{blklevel})_\{}}
\L{\LB{}}
\L{\LB{}\Tab{16}{__\C{}\1\*_end_of_current_procedure_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\V{blklevel}_=_\V{plstack}[\V{psptr}];}}
\L{\LB{}}
\L{\LB{}\Tab{16}{__\C{}\1\*_see_if_we_should_print_the_last_proc_name_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\K{if}_(\-\-\V{psptr}_\>=_\N{0})}}
\L{\LB{}\Tab{16}{_____\V{prccont}_=_\V{TRUE};}}
\L{\LB{}\Tab{16}{__\K{else}}}
\L{\LB{}\Tab{16}{_____\V{psptr}_=_\-\N{1};}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_start_of_a_lexical_block_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{blksptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{blksendptr}_\-_\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{blksendptr};}}
\L{\LB{}\Tab{8}{____\V{blklevel}++;}}
\L{\LB{}\Tab{8}{____\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_start_of_a_lexical_block_outside_functions_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{recsptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{recsendptr}_\-_\N{1},_\V{FALSE});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{recsendptr};}}
\L{\LB{}\Tab{8}{____\V{blklevel}++;}}
\L{\LB{}\Tab{8}{____\V{reclevel}++;}}
\L{\LB{}\Tab{8}{____\K{continue};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_check_for_end_of_comment_\*\1\CE{}}}
\L{\LB{______\}_\K{else}_\K{if}_(\V{incomm})_\{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\V{cdeendptr}_=_\V{expmatch}(\V{s},_\V{l\_cdebeg},_\&\V{cdeptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{texendptr}_=_\V{expmatch}(\V{s},_\V{l\_texbeg},_\&\V{texptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{txmendptr}_=_\V{expmatch}(\V{s},_\V{l\_txmbeg},_\&\V{txmptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}\Tab{8}{_\V{tt\_endptr}_=_\V{expmatch}(\V{s},_\V{l\_tt\_beg},_\&\V{tt\_ptr},_(\K{char}_\*)_\V{NULL});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{code\_cmnts})_\{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\C{}\1\*_Check_for_program_text_within_comment_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{cdeptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{16}{\&\&_(\V{texptr}_==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{texptr})}}
\L{\LB{}\Tab{16}{\&\&_(\V{tt\_ptr}_==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{tt\_ptr})}}
\L{\LB{}\Tab{16}{\&\&_(\V{txmptr}_==_\V{NULL}_\|\,\|_\V{cdeptr}_\<_\V{txmptr}))_\{}}
\L{\LB{}\Tab{8}{_______\V{putKcp}(\V{s},_\V{cdeptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{_______\V{printf}(\S{}\3\2\2CE\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{_______\V{s}_=_\V{cdeendptr};}}
\L{\LB{}\Tab{8}{_______\V{incode}_=_\V{INITCODE};_\V{incomm}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\C{}\1\*_Check_for_{\TeX}_text_within_comment_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{texptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{16}{\&\&_(\V{tt\_ptr}_==_\V{NULL}_\|\,\|_\V{texptr}_\<_\V{tt\_ptr})}}
\L{\LB{}\Tab{16}{\&\&_(\V{txmptr}_==_\V{NULL}_\|\,\|_\V{texptr}_\<_\V{txmptr}))_\{}}
\L{\LB{}\Tab{8}{_______\V{putKcp}(\V{s},_\V{texptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{_______\V{s}_=_\V{texendptr};}}
\L{\LB{}\Tab{8}{_______\K{if}_((\V{texendptr}_=}}
\L{\LB{}\Tab{16}{____\V{expmatch}(\V{s},_\V{l\_texend},_\&\V{texptr},_(\K{char}_\*)_\V{NULL}))_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{16}{__\V{putchar}(\S{}\4\{\4\SE{});_\V{putVcp}(\V{s},_\V{texptr}\-\N{1});_\V{putchar}(\S{}\4\}\4\SE{});}}
\L{\LB{}\Tab{16}{__\V{s}_=_\V{texendptr};}}
\L{\LB{}\Tab{8}{_______\}_\K{else}_\{}}
\L{\LB{}\Tab{16}{__\V{fprintf}(\V{stderr},_\S{}\3LaTeX_text_within_a_comment_must_all_be\2}}
\L{\LB{_on_one_line_(file_\%s_at_line_\%d)\2n\3\SE{},_\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{16}{__\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\C{}\1\*_Check_for_typewriter_text_within_comment_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{tt\_ptr}_!=_\V{NULL}}}
\L{\LB{}\Tab{16}{\&\&_(\V{txmptr}_==_\V{NULL}_\|\,\|_\V{tt\_ptr}_\<_\V{txmptr}))_\{}}
\L{\LB{}\Tab{8}{_______\V{putKcp}(\V{s},_\V{tt\_ptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{_______\V{s}_=_\V{tt\_endptr};}}
\L{\LB{}\Tab{8}{_______\K{if}_((\V{tt\_endptr}_=}}
\L{\LB{}\Tab{16}{____\V{expmatch}(\V{s},_\V{l\_tt\_end},_\&\V{tt\_ptr},_(\K{char}_\*)_\V{NULL}))_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\2\2texttt\{\3\SE{});}}
\L{\LB{}\Tab{16}{__\V{putKcp}(\V{s},_\V{tt\_ptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{16}{__\V{printf}(\S{}\3\}\3\SE{});}}
\L{\LB{}\Tab{16}{__\V{s}_=_\V{tt\_endptr};}}
\L{\LB{}\Tab{8}{_______\}_\K{else}_\{}}
\L{\LB{}\Tab{16}{__\V{fprintf}(\V{stderr},_\S{}\3typewriter_text_within_a_comment_must_all\2}}
\L{\LB{_be_on_one_line_(file_\%s_at_line_\%d)\2n\2t\%s\3\SE{},}}
\L{\LB{}\Tab{24}{____\V{fname},_\V{lineno},_\V{s});}}
\L{\LB{}\Tab{16}{__\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\C{}\1\*_Check_for_{\TeX}_math_within_comment_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{txmptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{_______\V{putKcp}(\V{s},_\V{txmptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{_______\V{s}_=_\V{txmendptr};}}
\L{\LB{}\Tab{8}{_______\K{if}_((\V{txmendptr}_=}}
\L{\LB{}\Tab{16}{____\V{expmatch}(\V{s},_\V{l\_txmend},_\&\V{txmptr},_(\K{char}_\*)_\V{NULL}))_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{16}{__\V{putchar}(\S{}\4\$\4\SE{});_\V{putVcp}(\V{s},_\V{txmptr}\-\N{1});_\V{putchar}(\S{}\4\$\4\SE{});}}
\L{\LB{}\Tab{16}{__\V{s}_=_\V{txmendptr};}}
\L{\LB{}\Tab{8}{_______\}_\K{else}_\{}}
\L{\LB{}\Tab{16}{__\V{fprintf}(\V{stderr},_\S{}\3TeX_math_within_a_comment_must_all_be\2}}
\L{\LB{_on_one_line_(file_\%s_at_line_\%d)\2n\3\SE{},_\V{fname},_\V{lineno});}}
\L{\LB{}\Tab{16}{__\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{_______\K{continue};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}\Tab{8}{_\}_\C{}\1\*_\CE{}\K{if}_(\V{code\_cmnts})\C{}_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\K{if}_((\V{comendptr}_=}}
\L{\LB{}\Tab{16}{\V{expmatch}(\V{s},_(\V{comtype}_==_\V{STANDARD})_?_\V{l\_comend}_:_\V{l\_acmend},}}
\L{\LB{}\Tab{24}{_(\K{char}_\*\*)_\V{NULL},_(\K{char}_\*)_\V{NULL}))_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{comendptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{comendptr};}}
\L{\LB{}\Tab{8}{____\V{incomm}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{____\V{printf}(\S{}\3\2\2CE\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{_\}_\K{else}_\{}}
\L{\LB{}\Tab{8}{____\V{comptr}_=_\V{s};}}
\L{\LB{}\Tab{8}{____\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{comptr},_\V{s}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_check_for_end_of_string_\*\1\CE{}}}
\L{\LB{______\}_\K{else}_\K{if}_(\V{instr})_\{}}
\L{\LB{}\Tab{8}{_\K{if}_((\V{strendptr}_=}}
\L{\LB{}\Tab{8}{______\V{expmatch}(\V{s},_\V{l\_strend},_(\K{char}_\*\*)_\V{NULL},_(\K{char}_\*)_\V{NULL}))_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{strendptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{strendptr};}}
\L{\LB{}\Tab{8}{____\V{instr}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{____\V{printf}(\S{}\3\2\2SE\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{_\}_\K{else}_\{}}
\L{\LB{}\Tab{8}{____\V{strptr}_=_\V{s};}}
\L{\LB{}\Tab{8}{____\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{strptr},_\V{s}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_check_for_end_of_character_string_\*\1\CE{}}}
\L{\LB{______\}_\K{else}_\K{if}_(\V{inchr})_\{}}
\L{\LB{}\Tab{8}{_\K{if}_((\V{chrendptr}_=}}
\L{\LB{}\Tab{8}{______\V{expmatch}(\V{s},_\V{l\_chrend},_(\K{char}_\*\*)_\V{NULL},_(\K{char}_\*)_\V{NULL}))_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{s},_\V{chrendptr}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{____\V{s}_=_\V{chrendptr};}}
\L{\LB{}\Tab{8}{____\V{inchr}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{____\V{printf}(\S{}\3\2\2SE\{\}\3\SE{});}}
\L{\LB{}\Tab{8}{_\}_\K{else}_\{}}
\L{\LB{}\Tab{8}{____\V{chrptr}_=_\V{s};}}
\L{\LB{}\Tab{8}{____\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{}\Tab{8}{____\V{putKcp}(\V{chrptr},_\V{s}\-\N{1},_\V{TRUE});}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{______\}}}
\L{\LB{}}
\L{\LB{______\C{}\1\*_print_out_the_line_\*\1\CE{}}}
\L{\LB{______\V{chrptr}_=_\V{s};}}
\L{\LB{______\V{s}_+=_\V{strlen}(\V{s});}}
\L{\LB{______\V{putKcp}(\V{chrptr},_\V{s}\-\N{1},_\V{FALSE});}}
\L{\LB{}}
\L{\LB{___\}_\K{while}_(\*\V{s});}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Output_a_{\LaTeX}_command_to_tab_to_column_\3col\3_(see_the_documentation}}
\L{\LB{_\*_for_a_partial_explanation_of_the_bizarre_brace_arrangement).}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{tabto}(\V{col})_\V{printf}(\S{}\3\}\2\2Tab\{\%d\}\{\3\SE{},_\V{col});}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_\CE{}\V{islidchr}()\C{}_is_\CE{}\V{TRUE}\C{}_for_things_that_can_begin_identifiers;}}
\L{\LB{_\*_\CE{}\V{isidchr}\C{}_is_\CE{}\V{TRUE}\C{}_of_identifier_constituents.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{islidchr}(\V{c})(((\V{isalpha}(\V{c})_\|\,\|_(\V{strchr}(\V{l\_id},_\V{c})))_\&\&_\V{c}!=\N{0}))}}
\L{\LB{\K{\#define}_\V{isidchr}(\V{c})(((\V{isalnum}(\V{c})_\|\,\|_(\V{strchr}(\V{l\_id},_\V{c})))_\&\&_\V{c}!=\N{0}))_}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Get_the_identifier_starting_at_\CE{}\V{s}\C{}.}\Tab{40}{It_is_assumed_that_\CE{}\V{s}\C{}_may_indeed}}
\L{\LB{_\*_start_an_identifier.__Value_is_$>0$_for_a_keyword_---_the_count_of}}
\L{\LB{_\*_characters_in_the_keyword_---_and_$<0$_if_not_a_keyword,_in_which}}
\L{\LB{_\*_case_the_value_returned_is_the_negative_of_the_number_of_bytes_in}}
\L{\LB{_\*_the_matched_identifier.}}
\L{\LB{_\*}}
\L{\LB{_\*_This_function_checks_\CE{}\V{nokeyw}\C{}_and_won\4t_check_to_see_if_the}}
\L{\LB{_\*_identifier_found_is_a_keyword_if_it_is_\CE{}\V{TRUE}\C{}.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{getid}\K{int}_\V{getid}(\K{char}_\*\V{s})}}
\L{\LB{\{}}
\L{\LB{___\K{char}_\*\*\V{ss}}\Tab{16}{=_\V{l\_keywds};}}
\L{\LB{___\K{int}}\Tab{8}{\V{i}}\Tab{16}{=_\N{1};}}
\L{\LB{___\K{char}_\*\V{cp}}\Tab{16}{=_\V{s};}}
\L{\LB{___\K{int}}\Tab{8}{\V{firstc}}\Tab{16}{=_\*\V{s};}}
\L{\LB{}}
\L{\LB{___\K{while}_(++\V{cp},_\V{isidchr}(\*\V{cp}))}}
\L{\LB{______\V{i}++;}}
\L{\LB{___\K{if}_(\V{nokeyw})}}
\L{\LB{______\K{return}_\-\V{i};}}
\L{\LB{___\K{while}_((\V{cp}_=_\*\V{ss}++)_!=_\S{}\4\20\4\SE{})_\{}}
\L{\LB{______\K{if}_(!\V{l\_onecase}_\&\&_\V{firstc}_!=_\*\V{cp})}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{______\K{if}_((\*\V{re\_strncmp})(\V{s},_\V{cp},_\V{i})_==_\N{0}_\&\&_!\V{isidchr}(\V{cp}[\V{i}]))}}
\L{\LB{}\Tab{8}{_\K{return}_\V{i};}}
\L{\LB{___\}}}
\L{\LB{___\K{return}_\-\V{i};}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Calculate_the_width_of_a_string,_including_tabs}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{width}\K{int}_\V{width}(\K{register}_\K{char}_\*\V{s},_\K{register}_\K{char}_\*\V{os})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{int}_\V{i}_=_\N{0},_\V{c};}}
\L{\LB{}}
\L{\LB{___\K{while}_(\V{s}_\<_\V{os})_\{}}
\L{\LB{______\V{c}_=_\*\V{s}++;}}
\L{\LB{______\K{if}_(\V{c}_==_\S{}\4\2t\4\SE{})_\{}}
\L{\LB{}\Tab{8}{_\C{}\1\*_i_=_(i_+_8)_\&\~_7;_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\V{i}_=_(\V{i}_+_\V{TabWidth})_\&\~_(\V{TabWidth}\-\N{1});}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{______\}}}
\L{\LB{______\K{if}_(\V{c}_\<_\S{}\4_\4\SE{})}}
\L{\LB{}\Tab{8}{_\V{i}_+=_\N{2};}}
\L{\LB{______\K{else}}}
\L{\LB{}\Tab{8}{_\V{i}++;}}
\L{\LB{___\}}}
\L{\LB{___\K{return}_\V{i};}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Write_out_a_portion_of_the_line}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{putKcp}\K{void}_\V{putKcp}(\K{char}_\*\V{start},_\K{char}_\*\V{end},_\V{boolean}_\V{nix})}}
\L{\LB{\C{}\1\*_start_}\Tab{16}{Start_of_string_to_write}}
\L{\LB{___end}\Tab{16}{End_of_string_to_write}}
\L{\LB{___nix}\Tab{16}{Don\4t_look_for_identifiers,_numbers_\*\1\CE{}}}
\L{\LB{\{}}
\L{\LB{___\K{int}_\V{i},_\V{c};}}
\L{\LB{}}
\L{\LB{___\K{while}_(\V{start}_\<=_\V{end})_\{}}
\L{\LB{______\V{c}_=_\*\V{start}++;}}
\L{\LB{______\C{}\1\*}}
\L{\LB{_______\*_take_care_of_nice_tab_stops}}
\L{\LB{_______\*\1\CE{}}}
\L{\LB{______\K{if}_(\V{c}_==_\S{}\4\2t\4\SE{})_\{}}
\L{\LB{}\Tab{8}{_\K{while}_(\V{start}_\<=_\V{end}_\&\&_\*\V{start}_==_\S{}\4\2t\4\SE{})}}
\L{\LB{}\Tab{8}{____\V{start}++;}}
\L{\LB{}\Tab{8}{_\V{tabto}(\V{width}(\V{\_sstart},_\V{start}));}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{______\}}}
\L{\LB{}}
\L{\LB{______\C{}\1\*}}
\L{\LB{_______\*_First_split_off_numbers.__We_have_a_rather_ad_hoc}}
\L{\LB{_______\*_definition:__A_number_is_a_digit_followed_by_any_number}}
\L{\LB{_______\*_of_digits_or_letters,_and_periods.}}
\L{\LB{_______\*_(Additionally_a_number_can_start_with_\texttt{\$}_(e.g._hex_numbers).)}}
\L{\LB{_______\*_This_produces_meaningless_parses_---_$.2$_is_parsed_as_\texttt{.}}}
\L{\LB{_______\*_followed_by_the_number_\texttt{2}_---_but_should_produce_decent}}
\L{\LB{_______\*_results_for_most_languages_(outside_of_maybe_FORTRAN_and_DCL).}}
\L{\LB{_______\*\1\CE{}}}
\L{\LB{______\K{if}_(!\V{nix})_\{}}
\L{\LB{}\Tab{16}{_\K{if}_(\V{c}_==_\S{}\4\#\4\SE{}_\|\,\|_\V{islidchr}(\V{c}))_\{}}
\L{\LB{}\Tab{16}{____\V{i}_=_\V{getid}(\-\-\V{start});}}
\L{\LB{}\Tab{16}{____\K{if}_(\V{i}_\>_\N{0})}}
\L{\LB{}\Tab{16}{_______\V{printf}(\S{}\3\2\2K\{\3\SE{});}}
\L{\LB{}\Tab{16}{____\K{else}_\{}}
\L{\LB{}\Tab{16}{_______\V{printf}(\S{}\3\2\2V\{\3\SE{});}}
\L{\LB{}\Tab{16}{_______\V{i}_=_\-\V{i};}}
\L{\LB{}\Tab{16}{____\}}}
\L{\LB{}\Tab{16}{____\K{while}_(\-\-\V{i}_\>=_\N{0})_\{}}
\L{\LB{}\Tab{16}{_______\V{c}_=_\*\V{start}++;}}
\L{\LB{}\Tab{16}{_______\V{outchar}(\V{c});}}
\L{\LB{}\Tab{16}{____\}}}
\L{\LB{}\Tab{8}{____}\Tab{16}{\V{putchar}(\S{}\4\}\4\SE{});}}
\L{\LB{}\Tab{16}{____\K{continue};}}
\L{\LB{}\Tab{16}{_\}}}
\L{\LB{}\Tab{16}{_\K{else}_\K{if}_(\V{isdigit}(\V{c})_\|\,\|_\V{c}_==_\S{}\4\$\4\SE{})_\{}}
\L{\LB{}\Tab{16}{____\V{printf}(\S{}\3\2\2N\{\3\SE{});}}
\L{\LB{}\Tab{16}{____\K{do}_\{}}
\L{\LB{}\Tab{16}{_______\K{if}_(\V{c}_==_\S{}\4l\4\SE{})}}
\L{\LB{}\Tab{32}{__\V{printf}(\S{}\3\$\2\2ell\$\3\SE{});}}
\L{\LB{}\Tab{16}{_______\K{else}}}
\L{\LB{}\Tab{32}{__\V{outchar}(\V{c});}}
\L{\LB{}\Tab{16}{_______\V{c}_=_\*\V{start}++;}}
\L{\LB{}\Tab{16}{____\}_\K{while}_(\V{isalnum}(\V{c})_\|\,\|_\V{c}_==_\S{}\4.\4\SE{});}}
\L{\LB{}\Tab{16}{____\V{putchar}(\S{}\4\}\4\SE{});}}
\L{\LB{}\Tab{16}{____\V{start}\-\-;}}
\L{\LB{}\Tab{16}{____\K{continue};}}
\L{\LB{}\Tab{16}{_\}}}
\L{\LB{______\}}}
\L{\LB{______\V{outchar}(\V{c});}}
\L{\LB{___\}}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Write_out_a_portion_of_the_line_verbatim}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{putVcp}\K{void}_\V{putVcp}(\K{char}_\*\V{start},_\K{char}_\*\V{end})}}
\L{\LB{\C{}\1\*_start_}\Tab{16}{Start_of_string_to_write}}
\L{\LB{___end}\Tab{16}{End_of_string_to_write_\*\1\CE{}}}
\L{\LB{\{}}
\L{\LB{___\K{for}_(_;_\V{start}_\<=_\V{end};_\V{start}++)_\{}}
\L{\LB{______\V{putchar}(\*\V{start});}}
\L{\LB{___\}}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Output_a_string,_escaping_special_characters}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{putstr}\K{void}_\V{putstr}(\K{register}_\K{char}_\*\V{cp})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{int}_\V{c};}}
\L{\LB{}}
\L{\LB{___\K{if}_(\V{cp}_==_\V{NULL})}}
\L{\LB{______\K{return};}}
\L{\LB{___\K{while}_((\V{c}_=_\*\V{cp}++)_!=_\S{}\4\20\4\SE{})}}
\L{\LB{______\V{outchar}(\V{c});}}
\L{\LB{\}}}
\ProcCont{expmatch}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_The_following_table_converts_ASCII_characters_to_a_printed}}
\L{\LB{_\*_representation,_taking_care_of_all_the_{\LaTeX}_quoting.__N.B.:_all}}
\L{\LB{_\*_single-character_strings_are_assumed_to_be_equivalent_to_the}}
\L{\LB{_\*_character_for_that_index_(i.e.,_\CE{}\V{printtab}[\S{}\4c\4\SE{}]\C{}_can\4t_be_\CE{}\S{}\3f\3\SE{}\C{}).}}
\L{\LB{_\*_(This_is_purely_for_efficiency_hacking.)}}
\L{\LB{_\*}}
\L{\LB{_\*_Notes:}}
\L{\LB{_\*__Some_pairs_of_characters_are_handled_specially_within_\CE{}\V{outchar}()\C{};}}
\L{\LB{_\*__this_table_contains_no_indication_when_that_happens.}}
\L{\LB{_\*__\texttt{{`}}_is_output_as_\texttt{\{{`}\}}_to_avoid_various_ligatures,_such_as_\texttt{!{`}}.}}
\L{\LB{_\*__The_\texttt{\4\4}_and_\texttt{--}_(and_\texttt{---})_ligatures_are_not_a_problem}}
\L{\LB{_\*__because_those_characters_are_output_as_macros_anyway.__Using_\texttt{\{{`}\}}}}
\L{\LB{_\*__is_sufficient_since_nothing_we_put_out_will_ever_be_given_to_the}}
\L{\LB{_\*__hyphenation_algorithms_anyway.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{char}_\*\V{printtab}[\N{256}]_=_\{}}
\L{\LB{___\S{}\3\20x\3\SE{},___\S{}\3\2\2\5A\3\SE{},__\S{}\3\2\2\5B\3\SE{},__\S{}\3\2\2\5C\3\SE{},__\S{}\3\2\2\5D\3\SE{},__\S{}\3\2\2\5E\3\SE{},__\S{}\3\2\2\5F\3\SE{},__\S{}\3\2\2\5G\3\SE{},}}
\L{\LB{___\S{}\3\2\2\5H\3\SE{},__\S{}\3\2t\3\SE{},____\S{}\3\}\}\2n\3\SE{},__\S{}\3\2\2\5K\3\SE{},__\S{}\3\20x\3\SE{},___\S{}\3\2\2\5M\3\SE{},__\S{}\3\2\2\5N\3\SE{},__\S{}\3\2\2\5O\3\SE{},}}
\L{\LB{___\S{}\3\2\2\5P\3\SE{},__\S{}\3\2\2\5Q\3\SE{},__\S{}\3\2\2\5R\3\SE{},__\S{}\3\2\2\5S\3\SE{},__\S{}\3\2\2\5T\3\SE{},__\S{}\3\2\2\5U\3\SE{},__\S{}\3\2\2\5V\3\SE{},__\S{}\3\2\2\5W\3\SE{},}}
\L{\LB{___\S{}\3\2\2\5X\3\SE{},__\S{}\3\2\2\5Y\3\SE{},__\S{}\3\2\2\5Z\3\SE{},__\S{}\3\2\2\5[\3\SE{},__\S{}\3\2\2\5\2\2!\3\SE{},\S{}\3\2\2\5]\3\SE{},__\S{}\3\2\2\5\2\2\5\3\SE{},\S{}\3\2\2\5\2\2\_\3\SE{},}}
\L{\LB{___\S{}\3_\3\SE{},_____\S{}\3!\3\SE{},_____\S{}\3\2\23\3\SE{},___\S{}\3\2\2\#\3\SE{},___\S{}\3\2\2\$\3\SE{},___\S{}\3\2\2\%\3\SE{},___\S{}\3\2\2\&\3\SE{},___\S{}\3\2\24\3\SE{},}}
\L{\LB{___\S{}\3(\3\SE{},_____\S{}\3)\3\SE{},_____\S{}\3\2\2\*\3\SE{},___\S{}\3+\3\SE{},_____\S{}\3,\3\SE{},_____\S{}\3\2\2\-\3\SE{},___\S{}\3.\3\SE{},_____\S{}\3\2\21\3\SE{},}}
\L{\LB{___\S{}\30\3\SE{},_____\S{}\31\3\SE{},_____\S{}\32\3\SE{},_____\S{}\33\3\SE{},_____\S{}\34\3\SE{},_____\S{}\35\3\SE{},_____\S{}\36\3\SE{},_____\S{}\37\3\SE{},}}
\L{\LB{___\S{}\38\3\SE{},_____\S{}\39\3\SE{},_____\S{}\3:\3\SE{},_____\S{}\3;\3\SE{},_____\S{}\3\2\2\<\3\SE{},___\S{}\3=\3\SE{},_____\S{}\3\2\2\>\3\SE{},___\S{}\3?\3\SE{},}}
\L{\LB{___\S{}\3@\3\SE{},_____\S{}\3A\3\SE{},_____\S{}\3B\3\SE{},_____\S{}\3C\3\SE{},_____\S{}\3D\3\SE{},_____\S{}\3E\3\SE{},_____\S{}\3F\3\SE{},_____\S{}\3G\3\SE{},}}
\L{\LB{___\S{}\3H\3\SE{},_____\S{}\3I\3\SE{},_____\S{}\3J\3\SE{},_____\S{}\3K\3\SE{},_____\S{}\3L\3\SE{},_____\S{}\3M\3\SE{},_____\S{}\3N\3\SE{},_____\S{}\3O\3\SE{},}}
\L{\LB{___\S{}\3P\3\SE{},_____\S{}\3Q\3\SE{},_____\S{}\3R\3\SE{},_____\S{}\3S\3\SE{},_____\S{}\3T\3\SE{},_____\S{}\3U\3\SE{},_____\S{}\3V\3\SE{},_____\S{}\3W\3\SE{},}}
\L{\LB{___\S{}\3X\3\SE{},_____\S{}\3Y\3\SE{},_____\S{}\3Z\3\SE{},_____\S{}\3[\3\SE{},_____\S{}\3\2\22\3\SE{},___\S{}\3]\3\SE{},_____\S{}\3\2\25\3\SE{},___\S{}\3\2\2\_\3\SE{},}}
\L{\LB{___\S{}\3\{{`}\}\3\SE{},___\S{}\3a\3\SE{},_____\S{}\3b\3\SE{},_____\S{}\3c\3\SE{},_____\S{}\3d\3\SE{},_____\S{}\3e\3\SE{},_____\S{}\3f\3\SE{},_____\S{}\3g\3\SE{},}}
\L{\LB{___\S{}\3h\3\SE{},_____\S{}\3i\3\SE{},_____\S{}\3j\3\SE{},_____\S{}\3k\3\SE{},_____\S{}\3l\3\SE{},_____\S{}\3m\3\SE{},_____\S{}\3n\3\SE{},_____\S{}\3o\3\SE{},}}
\L{\LB{___\S{}\3p\3\SE{},_____\S{}\3q\3\SE{},_____\S{}\3r\3\SE{},_____\S{}\3s\3\SE{},_____\S{}\3t\3\SE{},_____\S{}\3u\3\SE{},_____\S{}\3v\3\SE{},_____\S{}\3w\3\SE{},}}
\L{\LB{___\S{}\3x\3\SE{},_____\S{}\3y\3\SE{},_____\S{}\3z\3\SE{},_____\S{}\3\2\2\{\3\SE{},___\S{}\3\2\2\|\3\SE{},___\S{}\3\2\2\}\3\SE{},___\S{}\3\2\2\~\3\SE{},___\S{}\3\2\2\5?\3\SE{},}}
\L{\LB{___\S{}\3\2200\3\SE{},__\S{}\3\2201\3\SE{},__\S{}\3\2202\3\SE{},__\S{}\3\2203\3\SE{},__\S{}\3\2204\3\SE{},__\S{}\3\2205\3\SE{},__\S{}\3\2206\3\SE{},__\S{}\3\2207\3\SE{},}}
\L{\LB{___\S{}\3\2210\3\SE{},__\S{}\3\2211\3\SE{},__\S{}\3\2212\3\SE{},__\S{}\3\2213\3\SE{},__\S{}\3\2214\3\SE{},__\S{}\3\2215\3\SE{},__\S{}\3\2216\3\SE{},__\S{}\3\2217\3\SE{},}}
\L{\LB{___\S{}\3\2220\3\SE{},__\S{}\3\2221\3\SE{},__\S{}\3\2222\3\SE{},__\S{}\3\2223\3\SE{},__\S{}\3\2224\3\SE{},__\S{}\3\2225\3\SE{},__\S{}\3\2226\3\SE{},__\S{}\3\2227\3\SE{},}}
\L{\LB{___\S{}\3\2230\3\SE{},__\S{}\3\2231\3\SE{},__\S{}\3\2232\3\SE{},__\S{}\3\2233\3\SE{},__\S{}\3\2234\3\SE{},__\S{}\3\2235\3\SE{},__\S{}\3\2236\3\SE{},__\S{}\3\2237\3\SE{},}}
\L{\LB{___\S{}\3\2240\3\SE{},__\S{}\3\2241\3\SE{},__\S{}\3\2242\3\SE{},__\S{}\3\2243\3\SE{},__\S{}\3\2244\3\SE{},__\S{}\3\2245\3\SE{},__\S{}\3\2246\3\SE{},__\S{}\3\2247\3\SE{},}}
\L{\LB{___\S{}\3\2250\3\SE{},__\S{}\3\2251\3\SE{},__\S{}\3\2252\3\SE{},__\S{}\3\2253\3\SE{},__\S{}\3\2254\3\SE{},__\S{}\3\2255\3\SE{},__\S{}\3\2256\3\SE{},__\S{}\3\2257\3\SE{},}}
\L{\LB{___\S{}\3\2260\3\SE{},__\S{}\3\2261\3\SE{},__\S{}\3\2262\3\SE{},__\S{}\3\2263\3\SE{},__\S{}\3\2264\3\SE{},__\S{}\3\2265\3\SE{},__\S{}\3\2266\3\SE{},__\S{}\3\2267\3\SE{},}}
\L{\LB{___\S{}\3\2270\3\SE{},__\S{}\3\2271\3\SE{},__\S{}\3\2272\3\SE{},__\S{}\3\2273\3\SE{},__\S{}\3\2274\3\SE{},__\S{}\3\2275\3\SE{},__\S{}\3\2276\3\SE{},__\S{}\3\2277\3\SE{},}}
\L{\LB{___\S{}\3\2300\3\SE{},__\S{}\3\2301\3\SE{},__\S{}\3\2302\3\SE{},__\S{}\3\2303\3\SE{},__\S{}\3\2304\3\SE{},__\S{}\3\2305\3\SE{},__\S{}\3\2306\3\SE{},__\S{}\3\2307\3\SE{},}}
\L{\LB{___\S{}\3\2310\3\SE{},__\S{}\3\2311\3\SE{},__\S{}\3\2312\3\SE{},__\S{}\3\2313\3\SE{},__\S{}\3\2314\3\SE{},__\S{}\3\2315\3\SE{},__\S{}\3\2316\3\SE{},__\S{}\3\2317\3\SE{},}}
\L{\LB{___\S{}\3\2320\3\SE{},__\S{}\3\2321\3\SE{},__\S{}\3\2322\3\SE{},__\S{}\3\2323\3\SE{},__\S{}\3\2324\3\SE{},__\S{}\3\2325\3\SE{},__\S{}\3\2326\3\SE{},__\S{}\3\2327\3\SE{},}}
\L{\LB{___\S{}\3\2330\3\SE{},__\S{}\3\2331\3\SE{},__\S{}\3\2332\3\SE{},__\S{}\3\2333\3\SE{},__\S{}\3\2334\3\SE{},__\S{}\3\2335\3\SE{},__\S{}\3\2336\3\SE{},__\S{}\3\2337\3\SE{},}}
\L{\LB{___\S{}\3\2340\3\SE{},__\S{}\3\2341\3\SE{},__\S{}\3\2342\3\SE{},__\S{}\3\2343\3\SE{},__\S{}\3\2344\3\SE{},__\S{}\3\2345\3\SE{},__\S{}\3\2346\3\SE{},__\S{}\3\2347\3\SE{},}}
\L{\LB{___\S{}\3\2350\3\SE{},__\S{}\3\2351\3\SE{},__\S{}\3\2352\3\SE{},__\S{}\3\2353\3\SE{},__\S{}\3\2354\3\SE{},__\S{}\3\2355\3\SE{},__\S{}\3\2356\3\SE{},__\S{}\3\2357\3\SE{},}}
\L{\LB{___\S{}\3\2360\3\SE{},__\S{}\3\2361\3\SE{},__\S{}\3\2362\3\SE{},__\S{}\3\2363\3\SE{},__\S{}\3\2364\3\SE{},__\S{}\3\2365\3\SE{},__\S{}\3\2366\3\SE{},__\S{}\3\2367\3\SE{},}}
\L{\LB{___\S{}\3\2370\3\SE{},__\S{}\3\2371\3\SE{},__\S{}\3\2372\3\SE{},__\S{}\3\2373\3\SE{},__\S{}\3\2374\3\SE{},__\S{}\3\2375\3\SE{},__\S{}\3\2376\3\SE{},__\S{}\3\2377\3\SE{},}}
\L{\LB{\};}}
\ProcCont{Torek}\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{EMDASH}_(\-\N{1})}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Output_one_character,_fixed_up_as_required.}\Tab{48}{Since_there_is_no_call-back}}
\L{\LB{_\*_to_tell_\CE{}\V{outchar}()\C{}_to_flush_what_it_has_stored,_it_must_always_produce}}
\L{\LB{_\*_some_output_---_it_can\4t_simply_retain_state.__This_makes_certain}}
\L{\LB{_\*_translations_impossible,_but_we_can_live_without_them_for_now.\,.\,.\,.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{outchar}\K{void}_\V{outchar}(\K{int}_\V{c})}}
\L{\LB{\{}}
\L{\LB{\K{\#if}_\V{nospaceincomment}}}
\L{\LB{___\K{if}_((\V{linehead}_\|\,\|_!\V{incomm})_\&\&_\V{c}_==_\S{}\4_\4\SE{})_\{}}
\L{\LB{______\V{putchar}(\S{}\4\_\4\SE{});}}
\L{\LB{______\K{goto}_\V{fin};}}
\L{\LB{___\}}}
\L{\LB{___\V{linehead}_=_\V{FALSE};}}
\L{\LB{\K{\#else}}}
\L{\LB{___\K{if}_(\V{c}_==_\S{}\4_\4\SE{})_\{}}
\L{\LB{______\V{putchar}(\S{}\4\_\4\SE{});}}
\L{\LB{______\K{goto}_\V{fin};}}
\L{\LB{___\}}}
\L{\LB{\K{\#endif}}}
\L{\LB{___\K{switch}_(\V{lastout})_\{}}
\L{\LB{___\K{case}_\S{}\4.\4\SE{}:}}
\L{\LB{___\K{case}_\S{}\4\|\4\SE{}:}}
\L{\LB{______\K{if}_(\V{c}_==_\V{lastout})}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2,\3\SE{});}}
\L{\LB{______\K{break};}}
\L{\LB{___\K{case}_\S{}\4_\4\SE{}:}}
\L{\LB{\K{\#if}_\N{0}}\Tab{8}{\C{}\1\*_gvr_hates_this_trick_\*\1\CE{}}}
\L{\LB{______\K{if}_(\V{incomm}_\&\&_\V{c}_==_\S{}\4\-\4\SE{})_\{}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\-\-\-\3\SE{});}}
\L{\LB{}\Tab{8}{_\V{c}_=_\V{EMDASH};}\Tab{24}{\C{}\1\*_For_future_cleverness.\,.\,.}\Tab{56}{\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{goto}_\V{fin};}}
\L{\LB{______\}}}
\L{\LB{\K{\#endif}}}
\L{\LB{______\K{break};}}
\L{\LB{___\K{case}_\S{}\4[\4\SE{}:}}
\L{\LB{______\K{if}_(\V{c}_==_\S{}\4]\4\SE{})}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2,\3\SE{});}}
\L{\LB{______\K{break};}}
\L{\LB{___\K{case}_\S{}\4\-\4\SE{}:}}
\L{\LB{______\K{if}_(\V{c}_==_\S{}\4\>\4\SE{})}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2!\3\SE{});}}
\L{\LB{______\K{break};}}
\L{\LB{___\K{case}_\S{}\4\<\4\SE{}:}}
\L{\LB{______\K{if}_(\V{c}_==_\S{}\4\-\4\SE{})}}
\L{\LB{}\Tab{8}{_\V{printf}(\S{}\3\2\2!\3\SE{});}}
\L{\LB{______\K{break};}}
\L{\LB{___\}}}
\L{\LB{___\K{if}_(\V{incomm}_\&\&_\V{c}_==_\S{}\4\-\4\SE{})_\{}}
\L{\LB{______\V{putchar}(\S{}\4\-\4\SE{});}}
\L{\LB{______\K{goto}_\V{fin};}}
\L{\LB{___\}}}
\L{\LB{___\V{printtab}[(\K{unsigned}_\K{char})\V{c}][\N{1}]_?_}}
\L{\LB{_______\V{printf}(\S{}\3\%s\3\SE{},_\V{printtab}[(\K{unsigned}_\K{char})\V{c}])_:_\V{putchar}(\V{c});}}
\L{\LB{_\V{fin}:}}
\L{\LB{___\V{lastout}_=_\V{c};}}
\L{\LB{\}}}
\ProcCont{Torek}\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*___Redefine_Chartab_from_lgrindef_file}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{parsechartab}\K{void}_\V{parsechartab}(\K{void})}}
\L{\LB{\{}}
\L{\LB{____\K{char}_\*\V{i}=\V{buf},_\*\V{j}=\V{chartab},_\V{c};}}
\L{\LB{____\K{int}__\V{charnum}=\N{0};}}
\L{\LB{}}
\L{\LB{____\K{while}_(\*\V{i}++!=\S{}\4:\4\SE{})_\{\}}}
\L{\LB{____\K{while}_((\V{c}=\*\V{i}++)!=\S{}\4\20\4\SE{})_\{}}
\L{\LB{______\K{if}_(\V{c}==\S{}\4:\4\SE{})_\K{continue};}}
\L{\LB{______\V{charnum}=(\V{c}\>=\S{}\40\4\SE{}_\&\&_\V{c}\<=\S{}\49\4\SE{})_?_(\K{int})\V{c}\-\N{48}_:_\V{tolower}(\V{c})\-\N{87};}}
\L{\LB{______\V{charnum}=\V{charnum}_\<\<_\N{4};_\V{c}=\*\V{i}++;}}
\L{\LB{______\V{charnum}+=(\V{c}\>=\S{}\40\4\SE{}_\&\&_\V{c}\<=\S{}\49\4\SE{})_?_(\K{int})\V{c}\-\N{48}_:_\V{tolower}(\V{c})\-\N{87};}}
\L{\LB{______\V{i}++;}}
\L{\LB{}}
\L{\LB{______\V{printtab}[\V{charnum}]=\V{j};}}
\L{\LB{______\K{while}_(\*\V{i}!=\S{}\4:\4\SE{})}}
\L{\LB{}\Tab{8}{\K{if}_(\*\V{i}==\S{}\4\2\2\4\SE{})_\{}}
\L{\LB{}\Tab{8}{__\K{switch}_(\*++\V{i})_\{}}
\L{\LB{}\Tab{8}{____\K{case}_\S{}\4:\4\SE{}:__\*\V{j}++=\S{}\4:\4\SE{};_\K{break};}}
\L{\LB{}\Tab{8}{____\K{case}_\S{}\4\2\2\4\SE{}:_\*\V{j}++=\S{}\4\2\2\4\SE{};_\K{break};}}
\L{\LB{}\Tab{8}{__\};_\V{i}++;}}
\L{\LB{}\Tab{8}{\}_\K{else}_\*\V{j}++=\*\V{i}++;}}
\L{\LB{______\*\V{j}++=\S{}\4\20\4\SE{};}}
\L{\LB{____\}}}
\L{\LB{}}
\L{\LB{\}}}
\ProcCont{Torek}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*}\Tab{8}{Look_for_a_procedure_beginning_on_this_line}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{isprocNorm}\V{boolean}_\V{isprocNorm}(\K{char}_\*\V{s})}}
\L{\LB{\{}}
\L{\LB{___\V{pname}[\N{0}]_=_\S{}\4\20\4\SE{};}}
\L{\LB{___\K{if}_((!\V{l\_toplex}_\|\,\|_\V{blklevel}_==_\N{0})}}
\L{\LB{_______\&\&_\V{expmatch}(\V{s},_\V{l\_prcbeg},_(\K{char}_\*\*)_\V{NULL},_\V{pname})_!=_\V{NULL}}}
\L{\LB{_______\&\&_\V{expmatch}(\V{s},_\V{l\_noproc},_(\K{char}_\*\*)_\V{NULL},_(\K{char}_\*)_\V{NULL})_==_\V{NULL})}}
\L{\LB{______\K{return}_\V{TRUE};}}
\L{\LB{___\K{return}_\V{FALSE};}}
\L{\LB{\}}}
\ProcCont{Torek}\L{\LB{}}
\L{\LB{\C{}\1\*}\Tab{8}{Special_version_of_the_above_for_C_functions_\*\1\CE{}}}
\L{\LB{\Proc{isprocC}\V{boolean}_\V{isprocC}(\K{char}_\*\V{s})}}
\L{\LB{\{}}
\L{\LB{___\K{char}}\Tab{16}{\V{cheat}[\V{BUFFERSIZE}];}}
\L{\LB{___\K{char}}\Tab{16}{\*\V{j}=\V{s},_\*\V{i}=\V{cheat};}}
\L{\LB{___\V{boolean}}\Tab{16}{\V{comm}=\V{FALSE},_\V{string}=\V{FALSE},_\V{schar}=\V{FALSE};}}
\L{\LB{___\K{int}}\Tab{16}{\V{brack}=\N{0};}}
\L{\LB{}}
\L{\LB{___\K{if}_(\V{blklevel}!=\N{0})_\K{return}_\V{FALSE};}}
\L{\LB{___\K{while}_(\*\V{j})}}
\L{\LB{___\{}}
\L{\LB{_____\K{if}_(\*\V{j}==\S{}\4\3\4\SE{}_\&\&_!\V{comm}_\&\&_!\V{schar})_\V{string}=(\V{string}+\N{1})\%\N{2};}}
\L{\LB{_____\K{else}_\K{if}_(\*\V{j}==\S{}\4\2\4\4\SE{}_\&\&_!\V{comm}_\&\&_!\V{string})_\V{schar}=(\V{schar}+\N{1})\%\N{2};}}
\L{\LB{_____\K{else}_\K{if}_(\*\V{j}==\S{}\4\2\2\4\SE{}_\&\&_!\V{comm})_\V{j}++;}}
\L{\LB{_____\K{else}_\K{if}_(!\V{comm}_\&\&_!\V{string}_\&\&_!\V{schar}_\&\&_\*\V{j}==\S{}\4\{\4\SE{})_\V{brack}++;___}}
\L{\LB{_____\K{else}_\K{if}_(!\V{comm}_\&\&_!\V{string}_\&\&_!\V{schar}_\&\&_\*\V{j}==\S{}\4\}\4\SE{})_\V{brack}\-\-;}}
\L{\LB{_____\K{else}_\K{if}_(!\V{comm}_\&\&_!\V{string}_\&\&_!\V{schar}_\&\&_\*\V{j}==\S{}\4\#\4\SE{})_\K{break};}}
\L{\LB{_____\K{else}_\K{if}_(!\V{comm}_\&\&_!\V{string}_\&\&_!\V{schar}_\&\&_\*\V{j}==\S{}\4\1\4\SE{}_\&\&_\*(\V{j}+\N{1})==\S{}\4\1\4\SE{})_\K{break};}}
\L{\LB{_____\K{else}_\K{if}_(!\V{comm}_\&\&_!\V{string}_\&\&_!\V{schar}_\&\&_\*\V{j}==\S{}\4\1\4\SE{}_\&\&_\*(\V{j}+\N{1})==\S{}\4\*\4\SE{})_\V{comm}=\V{TRUE};}}
\L{\LB{_____\K{else}_\K{if}_(_________!\V{string}_\&\&_!\V{schar}_\&\&_\*\V{j}==\S{}\4\*\4\SE{}_\&\&_\*(\V{j}+\N{1})==\S{}\4\1\4\SE{})_}}
\L{\LB{_______\{\V{comm}=\V{FALSE};_\V{j}++;\}}}
\L{\LB{_____\K{else}_\K{if}_(!\V{brack}_\&\&_!\V{comm}_\&\&_!\V{string}_\&\&_!\V{schar})}}
\L{\LB{_______\*\V{i}++=\*\V{j};}}
\L{\LB{_____\V{j}++;}}
\L{\LB{___\}}}
\L{\LB{___\*\V{i}_=_\S{}\4\20\4\SE{};}}
\L{\LB{_}}
\L{\LB{___\K{return}_\V{isprocNorm}(\V{cheat});}}
\L{\LB{\}}}
\ProcCont{Torek}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_\CE{}\V{getredirection}()\C{}_is_intended_to_aid_in_porting_C_programs}}
\L{\LB{_\*_to_VMS_(Vax-11_C)_which_does_not_support_\texttt{\>}_and_\texttt{\<}}}
\L{\LB{_\*_I\1O_redirection.__With_suitable_modification,_it_may}}
\L{\LB{_\*_useful_for_other_portability_problems_as_well.}}
\L{\LB{_\*}}
\L{\LB{_\*_Modified,_24-Jan-86_by_Jerry_Leichter}}
\L{\LB{_\*}\Tab{8}{When_creating_a_new_output_file,_force_the_maximum_record_size_to}}
\L{\LB{_\*}\Tab{8}{512;_otherwise,_it_ends_up_as_0_(though_the_C_I\1O_system_won\4t_write}}
\L{\LB{_\*}\Tab{8}{a_record_longer_than_512_bytes_anyway)_which_will_cause_problems_if}}
\L{\LB{_\*}\Tab{8}{the_file_is_later_opened_for_\CE{}\V{APPEND}\C{}_---_if_the_maximum_record_size}}
\L{\LB{_\*}\Tab{8}{is_0,_C_will_use_the_length_of_the_longest_record_written_to_the_file}}
\L{\LB{_\*}\Tab{8}{for_its_buffer!}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#ifdef}}\Tab{8}{\V{vms}}}
\L{\LB{\K{\#}__\K{include}}\Tab{16}{\<\V{stdio}.\V{h}\>}}
\L{\LB{\K{\#}__\K{include}}\Tab{16}{\<\V{errno}.\V{h}\>}}
\L{\LB{}}
\L{\LB{___\K{int}}}
\L{\LB{\Proc{getredirection}\V{getredirection}(\V{argc},_\V{argv})}}
\L{\LB{___\K{int}}\Tab{8}{\V{argc};}}
\L{\LB{___\K{char}_\*\*\V{argv};}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Process_VMS_redirection_args.__Exit_if_any_error_is_seen.}}
\L{\LB{_\*_If_\CE{}\V{getredirection}()\C{}_processes_an_argument,_it_is_erased}}
\L{\LB{_\*_from_the_vector.__\CE{}\V{getredirection}()\C{}_returns_a_new_\CE{}\V{argc}\C{}_value.}}
\L{\LB{_\*}}
\L{\LB{_\*_Warning:_do_not_try_to_simplify_the_code_for_VMS.__The_code}}
\L{\LB{_\*_presupposes_that_\CE{}\V{getredirection}()\C{}_is_called_before_any_data_is}}
\L{\LB{_\*_read_from_\CE{}\V{stdin}\C{}_or_written_to_\CE{}\V{stdout}\C{}.}}
\L{\LB{_\*}}
\L{\LB{_\*_Normal_usage_is_as_follows:}}
\L{\LB{_\*}}
\L{\LB{_\*\CE{}}\Tab{8}{\V{main}(\V{argc},_\V{argv})}}
\L{\LB{_\*}\Tab{8}{\K{int}}\Tab{24}{\V{argc};}}
\L{\LB{_\*}\Tab{8}{\K{char}}\Tab{24}{\*\V{argv}[\,];}}
\L{\LB{_\*}\Tab{8}{\{}}
\L{\LB{_\*}\Tab{16}{\V{argc}_=_\V{getredirection}(\V{argc},_\V{argv});}}
\L{\LB{_\*}\Tab{8}{\}\C{}}}
\ProcCont{Torek}\L{\LB{_\*\1\CE{}}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}}\Tab{24}{\*\V{ap};}\Tab{32}{\C{}\1\*_Argument_pointer_\*\1\CE{}}}
\L{\LB{___\K{int}}\Tab{24}{\V{i};}\Tab{32}{\C{}\1\*_\CE{}\V{argv}[\,]\C{}_index_\*\1\CE{}}}
\L{\LB{___\K{int}}\Tab{24}{\V{j};}\Tab{32}{\C{}\1\*_Output_index_\*\1\CE{}}}
\L{\LB{___\K{int}}\Tab{24}{\V{file};}\Tab{32}{\C{}\1\*_File\_descriptor_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{___\K{for}_(\V{j}_=_\V{i}_=_\N{1};_\V{i}_\<_\V{argc};_\V{i}++)_\{___\C{}\1\*_Do_all_arguments_\*\1\CE{}}}
\L{\LB{______\K{switch}_(\*(\V{ap}_=_\V{argv}[\V{i}]))_\{}}
\L{\LB{______\K{case}_\S{}\4\<\4\SE{}:_________________\C{}\1\*_\texttt{\<file}_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{freopen}(++\V{ap},_\S{}\3r\3\SE{},_\V{stdin})_==_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\V{perror}(\V{ap});_}\Tab{32}{\C{}\1\*_Can\4t_find_file_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{exit}(\V{errno});}\Tab{32}{\C{}\1\*_Is_a_fatal_error_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}}
\L{\LB{______\K{case}_\S{}\4\>\4\SE{}:_________________\C{}\1\*_\texttt{\>file}_or_\texttt{\>\>file}_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_(\*++\V{ap}_==_\S{}\4\>\4\SE{})_\{____\C{}\1\*_\texttt{\>\>file}_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\C{}\1\*}}
\L{\LB{}\Tab{8}{_____\*_If_the_file_exists,_and_is_writable_by_us,}}
\L{\LB{}\Tab{8}{_____\*_call_\CE{}\V{freopen}()\C{}_to_append_to_the_file_(using_the}}
\L{\LB{}\Tab{8}{_____\*_file\4s_current_attributes).__Otherwise,_create}}
\L{\LB{}\Tab{8}{_____\*_a_new_file_with_\3vanilla\3_attributes_as_if}}
\L{\LB{}\Tab{8}{_____\*_the_argument_was_given_as_\texttt{\>filename}.}}
\L{\LB{}\Tab{8}{_____\*_\CE{}\V{access}(\V{name},_\N{2})\C{}_is_\CE{}\V{TRUE}\C{}_if_we_can_write_on}}
\L{\LB{}\Tab{8}{_____\*_the_specified_file.}}
\L{\LB{}\Tab{8}{_____\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{access}(++\V{ap},_\N{2})_==_\N{0})_\{}}
\L{\LB{}\Tab{8}{_______\K{if}_(\V{freopen}(\V{ap},_\S{}\3a\3\SE{},_\V{stdout})_!=_\V{NULL})}}
\L{\LB{}\Tab{16}{__\K{break};}\Tab{32}{\C{}\1\*_Exit_\CE{}\K{case}\C{}_statement_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{perror}(\V{ap});}\Tab{32}{\C{}\1\*_Error,_can\4t_append_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{exit}(\V{errno});}\Tab{32}{\C{}\1\*_After_\CE{}\V{access}\C{}_test_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\}}\Tab{32}{\C{}\1\*_If_file_accessable_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\C{}\1\*}}
\L{\LB{}\Tab{8}{__\*_On_VMS,_we_want_to_create_the_file_using_\3standard\3}}
\L{\LB{}\Tab{8}{__\*_record_attributes.}\Tab{32}{\CE{}\V{create}(.\,.\,.)\C{}_creates_the_file}}
\L{\LB{}\Tab{8}{__\*_using_the_caller\4s_default_protection_mask_and}}
\L{\LB{}\Tab{8}{__\*_\3variable_length,_implied_carriage_return\3}}
\L{\LB{}\Tab{8}{__\*_attributes.__\CE{}\V{dup2}()\C{}_associates_the_file_with_\CE{}\V{stdout}\C{}.}}
\L{\LB{}\Tab{8}{__\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{if}_((\V{file}_=_\V{creat}(\V{ap},_\N{0},_\S{}\3rat=cr\3\SE{},_\S{}\3rfm=var\3\SE{},_\S{}\3mrs=512\3\SE{}))_==_\-\N{1}}}
\L{\LB{}\Tab{8}{_____\|\,\|_\V{dup2}(\V{file},_\V{fileno}(\V{stdout}))_==_\-\N{1})_\{}}
\L{\LB{}\Tab{8}{____\V{perror}(\V{ap});_}\Tab{32}{\C{}\1\*_Can\4t_create_file____\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{exit}(\V{errno});}\Tab{32}{\C{}\1\*_is_a_fatal_error}\Tab{56}{\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\}}\Tab{32}{\C{}\1\*_If_\texttt{\>}_creation}\Tab{56}{\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{break};_}\Tab{32}{\C{}\1\*_Exit_\CE{}\K{case}\C{}_test}\Tab{56}{\*\1\CE{}}}
\L{\LB{}}
\L{\LB{______\K{default}:}}
\L{\LB{}\Tab{8}{_\V{argv}[\V{j}++]_=_\V{ap};}\Tab{32}{\C{}\1\*_Not_a_redirector}\Tab{56}{\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{break};_}\Tab{32}{\C{}\1\*_Exit_\CE{}\K{case}\C{}_test}\Tab{56}{\*\1\CE{}}}
\L{\LB{______\}}}
\L{\LB{___\}}\Tab{32}{\C{}\1\*_For_all_arguments}\Tab{56}{\*\1\CE{}}}
\L{\LB{___\V{argv}[\V{j}]_=_\V{NULL};}\Tab{32}{\C{}\1\*_Terminate_\CE{}\V{argv}[\,]\C{}}\Tab{56}{\*\1\CE{}}}
\L{\LB{___\K{return}_\V{j};}\Tab{32}{\C{}\1\*_Return_new_\CE{}\V{argc}\C{}}\Tab{56}{\*\1\CE{}}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{\K{\#else}}\Tab{8}{\C{}\1\*_\CE{}!\V{vms}\C{}_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\Proc{getredirection}\K{int}_\V{getredirection}(\K{int}_\V{argc},_\K{char}_\*\*\V{argv})}}
\L{\LB{___\C{}\1\*}}
\L{\LB{____\*_Dummy_routine.}}
\L{\LB{____\*\1\CE{}}}
\L{\LB{\{}}
\L{\LB{___\K{return}_\V{argc};}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{\K{\#endif}}\Tab{8}{\C{}\1\*_\CE{}!\V{vms}\C{}_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Parses_the_\texttt{lgrindef}_file_for_a_preamble}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{parsepreamble}\K{void}_\V{parsepreamble}(\K{char}_\*\V{destination})}}
\L{\LB{\{}}
\L{\LB{____\K{char}_\*\V{i}=\V{buf},_\*\V{j}=\V{destination};}}
\L{\LB{}}
\L{\LB{____\K{while}_(\*\V{i}++!=\S{}\4:\4\SE{})_\{\}}}
\L{\LB{____\K{while}_(\*\V{i})_\{}}
\L{\LB{______\K{if}_(\*\V{i}==\S{}\4\2\2\4\SE{})_\{}}
\L{\LB{}\Tab{8}{\K{switch}_(\*++\V{i})_\{}}
\L{\LB{}\Tab{8}{__\K{case}_\S{}\4n\4\SE{}:__\*\V{j}++=\S{}\4\2n\4\SE{};_\K{break};}}
\L{\LB{}\Tab{8}{__\K{case}_\S{}\4t\4\SE{}:__\*\V{j}++=\S{}\4\2t\4\SE{};_\K{break};}}
\L{\LB{}\Tab{8}{__\K{case}_\S{}\4f\4\SE{}:__\*\V{j}++=\S{}\4\2f\4\SE{};_\K{break};}}
\L{\LB{}\Tab{8}{__\K{case}_\S{}\4\2\2\4\SE{}:_\*\V{j}++=\S{}\4\2\2\4\SE{};_\K{break};}}
\L{\LB{}\Tab{8}{__\K{default}:___\V{fprintf}(\V{stderr},_\S{}\3Bad_preamble_entry:_incorrect_\4\2\2\4\2n\3\SE{});}}
\L{\LB{}\Tab{8}{\};_\V{i}++;}}
\L{\LB{______\}_\K{else}_\*\V{j}++=\*\V{i}++;}}
\L{\LB{______\*\V{j}=\S{}\4\20\4\SE{};}}
\L{\LB{____\}}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Sets_the_default_preambles}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{setpreambles}\K{void}_\V{setpreambles}(\K{void})}}
\L{\LB{\{}}
\L{\LB{____\V{strcpy}(\V{preamble},}}
\L{\LB{\S{}\3\2\2documentclass[a4paper]\{article\}\2n\2}}
\L{\LB{\2\2usepackage[procnames,noindent]\{lgrind\}\2n\2}}
\L{\LB{\2\2usepackage\{fancyhdr\}\2n\2}}
\L{\LB{\2\2pagestyle\{fancy\}\2n\3\SE{});}}
\L{\LB{____\V{strcpy}(\V{preambl2},}}
\L{\LB{\S{}\3\2\2lhead[\2\2fancyplain\{\}\{\2\2bf\2\2thepage\}]\2}}
\L{\LB{\{\2\2fancyplain\{\}\{\2\2bf_\2f\}\}\2n\2}}
\L{\LB{\2\2rhead[\2\2fancyplain\{\}\{\2\2bf_\2f\}]\2}}
\L{\LB{\{\2\2fancyplain\{\}\{\2\2bf\2\2thepage\}\}\2n\2}}
\L{\LB{\2\2cfoot\{\}\2n\3\SE{});}}
\L{\LB{____\V{strcpy}(\V{config},\S{}\3\3\SE{});}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_prints_a_preamble,_substituting_\texttt{\2f}_with_the_current}}
\L{\LB{_\*_file\4s_name_(sorry,_no_more_form_feeds)}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{printpreamble}\K{void}_\V{printpreamble}(\K{char}_\*\V{string})}}
\L{\LB{\{}}
\L{\LB{___\K{char}_\*\V{i};}}
\L{\LB{___\K{while}_(\*\V{string})}}
\L{\LB{_____\K{if}_(\*\V{string}==\S{}\4\2f\4\SE{})}}
\L{\LB{}\Tab{8}{\{_\V{i}=\V{fname}\-\N{1};}}
\L{\LB{}\Tab{8}{__\K{while}_(\*(++\V{i}))_\V{outchar}(\*\V{i});}}
\L{\LB{__________\V{string}++;}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{_____\K{else}_\V{putchar}(\*\V{string}++);}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{\K{\#ifndef}_\V{NO\_PERM\_D}}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_try_to_modify_the_executable_file_to_store_the_new_lgrindef-file}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{writeDefsfileInExe}\K{void}_\V{writeDefsfileInExe}(\K{char}_\*\V{progname},_\K{char}_\*\V{newdefsfile})}}
\L{\LB{\{}}
\L{\LB{}\Tab{8}{\K{char}}\Tab{16}{\*\V{buffer},_\*\V{i};}}
\L{\LB{}\Tab{8}{\V{FILE}_____\*\V{progfile};}}
\L{\LB{}\Tab{8}{\K{long}_____\V{pos}=\N{0};}}
\L{\LB{}\Tab{8}{\K{int}______\V{ret};}}
\L{\LB{}\Tab{8}{\V{boolean}__\V{found}=\V{FALSE};}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\V{buffer}_=_(\K{char}\*)_\V{malloc}(\N{30000});}}
\L{\LB{}\Tab{8}{\C{}\1\*_So_small?_Why_in_chunks?_Well,_it\4s_gotta_run_on_machines_with}}
\L{\LB{}\Tab{8}{__only_limited_access_to_their_resources_(you_know,_the_IBM_PC)_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{if}_(\V{access}(\V{progname},_\N{6})==\N{0}_\&\&_\V{buffer})__\C{}\1\*_read_and_write_permission?_\*\1\CE{}}}
\L{\LB{}\Tab{8}{\{_}}
\L{\LB{}\Tab{16}{\V{progfile}=\V{fopen}(\V{progname},_\S{}\3r+b\3\SE{});}}
\L{\LB{}\Tab{16}{\V{fread}(\V{buffer},_\N{1},_\N{200},_\V{progfile});}}
\L{\LB{}\Tab{16}{\K{do}_\{}}
\L{\LB{}\Tab{24}{\V{ret}=\V{fread}(\V{buffer}+\N{200},_\N{1},_\N{29500},_\V{progfile});}}
\L{\LB{}\Tab{24}{\K{for}(\V{i}=\V{buffer};_\V{i}\<\V{buffer}+\V{ret};_\V{i}++)}}
\L{\LB{}\Tab{24}{\K{if}_(\*\V{i}==\S{}\4m\4\SE{}_\&\&_\*(\V{i}+\N{1})==\S{}\4P\4\SE{}_\&\&_\*(\V{i}+\N{2})==\S{}\4i\4\SE{}_}}
\L{\LB{}\Tab{40}{\&\&_\V{strcmp}(\V{defsfile},_\V{i}+\N{3})==\N{0})_\{}}
\L{\LB{}\Tab{32}{\V{pos}+=\V{i}\-\V{buffer};}}
\L{\LB{}\Tab{32}{\V{found}=\V{TRUE};}}
\L{\LB{}\Tab{24}{\}}}
\L{\LB{}\Tab{24}{\V{memcpy}(\V{buffer},_\V{buffer}+\N{29500},_\N{200});}}
\L{\LB{}\Tab{24}{\V{pos}+=\N{29500};}}
\L{\LB{}\Tab{16}{\}_\K{while}_(\V{ret}==\N{29500}_\&\&_!\V{found});}}
\L{\LB{}\Tab{16}{\K{if}_(\V{found})_\{}}
\L{\LB{}\Tab{24}{\V{fseek}(\V{progfile},_\V{pos}\-\N{29500}+\N{3},_\N{0});}}
\L{\LB{}\Tab{24}{\V{fwrite}(\V{newdefsfile},_\V{strlen}(\V{newdefsfile})+\N{1},_\N{1},_\V{progfile});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\V{fclose}(\V{progfile});}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{\V{free}(\V{buffer});}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{\K{\#endif}}}
\end{lgrind}
% end of `lgrind.c'

\chapter{regexp.c}
\section{Header}
% start of `regexp.h'
\LGinlinefalse\begin{lgrind}
\L{\LB{\C{}\1\*_Created_19_February_1996_\*\1\CE{}}}
\L{\LB{\K{typedef}_\K{int}____\V{boolean};}}
\L{\LB{\K{\#define}_\V{TRUE}___\N{1}}}
\L{\LB{\K{\#define}_\V{FALSE}__\N{0}}}
\L{\LB{\K{int}_\V{lc\_strncmp}(\V{const}_\K{char}_\*\V{s1},_\V{const}_\K{char}_\*\V{s2},_\V{size\_t}_\V{len});}}
\L{\LB{\K{char}_\*\V{convexp}(\K{char}_\*\V{re});}}
\L{\LB{\K{char}_\*\V{expmatch}(\K{register}_\K{char}_\*\V{s},_\K{register}_\K{char}_\*\V{re},_\K{char}_\*\*\V{strtptr},_\K{char}_\*\V{mstring});}}
\end{lgrind}
% end of `regexp.h'
\section{Code}
% start of `regexp.c'
\LGinlinefalse\begin{lgrind}
\L{\LB{\K{\#ifndef}_\V{lint}}}
\L{\LB{\K{static}_\K{char}_\*\V{sccsid}=\S{}\3@(\#)regexp.c}\Tab{40}{1.2_(LBL)_4\112\185\3\SE{};}}
\L{\LB{\K{static}_\K{char}_\V{Version}[\,]_=}}
\L{\LB{___\S{}\3\$Id:_regexp.c,v_1.2_91\110\101_00:30:20_gvr_Exp_\$\3\SE{};}}
\L{\LB{\K{\#endif}}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Regular_expression_matching_routines_for_lgrind\1tgrind\1tfontedpr.}}
\L{\LB{_\*}}
\L{\LB{_\*_These_routines_were_written_by_Dave_Presotto_(I_think)_for_vgrind.}}
\L{\LB{_\*_Minor_mods_\&_attempts_to_improve_performance_by_Van_Jacobson}}
\L{\LB{_\*_(van\CE{}\C{}@lbl-rtsg)_and_Chris_Torek_(chris\CE{}\C{}@maryland).}}
\L{\LB{_\*}}
\L{\LB{_\*_Modifications.}}
\L{\LB{_\*_--------------}}
\L{\LB{_\*____Sep_91}\Tab{16}{George_V_Reilly}\Tab{32}{Fixed_up_some_bogus_uses_of_\CE{}\V{NIL}\C{}_and_\CE{}\V{NULL}\C{}.}}
\L{\LB{_\*_30_Mar_85}\Tab{16}{Van_\&_Chris}\Tab{32}{Changed_\CE{}\V{expmatch}()\C{}_to_return_pointer_to}}
\L{\LB{_\*}\Tab{32}{start_of_what_was_matched_in_addition_to}}
\L{\LB{_\*}\Tab{32}{pointer_to_match_end.__Several_changes_to}}
\L{\LB{_\*}\Tab{32}{improve_performance_(too_numerous_to_mention).}}
\L{\LB{_\*_11_Dec_84}\Tab{16}{Dave_Presotto}\Tab{32}{Written.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\K{\#include}_\<\V{stdio}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{malloc}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{ctype}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{string}.\V{h}\>}}
\L{\LB{\K{\#include}_\S{}\3regexp.h\3\SE{}}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{makelower}(\V{c})_(\V{isupper}((\V{c}))_?_\V{tolower}((\V{c}))_:_(\V{c}))}}
\L{\LB{}}
\L{\LB{\K{extern}_\K{char}_\*\V{l\_id};}}
\L{\LB{\K{static}_\K{void}_\V{expconv}(\K{void});}\Tab{32}{_\C{}\1\*_forward_declaration_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{int}____(\*\V{re\_strncmp})(\V{const}_\K{char}_\*,_\V{const}_\K{char}_\*,_\V{size\_t});}\Tab{64}{_}}
\L{\LB{}\Tab{24}{\C{}\1\*_function_used_by_\CE{}\V{expmatch}()\C{}_to_compare}}
\L{\LB{}\Tab{24}{\*_strings.__The_caller_should_make_it_point_to}}
\L{\LB{}\Tab{24}{\*_\CE{}\V{strncmp}()\C{}_if_case_is_significant_\&}}
\L{\LB{}\Tab{24}{\*_\CE{}\V{lc\_strncmp}()\C{}_otherwise.}}
\L{\LB{}\Tab{24}{\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*__\CE{}\V{lc\_strncmp}()\C{}_---}\Tab{24}{like_\CE{}\V{strncmp}()\C{}_except_that_we_convert_the}}
\L{\LB{_\*}\Tab{24}{first_string_to_lower_case_before_comparing.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{lc\_strncmp}\K{int}_\V{lc\_strncmp}(\K{register}_\V{const}_\K{char}_\*\V{s1},_\K{register}_\V{const}_\K{char}_\*\V{s2},_\K{register}_\V{size\_t}_\V{len})}}
\L{\LB{\{}}
\L{\LB{___\K{while}_(\V{len}\-\-_\>_\N{0})}}
\L{\LB{______\K{if}_(\*\V{s2}_\-_\V{makelower}(\*\V{s1}))}}
\L{\LB{}\Tab{8}{_\K{return}_\N{1};}}
\L{\LB{______\K{else}}}
\L{\LB{}\Tab{8}{_\V{s2}++,_\V{s1}++;}}
\L{\LB{___}}
\L{\LB{___\K{return}_\N{0};}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*__The_following_routine_converts_an_irregular_expression_to}}
\L{\LB{_\*__internal_format.}}
\L{\LB{_\*}}
\L{\LB{_\*__Either_meta_symbols_(\texttt{\2a},_\texttt{\2d},_or_\texttt{\2p})_or_character_strings}}
\L{\LB{_\*__or_operations_(alternation_or_parenthesizing)_can_be_specified.}}
\L{\LB{_\*__Each_starts_with_a_descriptor_byte.__The_descriptor_byte}}
\L{\LB{_\*__has_\CE{}\V{STR}\C{}_set_for_strings,_\CE{}\V{META}\C{}_set_for_meta_symbols,}}
\L{\LB{_\*__and_\CE{}\V{OPER}\C{}_set_for_operations.__The_descriptor_byte_can_also_have}}
\L{\LB{_\*__the_\CE{}\V{OPT}\C{}_bit_set_if_the_object_defined_is_optional.__Also_\CE{}\V{ALT}\C{}}}
\L{\LB{_\*__can_be_set_to_indicate_an_alternation.}}
\L{\LB{_\*}}
\L{\LB{_\*__For_metasymbols,_the_byte_following_the_descriptor_byte_identities}}
\L{\LB{_\*__the_meta_symbol_(containing_an_ASCII_\CE{}\S{}\4a\4\SE{}\C{},_\CE{}\S{}\4d\4\SE{}\C{},_\CE{}\S{}\4p\4\SE{}\C{},_\CE{}\S{}\4\|\4\SE{}\C{},}}
\L{\LB{_\*__or_\CE{}\S{}\4(\4\SE{}\C{}).__For_strings,_the_byte_after_the_descriptor_is_a}}
\L{\LB{_\*__character_count_for_the_string:}}
\L{\LB{_\*\CE{}}}
\L{\LB{_\*}\Tab{8}{\V{meta}_\V{symbols}_:=}\Tab{24}{\V{descriptor}}}
\L{\LB{_\*}\Tab{24}{\V{symbol}}}
\L{\LB{_\*}}
\L{\LB{_\*}\Tab{8}{\V{strings}_:=}\Tab{24}{\V{descriptor}}}
\L{\LB{_\*}\Tab{24}{\V{character}_\V{count}}}
\L{\LB{_\*}\Tab{24}{\V{the}_\V{string}}}
\L{\LB{_\*}}
\L{\LB{_\*}\Tab{8}{\V{operations}_:=}\Tab{24}{\V{descriptor}}}
\L{\LB{_\*}\Tab{24}{\V{symbol}}}
\L{\LB{_\*}\Tab{24}{\V{character}_\V{count}\C{}}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*__handy_macros_for_accessing_parts_of_match_blocks}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{MSYM}(\V{A})}\Tab{16}{_(\*(\V{A}+\N{1}))}\Tab{32}{\C{}\1\*_symbol_in_a_meta_symbol_block_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{MNEXT}(\V{A})_(\V{A}+\N{2})}\Tab{32}{\C{}\1\*_character_following_a_metasymbol_block_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{OSYM}(\V{A})}\Tab{16}{_(\*(\V{A}+\N{1}))}\Tab{32}{\C{}\1\*_symbol_in_an_operation_block_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{OCNT}(\V{A})}\Tab{16}{_(\*(\V{A}+\N{2}))}\Tab{32}{\C{}\1\*_character_count_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{ONEXT}(\V{A})_(\V{A}+\N{3})}\Tab{32}{\C{}\1\*_next_character_after_the_operation_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{OPTR}(\V{A})}\Tab{16}{_(\V{A}+\*(\V{A}+\N{2}))}\Tab{32}{\C{}\1\*_place_pointed_to_by_the_operator_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{SCNT}(\V{A})}\Tab{16}{_(\*(\V{A}+\N{1}))}\Tab{32}{\C{}\1\*_byte_count_of_a_string_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{SSTR}(\V{A})}\Tab{16}{_(\V{A}+\N{2})}\Tab{32}{\C{}\1\*_address_of_the_string_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{SNEXT}(\V{A})_(\V{A}+\N{2}+\*(\V{A}+\N{1}))}\Tab{32}{\C{}\1\*_character_following_the_string_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*__bit_flags_in_the_descriptor_}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{OPT}}\Tab{16}{_\N{1}}}
\L{\LB{\K{\#define}_\V{STR}}\Tab{16}{_\N{2}}}
\L{\LB{\K{\#define}_\V{META}}\Tab{16}{_\N{4}}}
\L{\LB{\K{\#define}_\V{ALT}}\Tab{16}{_\N{8}}}
\L{\LB{\K{\#define}_\V{OPER}}\Tab{16}{\N{16}}}
\L{\LB{}}
\L{\LB{\K{char}_\*\V{ure};}\Tab{24}{\C{}\1\*_pointer_current_position_in_unconverted_exp_\*\1\CE{}}}
\L{\LB{\K{char}_\*\V{ccre};}\Tab{24}{\C{}\1\*_pointer_to_current_position_in_converted_exp_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Convert_an_irregular_expression_to_the_internal_form}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{convexp}\K{char}_\*\V{convexp}(\K{char}_\*\V{re})}}
\L{\LB{\C{}\1\*_re}\Tab{8}{_unconverted_irregular_expression_\*\1\CE{}}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{cre};}\Tab{24}{\C{}\1\*_pointer_to_converted_regular_expression_\*\1\CE{}}}
\L{\LB{___}}
\L{\LB{___\C{}\1\*_allocate_room_for_the_converted_expression_\*\1\CE{}}}
\L{\LB{___\K{if}_(\V{re}_==_\V{NULL})}}
\L{\LB{______\K{return}_\V{NULL};}}
\L{\LB{___\K{if}_(\*\V{re}_==_\S{}\4\20\4\SE{})}}
\L{\LB{______\K{return}_\V{NULL};}}
\L{\LB{___\V{cre}_=_(\K{char}\*)\V{malloc}(\N{4}_\*_\V{strlen}(\V{re})_+_\N{3});}}
\L{\LB{___\V{ccre}_=_\V{cre};}}
\L{\LB{___\V{ure}_=_\V{re};}}
\L{\LB{___}}
\L{\LB{___\C{}\1\*_start_the_conversion_with_a_\texttt{\2a}_\*\1\CE{}}}
\L{\LB{___\*\V{cre}_=_\V{META}_\|_\V{OPT};}}
\L{\LB{___\V{MSYM}(\V{cre})_=_\S{}\4a\4\SE{};}}
\L{\LB{___\V{ccre}_=_\V{MNEXT}(\V{cre});}}
\L{\LB{}}
\L{\LB{___\C{}\1\*_start_the_conversion_(it\4s_recursive)_\*\1\CE{}}}
\L{\LB{___\V{expconv}();}}
\L{\LB{___\*\V{ccre}_=_\N{0};}}
\L{\LB{___\K{return}_\V{cre};}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Actually_do_the_conversion}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{expconv}\K{static}_\K{void}_\V{expconv}(\K{void})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{cs};}\Tab{24}{\C{}\1\*_pointer_to_current_symbol_in_converted_exp_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{char}_\V{c};}\Tab{24}{\C{}\1\*_character_being_processed_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{char}_\*\V{acs};}\Tab{24}{\C{}\1\*_pointer_to_last_alternate_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{int}_\V{temp};}}
\L{\LB{}}
\L{\LB{___\C{}\1\*_let_the_conversion_begin_\*\1\CE{}}}
\L{\LB{___\V{acs}_=_\V{NULL};}}
\L{\LB{___\V{cs}_=_\V{NULL};}}
\L{\LB{___\K{while}_(\*\V{ure}_!=_\S{}\4\20\4\SE{})_\{}}
\L{\LB{}\Tab{8}{__\K{switch}_(\V{c}_=_\*\V{ure}++)_\{}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\K{case}_\S{}\4\2\2\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{switch}_(\V{c}_=_\*\V{ure}++)_\{}}
\L{\LB{}}
\L{\LB{}\Tab{16}{\C{}\1\*_escaped_characters_are_just_characters_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{default}:}}
\L{\LB{}\Tab{16}{\K{if}_(\V{cs}_==_\V{NULL}_\|\,\|_(\*\V{cs}_\&_\V{STR})_==_\N{0})_\{}}
\L{\LB{}\Tab{16}{___\V{cs}_=_\V{ccre};}}
\L{\LB{}\Tab{16}{___\*\V{cs}_=_\V{STR};}}
\L{\LB{}\Tab{16}{___\V{SCNT}(\V{cs})_=_\N{1};}}
\L{\LB{}\Tab{16}{___\V{ccre}_+=_\N{2};}}
\L{\LB{}\Tab{16}{\}_\K{else}}}
\L{\LB{}\Tab{16}{___\V{SCNT}(\V{cs})++;}}
\L{\LB{}\Tab{16}{\*\V{ccre}++_=_\V{c};}}
\L{\LB{}\Tab{16}{\K{break};}}
\L{\LB{}}
\L{\LB{}\Tab{16}{\C{}\1\*_normal(?)_metacharacters_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4a\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4d\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4e\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4p\4\SE{}:}}
\L{\LB{}\Tab{16}{\K{if}_(\V{acs}_!=_\V{NULL}_\&\&_\V{acs}_!=_\V{cs})_\{}}
\L{\LB{}\Tab{16}{___\K{do}_\{}}
\L{\LB{}\Tab{16}{__\V{temp}_=_\V{OCNT}(\V{acs});}}
\L{\LB{}\Tab{16}{__\V{OCNT}(\V{acs})_=_\V{ccre}_\-_\V{acs};}}
\L{\LB{}\Tab{16}{__\V{acs}_\-=_\V{temp};}}
\L{\LB{}\Tab{16}{___\}_\K{while}_(\V{temp}_!=_\N{0});}}
\L{\LB{}\Tab{16}{___\V{acs}_=_\V{NULL};}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\V{cs}_=_\V{ccre};}}
\L{\LB{}\Tab{16}{\*\V{cs}_=_\V{META};}}
\L{\LB{}\Tab{16}{\V{MSYM}(\V{cs})_=_\V{c};}}
\L{\LB{}\Tab{8}{____\V{ccre}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\K{break};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_just_put_the_symbol_in_\*\1\CE{}}}
\L{\LB{______\K{case}_\S{}\4\5\4\SE{}:}}
\L{\LB{______\K{case}_\S{}\4\$\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{acs}_!=_\V{NULL}_\&\&_\V{acs}_!=_\V{cs})_\{}}
\L{\LB{}\Tab{8}{____\K{do}_\{}}
\L{\LB{}\Tab{8}{_______\V{temp}_=_\V{OCNT}(\V{acs});}}
\L{\LB{}\Tab{8}{_______\V{OCNT}(\V{acs})_=_\V{ccre}_\-_\V{acs};}}
\L{\LB{}\Tab{8}{_______\V{acs}_\-=_\V{temp};}}
\L{\LB{}\Tab{8}{____\}_\K{while}_(\V{temp}_!=_\N{0});}}
\L{\LB{}\Tab{8}{____\V{acs}_=_\V{NULL};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\V{cs}_=_\V{ccre};}}
\L{\LB{}\Tab{8}{_\*\V{cs}_=_\V{META};}}
\L{\LB{}\Tab{8}{_\V{MSYM}(\V{cs})_=_\V{c};}}
\L{\LB{}\Tab{8}{_\V{ccre}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_mark_the_last_match_sequence_as_optional_\*\1\CE{}}}
\L{\LB{______\K{case}_\S{}\4?\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{cs})}}
\L{\LB{}\Tab{16}{\*\V{cs}_=_\*\V{cs}_\|_\V{OPT};}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_recurse_and_define_a_subexpression_\*\1\CE{}}}
\L{\LB{______\K{case}_\S{}\4(\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{acs}_!=_\V{NULL}_\&\&_\V{acs}_!=_\V{cs})_\{}}
\L{\LB{}\Tab{8}{____\K{do}_\{}}
\L{\LB{}\Tab{8}{_______\V{temp}_=_\V{OCNT}(\V{acs});}}
\L{\LB{}\Tab{8}{_______\V{OCNT}(\V{acs})_=_\V{ccre}_\-_\V{acs};}}
\L{\LB{}\Tab{8}{_______\V{acs}_\-=_\V{temp};}}
\L{\LB{}\Tab{8}{____\}_\K{while}_(\V{temp}_!=_\N{0});}}
\L{\LB{}\Tab{8}{____\V{acs}_=_\V{NULL};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\V{cs}_=_\V{ccre};}}
\L{\LB{}\Tab{8}{_\*\V{cs}_=_\V{OPER};}}
\L{\LB{}\Tab{8}{_\V{OSYM}(\V{cs})_=_\S{}\4(\4\SE{};}}
\L{\LB{}\Tab{8}{_\V{ccre}_=_\V{ONEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{_\V{expconv}();}}
\L{\LB{}\Tab{8}{_\V{OCNT}(\V{cs})_=_\V{ccre}_\-_\V{cs};}\Tab{40}{\C{}\1\*_offset_to_next_symbol_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_return_from_a_recursion_\*\1\CE{}}}
\L{\LB{______\K{case}_\S{}\4)\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{acs}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{____\K{do}_\{}}
\L{\LB{}\Tab{8}{_______\V{temp}_=_\V{OCNT}(\V{acs});}}
\L{\LB{}\Tab{8}{_______\V{OCNT}(\V{acs})_=_\V{ccre}_\-_\V{acs};}}
\L{\LB{}\Tab{8}{_______\V{acs}_\-=_\V{temp};}}
\L{\LB{}\Tab{8}{____\}_\K{while}_(\V{temp}_!=_\N{0});}}
\L{\LB{}\Tab{8}{____\V{acs}_=_\V{NULL};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\V{cs}_=_\V{ccre};}}
\L{\LB{}\Tab{8}{_\*\V{cs}_=_\V{META};}}
\L{\LB{}\Tab{8}{_\V{MSYM}(\V{cs})_=_\V{c};}}
\L{\LB{}\Tab{8}{_\V{ccre}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{_\K{return};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_Mark_the_last_match_sequence_as_having_an_alternate._\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\C{}\1\*_The_third_byte_will_contain_an_offset_to_jump_over_the_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\C{}\1\*_alternate_match_in_case_the_first_did_not_fail_\*\1\CE{}}}
\L{\LB{______\K{case}_\S{}\4\|\4\SE{}:}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{acs}_!=_\V{NULL}_\&\&_\V{acs}_!=_\V{cs})}}
\L{\LB{}\Tab{8}{____\V{OCNT}(\V{ccre})_=_\V{ccre}_\-_\V{acs};}\Tab{40}{\C{}\1\*_make_a_back_pointer_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{else}}}
\L{\LB{}\Tab{8}{____\V{OCNT}(\V{ccre})_=_\N{0};}}
\L{\LB{}\Tab{8}{_\*\V{cs}_\|=_\V{ALT};}}
\L{\LB{}\Tab{8}{_\V{cs}_=_\V{ccre};}}
\L{\LB{}\Tab{8}{_\*\V{cs}_=_\V{OPER};}}
\L{\LB{}\Tab{8}{_\V{OSYM}(\V{cs})_=_\S{}\4\|\4\SE{};}}
\L{\LB{}\Tab{8}{_\V{ccre}_=_\V{ONEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{_\V{acs}_=_\V{cs};}\Tab{24}{\C{}\1\*_remember_that_the_pointer_is_to_be_filled_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_if_it\4s_not_a_metasymbol,_just_build_a_character_string_\*\1\CE{}}}
\L{\LB{______\K{default}:}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{cs}_==_\V{NULL}_\|\,\|_(\*\V{cs}_\&_\V{STR})_==_\N{0})_\{}}
\L{\LB{}\Tab{8}{____\V{cs}_=_\V{ccre};}}
\L{\LB{}\Tab{8}{____\*\V{cs}_=_\V{STR};}}
\L{\LB{}\Tab{8}{____\V{SCNT}(\V{cs})_=_\N{1};}}
\L{\LB{}\Tab{8}{____\V{ccre}_=_\V{SSTR}(\V{cs});}}
\L{\LB{}\Tab{8}{_\}_\K{else}}}
\L{\LB{}\Tab{8}{____\V{SCNT}(\V{cs})++;}}
\L{\LB{}\Tab{8}{_\*\V{ccre}++_=_\V{c};}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{______\}}}
\L{\LB{___\}}}
\L{\LB{___\K{if}_(\V{acs}_!=_\V{NULL})_\{}}
\L{\LB{______\K{do}_\{}}
\L{\LB{}\Tab{8}{_\V{temp}_=_\V{OCNT}(\V{acs});}}
\L{\LB{}\Tab{8}{_\V{OCNT}(\V{acs})_=_\V{ccre}_\-_\V{acs};}}
\L{\LB{}\Tab{8}{_\V{acs}_\-=_\V{temp};}}
\L{\LB{______\}_\K{while}_(\V{temp}_!=_\N{0});}}
\L{\LB{______\V{acs}_=_\V{NULL};}}
\L{\LB{___\}}}
\L{\LB{___\K{return};}}
\L{\LB{\}_\C{}\1\*_end_of_\CE{}\V{expconv}()\C{}_\*\1\CE{}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*__The_following_routine_recognises_an_irregular_expression}}
\L{\LB{_\*__with_the_following_special_characters:}}
\L{\LB{_\*}}
\L{\LB{_\*}\Tab{8}{\texttt{\2?}}\Tab{24}{means_last_match_was_optional}}
\L{\LB{_\*}\Tab{8}{\texttt{\2a}}\Tab{24}{matches_any_number_of_characters}}
\L{\LB{_\*}\Tab{8}{\texttt{\2d}}\Tab{24}{matches_any_number_of_spaces_and_tabs}}
\L{\LB{_\*}\Tab{8}{\texttt{\2p}}\Tab{24}{matches_any_number_of_alphanumeric_characters.}}
\L{\LB{_\*}\Tab{24}{The_characters_matched_will_be_copied_into}}
\L{\LB{_\*}\Tab{24}{the_area_pointed_to_by_\CE{}\V{mstring}\C{}.}}
\L{\LB{_\*}\Tab{8}{\texttt{\2\|}}\Tab{24}{alternation}}
\L{\LB{_\*}\Tab{8}{\texttt{\2(_\2)}}\Tab{24}{grouping_used_mostly_for_alternation_and}}
\L{\LB{_\*}\Tab{24}{optionality}}
\L{\LB{_\*}}
\L{\LB{_\*__The_irregular_expression_must_be_translated_to_internal_form}}
\L{\LB{_\*__prior_to_calling_this_routine}}
\L{\LB{_\*}}
\L{\LB{_\*__The_value_returned_is_the_pointer_to_the_last_character_matched.}}
\L{\LB{_\*__If_\CE{}\V{strtptr}\C{}_is_non-\CE{}\V{NULL}\C{},_a_pointer_to_the_start_of_the_string_matched}}
\L{\LB{_\*__(excluding_\texttt{\2a}_matches)_will_be_returned_at_\CE{}\*\V{strtptr}\C{}.__}}
\L{\LB{_\*__If_\CE{}\V{mstring}\C{}_is_non-\CE{}\V{NULL}\C{},_the_string_matched_by_a_\texttt{\2p}_will_be_copied}}
\L{\LB{_\*__into_\CE{}\V{mstring}\C{}.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\V{boolean}_\V{\_escaped};}\Tab{32}{\C{}\1\*_true_if_we_are_currently_\CE{}\V{\_escaped}\C{}_\*\1\CE{}}}
\L{\LB{\K{char}_\*\V{\_sstart};}\Tab{32}{\C{}\1\*_start_of_string.__Set_in_\CE{}\V{putScp}()\C{}._\*\1\CE{}}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\Proc{expmatch}\K{char}_\*\V{expmatch}(}}
\L{\LB{___\K{register}_\K{char}_\*\V{s},}\Tab{32}{\C{}\1\*_string_to_check_for_a_match_in_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{char}_\*\V{re},}\Tab{32}{\C{}\1\*_a_converted_irregular_expression_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\*\V{strtptr},}\Tab{32}{\C{}\1\*_where_to_put_ptr_to_start_of_match_\*\1\CE{}}}
\L{\LB{___\K{char}_\*\V{mstring})}\Tab{32}{\C{}\1\*_where_to_put_whatever_matches_a_\texttt{\2p}_\*\1\CE{}}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{cs};}\Tab{32}{\C{}\1\*_the_current_symbol_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{char}_\*\V{ptr},_\*\V{s1};}\Tab{32}{\C{}\1\*_temporary_pointer_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{char}_\V{c};}\Tab{32}{\C{}\1\*_temporary_\*\1\CE{}}}
\L{\LB{___\V{boolean}_\V{matched};}\Tab{32}{\C{}\1\*_a_temporary_\CE{}\V{boolean}\C{}_\*\1\CE{}}}
\L{\LB{___}}
\L{\LB{___\C{}\1\*_initial_conditions_\*\1\CE{}}}
\L{\LB{___\K{if}_(\V{strtptr})}}
\L{\LB{______\*\V{strtptr}_=_\S{}\4\20\4\SE{};}}
\L{\LB{___\K{if}_(\V{re}_==_\V{NULL})}}
\L{\LB{______\K{return}_\V{NULL};}}
\L{\LB{___\V{cs}_=_\V{re};}}
\L{\LB{___\V{matched}_=_\V{FALSE};}}
\L{\LB{___}}
\L{\LB{___\C{}\1\*_loop_till_expression_string_is_exhausted_(or_at_least_pretty_tired)_\*\1\CE{}}}
\L{\LB{___\K{while}_(\*\V{cs})_\{}}
\L{\LB{______\K{switch}_(\*\V{cs}_\&_(\V{OPER}_\|_\V{STR}_\|_\V{META}))_\{}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_try_to_match_a_string_\*\1\CE{}}}
\L{\LB{______\K{case}_\V{STR}:}}
\L{\LB{}\Tab{8}{_\V{matched}_=_!((\*\V{re\_strncmp})(\V{s},_\V{SSTR}(\V{cs}),_\V{SCNT}(\V{cs})));}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{matched})_\{}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_hoorah:_it_matches_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{s}_+=_\V{SCNT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\V{cs}_=_\V{SNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{_\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{ALT})_\{}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_alternation:_skip_to_next_expression_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{cs}_=_\V{SNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{_\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{OPT})_\{}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_the_match_is_optional_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{cs}_=_\V{SNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\V{matched}_=_\N{1};}\Tab{40}{\C{}\1\*_indicate_a_successful_match_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\}_\K{else}_\{}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_no_match:_error_return_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_an_operator:_do_something_fancy_\*\1\CE{}}}
\L{\LB{______\K{case}_\V{OPER}:}}
\L{\LB{}\Tab{8}{_\K{switch}_(\V{OSYM}(\V{cs}))_\{}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_this_is_an_alternation_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4\|\4\SE{}:}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{matched})}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_last_thing_in_the_alternation_was_a_match:_skip_ahead_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{OPTR}(\V{cs});}}
\L{\LB{}\Tab{8}{____\K{else}}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_no_match:_keep_trying_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{ONEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\K{break};}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_this_is_a_grouping:_recurse_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4(\4\SE{}:}}
\L{\LB{}\Tab{8}{____\V{ptr}_=_\V{expmatch}(\V{s},_\V{ONEXT}(\V{cs}),_\V{strtptr},_\V{mstring});}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{ptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_the_subexpression_matched_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{s}_=_\V{ptr};}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{ALT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_alternation:_skip_to_next_expression_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{0};}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{OPT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_the_match_is_optional_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}\Tab{32}{\C{}\1\*_indicate_a_successful_match_\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_no_match:_error_return_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{____\}}}
\L{\LB{}\Tab{8}{____\V{cs}_=_\V{OPTR}(\V{cs});}}
\L{\LB{}\Tab{8}{____\K{break};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{}\Tab{8}{_}}
\L{\LB{}\Tab{8}{_\C{}\1\*_try_to_match_a_metasymbol_\*\1\CE{}}}
\L{\LB{______\K{case}_\V{META}:}}
\L{\LB{}\Tab{8}{_\K{switch}_(\V{MSYM}(\V{cs}))_\{}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_try_to_match_anything_and_remember_what_was_matched_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4p\4\SE{}:}}
\L{\LB{}\Tab{8}{____\C{}\1\*}}
\L{\LB{}\Tab{8}{_____\*__This_is_really_the_same_as_trying_the_match_the}}
\L{\LB{}\Tab{8}{_____\*__remaining_parts_of_the_expression_to_any_subset}}
\L{\LB{}\Tab{8}{_____\*__of_the_string.}}
\L{\LB{}\Tab{8}{_____\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{s1}_=_\V{s};}}
\L{\LB{}\Tab{8}{____\K{do}_\{}}
\L{\LB{}\Tab{8}{_______\V{ptr}_=_\V{expmatch}(\V{s1},_\V{MNEXT}(\V{cs}),_\V{strtptr},_\V{mstring});}}
\L{\LB{}\Tab{8}{_______\K{if}_(\V{ptr}_!=_\V{NULL}_\&\&_\V{s1}_!=_\V{s})_\{}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\C{}\1\*_we_have_a_match:_remember_the_match_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\K{if}_(\V{mstring})_\{}}
\L{\LB{}\Tab{16}{_____\V{strncpy}(\V{mstring},_\V{s},_(\V{size\_t})(\V{s1}_\-_\V{s}));}}
\L{\LB{}\Tab{16}{_____\V{mstring}[(\K{int})(\V{s1}_\-_\V{s})]_=_\S{}\4\20\4\SE{};}}
\L{\LB{}\Tab{16}{__\}}}
\L{\LB{}\Tab{16}{__\K{return}_\V{ptr};}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{8}{_______\}_\K{else}_\K{if}_(\V{ptr}_!=_\V{NULL}_\&\&_(\*\V{cs}_\&_\V{OPT}))_\{}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\C{}\1\*_\texttt{\2p}_was_optional,_so_no_match_is_ok_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\K{return}_\V{ptr};}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{8}{_______\}_\K{else}_\K{if}_(\V{ptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\C{}\1\*_not_optional_and_we_still_matched_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{_______\K{if}_(!\V{isalnum}(\*\V{s1})_\&\&_!\V{strchr}(\V{l\_id},_\*\V{s1}))}}
\L{\LB{}\Tab{16}{__\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{_______\K{if}_(\*\V{s1}_==_\S{}\4\2\2\4\SE{})}}
\L{\LB{}\Tab{16}{__\V{\_escaped}_=_\V{\_escaped}_?_\V{FALSE}_:_\V{TRUE};}}
\L{\LB{}\Tab{8}{_______\K{else}}}
\L{\LB{}\Tab{16}{__\V{\_escaped}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{____\}_\K{while}_(\*\V{s1}++);}}
\L{\LB{}\Tab{8}{____\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_try_to_match_anything_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4a\4\SE{}:}}
\L{\LB{}\Tab{8}{____\C{}\1\*}}
\L{\LB{}\Tab{8}{_____\*__This_is_really_the_same_as_trying_the_match_the}}
\L{\LB{}\Tab{8}{_____\*__remaining_parts_of_the_expression_to_any_subset}}
\L{\LB{}\Tab{8}{_____\*__of_the_string.}}
\L{\LB{}\Tab{8}{_____\*\1\CE{}}}
\L{\LB{}\Tab{8}{____\V{s1}_=_\V{s};}}
\L{\LB{}\Tab{8}{____\K{do}_\{}}
\L{\LB{}\Tab{8}{_______\C{}\1\*}}
\L{\LB{}\Tab{16}{\*_Hack_for_an_important_special_case:_if_the_next_thing}}
\L{\LB{}\Tab{16}{\*_in_the_pattern_is_a_string,_just_gobble_characters_until}}
\L{\LB{}\Tab{16}{\*_we_find_something_that_matches_that_string_(this_saves}}
\L{\LB{}\Tab{16}{\*_the_cost_of_a_recursive_call_on_\CE{}\V{expmatch}()\C{}_while_scanning}}
\L{\LB{}\Tab{16}{\*_for_the_start_of_comments_or_strings).__Since_many}}
\L{\LB{}\Tab{16}{\*_patterns_end_with_a_string,_we_also_treat_that_as_a}}
\L{\LB{}\Tab{16}{\*_special_case.}}
\L{\LB{}\Tab{16}{\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\K{if}(\*(\V{ptr}_=_\V{MNEXT}(\V{cs}))_==_\V{STR})_\{}}
\L{\LB{}\Tab{16}{__\V{c}_=_\*\V{SSTR}(\V{ptr});}}
\L{\LB{}\Tab{16}{__\K{while}(\*\V{s1}_\&\&_\*\V{s1}_!=_\V{c})}}
\L{\LB{}\Tab{16}{_____\V{s1}++;}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\K{if}_(\*\V{s1}_==_\N{0})}}
\L{\LB{}\Tab{16}{_____\K{return}_\V{NULL};}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\K{if}_(\V{SNEXT}(\V{ptr})_==_\N{0}_\&\&_(\V{s1}_!=_\V{s}_\|\,\|_\*\V{cs}_\&_\V{OPT}))_\{}}
\L{\LB{}\Tab{16}{_____\C{}\1\*_next_item_is_a_string,_it\4s_the_last_item_and}}
\L{\LB{}\Tab{16}{______\*_the_\texttt{\2a}_match_is_ok_---_just_loop_to_try_\&_match}}
\L{\LB{}\Tab{16}{______\*_the_string.}}
\L{\LB{}\Tab{16}{______\*\1\CE{}}}
\L{\LB{}\Tab{16}{_____\K{if}_(\V{strtptr})}}
\L{\LB{}\Tab{24}{\*\V{strtptr}_=_\V{s1};}}
\L{\LB{}\Tab{16}{_____}}
\L{\LB{}\Tab{16}{_____\V{cs}_=_\V{ptr};}}
\L{\LB{}\Tab{16}{_____\V{s}_=_\V{s1};}}
\L{\LB{}\Tab{16}{_____\K{break};}}
\L{\LB{}\Tab{16}{__\}}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{_______\V{ptr}_=_\V{expmatch}(\V{s1},_\V{MNEXT}(\V{cs}),_\V{strtptr},_\V{mstring});}}
\L{\LB{}\Tab{8}{_______\K{if}_(\V{ptr}_!=_\V{NULL}_\&\&_(\V{s1}_!=_\V{s}_\|\,\|_\*\V{cs}_\&_\V{OPT}))_\{}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\C{}\1\*_we_have_a_match_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\K{if}_(\V{strtptr})}}
\L{\LB{}\Tab{16}{_____\*\V{strtptr}_=_\V{s1};}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\K{return}_\V{ptr};}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{8}{_______\}_\K{else}_\K{if}_(\V{ptr}_!=_\V{NULL})_\{}}
\L{\LB{}\Tab{16}{__}}
\L{\LB{}\Tab{16}{__\C{}\1\*_not_optional_and_we_still_matched_\*\1\CE{}}}
\L{\LB{}\Tab{16}{__\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{_______\}}}
\L{\LB{}\Tab{8}{_______\K{if}_(\*\V{s1}_==_\S{}\4\2\2\4\SE{})}}
\L{\LB{}\Tab{16}{__\V{\_escaped}_=_\V{\_escaped}_?_\V{FALSE}_:_\V{TRUE};}}
\L{\LB{}\Tab{8}{_______\K{else}}}
\L{\LB{}\Tab{16}{__\V{\_escaped}_=_\V{FALSE};}}
\L{\LB{}\Tab{8}{____\}_\K{while}_(\*\V{s1}++);}}
\L{\LB{}\Tab{8}{____\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_fail_if_we_are_currently_\CE{}\V{\_escaped}\C{}_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4e\4\SE{}:}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{\_escaped})}}
\L{\LB{}\Tab{8}{_______\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{____\V{cs}_=_\V{MNEXT}(\V{cs});_}}
\L{\LB{}\Tab{8}{____\K{break};}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_match_any_number_of_tabs_and_spaces_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4d\4\SE{}:}}
\L{\LB{}\Tab{8}{____\V{ptr}_=_\V{s};}}
\L{\LB{}\Tab{8}{____\K{while}_(\*\V{s}_==_\S{}\4_\4\SE{}_\|\,\|_\*\V{s}_==_\S{}\4\2t\4\SE{})}}
\L{\LB{}\Tab{8}{_______\V{s}++;}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{s}_!=_\V{ptr}_\|\,\|_\V{s}_==_\V{\_sstart})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_match:_be_happy_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});_}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{s}_==_\S{}\4\2n\4\SE{}_\|\,\|_\*\V{s}_==_\S{}\4\20\4\SE{})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_match:_be_happy_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});_}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{ALT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_try_the_next_part_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{0};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{OPT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_doesn\4t_matter_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_no_match:_error_return_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\K{return}_\V{NULL};}}
\L{\LB{}}
\L{\LB{}\Tab{8}{____\K{break};}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_check_for_end_of_line_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4\$\4\SE{}:}}
\L{\LB{}\Tab{8}{____\K{if}_(\*\V{s}_==_\S{}\4\20\4\SE{}_\|\,\|_\*\V{s}_==_\S{}\4\2n\4\SE{})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_match:_be_happy_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{s}++;}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{ALT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_try_the_next_part_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{0};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{OPT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_doesn\4t_matter_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_no_match:_error_return_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{____\K{break};}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_check_for_start_of_line_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4\5\4\SE{}:}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{s}_==_\V{\_sstart})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_match:_be_happy_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{ALT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_try_the_next_part_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{0};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}_\K{if}_(\*\V{cs}_\&_\V{OPT})_\{}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_doesn\4t_matter_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\V{matched}_=_\N{1};}}
\L{\LB{}\Tab{8}{_______\V{cs}_=_\V{MNEXT}(\V{cs});}}
\L{\LB{}\Tab{8}{____\}_\K{else}}}
\L{\LB{}\Tab{8}{_______}}
\L{\LB{}\Tab{8}{_______\C{}\1\*_no_match:_error_return_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_______\K{return}_\V{NULL};}}
\L{\LB{}\Tab{8}{____\K{break};}}
\L{\LB{}\Tab{8}{____}}
\L{\LB{}\Tab{8}{____\C{}\1\*_end_of_a_subexpression:_return_success_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{case}_\S{}\4)\4\SE{}:}}
\L{\LB{}\Tab{8}{____\K{return}_\V{s};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{______\}}}
\L{\LB{___\}}}
\L{\LB{___\K{return}_\V{s};}}
\L{\LB{\}}}
\ProcCont{package}\end{lgrind}
% end of `regexp.c'

\chapter{lgrindef.c}
\section{Header}
% start of `lgrindef.h'
\LGinlinefalse\begin{lgrind}
\L{\LB{\C{}\1\*_Created_19_February_1996_\*\1\CE{}}}
\L{\LB{\K{\#define}_\V{BUFFERSIZE}_\N{8192}}}
\L{\LB{\K{int}_\V{tgetent}(\K{char}_\*\V{bp},_\K{char}_\*\V{name},_\K{char}_\*\V{file});}}
\L{\LB{\K{int}_\V{tgetnum}(\K{char}_\*\V{id});}}
\L{\LB{\K{int}_\V{tgetflag}(\K{char}_\*\V{id});}}
\L{\LB{\K{char}_\*\V{tgetstr}(\K{char}_\*\V{id},_\K{char}_\*\*\V{area});}}
\end{lgrind}
% end of `lgrindef.h'
\section{Code}
% start of `lgrindef.c'
\LGinlinefalse\begin{lgrind}
\L{\LB{\K{\#ifndef}_\V{lint}}}
\L{\LB{\K{static}_\K{char}_\V{sccsid}[\,]_=_\S{}\3@(\#)lgrindef.c}\Tab{40}{4.3_(Berkeley)_12\111\184\3\SE{};}}
\L{\LB{\K{static}_\K{char}_\V{Version}[\,]_=}}
\L{\LB{___\S{}\3\$Id:_lgrindef.c,v_1.2_91\110\101_00:29:08_gvr_Exp_\$\3\SE{};}}
\L{\LB{\K{\#endif}}}
\L{\LB{}}
\L{\LB{\C{}\1\*_Copyright_(c)_1979_Regents_of_the_University_of_California_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#define}_\V{MAXHOP}}\Tab{16}{\N{32}}\Tab{24}{\C{}\1\*_max_number_of_\texttt{tc=}_indirections_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{\#include}_\<\V{stdio}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{stdlib}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{ctype}.\V{h}\>}}
\L{\LB{\K{\#include}_\<\V{string}.\V{h}\>}}
\L{\LB{\K{\#include}_\S{}\3lgrindef.h\3\SE{}}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_grindcap_---_routines_for_dealing_with_the_language_definitions_data_base}}
\L{\LB{_\*}\Tab{8}{(code_stolen_almost_totally_from_termcap)}}
\L{\LB{_\*}}
\L{\LB{_\*_BUG:}\Tab{16}{Should_use_a_\3last\3_pointer_in_\CE{}\V{tbuf}\C{},_so_that_searching}}
\L{\LB{_\*}\Tab{16}{for_capabilities_alphabetically_would_not_be_a_$n^2/2$}}
\L{\LB{_\*}\Tab{16}{process_when_large_numbers_of_capabilities_are_given.}}
\L{\LB{_\*_Note:}\Tab{16}{If_we_add_a_last_pointer_now_we_will_screw_up_the}}
\L{\LB{_\*}\Tab{16}{\texttt{tc}_capability._We_really_should_compile_termcap.}}
\L{\LB{_\*}}
\L{\LB{_\*_Essentially_all_the_work_here_is_scanning_and_decoding_escapes}}
\L{\LB{_\*_in_string_capabilities.__We_don\4t_use_stdio_because_the_editor}}
\L{\LB{_\*_doesn\4t,_and_because_living_w\1o_it_is_not_hard.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{static}}\Tab{8}{\K{char}_\*\V{tbuf};}}
\L{\LB{\K{static}}\Tab{8}{\K{char}_\*\V{filename};}}
\L{\LB{\K{static}}\Tab{8}{\K{int}_\V{hopcount}_=_\N{0};_\C{}\1\*_detect_infinite_loops_in_termcap_\*\1\CE{}}}
\L{\LB{}}
\L{\LB{\K{static}_\K{char}}\Tab{16}{\*\V{tskip}(\K{char}_\*);}}
\L{\LB{\K{static}_\K{char}}\Tab{16}{\*\V{tdecode}(\K{char}_\*,_\K{char}_\*\*);}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_\CE{}\V{tnchktc}\C{}:_check_the_last_entry,_see_if_it\4s_\texttt{tc=xxx}._If_so,}}
\L{\LB{_\*_recursively_find_\texttt{xxx}_and_append_that_entry_(minus_the_names)}}
\L{\LB{_\*_to_take_the_place_of_the_\texttt{tc=xxx}_entry._This_allows_termcap}}
\L{\LB{_\*_entries_to_say_\3like_an_HP2621_but_doesn\4t_turn_on_the_labels\3.}}
\L{\LB{_\*_Note_that_this_works_because_of_the_left_to_right_scan.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tnchktc}\K{static}_\K{int}_\V{tnchktc}(\K{void})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{p},_\*\V{q};}}
\L{\LB{___\K{char}_\V{tcname}[\N{16}];}\Tab{24}{\C{}\1\*_name_of_similar_terminal_\*\1\CE{}}}
\L{\LB{___\K{char}_\V{tcbuf}[\V{BUFFERSIZE}];}}
\L{\LB{___\K{char}_\*\V{holdtbuf}_=_\V{tbuf};}}
\L{\LB{___\K{int}_\V{l};}}
\L{\LB{___}}
\L{\LB{___\V{p}_=_\V{tbuf}_+_\V{strlen}(\V{tbuf})_\-_\N{2};}\Tab{32}{\C{}\1\*_before_the_last_colon_\*\1\CE{}}}
\L{\LB{___\K{while}_(\*\-\-\V{p}_!=_\S{}\4:\4\SE{})}}
\L{\LB{______\K{if}_(\V{p}_\<_\V{tbuf})_\{}}
\L{\LB{_____\C{}\1\*_Not_very_informative._Wrong_BTW_(for_the_configs)._Shut_up._\*\1\CE{}_}}
\L{\LB{_____\C{}\1\*_write(2,_\3Bad_lgrind_entry\2n\3,_18);_\*\1\CE{}}}
\L{\LB{}\Tab{8}{_\K{return}_\N{0};}}
\L{\LB{______\}}}
\L{\LB{___\V{p}++;}}
\L{\LB{___\C{}\1\*_\CE{}\V{p}\C{}_now_points_to_beginning_of_last_field_\*\1\CE{}}}
\L{\LB{___\K{if}_(\V{p}[\N{0}]_!=_\S{}\4t\4\SE{}_\|\,\|_\V{p}[\N{1}]_!=_\S{}\4c\4\SE{})}}
\L{\LB{______\K{return}_\N{1};}}
\L{\LB{___\V{strcpy}(\V{tcname},\V{p}+\N{3});}}
\L{\LB{___\V{q}_=_\V{tcname};}}
\L{\LB{___\K{while}_(\V{q}_\&\&_\*\V{q}_!=_\S{}\4:\4\SE{})}}
\L{\LB{______\V{q}++;}}
\L{\LB{___\*\V{q}_=_\S{}\4\20\4\SE{};}}
\L{\LB{___\K{if}_(++\V{hopcount}_\>_\V{MAXHOP})_\{}}
\L{\LB{______\V{fprintf}(\V{stderr},_\S{}\3Infinite_tc=_loop\2n\3\SE{});}}
\L{\LB{______\K{return}_\N{0};}}
\L{\LB{___\}}}
\L{\LB{___\K{if}_(\V{tgetent}(\V{tcbuf},_\V{tcname},_\V{filename})_!=_\N{1})}}
\L{\LB{______\K{return}_\N{0};}}
\L{\LB{___\K{for}_(\V{q}_=_\V{tcbuf};_\*\V{q}_!=_\S{}\4:\4\SE{};_\V{q}++)}}
\L{\LB{______;}}
\L{\LB{___\V{l}_=_(\K{int})(\V{p}_\-_\V{holdtbuf}_+_\V{strlen}(\V{q}));}}
\L{\LB{___\K{if}_(\V{l}_\>_\V{BUFFERSIZE})_\{}}
\L{\LB{______\V{fprintf}(\V{stderr},_\S{}\3LGrind_entry_too_long\2n\3\SE{});}}
\L{\LB{______\V{q}[(\K{int})(\V{BUFFERSIZE}_\-_(\V{p}\-\V{tbuf}))]_=_\S{}\4\20\4\SE{};}}
\L{\LB{___\}}}
\L{\LB{___\V{strcpy}(\V{p},_\V{q}+\N{1});}}
\L{\LB{___\V{tbuf}_=_\V{holdtbuf};}}
\L{\LB{___\K{return}_\N{1};}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_\CE{}\V{tnamatch}\C{}_deals_with_name_matching.__The_first_field_of_the_termcap}}
\L{\LB{_\*_entry_is_a_sequence_of_names_separated_by_\texttt{\|}\4s,_so_we_compare}}
\L{\LB{_\*_against_each_such_name.__The_normal_\texttt{:}_terminator_after_the_last}}
\L{\LB{_\*_name_(before_the_first_field)_stops_us.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tnamatch}\K{static}_\K{int}_\V{tnamatch}(\K{char}_\*\V{np})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{Np},_\*\V{Bp};}}
\L{\LB{___}}
\L{\LB{___\V{Bp}_=_\V{tbuf};}}
\L{\LB{___\K{if}_(\*\V{Bp}_==_\S{}\4\#\4\SE{})}}
\L{\LB{______\K{return}_\N{0};}}
\L{\LB{___\K{for}_(;;)_\{}}
\L{\LB{______\K{for}_(\V{Np}_=_\V{np};_\*\V{Np}_\&\&_\V{toupper}(\*\V{Bp})_==_\V{toupper}(\*\V{Np});_\V{Bp}++,_\V{Np}++)}}
\L{\LB{}\Tab{16}{_\K{continue};}}
\L{\LB{______\K{if}_(\*\V{Np}_==_\S{}\4\20\4\SE{}_\&\&_(\*\V{Bp}_==_\S{}\4\|\4\SE{}_\|\,\|_\*\V{Bp}_==_\S{}\4:\4\SE{}_\|\,\|_\*\V{Bp}_==_\S{}\4\20\4\SE{}))}}
\L{\LB{}\Tab{16}{_\K{return}_\N{1};}}
\L{\LB{______\K{while}_(\*\V{Bp}_!=_\S{}\4\20\4\SE{}_\&\&_\*\V{Bp}_!=_\S{}\4:\4\SE{}_\&\&_\*\V{Bp}_!=_\S{}\4\|\4\SE{})}}
\L{\LB{}\Tab{16}{_\V{Bp}++;}}
\L{\LB{______\K{if}_(\*\V{Bp}_==_\S{}\4\20\4\SE{}_\|\,\|_\*\V{Bp}_==_\S{}\4:\4\SE{})}}
\L{\LB{}\Tab{16}{_\K{return}_\N{0};}}
\L{\LB{______\V{Bp}++;}}
\L{\LB{___\}}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Skip_to_the_next_field.__Notice_that_this_is_very_dumb,_not}}
\L{\LB{_\*_knowing_about_\texttt{\2:}_escapes_or_any_such.__If_necessary,_\texttt{:}\4s_can}}
\L{\LB{_\*_be_put_into_the_termcap_file_in_octal.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tskip}\K{static}_\K{char}_\*\V{tskip}(\K{register}_\K{char}_\*\V{bp})}}
\L{\LB{\{}}
\L{\LB{___\K{while}_(\*\V{bp}_\&\&_\*\V{bp}_!=_\S{}\4:\4\SE{})}}
\L{\LB{______\V{bp}++;}}
\L{\LB{___\K{if}_(\*\V{bp}_==_\S{}\4:\4\SE{})}}
\L{\LB{______\V{bp}++;}}
\L{\LB{___\K{return}_\V{bp};}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Return_the_(numeric)_option_id.}}
\L{\LB{_\*_Numeric_options_look_like}}
\L{\LB{_\*}\Tab{8}{\texttt{li\#80}}}
\L{\LB{_\*_i.e._the_option_string_is_separated_from_the_numeric_value_by}}
\L{\LB{_\*_a_\texttt{\#}_character.__If_the_option_is_not_found_we_return_$-1$.}}
\L{\LB{_\*_Note_that_we_handle_octal_numbers_beginning_with_$0$.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tgetnum}\K{int}_\V{tgetnum}(\K{char}_\*\V{id})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{int}_\V{i},_\V{base};}}
\L{\LB{___\K{register}_\K{char}_\*\V{bp}_=_\V{tbuf};}}
\L{\LB{___}}
\L{\LB{___\K{for}_(;;)_\{}}
\L{\LB{______\V{bp}_=_\V{tskip}(\V{bp});}}
\L{\LB{______\K{if}_(\*\V{bp}_==_\S{}\4\20\4\SE{})}}
\L{\LB{}\Tab{8}{_\K{return}_\-\N{1};}}
\L{\LB{______\K{if}_(\*\V{bp}++_!=_\V{id}[\N{0}]_\|\,\|_\*\V{bp}_==_\S{}\4\20\4\SE{}_\|\,\|_\*\V{bp}++_!=_\V{id}[\N{1}])}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{______\K{if}_(\*\V{bp}_==_\S{}\4@\4\SE{})}}
\L{\LB{}\Tab{8}{_\K{return}_\-\N{1};}}
\L{\LB{______\K{if}_(\*\V{bp}_!=_\S{}\4\#\4\SE{})}}
\L{\LB{}\Tab{8}{_\K{continue};}}
\L{\LB{______\V{bp}++;}}
\L{\LB{______\V{base}_=_\N{10};}}
\L{\LB{______\K{if}_(\*\V{bp}_==_\S{}\40\4\SE{})}}
\L{\LB{}\Tab{8}{_\V{base}_=_\N{8};}}
\L{\LB{______\V{i}_=_\N{0};}}
\L{\LB{______\K{while}_(\V{isdigit}(\*\V{bp}))}}
\L{\LB{}\Tab{8}{_\V{i}_\*=_\V{base},_\V{i}_+=_\*\V{bp}++_\-_\S{}\40\4\SE{};}}
\L{\LB{______\K{return}_\V{i};}}
\L{\LB{___\}}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Handle_a_flag_option.}}
\L{\LB{_\*_Flag_options_are_given_\3naked\3,_i.e._followed_by_a_\texttt{:}_or_the_end}}
\L{\LB{_\*_of_the_buffer.__Return_1_if_we_find_the_option,_or_0_if_it_is}}
\L{\LB{_\*_not_given.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tgetflag}\K{int}_\V{tgetflag}(\K{char}_\*\V{id})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{bp}_=_\V{tbuf};}}
\L{\LB{___}}
\L{\LB{___\K{for}_(;;)_\{}}
\L{\LB{______\V{bp}_=_\V{tskip}(\V{bp});}}
\L{\LB{______\K{if}_(!\*\V{bp})}}
\L{\LB{}\Tab{8}{_\K{return}_\N{0};}}
\L{\LB{______\K{if}_(\*\V{bp}++_==_\V{id}[\N{0}]_\&\&_\*\V{bp}_!=_\N{0}_\&\&_\*\V{bp}++_==_\V{id}[\N{1}])_\{}}
\L{\LB{}\Tab{8}{_\K{if}_(!\*\V{bp}_\|\,\|_\*\V{bp}_==_\S{}\4:\4\SE{})}}
\L{\LB{}\Tab{8}{____\K{return}_\N{1};}}
\L{\LB{}\Tab{8}{_\K{else}_\K{if}_(\*\V{bp}_==_\S{}\4@\4\SE{})}}
\L{\LB{}\Tab{8}{____\K{return}_\N{0};}}
\L{\LB{______\}}}
\L{\LB{___\}}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Get_a_string_valued_option.}}
\L{\LB{_\*_These_are_given_as}}
\L{\LB{_\*}\Tab{8}{\texttt{cl=\5Z}}}
\L{\LB{_\*_Much_decoding_is_done_on_the_strings,_and_the_strings_are}}
\L{\LB{_\*_placed_in_area,_which_is_a_ref_parameter_which_is_updated.}}
\L{\LB{_\*_No_checking_on_area_overflow.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tgetstr}\K{char}_\*\V{tgetstr}(\K{char}_\*\V{id},_\K{char}_\*\*\V{area})}}
\L{\LB{\{}}
\L{\LB{}\Tab{8}{\K{register}_\K{char}_\*\V{bp}_=_\V{tbuf},_\*\V{i};}}
\L{\LB{}\Tab{8}{\K{register}_\V{eq};}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\K{for}_(;;)_\{}}
\L{\LB{}\Tab{16}{\V{bp}_=_\V{tskip}(\V{bp});}}
\L{\LB{}\Tab{16}{\K{if}_(!\*\V{bp})}}
\L{\LB{}\Tab{24}{\K{return}_\N{0};}}
\L{\LB{}\Tab{16}{\V{eq}=\N{1};}}
\L{\LB{}\Tab{16}{\K{for}_(\V{i}=\V{id};_\*\V{i};)}}
\L{\LB{}\Tab{24}{\K{if}_(\*\V{i}++!=\*\V{bp}++)_\{_\V{eq}=\N{0};_\K{break};_\}}}
\L{\LB{}\Tab{16}{\K{if}_(!\V{eq})}}
\L{\LB{}\Tab{24}{\K{continue};}}
\L{\LB{}\Tab{16}{\K{if}_(\*\V{bp}_==_\S{}\4@\4\SE{})}}
\L{\LB{}\Tab{24}{\K{return}_\N{0};}}
\L{\LB{}\Tab{16}{\K{if}_(\*\V{bp}_!=_\S{}\4=\4\SE{})}}
\L{\LB{}\Tab{24}{\K{continue};}}
\L{\LB{}\Tab{16}{\V{bp}++;}}
\L{\LB{}\Tab{16}{\K{return}_\V{tdecode}(\V{bp},_\V{area});}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_\CE{}\V{tdecode}\C{}_does_the_grunge_work_to_decode_the}}
\L{\LB{_\*_string_capability_escapes.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tdecode}\K{static}_\K{char}_\*\V{tdecode}(\K{register}_\K{char}_\*\V{str},_\K{char}_\*\*\V{area})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{cp};}}
\L{\LB{___\K{register}_\K{char}_\V{c};_________\C{}\1\*_30.7.96_--_tryal_[sic]_\*\1\CE{}}}
\L{\LB{___}}
\L{\LB{___\V{cp}_=_\*\V{area};}}
\L{\LB{___\K{while}_((\V{c}_=_\*\V{str}++)_!=_\N{0})_\{}}
\L{\LB{______\K{if}_(\V{c}_==_\S{}\4:\4\SE{}_\&\&_\*(\V{cp}\-\N{1})_!=_\S{}\4\2\2\4\SE{})}}
\L{\LB{}\Tab{8}{_\K{break};}}
\L{\LB{______\*\V{cp}++_=_\V{c};}}
\L{\LB{___\}}}
\L{\LB{___\*\V{cp}++_=_\S{}\4\20\4\SE{};}}
\L{\LB{___\V{str}_=_\*\V{area};}}
\L{\LB{___\*\V{area}_=_\V{cp};}}
\L{\LB{___\K{return}_\V{str};}}
\L{\LB{\}}}
\ProcCont{package}\L{\LB{}}
\L{\LB{\C{}\1\*}}
\L{\LB{_\*_Get_an_entry_for_terminal_name_in_buffer_\CE{}\V{bp}\C{},}}
\L{\LB{_\*_from_the_termcap_file.__Parse_is_very_rudimentary;}}
\L{\LB{_\*_we_just_notice_escaped_newlines.}}
\L{\LB{_\*\1\CE{}}}
\L{\LB{\Proc{tgetent}\K{int}_\V{tgetent}(\K{char}_\*\V{bp},_\K{char}_\*\V{name},_\K{char}_\*\V{file})}}
\L{\LB{\{}}
\L{\LB{___\K{register}_\K{char}_\*\V{cp};}}
\L{\LB{___\K{register}_\K{char}_\V{c};________\C{}\1\*_30.7.96_--_tryal_[sic]_\*\1\CE{}}}
\L{\LB{___\K{register}_\K{int}_\V{i}_=_\N{0},_\V{cnt}_=_\N{0};}}
\L{\LB{___\K{char}_\V{ibuf}[\V{BUFFERSIZE}];}}
\L{\LB{___\V{FILE}_\*\V{tf};}}
\L{\LB{___}}
\L{\LB{___\V{tbuf}_=_\V{bp};}}
\L{\LB{___\V{tf}_=_\N{0};}}
\L{\LB{___\V{filename}_=_\V{file};}}
\L{\LB{___\V{tf}_=_\V{fopen}(\V{filename},_\S{}\3rt\3\SE{});}}
\L{\LB{___\K{if}_(\V{tf}_==_\V{NULL})}}
\L{\LB{______\K{return}_\-\N{1};}}
\L{\LB{___\K{for}_(;;)_\{}}
\L{\LB{______\V{cp}_=_\V{bp};}}
\L{\LB{______\K{for}_(;;)_\{}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{i}_==_\V{cnt})_\{}}
\L{\LB{}\Tab{8}{____\V{cnt}_=_\V{fread}(\V{ibuf},_\N{1},_\V{BUFFERSIZE},_\V{tf});}}
\L{\LB{}\Tab{8}{____\K{if}_(\V{cnt}_\<=_\N{0})_\{}}
\L{\LB{}\Tab{8}{_______\V{fclose}(\V{tf});}}
\L{\LB{}\Tab{8}{_______\K{return}_\N{0};}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\V{i}_=_\N{0};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\V{c}_=_\V{ibuf}[\V{i}++];}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{c}_==_\S{}\4\2n\4\SE{})_\{}}
\L{\LB{}\Tab{16}{\K{if}_(\V{cp}_\>_\V{bp}_\&\&_\V{cp}[\-\N{1}]_==_\S{}\4\2\2\4\SE{})\{}}
\L{\LB{}\Tab{16}{___\V{cp}\-\-;}}
\L{\LB{}\Tab{16}{___\K{continue};}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{\K{break};}}
\L{\LB{}\Tab{8}{_\}}}
\L{\LB{}\Tab{8}{_\K{if}_(\V{cp}_\>=_\V{bp}+\V{BUFFERSIZE})_\{}}
\L{\LB{}\Tab{16}{\V{fprintf}(\V{stderr},_\S{}\3LGrind_entry_too_long\2n\3\SE{});}}
\L{\LB{}\Tab{16}{\K{break};}}
\L{\LB{}\Tab{8}{_\}_\K{else}}}
\L{\LB{}\Tab{16}{\*\V{cp}++_=_\V{c};}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{}\Tab{8}{__\*\V{cp}_=_\S{}\4\20\4\SE{};}}
\L{\LB{}}
\L{\LB{}\Tab{8}{__\C{}\1\*}}
\L{\LB{}\Tab{8}{___\*_The_real_work_for_the_match.}}
\L{\LB{}\Tab{8}{___\*\1\CE{}}}
\L{\LB{}\Tab{8}{__\K{if}_(\V{tnamatch}(\V{name}))_\{}}
\L{\LB{}\Tab{8}{_\V{fclose}(\V{tf});}}
\L{\LB{}\Tab{8}{_\K{return}_\V{tnchktc}();}}
\L{\LB{}\Tab{8}{__\}}}
\L{\LB{___\}}}
\L{\LB{\}}}
\ProcCont{package}\end{lgrind}
% end of `lgrindef.c'

\end{document}
\endinput
%%
%% End of file `doc-lgrind.lg'.
