
/* This file was automatically generated by pclu.*/

#include "pclu_err.h"
#include "pclu_sys.h"


/**** BEGIN CLUSTER stream ****/

extern errcode stream_IB_1();
extern errcode stream_IB_2();
extern errcode stream_IB_3();
extern errcode stream_IB_4();
extern errcode stream_IB_5();
extern errcode stream_IB_6();
extern errcode stream_IB_7();
extern errcode stream_IB_8();
extern errcode stream_IB_9();
extern errcode stream_IB_10();
extern errcode stream_IB_11();
extern errcode stream_IB_12();
extern errcode stream_IB_13();
extern errcode stream_IB_14();
extern errcode stream_IB_15();
extern errcode stream_IB_16();
extern errcode stream_IB_17();
extern errcode stream_IB_18();
extern errcode stream_IB_19();
extern errcode stream_IB_20();
extern errcode stringOPequal();
extern errcode boolOPnot();
extern errcode file_nameOPget_dir();
extern errcode stringOPempty();
extern errcode file_nameOPget_suffix();
extern errcode file_nameOPget_other();
extern errcode file_nameOPget_name();
extern errcode streamOPprimary_input();
extern errcode streamOPprimary_output();
extern errcode streamOPerror_output();
extern errcode sequenceOPnew();
extern errcode oneofOPmake_3();
extern errcode arrayOPaddh();
extern errcode streamOPopen_streams();
extern errcode _chanOPopen();
extern errcode _bytevecOPcreate();
extern errcode _chanOPis_tty();
extern errcode _chanOPclose();
extern errcode arrayOPnew();
extern errcode oneofOPmake_6();
extern errcode streamOPtermcap();
extern errcode oneofOPmake_5();
extern errcode oneofOPmake_7();
extern errcode _chanOPget_name();
extern errcode streamOPget_prims();
extern errcode _chanOPerror_output();
extern errcode _chanOPprimary_input();
extern errcode _chanOPprimary_output();
extern errcode _chanOPequal();
extern errcode _get_termcap();
extern errcode recordOPset_15();
extern errcode intOPparse();
extern errcode _termcap();
extern errcode recordOPset_17();
extern errcode intOPgt();
extern errcode stringOPindexs();
extern errcode _chanOPget_speeds();
extern errcode recordOPget_3();
extern errcode recordOPset_1();
extern errcode recordOPset_13();
extern errcode recordOPget_1();
extern errcode intOPequal();
extern errcode stringOPconcat();
extern errcode stringOPappend();
extern errcode recordOPset_4();
extern errcode recordOPget_17();
extern errcode recordOPget_13();
extern errcode recordOPget_4();
extern errcode recordOPset_7();
extern errcode streamOPall_scripts();
extern errcode recordOPequal();
extern errcode sequenceOPaddh();
extern errcode recordOPset_3();
extern errcode sequenceOPelements();
extern errcode sequenceOPindexes();
extern errcode streamOPequal();
extern errcode sequenceOPfetch();
extern errcode sequenceOPconcat();
extern errcode sequenceOPsubseq();
extern errcode intOPsub();
extern errcode intOPadd();
extern errcode sequenceOPsize();
extern errcode sequenceOPempty();
extern errcode recordOPget_5();
extern errcode recordOPset_5();
extern errcode _chanOPgetb();
extern errcode recordOPget_2();
extern errcode _bytevecOPfetch();
extern errcode charOPequal();
extern errcode streamOPflush();
extern errcode streamOPtty_get1();
extern errcode streamOPtty_put1();
extern errcode stringOPfetch();
extern errcode recordOPset_2();
extern errcode streamOPscript();
extern errcode stringOPc2s();
extern errcode recordOPget_8();
extern errcode recordOPget_9();
extern errcode arrayOPempty();
extern errcode recordOPget_19();
extern errcode _chanOPgetc();
extern errcode recordOPset_8();
extern errcode recordOPset_6();
extern errcode arrayOPbottom();
extern errcode _chanOPpending();
extern errcode streamOPempty();
extern errcode streamOPpeekc();
extern errcode stringOPsize();
extern errcode _chanOPput();
extern errcode _chanOPputc();
extern errcode streamOPtty_put();
extern errcode recordOPget_14();
extern errcode _chanOPreset();
extern errcode recordOPset_12();
extern errcode arrayOPset_low();
extern errcode arrayOPtrim();
extern errcode recordOPset_14();
extern errcode _chanOPputb();
extern errcode recordOPget_12();
extern errcode recordOPget_11();
extern errcode recordOPset_11();
extern errcode recordOPget_15();
extern errcode _chanOPget_date();
extern errcode oneofOPmake_1();
extern errcode arrayOPindexes();
extern errcode arrayOPfetch();
extern errcode arrayOPstore();
extern errcode arrayOPremh();
extern errcode _chanOPabort();
extern errcode oneofOPis_1();
extern errcode oneofOPis_6();
extern errcode streamOPgets();
extern errcode arrayOPreml();
extern errcode recordOPget_6();
extern errcode streamOPputs();
extern errcode streamOPputc();
extern errcode _chanOPget();
extern errcode stringOPindexc();
extern errcode streamOPlines();
extern errcode recordOPget_10();
extern errcode recordOPget_18();
extern errcode streamOPedit();
extern errcode streamOPtty_get();
extern errcode streamOPstr_get();
extern errcode streamOPecho();
extern errcode arrayOPaddl();
extern errcode stringOPac2s();
extern errcode stringOPsubstr();
extern errcode stringOPrest();
extern errcode stringOPchars();
extern errcode _chanOPputs();
extern errcode _bytevecOPstore();
extern errcode boolOPequal();
extern errcode recordOPget_16();
extern errcode intOPlt();
extern errcode charOPge();
extern errcode charOPle();
extern errcode streamOPputspace();
extern errcode file_nameOPparse();
extern errcode oneofOPmake_2();
extern errcode oneofOPmake_4();
extern errcode _bytevecOPindexc();
extern errcode _cvt();
extern errcode streamOPputs_image();
extern errcode _eventOPdefer();
extern errcode _bytevecOPmove_lr();
extern errcode streamOPrubout();
extern errcode streamOPerase();
extern errcode intOPfrom_to();
extern errcode _eventOPundefer();
extern errcode charOPc2i();
extern errcode _chanOPputi();
extern errcode intOPmod();
extern errcode intOPle();
extern errcode recordOPget_7();
extern errcode charOPlt();
extern errcode streamOPcalc_pos();
extern errcode intOPfrom_to_by();
extern errcode streamOPttydsp();
extern errcode recordOPset_18();
extern errcode stringOPs2ac();
extern errcode recordOPset_19();
extern errcode recordOPset_10();
extern errcode recordOPset_16();
extern errcode recordOPset_9();
extern errcode pstreamOPtext();
extern errcode streamOPcan_read();
extern errcode pstreamOPtextc();
extern errcode streamOPcan_write();
extern errcode streamOPis_closed();
extern errcode file_nameOPprint();
extern errcode streamOPget_name();
extern errcode arrayOPelements();
extern errcode streamOPclose();
extern errcode streamOPabort();
extern errcode streamOPprint();
extern OWN_req string_ownreqs;
extern struct OPS *string_ops;
extern struct REQS *array_of_t_reqs;
extern struct OPS *char_ops;
extern OWN_req array_ownreqs;
extern struct OPS *array_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
extern struct OPS *_bytevec_ops;
extern struct OPS *_chan_ops;
extern struct OPS *int_ops;
extern struct OPS *bool_ops;
extern struct OPS *array_of_char_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
extern struct OPS *null_ops;
extern struct OPS *record_chars_index_line_newln_ops;
extern struct OPS *record_bvec_chan_index_line_max_ops;
extern struct OPS *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
extern struct OPS *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
extern struct REQS *sequence_of_t_reqs;
extern struct OPS *stream_ops;
extern OWN_req sequence_ownreqs;
extern struct OPS *sequence_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
extern struct OPS *oneof_closed_istr_nul_ostr_read_tty_write_ops;
extern struct OPS *file_name_ops;
extern struct OPS *sequence_of_stream_ops;
struct OPS  *record_buf_name_scripting_scripts_ops;
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
CLUREF STR_read;
CLUREF STR_write;
CLUREF STR_append;
CLUREF STR_bad_040access_040mode;
CLUREF STR__057dev;
CLUREF STR_p;
CLUREF STR_e;
CLUREF STR_cannot_040read_040from_040this_040stream;
CLUREF STR_null;
CLUREF STR_tty;
CLUREF STR_modify;
CLUREF STR_;
CLUREF STR__072co_043;
CLUREF STR__072li_043;
CLUREF STR__072hc_072;
CLUREF STR__072bs_072;
CLUREF STR__010;
CLUREF STR__072bc_075;
CLUREF STR__072ce_075;
CLUREF STR__072os_072;
CLUREF STR__072eo_072;
CLUREF STR__072cl_075;
CLUREF STR__012;
CLUREF STR_cannot_040write_040to_040this_040stream;
CLUREF STR_no_040line_040numbers;
CLUREF STR_cannot_040get_040date;
CLUREF STR_cannot_040set_040date;
CLUREF STR_no_040name_040for_040string_040stream;
CLUREF STR_not_040a_040string_040output_040stream;
CLUREF STR__136_077;
CLUREF STR_not_040a_040terminal_040stream;
CLUREF STR_cannot_040rescan_040on_040this_040stream;
CLUREF STR_input_040is_040always_040buffered;
CLUREF STR_output_040is_040always_040buffered;
CLUREF STR_cannot_040disable_040eof_040on_040this_040stream;
CLUREF STR_cannot_040enable_040eof_040on_040this_040stream;
CLUREF STR_stream_133;
CLUREF STR__050internal_051;
CLUREF STR_does_040not_040contain_040a_040_137chan;
static int stream_own_init = 0;
OWN_req stream_ownreqs = {0,0};
CLUREF streamOPfree;
CLUREF streamOPfreebuf;
errcode stream_own_init_proc()
{
struct {
    errcode err;
    } locals;
    enter_own_init_proc();
        if (stream_own_init == 0) {
        add_parm_info_type(0, char_ops, array_of_t_reqs);
        find_type_instance(array_ops, 1, &array_ownreqs, &(array_of_char_ops));
        add_selector_info("back", 0, string_ops); 
        add_selector_info("bvec", 1, _bytevec_ops); 
        add_selector_info("chan", 2, _chan_ops); 
        add_selector_info("clear", 3, string_ops); 
        add_selector_info("disp", 4, int_ops); 
        add_selector_info("echo", 5, bool_ops); 
        add_selector_info("edit", 6, bool_ops); 
        add_selector_info("eof", 7, bool_ops); 
        add_selector_info("eofok", 8, bool_ops); 
        add_selector_info("ibf", 9, bool_ops); 
        add_selector_info("image", 10, bool_ops); 
        add_selector_info("index", 11, int_ops); 
        add_selector_info("kill", 12, string_ops); 
        add_selector_info("line", 13, int_ops); 
        add_selector_info("llen", 14, int_ops); 
        add_selector_info("obf", 15, bool_ops); 
        add_selector_info("plen", 16, int_ops); 
        add_selector_info("prompt", 17, string_ops); 
        add_selector_info("rescan", 18, array_of_char_ops); 
        find_selector_ops("record", 19, &(record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops));
        add_selector_info("chars", 0, string_ops); 
        add_selector_info("index", 1, int_ops); 
        add_selector_info("line", 2, int_ops); 
        add_selector_info("newln", 3, char_ops); 
        find_selector_ops("record", 4, &(record_chars_index_line_newln_ops));
        add_selector_info("bvec", 0, _bytevec_ops); 
        add_selector_info("chan", 1, _chan_ops); 
        add_selector_info("index", 2, int_ops); 
        add_selector_info("line", 3, int_ops); 
        add_selector_info("max", 4, int_ops); 
        find_selector_ops("record", 5, &(record_bvec_chan_index_line_max_ops));
        add_selector_info("bvec", 0, _bytevec_ops); 
        add_selector_info("chan", 1, _chan_ops); 
        add_selector_info("index", 2, int_ops); 
        add_selector_info("obf", 3, bool_ops); 
        find_selector_ops("record", 4, &(record_bvec_chan_index_obf_ops));
        add_selector_info("closed", 0, null_ops); 
        add_selector_info("istr", 1, record_chars_index_line_newln_ops); 
        add_selector_info("nul", 2, null_ops); 
        add_selector_info("ostr", 3, array_of_char_ops); 
        add_selector_info("read", 4, record_bvec_chan_index_line_max_ops); 
        add_selector_info("tty", 5, record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops); 
        add_selector_info("write", 6, record_bvec_chan_index_obf_ops); 
        find_selector_ops("oneof", 7, &(oneof_closed_istr_nul_ostr_read_tty_write_ops));
        add_parm_info_type(0, stream_ops, sequence_of_t_reqs);
        find_type_instance(sequence_ops, 1, &sequence_ownreqs, &(sequence_of_stream_ops));
        add_selector_info("buf", 0, oneof_closed_istr_nul_ostr_read_tty_write_ops); 
        add_selector_info("name", 1, file_name_ops); 
        add_selector_info("scripting", 2, bool_ops); 
        add_selector_info("scripts", 3, sequence_of_stream_ops); 
        find_selector_ops("record", 4, &(record_buf_name_scripting_scripts_ops));
        add_parm_info_type(0, stream_ops, array_of_t_reqs);
        find_type_instance(array_ops, 1, &array_ownreqs, &(array_of_stream_ops));
        stringOPcons("read", CLU_1, CLU_4, &STR_read);
        stringOPcons("write", CLU_1, CLU_5, &STR_write);
        stringOPcons("append", CLU_1, CLU_6, &STR_append);
        stringOPcons("bad access mode", CLU_1, CLU_15, &STR_bad_040access_040mode);
        stringOPcons("/dev", CLU_1, CLU_4, &STR__057dev);
        stringOPcons("p", CLU_1, CLU_1, &STR_p);
        stringOPcons("e", CLU_1, CLU_1, &STR_e);
        stringOPcons("cannot read from this stream", CLU_1, CLU_28, &STR_cannot_040read_040from_040this_040stream);
        stringOPcons("null", CLU_1, CLU_4, &STR_null);
        stringOPcons("tty", CLU_1, CLU_3, &STR_tty);
        stringOPcons("modify", CLU_1, CLU_6, &STR_modify);
        stringOPcons("", CLU_1, CLU_0, &STR_);
        stringOPcons(":co#", CLU_1, CLU_4, &STR__072co_043);
        stringOPcons(":li#", CLU_1, CLU_4, &STR__072li_043);
        stringOPcons(":hc:", CLU_1, CLU_4, &STR__072hc_072);
        stringOPcons(":bs:", CLU_1, CLU_4, &STR__072bs_072);
        stringOPcons("\b", CLU_1, CLU_1, &STR__010);
        stringOPcons(":bc=", CLU_1, CLU_4, &STR__072bc_075);
        stringOPcons(":ce=", CLU_1, CLU_4, &STR__072ce_075);
        stringOPcons(":os:", CLU_1, CLU_4, &STR__072os_072);
        stringOPcons(":eo:", CLU_1, CLU_4, &STR__072eo_072);
        stringOPcons(":cl=", CLU_1, CLU_4, &STR__072cl_075);
        stringOPcons("\n", CLU_1, CLU_1, &STR__012);
        stringOPcons("cannot write to this stream", CLU_1, CLU_27, &STR_cannot_040write_040to_040this_040stream);
        stringOPcons("no line numbers", CLU_1, CLU_15, &STR_no_040line_040numbers);
        stringOPcons("cannot get date", CLU_1, CLU_15, &STR_cannot_040get_040date);
        stringOPcons("cannot set date", CLU_1, CLU_15, &STR_cannot_040set_040date);
        stringOPcons("no name for string stream", CLU_1, CLU_25, &STR_no_040name_040for_040string_040stream);
        stringOPcons("not a string output stream", CLU_1, CLU_26, &STR_not_040a_040string_040output_040stream);
        stringOPcons("^?", CLU_1, CLU_2, &STR__136_077);
        stringOPcons("not a terminal stream", CLU_1, CLU_21, &STR_not_040a_040terminal_040stream);
        stringOPcons("cannot rescan on this stream", CLU_1, CLU_28, &STR_cannot_040rescan_040on_040this_040stream);
        stringOPcons("input is always buffered", CLU_1, CLU_24, &STR_input_040is_040always_040buffered);
        stringOPcons("output is always buffered", CLU_1, CLU_25, &STR_output_040is_040always_040buffered);
        stringOPcons("cannot disable eof on this stream", CLU_1, CLU_33, &STR_cannot_040disable_040eof_040on_040this_040stream);
        stringOPcons("cannot enable eof on this stream", CLU_1, CLU_32, &STR_cannot_040enable_040eof_040on_040this_040stream);
        stringOPcons("stream[", CLU_1, CLU_7, &STR_stream_133);
        stringOPcons("(internal)", CLU_1, CLU_10, &STR__050internal_051);
        stringOPcons("does not contain a _chan", CLU_1, CLU_24, &STR_does_040not_040contain_040a_040_137chan);
        stream_own_init = 1;
        {
            {streamOPfree.tf = false;
            }
            }
        streamOPfreebuf.num = UNINIT;
        {signal(ERR_ok);}
    ex_0: pclu_unhandled(locals.err); {signal(ERR_failure);}
        }
    }

extern struct dbg_info* dbg_info_streamOPopen;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPopen_TRACE
int streamOPopen_TRACE;
extern struct OPS *array_of_stream_ops;
typedef struct {
        int hdr;
        int count;
        var_desc vds[96];
        } Vlist96;
static Vlist96 owns_stream = {0, 96,{ {0, 2, "stream_init", &int_ops}
,  {0, 2, "free", &bool_ops},  {0, 2, "freebuf", &_bytevec_ops}, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
,  {0, 2, "list", &array_of_stream_ops}, {0, 2, "streamOPopen_init", &int_ops}
,  {0, 2, "pri", &stream_ops},  {0, 2, "pro", &stream_ops}, {0, 2, "streamOPopen_init", &int_ops}
,  {0, 2, "pri", &stream_ops},  {0, 2, "pro", &stream_ops}, {0, 2, "streamOPopen_init", &int_ops}
,  {0, 2, "init", &bool_ops},  {0, 2, "ero", &stream_ops}, {0, 2, "streamOPopen_init", &int_ops}
,  {0, 2, "init", &bool_ops},  {0, 2, "pri", &stream_ops},  {0, 2, "pro", &stream_ops}, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
,  {0, 2, "tmp", &array_of_char_ops},  {0, 2, "inuse", &bool_ops}, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
, {0, 2, "streamOPopen_init", &int_ops}
}
};
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
static int streamOPopen_own_init = 0;

/**** BEGIN PROCEDURE open ****/

errcode streamOPopen(fn, mode, ret_1)
CLUREF fn;
CLUREF mode;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF _can_read;
        CLUREF _can_write;
        CLUREF st;
        CLUREF ch;
        CLUREF bvec;
        CLUREF b;
        CLUREF istty;
        CLUREF nch;
        CLUREF tb;
        CLUREF fn;
        CLUREF mode;
        } locals;
    locals._can_read.num = UNINIT;
    locals._can_write.num = UNINIT;
    locals.st.num = UNINIT;
    locals.ch.num = UNINIT;
    locals.bvec.num = UNINIT;
    locals.b.num = UNINIT;
    locals.istty.num = UNINIT;
    locals.nch.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.fn.num = UNINIT;
    locals.mode.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPopen;
    locals.fn = fn;
    locals.mode = mode;
        if (streamOPopen_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPopen_own_init = 1;
    }
    enter_proc(84);

  LINE(86);
    {
        {CLUREF T_1_1;
        locals.err = stringOPequal(locals.mode, STR_read, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals._can_read.num = T_1_1.num;
        }
        }

  LINE(87);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        locals.err = stringOPequal(locals.mode, STR_write, &T_1_2);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_1.num = T_1_2.num;
        if (!T_1_2.num) {
            locals.err = stringOPequal(locals.mode, STR_append, &T_1_3);
            if (locals.err != ERR_ok) goto ex_0;
            T_1_1.num = T_1_3.num;
        }
        locals._can_write.num = T_1_1.num;
        }
        }

  LINE(88);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals._can_read.num;
    if (!locals._can_read.num) {
        T_1_1.num = locals._can_write.num;
    }
    T_1_2.num = T_1_1.num ^ 1;
    if (T_1_2.num == true) {

  LINE(89);
        {
        elist[0] = STR_bad_040access_040mode;
        {signal (ERR_not_possible);}}
        }
        }/* end if */

  LINE(90);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    CLUREF T_1_6;
    CLUREF T_1_7;
    CLUREF T_1_8;
    locals.err = file_nameOPget_dir(locals.fn, &T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    locals.err = stringOPequal(T_1_3, STR__057dev, &T_1_4);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_2.num = T_1_4.num;
    if (T_1_4.num) {
        locals.err = file_nameOPget_suffix(locals.fn, &T_1_5);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = stringOPempty(T_1_5, &T_1_6);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_2.num = T_1_6.num;
    }
    T_1_1.num = T_1_2.num;
    if (T_1_2.num) {
        locals.err = file_nameOPget_other(locals.fn, &T_1_7);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = stringOPempty(T_1_7, &T_1_8);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_1.num = T_1_8.num;
    }
    if (T_1_1.num == true) {

  LINE(92);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        locals.err = file_nameOPget_name(locals.fn, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = stringOPequal(T_2_1, STR_p, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        if (T_2_2.num == true) {

  LINE(93);
            {
            if (locals._can_read.num == true) {

  LINE(94);
                {
                {
                CLUREF T_4_1;
                locals.err = streamOPprimary_input(&T_4_1);
                if (locals.err != ERR_ok) goto ex_0;
                ret_1->num = T_4_1.num;
                }
                {signal (ERR_ok);}}
                }
            else {

  LINE(95);
                {
                {
                CLUREF T_4_1;
                locals.err = streamOPprimary_output(&T_4_1);
                if (locals.err != ERR_ok) goto ex_0;
                ret_1->num = T_4_1.num;
                }
                {signal (ERR_ok);}}
                }}/* end if */
            }
        else {
        CLUREF T_2_3;
        CLUREF T_2_4;
        locals.err = file_nameOPget_name(locals.fn, &T_2_3);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = stringOPequal(T_2_3, STR_e, &T_2_4);
        if (locals.err != ERR_ok) goto ex_0;
        if (T_2_4.num == true) {

  LINE(98);
            {
            if (locals._can_write.num == true) {

  LINE(99);
                {
                {
                CLUREF T_4_1;
                locals.err = streamOPerror_output(&T_4_1);
                if (locals.err != ERR_ok) goto ex_0;
                ret_1->num = T_4_1.num;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */

  LINE(100);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            }
        else {
        CLUREF T_2_5;
        CLUREF T_2_6;
        locals.err = file_nameOPget_name(locals.fn, &T_2_5);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = stringOPequal(T_2_5, STR_null, &T_2_6);
        if (locals.err != ERR_ok) goto ex_0;
        if (T_2_6.num == true) {

  LINE(102);
            {
                {CLUREF T_3_1;
                CLUREF T_3_2;
                CLUREF T_3_3;
                RecordAlloc(4, T_3_1);
                T_3_1.vec->data[1]  = locals.fn.num;
                locals.err = sequenceOPnew(&T_3_2);
                if (locals.err != ERR_ok) goto ex_0;
                T_3_1.vec->data[3]  = T_3_2.num;
                T_3_1.vec->data[2]  = false;
                CellAlloc(3, nil, T_3_3);
                T_3_1.vec->data[0]  = T_3_3.num;
                locals.st.num = T_3_1.num;
                }
                }

  LINE(106);
            {
            CLUREF T_3_1;
            locals.err = streamOPopen_streams(&T_3_1);
            if (locals.err != ERR_ok) goto ex_0;
            locals.err = arrayOPaddh(T_3_1, locals.st);
            if (locals.err != ERR_ok) goto ex_0;
            }

  LINE(107);
            {
            {
            ret_1->num = locals.st.num;
            }
            {signal (ERR_ok);}}
            }
        else {
        CLUREF T_2_7;
        CLUREF T_2_8;
        locals.err = file_nameOPget_name(locals.fn, &T_2_7);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = stringOPequal(T_2_7, STR_tty, &T_2_8);
        if (locals.err != ERR_ok) goto ex_0;
        if (T_2_8.num == true) {

  LINE(109);
            {
            locals.mode = STR_modify;
            }
            }
            }}}}/* end if */
        }
        }/* end if */

  LINE(111);
    {
        {CLUREF T_2_1;
        locals.err = _chanOPopen(locals.fn, locals.mode, CLU_0, &T_2_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.ch.num = T_2_1.num;
        }
        }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(113);
    locals.bvec.num = UNINIT;

  LINE(114);
    {
    if (streamOPfree.num == true) {

  LINE(115);
        {
        locals.bvec.num = streamOPfreebuf.num;
        }

  LINE(116);
        {
        streamOPfree.tf = false;
        }
        }
    else {

  LINE(117);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = 4096;
        locals.err = _bytevecOPcreate(T_2_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.bvec.num = T_2_2.num;
        }
        }}/* end if */

  LINE(119);
    locals.b.num = UNINIT;

  LINE(120);
    {
        {CLUREF T_1_1;
        locals.err = _chanOPis_tty(locals.ch, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.istty.num = T_1_1.num;
        }
        }

  LINE(121);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    CLUREF T_2_3;
    T_2_1.num = locals.istty.num;
    if (locals.istty.num) {
        locals.err = stringOPequal(locals.mode, STR_modify, &T_2_2);
        if (locals.err != ERR_ok) goto ex_2;
        T_2_3.num = T_2_2.num ^ 1;
        T_2_1.num = T_2_3.num;
    }
    if (T_2_1.num == true) {

  LINE(122);
        {
            {CLUREF T_3_1;
            locals.err = _chanOPopen(locals.fn, STR_modify, CLU_0, &T_3_1);
            if (locals.err != ERR_ok) goto ex_2;
            locals.nch.num = T_3_1.num;
            }
            }

  LINE(123);
        {
        locals.err = _chanOPclose(locals.ch);
        if (locals.err != ERR_ok) goto ex_2;
        }

  LINE(124);
        {
        locals.ch.num = locals.nch.num;
        }
        }
        }/* end if */
        goto end_2;
        ex_2:
            if ((locals.err == ERR_not_possible)) {

  LINE(125);
                {
                locals.istty.tf = false;
                }
            }
            else {
                goto ex_0;
            }
        end_2:;

  LINE(126);
    {
    if (locals.istty.num == true) {

  LINE(127);
        {
            {CLUREF T_2_1;
            CLUREF T_2_2;
            RecordAlloc(19, T_2_1);
            T_2_1.vec->data[1]  = locals.bvec.num;
            T_2_1.vec->data[4]  = 1;
            T_2_1.vec->data[11]  = 0;
            T_2_1.vec->data[9]  = true;
            T_2_1.vec->data[15]  = true;
            T_2_1.vec->data[10]  = false;
            T_2_1.vec->data[2]  = locals.ch.num;
            locals.err = arrayOPnew(&T_2_2);
            if (locals.err != ERR_ok) goto ex_0;
            T_2_1.vec->data[18]  = T_2_2.num;
            T_2_1.vec->data[5]  = false;
            T_2_1.vec->data[7]  = false;
            T_2_1.vec->data[8]  = true;
            T_2_1.vec->data[13]  = 1;
            T_2_1.vec->data[17]  = STR_.num;
            T_2_1.vec->data[6]  = false;
            T_2_1.vec->data[14]  = 0;
            T_2_1.vec->data[16]  = 0;
            T_2_1.vec->data[0]  = STR_.num;
            T_2_1.vec->data[12]  = STR_.num;
            T_2_1.vec->data[3]  = STR_.num;
            locals.tb.num = T_2_1.num;
            }
            }

  LINE(146);
        {
        CLUREF T_2_1;
        CellAlloc(6, locals.tb.num, T_2_1);
        locals.b.num = T_2_1.num;
        }

  LINE(147);
        {
        CLUREF T_2_1;
        locals.err = stringOPequal(locals.mode, STR_modify, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        if (T_2_1.num == true) {

  LINE(148);
            {
            locals.err = streamOPtermcap(locals.tb, STR_);
            if (locals.err != ERR_ok) goto ex_0;
            }
            }
            }/* end if */
        }
    else {
    if (locals._can_read.num == true) {

  LINE(150);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        RecordAlloc(5, T_2_1);
        T_2_1.vec->data[0]  = locals.bvec.num;
        T_2_1.vec->data[2]  = 1;
        T_2_1.vec->data[4]  = 0;
        T_2_1.vec->data[3]  = 1;
        T_2_1.vec->data[1]  = locals.ch.num;
        CellAlloc(5, T_2_1.num, T_2_2);
        locals.b.num = T_2_2.num;
        }
        }
    else {

  LINE(155);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        RecordAlloc(4, T_2_1);
        T_2_1.vec->data[0]  = locals.bvec.num;
        T_2_1.vec->data[2]  = 0;
        T_2_1.vec->data[3]  = true;
        T_2_1.vec->data[1]  = locals.ch.num;
        CellAlloc(7, T_2_1.num, T_2_2);
        locals.b.num = T_2_2.num;
        }
        }}}/* end if */

  LINE(160);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        RecordAlloc(4, T_1_1);
        locals.err = _chanOPget_name(locals.ch, &T_1_2);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_1.vec->data[1]  = T_1_2.num;
        locals.err = sequenceOPnew(&T_1_3);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_1.vec->data[3]  = T_1_3.num;
        T_1_1.vec->data[2]  = false;
        T_1_1.vec->data[0]  = locals.b.num;
        locals.st.num = T_1_1.num;
        }
        }

  LINE(164);
    {
    CLUREF T_1_1;
    locals.err = streamOPopen_streams(&T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    locals.err = arrayOPaddh(T_1_1, locals.st);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(165);
    {
    {
    ret_1->num = locals.st.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE open ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist13 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPopen_actual;
static Vlist1 vals_streamOPopen = {0, 1, { {0, 2, "", &stream_ops}}
};
static sig_desc1 sig_streamOPopen_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPopen = {0, 1, (sig_desc*)&sig_streamOPopen_1};
static Vlist13 locals_streamOPopen = {0, 13,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "_can_read", &bool_ops},  {0, 2, "_can_write", &bool_ops},  {0, 2, "st", &stream_ops},  {0, 2, "ch", &_chan_ops},  {0, 2, "bvec", &_bytevec_ops},  {0, 2, "b", &oneof_closed_istr_nul_ostr_read_tty_write_ops},  {0, 2, "istty", &bool_ops},  {0, 2, "nch", &_chan_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "fn", &file_name_ops},  {0, 2, "mode", &string_ops}}
};
static Vlist0 popowns_streamOPopen = {0, 0};
Slist0 tformals_streamOPopen = {0, 0};
Slist0 opformals_streamOPopen = {0, 0};
dbg_info_streamOPopen_actual dbg_info_streamOPopen_data = {0, 12, 
    "streamOPopen", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPopen, 2, 
    &vals_streamOPopen, &sigs_streamOPopen, &locals_streamOPopen, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPopen = (struct dbg_info*)&dbg_info_streamOPopen_data;
extern struct dbg_info* dbg_info_streamOPopen_streams;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPopen_streams_TRACE
int streamOPopen_streams_TRACE;
extern OWN_req stream_ownreqs;
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
static int streamOPopen_streams_own_init = 0;
CLUREF streamOPopen_streamsOPlist;

/**** BEGIN PROCEDURE open_streams ****/

errcode streamOPopen_streams(ret_1)
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        } locals;
    locals.DBG_INFO = dbg_info_streamOPopen_streams;
        if (streamOPopen_streams_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPopen_streams_own_init = 1;
        {
            {CLUREF T_0_1;
            locals.err = arrayOPnew(&T_0_1);
            if (locals.err != ERR_ok) goto ex_0;
            streamOPopen_streamsOPlist.num = T_0_1.num;
            }
            }
    }
    enter_proc(168);

  LINE(170);
    {
    {
    ret_1->num = streamOPopen_streamsOPlist.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE open_streams ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist2 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPopen_streams_actual;
static Vlist1 vals_streamOPopen_streams = {0, 1, { {0, 2, "", &array_of_stream_ops}}
};
static siglist0 sigs_streamOPopen_streams = {0, 0};
static Vlist2 locals_streamOPopen_streams = {0, 2,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops}}
};
static Vlist0 popowns_streamOPopen_streams = {0, 0};
Slist0 tformals_streamOPopen_streams = {0, 0};
Slist0 opformals_streamOPopen_streams = {0, 0};
dbg_info_streamOPopen_streams_actual dbg_info_streamOPopen_streams_data = {0, 12, 
    "streamOPopen_streams", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPopen_streams, 0, 
    &vals_streamOPopen_streams, &sigs_streamOPopen_streams, &locals_streamOPopen_streams, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPopen_streams = (struct dbg_info*)&dbg_info_streamOPopen_streams_data;
extern struct dbg_info* dbg_info_streamOPprimary_input;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPprimary_input_TRACE
int streamOPprimary_input_TRACE;
static int streamOPprimary_input_own_init = 0;
CLUREF streamOPprimary_inputOPpri;
CLUREF streamOPprimary_inputOPpro;

/**** BEGIN PROCEDURE primary_input ****/

errcode streamOPprimary_input(ret_1)
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        } locals;
    locals.DBG_INFO = dbg_info_streamOPprimary_input;
        if (streamOPprimary_input_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPprimary_input_own_init = 1;
        {
            {CLUREF T_0_1;
            CLUREF T_0_2;
            locals.err = streamOPget_prims(&T_0_1, &T_0_2);
            if (locals.err != ERR_ok) goto ex_0;
            streamOPprimary_inputOPpri.num = T_0_1.num;
            streamOPprimary_inputOPpro.num = T_0_2.num;
            }
            }
    }
    enter_proc(173);

  LINE(175);
    {
    {
    ret_1->num = streamOPprimary_inputOPpri.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE primary_input ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist2 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPprimary_input_actual;
static Vlist1 vals_streamOPprimary_input = {0, 1, { {0, 2, "", &stream_ops}}
};
static siglist0 sigs_streamOPprimary_input = {0, 0};
static Vlist2 locals_streamOPprimary_input = {0, 2,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops}}
};
static Vlist0 popowns_streamOPprimary_input = {0, 0};
Slist0 tformals_streamOPprimary_input = {0, 0};
Slist0 opformals_streamOPprimary_input = {0, 0};
dbg_info_streamOPprimary_input_actual dbg_info_streamOPprimary_input_data = {0, 12, 
    "streamOPprimary_input", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPprimary_input, 0, 
    &vals_streamOPprimary_input, &sigs_streamOPprimary_input, &locals_streamOPprimary_input, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPprimary_input = (struct dbg_info*)&dbg_info_streamOPprimary_input_data;
extern struct dbg_info* dbg_info_streamOPprimary_output;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPprimary_output_TRACE
int streamOPprimary_output_TRACE;
static int streamOPprimary_output_own_init = 0;
CLUREF streamOPprimary_outputOPpri;
CLUREF streamOPprimary_outputOPpro;

/**** BEGIN PROCEDURE primary_output ****/

errcode streamOPprimary_output(ret_1)
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        } locals;
    locals.DBG_INFO = dbg_info_streamOPprimary_output;
        if (streamOPprimary_output_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPprimary_output_own_init = 1;
        {
            {CLUREF T_0_1;
            CLUREF T_0_2;
            locals.err = streamOPget_prims(&T_0_1, &T_0_2);
            if (locals.err != ERR_ok) goto ex_0;
            streamOPprimary_outputOPpri.num = T_0_1.num;
            streamOPprimary_outputOPpro.num = T_0_2.num;
            }
            }
    }
    enter_proc(178);

  LINE(180);
    {
    {
    ret_1->num = streamOPprimary_outputOPpro.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE primary_output ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist2 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPprimary_output_actual;
static Vlist1 vals_streamOPprimary_output = {0, 1, { {0, 2, "", &stream_ops}}
};
static siglist0 sigs_streamOPprimary_output = {0, 0};
static Vlist2 locals_streamOPprimary_output = {0, 2,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops}}
};
static Vlist0 popowns_streamOPprimary_output = {0, 0};
Slist0 tformals_streamOPprimary_output = {0, 0};
Slist0 opformals_streamOPprimary_output = {0, 0};
dbg_info_streamOPprimary_output_actual dbg_info_streamOPprimary_output_data = {0, 12, 
    "streamOPprimary_output", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPprimary_output, 0, 
    &vals_streamOPprimary_output, &sigs_streamOPprimary_output, &locals_streamOPprimary_output, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPprimary_output = (struct dbg_info*)&dbg_info_streamOPprimary_output_data;
extern struct dbg_info* dbg_info_streamOPerror_output;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPerror_output_TRACE
int streamOPerror_output_TRACE;
extern OWN_req bool_ownreqs;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
static int streamOPerror_output_own_init = 0;
CLUREF streamOPerror_outputOPinit;
CLUREF streamOPerror_outputOPero;

/**** BEGIN PROCEDURE error_output ****/

errcode streamOPerror_output(ret_1)
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF ch;
        CLUREF b;
        } locals;
    locals.ch.num = UNINIT;
    locals.b.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPerror_output;
        if (streamOPerror_output_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPerror_output_own_init = 1;
        {
            {streamOPerror_outputOPinit.tf = false;
            }
            }
        streamOPerror_outputOPero.num = UNINIT;
    }
    enter_proc(183);

  LINE(186);
    {
    CLUREF T_1_1;
    T_1_1.num = streamOPerror_outputOPinit.num ^ 1;
    if (T_1_1.num == true) {

  LINE(187);
        {
            {CLUREF T_2_1;
            locals.err = _chanOPerror_output(&T_2_1);
            if (locals.err != ERR_ok) goto ex_0;
            locals.ch.num = T_2_1.num;
            }
            }

  LINE(188);
        {
            {CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            RecordAlloc(4, T_2_1);
            T_2_2.num = 2048;
            locals.err = _bytevecOPcreate(T_2_2, &T_2_3);
            if (locals.err != ERR_ok) goto ex_0;
            T_2_1.vec->data[0]  = T_2_3.num;
            T_2_1.vec->data[2]  = 0;
            T_2_1.vec->data[3]  = false;
            T_2_1.vec->data[1]  = locals.ch.num;
            CellAlloc(7, T_2_1.num, T_2_4);
            locals.b.num = T_2_4.num;
            }
            }

  LINE(193);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        RecordAlloc(4, T_2_1);
        locals.err = _chanOPget_name(locals.ch, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        T_2_1.vec->data[1]  = T_2_2.num;
        locals.err = sequenceOPnew(&T_2_3);
        if (locals.err != ERR_ok) goto ex_0;
        T_2_1.vec->data[3]  = T_2_3.num;
        T_2_1.vec->data[2]  = false;
        T_2_1.vec->data[0]  = locals.b.num;
        streamOPerror_outputOPero.num = T_2_1.num;
        }

  LINE(197);
        {
        CLUREF T_2_1;
        locals.err = streamOPopen_streams(&T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = arrayOPaddh(T_2_1, streamOPerror_outputOPero);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(198);
        {
        streamOPerror_outputOPinit.tf = true;
        }
        }
        }/* end if */

  LINE(200);
    {
    {
    ret_1->num = streamOPerror_outputOPero.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE error_output ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPerror_output_actual;
static Vlist1 vals_streamOPerror_output = {0, 1, { {0, 2, "", &stream_ops}}
};
static siglist0 sigs_streamOPerror_output = {0, 0};
static Vlist4 locals_streamOPerror_output = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "ch", &_chan_ops},  {0, 2, "b", &oneof_closed_istr_nul_ostr_read_tty_write_ops}}
};
static Vlist0 popowns_streamOPerror_output = {0, 0};
Slist0 tformals_streamOPerror_output = {0, 0};
Slist0 opformals_streamOPerror_output = {0, 0};
dbg_info_streamOPerror_output_actual dbg_info_streamOPerror_output_data = {0, 12, 
    "streamOPerror_output", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPerror_output, 0, 
    &vals_streamOPerror_output, &sigs_streamOPerror_output, &locals_streamOPerror_output, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPerror_output = (struct dbg_info*)&dbg_info_streamOPerror_output_data;
extern struct dbg_info* dbg_info_streamOPget_prims;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_prims_TRACE
int streamOPget_prims_TRACE;
extern OWN_req _chan_ownreqs;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
static int streamOPget_prims_own_init = 0;
CLUREF streamOPget_primsOPinit;
CLUREF streamOPget_primsOPpri;
CLUREF streamOPget_primsOPpro;

/**** BEGIN PROCEDURE get_prims ****/

errcode streamOPget_prims(ret_1, ret_2)
CLUREF *ret_1;
CLUREF *ret_2;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF chi;
        CLUREF cho;
        CLUREF opens;
        CLUREF tb;
        CLUREF b;
        } locals;
    locals.chi.num = UNINIT;
    locals.cho.num = UNINIT;
    locals.opens.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.b.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_prims;
        if (streamOPget_prims_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_prims_own_init = 1;
        {
            {streamOPget_primsOPinit.tf = false;
            }
            }
        streamOPget_primsOPpri.num = UNINIT;
        streamOPget_primsOPpro.num = UNINIT;
    }
    enter_proc(203);

  LINE(206);
    {
    if (streamOPget_primsOPinit.num == true) {

  LINE(207);
        {
        {
        ret_1->num = streamOPget_primsOPpri.num;
        }
        {
        ret_2->num = streamOPget_primsOPpro.num;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(208);
    {
        {CLUREF T_1_1;
        locals.err = _chanOPprimary_input(&T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.chi.num = T_1_1.num;
        }
        }

  LINE(209);
    {
        {CLUREF T_1_1;
        locals.err = _chanOPprimary_output(&T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.cho.num = T_1_1.num;
        }
        }

  LINE(210);
    {
        {CLUREF T_1_1;
        locals.err = streamOPopen_streams(&T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.opens.num = T_1_1.num;
        }
        }

  LINE(211);
    {
    CLUREF T_1_1;
    locals.err = _chanOPequal(locals.chi, locals.cho, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(212);
        {
            {CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            RecordAlloc(19, T_2_1);
            T_2_2.num = 1024;
            locals.err = _bytevecOPcreate(T_2_2, &T_2_3);
            if (locals.err != ERR_ok) goto ex_0;
            T_2_1.vec->data[1]  = T_2_3.num;
            T_2_1.vec->data[4]  = 1;
            T_2_1.vec->data[11]  = 0;
            T_2_1.vec->data[9]  = true;
            T_2_1.vec->data[15]  = true;
            T_2_1.vec->data[10]  = false;
            T_2_1.vec->data[2]  = locals.chi.num;
            locals.err = arrayOPnew(&T_2_4);
            if (locals.err != ERR_ok) goto ex_0;
            T_2_1.vec->data[18]  = T_2_4.num;
            T_2_1.vec->data[5]  = false;
            T_2_1.vec->data[7]  = false;
            T_2_1.vec->data[8]  = true;
            T_2_1.vec->data[13]  = 1;
            T_2_1.vec->data[17]  = STR_.num;
            T_2_1.vec->data[6]  = false;
            T_2_1.vec->data[14]  = 0;
            T_2_1.vec->data[16]  = 0;
            T_2_1.vec->data[0]  = STR_.num;
            T_2_1.vec->data[12]  = STR_.num;
            T_2_1.vec->data[3]  = STR_.num;
            locals.tb.num = T_2_1.num;
            }
            }

  LINE(231);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        RecordAlloc(4, T_2_1);
        locals.err = _chanOPget_name(locals.chi, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        T_2_1.vec->data[1]  = T_2_2.num;
        locals.err = sequenceOPnew(&T_2_3);
        if (locals.err != ERR_ok) goto ex_0;
        T_2_1.vec->data[3]  = T_2_3.num;
        T_2_1.vec->data[2]  = false;
        CellAlloc(6, locals.tb.num, T_2_4);
        T_2_1.vec->data[0]  = T_2_4.num;
        streamOPget_primsOPpro.num = T_2_1.num;
        }

  LINE(235);
        {
        streamOPget_primsOPpri.num = streamOPget_primsOPpro.num;
        }

  LINE(236);
        {
        locals.err = arrayOPaddh(locals.opens, streamOPget_primsOPpro);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(237);
        {
        streamOPget_primsOPinit.tf = true;
        }

  LINE(238);
        {
        locals.err = streamOPtermcap(locals.tb, STR_);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(239);
        {
        {
        ret_1->num = streamOPget_primsOPpri.num;
        }
        {
        ret_2->num = streamOPget_primsOPpro.num;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(241);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        CLUREF T_1_4;
        RecordAlloc(5, T_1_1);
        T_1_2.num = 2048;
        locals.err = _bytevecOPcreate(T_1_2, &T_1_3);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_1.vec->data[0]  = T_1_3.num;
        T_1_1.vec->data[2]  = 1;
        T_1_1.vec->data[4]  = 0;
        T_1_1.vec->data[3]  = 1;
        T_1_1.vec->data[1]  = locals.chi.num;
        CellAlloc(5, T_1_1.num, T_1_4);
        locals.b.num = T_1_4.num;
        }
        }

  LINE(246);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    RecordAlloc(4, T_1_1);
    locals.err = _chanOPget_name(locals.chi, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[1]  = T_1_2.num;
    locals.err = sequenceOPnew(&T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[3]  = T_1_3.num;
    T_1_1.vec->data[2]  = false;
    T_1_1.vec->data[0]  = locals.b.num;
    streamOPget_primsOPpri.num = T_1_1.num;
    }

  LINE(250);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    RecordAlloc(4, T_1_1);
    T_1_2.num = 2048;
    locals.err = _bytevecOPcreate(T_1_2, &T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[0]  = T_1_3.num;
    T_1_1.vec->data[2]  = 0;
    T_1_1.vec->data[3]  = true;
    T_1_1.vec->data[1]  = locals.cho.num;
    CellAlloc(7, T_1_1.num, T_1_4);
    locals.b.num = T_1_4.num;
    }

  LINE(254);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    RecordAlloc(4, T_1_1);
    locals.err = _chanOPget_name(locals.cho, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[1]  = T_1_2.num;
    locals.err = sequenceOPnew(&T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[3]  = T_1_3.num;
    T_1_1.vec->data[2]  = false;
    T_1_1.vec->data[0]  = locals.b.num;
    streamOPget_primsOPpro.num = T_1_1.num;
    }

  LINE(258);
    {
    locals.err = arrayOPaddh(locals.opens, streamOPget_primsOPpri);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(259);
    {
    locals.err = arrayOPaddh(locals.opens, streamOPget_primsOPpro);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(260);
    {
    streamOPget_primsOPinit.tf = true;
    }

  LINE(261);
    {
    {
    ret_1->num = streamOPget_primsOPpri.num;
    }
    {
    ret_2->num = streamOPget_primsOPpro.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_prims ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist2 *vals;
    siglist0 *sigs;
    Vlist7 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_prims_actual;
static Vlist2 vals_streamOPget_prims = {0, 2, { {0, 2, "", &stream_ops},  {0, 2, "", &stream_ops}}
};
static siglist0 sigs_streamOPget_prims = {0, 0};
static Vlist7 locals_streamOPget_prims = {0, 7,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "chi", &_chan_ops},  {0, 2, "cho", &_chan_ops},  {0, 2, "opens", &array_of_stream_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "b", &oneof_closed_istr_nul_ostr_read_tty_write_ops}}
};
static Vlist0 popowns_streamOPget_prims = {0, 0};
Slist0 tformals_streamOPget_prims = {0, 0};
Slist0 opformals_streamOPget_prims = {0, 0};
dbg_info_streamOPget_prims_actual dbg_info_streamOPget_prims_data = {0, 12, 
    "streamOPget_prims", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_prims, 0, 
    &vals_streamOPget_prims, &sigs_streamOPget_prims, &locals_streamOPget_prims, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_prims = (struct dbg_info*)&dbg_info_streamOPget_prims_data;
extern struct dbg_info* dbg_info_streamOPtermcap;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPtermcap_TRACE
int streamOPtermcap_TRACE;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPtermcap_own_init = 0;

/**** BEGIN PROCEDURE termcap ****/

errcode streamOPtermcap(b, term)
CLUREF b;
CLUREF term;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF ibaud;
        CLUREF obaud;
        CLUREF b;
        CLUREF term;
        } locals;
    locals.ibaud.num = UNINIT;
    locals.obaud.num = UNINIT;
    locals.b.num = UNINIT;
    locals.term.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPtermcap;
    locals.b = b;
    locals.term = term;
        if (streamOPtermcap_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPtermcap_own_init = 1;
    }
    enter_proc(264);

  LINE(265);
    {
    CLUREF T_1_1;
    locals.err = stringOPempty(locals.term, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(266);
        {
        CLUREF T_3_1;
        locals.err = _get_termcap(&T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.term.num = T_3_1.num;
        }
            goto end_1;
            ex_1:
                if ((locals.err == ERR_not_found)) {

  LINE(267);
                    {
                    {signal (ERR_ok);}}
                }
                else {
                    goto ex_0;
                }
            end_1:;
        }
        }/* end if */

  LINE(269);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    locals.err = _termcap(locals.term, STR__072co_043, CLU_0, CLU_0, &T_2_1);
    if (locals.err != ERR_ok) goto ex_2;
    locals.err = intOPparse(T_2_1, &T_2_2);
    if (locals.err != ERR_ok) goto ex_2;
    locals.b.vec->data[14]  = T_2_2.num;
    }
        goto end_2;
        ex_2:
            if ((locals.err == ERR_not_found)
             || (locals.err == ERR_bad_format)
             || (locals.err == ERR_overflow)) {

  LINE(270);
                {
                locals.b.vec->data[14]  = 0;
                }
            }
            else {
                goto ex_0;
            }
        end_2:;

  LINE(271);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    locals.err = _termcap(locals.term, STR__072li_043, CLU_0, CLU_0, &T_2_1);
    if (locals.err != ERR_ok) goto ex_3;
    locals.err = intOPparse(T_2_1, &T_2_2);
    if (locals.err != ERR_ok) goto ex_3;
    locals.b.vec->data[16]  = T_2_2.num;
    }
        goto end_3;
        ex_3:
            if ((locals.err == ERR_not_found)
             || (locals.err == ERR_bad_format)
             || (locals.err == ERR_overflow)) {

  LINE(272);
                {
                locals.b.vec->data[14]  = 0;
                }
            }
            else {
                goto ex_0;
            }
        end_3:;

  LINE(273);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    locals.err = stringOPindexs(STR__072hc_072, locals.term, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_2.num = (T_1_1.num > 0)? true : false;
    if (T_1_2.num == true) {

  LINE(274);
        {
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(275);
    {
        {CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        T_2_1.num = locals.b.vec->data[2];
        locals.err = _chanOPget_speeds(T_2_1, &T_2_2, &T_2_3);
        if (locals.err != ERR_ok) goto ex_4;
        locals.ibaud.num = T_2_2.num;
        locals.obaud.num = T_2_3.num;
        }
        }
        goto end_4;
        ex_4:
            if ((locals.err == ERR_not_possible)) {

  LINE(276);
                {
                locals.obaud.num = 9600;
                }
            }
            else {
                goto ex_0;
            }
        end_4:;

  LINE(277);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    locals.err = stringOPindexs(STR__072bs_072, locals.term, &T_2_1);
    if (locals.err != ERR_ok) goto ex_5;
    T_2_2.num = (T_2_1.num > 0)? true : false;
    if (T_2_2.num == true) {

  LINE(278);
        {
        locals.b.vec->data[0]  = STR__010.num;
        }
        }
    else {

  LINE(279);
        {
        CLUREF T_3_1;
        locals.err = _termcap(locals.term, STR__072bc_075, CLU_0, CLU_0, &T_3_1);
        if (locals.err != ERR_ok) goto ex_5;
        locals.b.vec->data[0]  = T_3_1.num;
        }
        }}/* end if */
        goto end_5;
        ex_5:
            if ((locals.err == ERR_not_found)) {
            }
            else {
                goto ex_0;
            }
        end_5:;

  LINE(281);
    {
    CLUREF T_2_1;
    locals.err = _termcap(locals.term, STR__072ce_075, CLU_1, locals.obaud, &T_2_1);
    if (locals.err != ERR_ok) goto ex_6;
    locals.b.vec->data[12]  = T_2_1.num;
    }
        goto end_6;
        ex_6:
            if ((locals.err == ERR_not_found)) {

  LINE(283);
                {
                CLUREF T_2_1;
                CLUREF T_2_2;
                CLUREF T_2_3;
                CLUREF T_2_4;
                CLUREF T_2_5;
                CLUREF T_2_6;
                CLUREF T_2_7;
                CLUREF T_2_8;
                CLUREF T_2_9;
                T_2_2.num = locals.b.vec->data[0];
                locals.err = stringOPempty(T_2_2, &T_2_3);
                if (locals.err != ERR_ok) goto ex_0;
                T_2_4.num = T_2_3.num ^ 1;
                T_2_1.num = T_2_4.num;
                if (T_2_4.num) {
                    locals.err = stringOPindexs(STR__072os_072, locals.term, &T_2_6);
                    if (locals.err != ERR_ok) goto ex_0;
                    T_2_7.num = (T_2_6.num == 0)? true : false;
                    T_2_5.num = T_2_7.num;
                    if (!T_2_7.num) {
                        locals.err = stringOPindexs(STR__072eo_072, locals.term, &T_2_8);
                        if (locals.err != ERR_ok) goto ex_0;
                        T_2_9.num = (T_2_8.num > 0)? true : false;
                        T_2_5.num = T_2_9.num;
                    }
                    T_2_1.num = T_2_5.num;
                }
                if (T_2_1.num == true) {

  LINE(286);
                    {
                    CLUREF T_3_1;
                    CLUREF T_3_2;
                    CLUREF T_3_3;
                    CLUREF T_3_4;
                    CLUREF T_3_5;
                    T_3_1.num = locals.b.vec->data[0];
                    T_3_2.ch = ' ';
                    locals.err = stringOPappend(T_3_1, T_3_2, &T_3_3);
                    if (locals.err != ERR_ok) goto ex_0;
                    T_3_4.num = locals.b.vec->data[0];
                    locals.err = stringOPconcat(T_3_3, T_3_4, &T_3_5);
                    if (locals.err != ERR_ok) goto ex_0;
                    locals.b.vec->data[0]  = T_3_5.num;
                    }
                    }
                    }/* end if */
            }
            else {
                goto ex_0;
            }
        end_6:;

  LINE(289);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    T_2_1.num = locals.b.vec->data[16];
    locals.err = _termcap(locals.term, STR__072cl_075, T_2_1, locals.obaud, &T_2_2);
    if (locals.err != ERR_ok) goto ex_7;
    locals.b.vec->data[3]  = T_2_2.num;
    }
        goto end_7;
        ex_7:
            if ((locals.err == ERR_not_found)) {
            }
            else {
                goto ex_0;
            }
        end_7:;

  LINE(291);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    CLUREF T_1_6;
    CLUREF T_1_7;
    CLUREF T_1_8;
    T_1_3.num = locals.b.vec->data[0];
    locals.err = stringOPempty(T_1_3, &T_1_4);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_2.num = T_1_4.num;
    if (T_1_4.num) {
        T_1_5.num = locals.b.vec->data[12];
        locals.err = stringOPempty(T_1_5, &T_1_6);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_2.num = T_1_6.num;
    }
    T_1_1.num = T_1_2.num;
    if (T_1_2.num) {
        T_1_7.num = locals.b.vec->data[3];
        locals.err = stringOPempty(T_1_7, &T_1_8);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_1.num = T_1_8.num;
    }
    if (T_1_1.num == true) {

  LINE(294);
        {
        locals.b.vec->data[12]  = STR__012.num;
        }

  LINE(295);
        {
        locals.b.vec->data[3]  = STR__012.num;
        }
        }
    else {

  LINE(296);
        {
        locals.b.vec->data[6]  = true;
        }
        }}/* end if */
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE termcap ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPtermcap_actual;
static Vlist0 vals_streamOPtermcap = {0, 0};
static siglist0 sigs_streamOPtermcap = {0, 0};
static Vlist6 locals_streamOPtermcap = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "ibaud", &int_ops},  {0, 2, "obaud", &int_ops},  {0, 2, "b", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "term", &string_ops}}
};
static Vlist0 popowns_streamOPtermcap = {0, 0};
Slist0 tformals_streamOPtermcap = {0, 0};
Slist0 opformals_streamOPtermcap = {0, 0};
dbg_info_streamOPtermcap_actual dbg_info_streamOPtermcap_data = {0, 12, 
    "streamOPtermcap", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPtermcap, 2, 
    &vals_streamOPtermcap, &sigs_streamOPtermcap, &locals_streamOPtermcap, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPtermcap = (struct dbg_info*)&dbg_info_streamOPtermcap_data;
extern struct dbg_info* dbg_info_streamOPadd_script;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPadd_script_TRACE
int streamOPadd_script_TRACE;
extern errcode streamOPadd_script_IB_1();
extern errcode streamOPadd_script_IB_2();
extern OWN_req null_ownreqs;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPadd_script_own_init = 0;

/**** BEGIN PROCEDURE add_script ****/

errcode streamOPadd_script(st1, st2)
CLUREF st1;
CLUREF st2;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF scr;
        CLUREF st1;
        CLUREF st2;
        } locals;
    locals.scr.num = UNINIT;
    locals.st1.num = UNINIT;
    locals.st2.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPadd_script;
    locals.st1 = st1;
    locals.st2 = st2;
        if (streamOPadd_script_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPadd_script_own_init = 1;
    }
    enter_proc(300);

  LINE(301);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st2.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(303);
            {
            {signal (ERR_script_failed);}}
            break;
            }
    default: {

  LINE(305);
        {
            locals.err = streamOPall_scripts(locals.st2, streamOPadd_script_IB_1, &locals, &locals.ecode2);
            if (locals.err == ERR_iterbodyreturn) {
            signal(ERR_ok);}
            if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
            if (locals.err == ERR_break) locals.err = ERR_ok;
            if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
            if (locals.err != ERR_ok) goto ex_0;
            }

  LINE(309);
        {
            locals.err = streamOPall_scripts(locals.st1, streamOPadd_script_IB_2, &locals, &locals.ecode2);
            if (locals.err == ERR_iterbodyreturn) {
            signal(ERR_ok);}
            if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
            if (locals.err == ERR_break) locals.err = ERR_ok;
            if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
            if (locals.err != ERR_ok) goto ex_0;
            }

  LINE(313);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.st1.vec->data[3];
        locals.err = sequenceOPaddh(T_2_1, locals.st2, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.st1.vec->data[3]  = T_2_2.num;
        }

  LINE(314);
        {
        locals.st1.vec->data[2]  = true;
        }
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE add_script ****/

extern struct OPS *record_buf_name_scripting_scripts_ops;
typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPadd_script_actual;
static Vlist0 vals_streamOPadd_script = {0, 0};
static sig_desc0 sig_streamOPadd_script_1 = {0, 3, "script_failed", {0, 0
}};
static siglist1 sigs_streamOPadd_script = {0, 1, (sig_desc*)&sig_streamOPadd_script_1};
static Vlist5 locals_streamOPadd_script = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "scr", &record_buf_name_scripting_scripts_ops},  {0, 2, "st1", &record_buf_name_scripting_scripts_ops},  {0, 2, "st2", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPadd_script = {0, 0};
Slist0 tformals_streamOPadd_script = {0, 0};
Slist0 opformals_streamOPadd_script = {0, 0};
dbg_info_streamOPadd_script_actual dbg_info_streamOPadd_script_data = {0, 12, 
    "streamOPadd_script", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPadd_script, 2, 
    &vals_streamOPadd_script, &sigs_streamOPadd_script, &locals_streamOPadd_script, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPadd_script = (struct dbg_info*)&dbg_info_streamOPadd_script_data;

/**** BEGIN ITERATOR BODIES for add_script ****/

errcode streamOPadd_script_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF scr;
    CLUREF st1;
    CLUREF st2;
    } *locals;
{
    locals->scr.num = iv_1.num;
    enter_iter_body_proc(306);

  FB_LINE(306);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals->st1.num == locals->scr.num)? true : false;
    if (T_1_1.num == true) {

  FB_LINE(307);
        {
        *iecode = ERR_script_failed;
        {signal(ERR_iterbodysignal);}
        }
        }
        }/* end if */
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPadd_script_IB_1 */
errcode streamOPadd_script_IB_2(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF scr;
    CLUREF st1;
    CLUREF st2;
    } *locals;
{
    locals->scr.num = iv_1.num;
    enter_iter_body_proc(310);

  FB_LINE(310);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals->st2.num == locals->scr.num)? true : false;
    if (T_1_1.num == true) {

  FB_LINE(311);
        {
        *iecode = ERR_script_failed;
        {signal(ERR_iterbodysignal);}
        }
        }
        }/* end if */
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPadd_script_IB_2 */

/**** END ITERATOR BODIES for add_script ****/

extern struct dbg_info* dbg_info_streamOPall_scripts;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPall_scripts_TRACE
int streamOPall_scripts_TRACE;
extern errcode streamOPall_scripts_IB_1();
extern errcode streamOPall_scripts_IB_2();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPall_scripts_own_init = 0;

/**** BEGIN ITERATOR all_scripts ****/

errcode streamOPall_scripts(st, proc, user_locals, iecode)
CLUREF st;
errcode (*proc)();
char **user_locals;
errcode *iecode;
    {
    errcode ecode;
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        char **user_locals;
        errcode (*proc)();
        errcode err;
        errcode ecode2;
        bool body_ctrl_req;
        CLUREF scr1;
        CLUREF scr2;
        CLUREF st;
        } locals;
    locals.scr1.num = UNINIT;
    locals.scr2.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPall_scripts;
    locals.st = st;
    locals.proc = proc;
    locals.user_locals = user_locals;
    locals.user_locals = user_locals;
    locals.proc = proc;
        if (streamOPall_scripts_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPall_scripts_own_init = 1;
    }
    enter_proc(318);

  LINE(319);
    {
    locals.err = locals.proc(locals.st, locals.user_locals, iecode);
    if (locals.err != ERR_ok) {
    if (locals.err == ERR_break) {signal(ERR_break);}
    if (locals.err == ERR_iterbodyreturn) {signal(ERR_iterbodyreturn);}
    if (locals.err == ERR_iterbodyexit) {signal(ERR_iterbodyexit);}
    if (locals.err == ERR_iterbodysignal) {signal(ERR_iterbodysignal);}
    {signal(locals.err);
        }}
    }

  LINE(320);
    {
        CLUREF T_1_1;
        T_1_1.num = locals.st.vec->data[3];
        locals.body_ctrl_req = false;
        locals.err = sequenceOPelements(T_1_1, streamOPall_scripts_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {signal(ERR_iterbodyreturn);}
        if (locals.err == ERR_iterbodysignal) {
            *iecode = locals.ecode2; signal(ERR_iterbodysignal);}
        if (locals.err == ERR_iterbodyexit) {
            *iecode = locals.ecode2; signal(ERR_iterbodyexit);}
        if (locals.body_ctrl_req == true) {
            locals.body_ctrl_req = false;
            if (locals.err == ERR_iteriterbodyreturn) {signal(ERR_ok);}
            if (locals.err == ERR_iteriterbodysignal) {signal(locals.ecode2);}
            if (locals.err == ERR_break) locals.err = ERR_ok;
            if (locals.err == ERR_iteriterbodyexit) locals.err = locals.ecode2;
            }
        else {
            if (locals.err == ERR_iteriterbodyreturn) {signal(ERR_iteriterbodyreturn);}
            if (locals.err == ERR_break) {signal(ERR_break);}
            if (locals.err == ERR_iteriterbodysignal) {
                  *iecode = locals.ecode2; signal(ERR_iteriterbodysignal);}
            if (locals.err == ERR_iteriterbodyexit) {
                  *iecode = locals.ecode2; signal(ERR_iteriterbodyexit);}}
        if (locals.err != ERR_ok) goto ex_0;
        }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END ITERATOR all_scripts ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPall_scripts_actual;
static Vlist1 vals_streamOPall_scripts = {0, 1, { {0, 2, "", &record_buf_name_scripting_scripts_ops}}
};
static siglist0 sigs_streamOPall_scripts = {0, 0};
static Vlist8 locals_streamOPall_scripts = {0, 8,{ {0, 2, "user_locals", &int_ops},  {0, 2, "proc", &int_ops},  {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "body_ctrl_req", &int_ops},  {0, 2, "scr1", &stream_ops},  {0, 2, "scr2", &record_buf_name_scripting_scripts_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPall_scripts = {0, 0};
Slist0 tformals_streamOPall_scripts = {0, 0};
Slist0 opformals_streamOPall_scripts = {0, 0};
dbg_info_streamOPall_scripts_actual dbg_info_streamOPall_scripts_data = {0, 12, 
    "streamOPall_scripts", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 1, 0, (int)streamOPall_scripts, 1, 
    &vals_streamOPall_scripts, &sigs_streamOPall_scripts, &locals_streamOPall_scripts, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPall_scripts = (struct dbg_info*)&dbg_info_streamOPall_scripts_data;

/**** BEGIN ITERATOR BODIES for all_scripts ****/

errcode streamOPall_scripts_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    char **user_locals;
    errcode (*proc)();
    errcode err;
    errcode ecode2;
    bool body_ctrl_req;
    CLUREF scr1;
    CLUREF scr2;
    CLUREF st;
    } *locals;
{
    locals->scr1.num = iv_1.num;
    enter_iter_body_proc(321);

  FB_LINE(321);
    {
        locals->body_ctrl_req = false;
        locals->err = streamOPall_scripts(locals->scr1, streamOPall_scripts_IB_2, locals, iecode);
        if (locals->err != ERR_ok) {
        if (locals->err == ERR_iterbodyreturn) {signal(ERR_iterbodyreturn);}
        if (locals->err == ERR_iterbodysignal) {signal(ERR_iterbodysignal);}
        if (locals->err == ERR_iterbodyexit) {signal(ERR_iterbodyexit);}
        if (locals->err == ERR_iteriterbodyreturn) {signal(ERR_iteriterbodyreturn);}
        if (locals->err == ERR_iteriterbodysignal) {signal(ERR_iteriterbodysignal);}
        if (locals->err == ERR_break && !locals->body_ctrl_req) {signal(ERR_break);}
        if (locals->err == ERR_iteriterbodyexit && !locals->body_ctrl_req) {signal(ERR_iteriterbodyexit);}
        if (locals->err == ERR_break) locals->err = ERR_ok;
        if (locals->err == ERR_iteriterbodyexit) 
        locals->err = *iecode;
        if (locals->err != ERR_ok) 
        goto ex_0;
        }
        }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            locals->body_ctrl_req = true;
            {signal(ERR_iteriterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPall_scripts_IB_1 */
errcode streamOPall_scripts_IB_2(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    char **user_locals;
    errcode (*proc)();
    errcode err;
    errcode ecode2;
    bool body_ctrl_req;
    CLUREF scr1;
    CLUREF scr2;
    CLUREF st;
    } *locals;
{
    locals->scr2.num = iv_1.num;
    enter_iter_body_proc(322);

  FB_LINE(322);
    {
    locals->err = locals->proc(locals->scr2, locals->user_locals, iecode);
    if ((locals->body_ctrl_req == true) && (locals->err == ERR_iteriterbodyexit)) {
        locals->err = *iecode;
        goto ex_0;}
    if (locals->err != ERR_ok) {
    signal(locals->err);
    }
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            locals->body_ctrl_req = true;
            {signal(ERR_iteriterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPall_scripts_IB_2 */

/**** END ITERATOR BODIES for all_scripts ****/

extern struct dbg_info* dbg_info_streamOPscripts;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPscripts_TRACE
int streamOPscripts_TRACE;
extern errcode streamOPscripts_IB_1();
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPscripts_own_init = 0;

/**** BEGIN ITERATOR scripts ****/

errcode streamOPscripts(st, proc, user_locals, iecode)
CLUREF st;
errcode (*proc)();
char **user_locals;
errcode *iecode;
    {
    errcode ecode;
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        char **user_locals;
        errcode (*proc)();
        errcode err;
        errcode ecode2;
        bool body_ctrl_req;
        CLUREF scr;
        CLUREF st;
        } locals;
    locals.scr.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPscripts;
    locals.st = st;
    locals.proc = proc;
    locals.user_locals = user_locals;
    locals.user_locals = user_locals;
    locals.proc = proc;
        if (streamOPscripts_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPscripts_own_init = 1;
    }
    enter_proc(327);

  LINE(328);
    {
        CLUREF T_1_1;
        T_1_1.num = locals.st.vec->data[3];
        locals.body_ctrl_req = false;
        locals.err = sequenceOPelements(T_1_1, streamOPscripts_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {signal(ERR_iterbodyreturn);}
        if (locals.err == ERR_iterbodysignal) {
            *iecode = locals.ecode2; signal(ERR_iterbodysignal);}
        if (locals.err == ERR_iterbodyexit) {
            *iecode = locals.ecode2; signal(ERR_iterbodyexit);}
        if (locals.body_ctrl_req == true) {
            locals.body_ctrl_req = false;
            if (locals.err == ERR_iteriterbodyreturn) {signal(ERR_ok);}
            if (locals.err == ERR_iteriterbodysignal) {signal(locals.ecode2);}
            if (locals.err == ERR_break) locals.err = ERR_ok;
            if (locals.err == ERR_iteriterbodyexit) locals.err = locals.ecode2;
            }
        else {
            if (locals.err == ERR_iteriterbodyreturn) {signal(ERR_iteriterbodyreturn);}
            if (locals.err == ERR_break) {signal(ERR_break);}
            if (locals.err == ERR_iteriterbodysignal) {
                  *iecode = locals.ecode2; signal(ERR_iteriterbodysignal);}
            if (locals.err == ERR_iteriterbodyexit) {
                  *iecode = locals.ecode2; signal(ERR_iteriterbodyexit);}}
        if (locals.err != ERR_ok) goto ex_0;
        }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END ITERATOR scripts ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist7 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPscripts_actual;
static Vlist1 vals_streamOPscripts = {0, 1, { {0, 2, "", &stream_ops}}
};
static siglist0 sigs_streamOPscripts = {0, 0};
static Vlist7 locals_streamOPscripts = {0, 7,{ {0, 2, "user_locals", &int_ops},  {0, 2, "proc", &int_ops},  {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "body_ctrl_req", &int_ops},  {0, 2, "scr", &stream_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPscripts = {0, 0};
Slist0 tformals_streamOPscripts = {0, 0};
Slist0 opformals_streamOPscripts = {0, 0};
dbg_info_streamOPscripts_actual dbg_info_streamOPscripts_data = {0, 12, 
    "streamOPscripts", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 1, 0, (int)streamOPscripts, 1, 
    &vals_streamOPscripts, &sigs_streamOPscripts, &locals_streamOPscripts, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPscripts = (struct dbg_info*)&dbg_info_streamOPscripts_data;

/**** BEGIN ITERATOR BODIES for scripts ****/

errcode streamOPscripts_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    char **user_locals;
    errcode (*proc)();
    errcode err;
    errcode ecode2;
    bool body_ctrl_req;
    CLUREF scr;
    CLUREF st;
    } *locals;
{
    locals->scr.num = iv_1.num;
    enter_iter_body_proc(329);

  FB_LINE(329);
    {
    locals->err = locals->proc(locals->scr, locals->user_locals, iecode);
    if ((locals->body_ctrl_req == true) && (locals->err == ERR_iteriterbodyexit)) {
        locals->err = *iecode;
        goto ex_0;}
    if (locals->err != ERR_ok) {
    signal(locals->err);
    }
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            locals->body_ctrl_req = true;
            {signal(ERR_iteriterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPscripts_IB_1 */

/**** END ITERATOR BODIES for scripts ****/

extern struct dbg_info* dbg_info_streamOPrem_script;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPrem_script_TRACE
int streamOPrem_script_TRACE;
extern errcode streamOPrem_script_IB_1();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPrem_script_own_init = 0;

/**** BEGIN PROCEDURE rem_script ****/

errcode streamOPrem_script(st1, st2)
CLUREF st1;
CLUREF st2;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF scrs;
        CLUREF i;
        CLUREF st1;
        CLUREF st2;
        } locals;
    locals.scrs.num = UNINIT;
    locals.i.num = UNINIT;
    locals.st1.num = UNINIT;
    locals.st2.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPrem_script;
    locals.st1 = st1;
    locals.st2 = st2;
        if (streamOPrem_script_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPrem_script_own_init = 1;
    }
    enter_proc(333);

  LINE(334);
    {
        {CLUREF T_1_1;
        T_1_1.num = locals.st1.vec->data[3];
        locals.scrs.num = T_1_1.num;
        }
        }

  LINE(335);
    {
        locals.err = sequenceOPindexes(locals.scrs, streamOPrem_script_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE rem_script ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPrem_script_actual;
static Vlist0 vals_streamOPrem_script = {0, 0};
static siglist0 sigs_streamOPrem_script = {0, 0};
static Vlist6 locals_streamOPrem_script = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "scrs", &sequence_of_stream_ops},  {0, 2, "i", &int_ops},  {0, 2, "st1", &record_buf_name_scripting_scripts_ops},  {0, 2, "st2", &stream_ops}}
};
static Vlist0 popowns_streamOPrem_script = {0, 0};
Slist0 tformals_streamOPrem_script = {0, 0};
Slist0 opformals_streamOPrem_script = {0, 0};
dbg_info_streamOPrem_script_actual dbg_info_streamOPrem_script_data = {0, 12, 
    "streamOPrem_script", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPrem_script, 2, 
    &vals_streamOPrem_script, &sigs_streamOPrem_script, &locals_streamOPrem_script, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPrem_script = (struct dbg_info*)&dbg_info_streamOPrem_script_data;

/**** BEGIN ITERATOR BODIES for rem_script ****/

errcode streamOPrem_script_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF scrs;
    CLUREF i;
    CLUREF st1;
    CLUREF st2;
    } *locals;
{
    locals->i.num = iv_1.num;
    enter_iter_body_proc(336);

  FB_LINE(336);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    locals->err = sequenceOPfetch(locals->scrs, locals->i, &T_1_1);
    if (locals->err != ERR_ok) goto ex_0;
    locals->err = streamOPequal(T_1_1, locals->st2, &T_1_2);
    if (locals->err != ERR_ok) goto ex_0;
    if (T_1_2.num == true) {

  FB_LINE(337);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        CLUREF T_2_5;
        CLUREF T_2_6;
        locals->err = intOPsub(locals->i, CLU_1, &T_2_1);
        if (locals->err != ERR_ok) goto ex_0;
        locals->err = sequenceOPsubseq(locals->scrs, CLU_1, T_2_1, &T_2_2);
        if (locals->err != ERR_ok) goto ex_0;
        locals->err = intOPadd(locals->i, CLU_1, &T_2_3);
        if (locals->err != ERR_ok) goto ex_0;
        T_2_4.num = locals->scrs.vec->size;
        locals->err = sequenceOPsubseq(locals->scrs, T_2_3, T_2_4, &T_2_5);
        if (locals->err != ERR_ok) goto ex_0;
        locals->err = sequenceOPconcat(T_2_2, T_2_5, &T_2_6);
        if (locals->err != ERR_ok) goto ex_0;
        locals->st1.vec->data[3]  = T_2_6.num;
        }

  FB_LINE(339);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        T_2_1.num = locals->st1.vec->data[3];
        locals->err = sequenceOPempty(T_2_1, &T_2_2);
        if (locals->err != ERR_ok) goto ex_0;
        T_2_3.num = T_2_2.num ^ 1;
        locals->st1.vec->data[2]  = T_2_3.num;
        }

  FB_LINE(340);
        {
        *iecode = ERR_ok;
        {signal(ERR_iterbodyreturn);}
        }
        }
        }/* end if */
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPrem_script_IB_1 */

/**** END ITERATOR BODIES for rem_script ****/

extern struct dbg_info* dbg_info_streamOPunscript;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPunscript_TRACE
int streamOPunscript_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPunscript_own_init = 0;

/**** BEGIN PROCEDURE unscript ****/

errcode streamOPunscript(st)
CLUREF st;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        } locals;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPunscript;
    locals.st = st;
        if (streamOPunscript_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPunscript_own_init = 1;
    }
    enter_proc(345);

  LINE(346);
    {
    CLUREF T_1_1;
    locals.err = sequenceOPnew(&T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    locals.st.vec->data[3]  = T_1_1.num;
    }

  LINE(347);
    {
    locals.st.vec->data[2]  = false;
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE unscript ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist3 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPunscript_actual;
static Vlist0 vals_streamOPunscript = {0, 0};
static siglist0 sigs_streamOPunscript = {0, 0};
static Vlist3 locals_streamOPunscript = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPunscript = {0, 0};
Slist0 tformals_streamOPunscript = {0, 0};
Slist0 opformals_streamOPunscript = {0, 0};
dbg_info_streamOPunscript_actual dbg_info_streamOPunscript_data = {0, 12, 
    "streamOPunscript", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPunscript, 1, 
    &vals_streamOPunscript, &sigs_streamOPunscript, &locals_streamOPunscript, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPunscript = (struct dbg_info*)&dbg_info_streamOPunscript_data;
extern struct dbg_info* dbg_info_streamOPcan_read;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPcan_read_TRACE
int streamOPcan_read_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPcan_read_own_init = 0;

/**** BEGIN PROCEDURE can_read ****/

errcode streamOPcan_read(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        } locals;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPcan_read;
    locals.st = st;
        if (streamOPcan_read_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPcan_read_own_init = 1;
    }
    enter_proc(350);

  LINE(351);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(353);
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(355);
        {
        {
        ret_1->tf = true;
        }
        {signal (ERR_ok);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE can_read ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist3 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPcan_read_actual;
static Vlist1 vals_streamOPcan_read = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPcan_read = {0, 0};
static Vlist3 locals_streamOPcan_read = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPcan_read = {0, 0};
Slist0 tformals_streamOPcan_read = {0, 0};
Slist0 opformals_streamOPcan_read = {0, 0};
dbg_info_streamOPcan_read_actual dbg_info_streamOPcan_read_data = {0, 12, 
    "streamOPcan_read", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPcan_read, 1, 
    &vals_streamOPcan_read, &sigs_streamOPcan_read, &locals_streamOPcan_read, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPcan_read = (struct dbg_info*)&dbg_info_streamOPcan_read_data;
extern struct dbg_info* dbg_info_streamOPcan_write;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPcan_write_TRACE
int streamOPcan_write_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPcan_write_own_init = 0;

/**** BEGIN PROCEDURE can_write ****/

errcode streamOPcan_write(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        } locals;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPcan_write;
    locals.st = st;
        if (streamOPcan_write_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPcan_write_own_init = 1;
    }
    enter_proc(359);

  LINE(360);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(362);
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(364);
        {
        {
        ret_1->tf = true;
        }
        {signal (ERR_ok);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE can_write ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist3 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPcan_write_actual;
static Vlist1 vals_streamOPcan_write = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPcan_write = {0, 0};
static Vlist3 locals_streamOPcan_write = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPcan_write = {0, 0};
Slist0 tformals_streamOPcan_write = {0, 0};
Slist0 opformals_streamOPcan_write = {0, 0};
dbg_info_streamOPcan_write_actual dbg_info_streamOPcan_write_data = {0, 12, 
    "streamOPcan_write", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPcan_write, 1, 
    &vals_streamOPcan_write, &sigs_streamOPcan_write, &locals_streamOPcan_write, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPcan_write = (struct dbg_info*)&dbg_info_streamOPcan_write_data;
extern struct dbg_info* dbg_info_streamOPgetc;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPgetc_TRACE
int streamOPgetc_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPgetc_own_init = 0;

/**** BEGIN PROCEDURE getc ****/

errcode streamOPgetc(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF c;
        CLUREF rb;
        CLUREF index;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        } locals;
    locals.c.num = UNINIT;
    locals.rb.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPgetc;
    locals.st = st;
        if (streamOPgetc_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPgetc_own_init = 1;
    }
    enter_proc(368);

  LINE(370);
    locals.c.num = UNINIT;

  LINE(371);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(373);
            {
                {CLUREF T_3_1;
                T_3_1.num = locals.rb.vec->data[2];
                locals.index.num = T_3_1.num;
                }
                }

  LINE(374);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[4];
            T_3_2.num = (locals.index.num > T_3_1.num)? true : false;
            if (T_3_2.num == true) {

  LINE(375);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                CLUREF T_4_3;
                T_4_1.num = locals.rb.vec->data[1];
                T_4_2.num = locals.rb.vec->data[0];
                locals.err = _chanOPgetb(T_4_1, T_4_2, &T_4_3);
                if (locals.err != ERR_ok) goto ex_1;
                locals.rb.vec->data[4]  = T_4_3.num;
                }

  LINE(376);
                {
                locals.index.num = 1;
                }
                }
                }/* end if */

  LINE(378);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[0];
            locals.err = _bytevecOPfetch(T_3_1, locals.index, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            locals.c.num = T_3_2.num;
            }

  LINE(379);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.ch = '\n';
            T_3_2.num = (locals.c.ch == T_3_1.ch)? true : false;
            if (T_3_2.num == true) {

  LINE(380);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                T_4_1.num = locals.rb.vec->data[3];
                locals.err = intOPadd(T_4_1, CLU_1, &T_4_2);
                if (locals.err != ERR_ok) goto ex_1;
                locals.rb.vec->data[3]  = T_4_2.num;
                }
                }
                }/* end if */

  LINE(381);
            {
            CLUREF T_3_1;
            locals.err = intOPadd(locals.index, CLU_1, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.rb.vec->data[2]  = T_3_1.num;
            }
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(383);
            {
            locals.err = streamOPflush(locals.st);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(384);
            {
            CLUREF T_3_1;
            locals.err = streamOPtty_get1(locals.tb, CLU_0, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.c.num = T_3_1.num;
            }

  LINE(385);
            {
            locals.err = streamOPtty_put1(locals.tb, locals.c);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 2: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.sb.num = T_2_4.num;

  LINE(387);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            T_4_1.num = locals.sb.vec->data[0];
            T_4_2.num = locals.sb.vec->data[1];
            locals.err = stringOPfetch(T_4_1, T_4_2, &T_4_3);
            if (locals.err != ERR_ok) goto ex_2;
            locals.c.num = T_4_3.num;
            }
                goto end_2;
                ex_2:
                    if ((locals.err == ERR_bounds)) {

  LINE(389);
                        {
                        CLUREF T_4_1;
                        T_4_1.num = locals.sb.vec->data[3];
                        locals.c.num = T_4_1.num;
                        }

  LINE(390);
                        {
                        CLUREF T_4_1;
                        CLUREF T_4_2;
                        T_4_1.ch = ' ';
                        T_4_2.num = (locals.c.ch == T_4_1.ch)? true : false;
                        if (T_4_2.num == true) {

  LINE(391);
                            {
                            {signal (ERR_end_of_file);}}
                            }
                            }/* end if */

  LINE(392);
                        {
                        CLUREF T_4_1;
                        T_4_1.ch = ' ';
                        locals.sb.vec->data[3]  = T_4_1.num;
                        }
                    }
                    else {
                        goto ex_1;
                    }
                end_2:;

  LINE(394);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.sb.vec->data[1];
            locals.err = intOPadd(T_3_1, CLU_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            locals.sb.vec->data[1]  = T_3_2.num;
            }

  LINE(395);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.ch = '\n';
            T_3_2.num = (locals.c.ch == T_3_1.ch)? true : false;
            if (T_3_2.num == true) {

  LINE(396);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                T_4_1.num = locals.sb.vec->data[2];
                locals.err = intOPadd(T_4_1, CLU_1, &T_4_2);
                if (locals.err != ERR_ok) goto ex_1;
                locals.sb.vec->data[2]  = T_4_2.num;
                }
                }
                }/* end if */
            break;
            }
    case 3: 
         {

  LINE(398);
            {
            {signal (ERR_end_of_file);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(400);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_end_of_file) {signal(ERR_end_of_file);}
        else if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(402);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(403);
        {
        CLUREF T_2_1;
        locals.err = stringOPc2s(locals.c, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = streamOPscript(locals.st, T_2_1, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(404);
    {
    {
    ret_1->num = locals.c.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE getc ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPgetc_actual;
static Vlist1 vals_streamOPgetc = {0, 1, { {0, 2, "", &char_ops}}
};
static sig_desc0 sig_streamOPgetc_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPgetc_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPgetc = {0, 2, (sig_desc*)&sig_streamOPgetc_1, (sig_desc*)&sig_streamOPgetc_2};
static Vlist8 locals_streamOPgetc = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPgetc = {0, 0};
Slist0 tformals_streamOPgetc = {0, 0};
Slist0 opformals_streamOPgetc = {0, 0};
dbg_info_streamOPgetc_actual dbg_info_streamOPgetc_data = {0, 12, 
    "streamOPgetc", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPgetc, 1, 
    &vals_streamOPgetc, &sigs_streamOPgetc, &locals_streamOPgetc, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPgetc = (struct dbg_info*)&dbg_info_streamOPgetc_data;
extern struct dbg_info* dbg_info_streamOPgetc_image;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPgetc_image_TRACE
int streamOPgetc_image_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPgetc_image_own_init = 0;

/**** BEGIN PROCEDURE getc_image ****/

errcode streamOPgetc_image(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF c;
        CLUREF rb;
        CLUREF index;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        } locals;
    locals.c.num = UNINIT;
    locals.rb.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPgetc_image;
    locals.st = st;
        if (streamOPgetc_image_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPgetc_image_own_init = 1;
    }
    enter_proc(407);

  LINE(409);
    locals.c.num = UNINIT;

  LINE(410);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(412);
            {
                {CLUREF T_3_1;
                T_3_1.num = locals.rb.vec->data[2];
                locals.index.num = T_3_1.num;
                }
                }

  LINE(413);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[4];
            T_3_2.num = (locals.index.num > T_3_1.num)? true : false;
            if (T_3_2.num == true) {

  LINE(414);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                CLUREF T_4_3;
                T_4_1.num = locals.rb.vec->data[1];
                T_4_2.num = locals.rb.vec->data[0];
                locals.err = _chanOPgetb(T_4_1, T_4_2, &T_4_3);
                if (locals.err != ERR_ok) goto ex_1;
                locals.rb.vec->data[4]  = T_4_3.num;
                }

  LINE(415);
                {
                locals.index.num = 1;
                }
                }
                }/* end if */

  LINE(417);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[0];
            locals.err = _bytevecOPfetch(T_3_1, locals.index, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            locals.c.num = T_3_2.num;
            }

  LINE(418);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.ch = '\n';
            T_3_2.num = (locals.c.ch == T_3_1.ch)? true : false;
            if (T_3_2.num == true) {

  LINE(419);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                T_4_1.num = locals.rb.vec->data[3];
                locals.err = intOPadd(T_4_1, CLU_1, &T_4_2);
                if (locals.err != ERR_ok) goto ex_1;
                locals.rb.vec->data[3]  = T_4_2.num;
                }
                }
                }/* end if */

  LINE(420);
            {
            CLUREF T_3_1;
            locals.err = intOPadd(locals.index, CLU_1, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.rb.vec->data[2]  = T_3_1.num;
            }
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(422);
            {
            locals.err = streamOPflush(locals.st);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(423);
            {
            CLUREF T_3_1;
            locals.err = streamOPtty_get1(locals.tb, CLU_1, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.c.num = T_3_1.num;
            }
            break;
            }
    case 2: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.sb.num = T_2_4.num;

  LINE(425);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            T_4_1.num = locals.sb.vec->data[0];
            T_4_2.num = locals.sb.vec->data[1];
            locals.err = stringOPfetch(T_4_1, T_4_2, &T_4_3);
            if (locals.err != ERR_ok) goto ex_2;
            locals.c.num = T_4_3.num;
            }
                goto end_2;
                ex_2:
                    if ((locals.err == ERR_bounds)) {

  LINE(427);
                        {
                        CLUREF T_4_1;
                        T_4_1.num = locals.sb.vec->data[3];
                        locals.c.num = T_4_1.num;
                        }

  LINE(428);
                        {
                        CLUREF T_4_1;
                        CLUREF T_4_2;
                        T_4_1.ch = ' ';
                        T_4_2.num = (locals.c.ch == T_4_1.ch)? true : false;
                        if (T_4_2.num == true) {

  LINE(429);
                            {
                            {signal (ERR_end_of_file);}}
                            }
                            }/* end if */

  LINE(430);
                        {
                        CLUREF T_4_1;
                        T_4_1.ch = ' ';
                        locals.sb.vec->data[3]  = T_4_1.num;
                        }
                    }
                    else {
                        goto ex_1;
                    }
                end_2:;

  LINE(432);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.sb.vec->data[1];
            locals.err = intOPadd(T_3_1, CLU_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            locals.sb.vec->data[1]  = T_3_2.num;
            }

  LINE(433);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.ch = '\n';
            T_3_2.num = (locals.c.ch == T_3_1.ch)? true : false;
            if (T_3_2.num == true) {

  LINE(434);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                T_4_1.num = locals.sb.vec->data[2];
                locals.err = intOPadd(T_4_1, CLU_1, &T_4_2);
                if (locals.err != ERR_ok) goto ex_1;
                locals.sb.vec->data[2]  = T_4_2.num;
                }
                }
                }/* end if */
            break;
            }
    case 3: 
         {

  LINE(436);
            {
            {signal (ERR_end_of_file);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(438);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_end_of_file) {signal(ERR_end_of_file);}
        else if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(440);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(441);
        {
        CLUREF T_2_1;
        locals.err = stringOPc2s(locals.c, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = streamOPscript(locals.st, T_2_1, CLU_1);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(442);
    {
    {
    ret_1->num = locals.c.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE getc_image ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPgetc_image_actual;
static Vlist1 vals_streamOPgetc_image = {0, 1, { {0, 2, "", &char_ops}}
};
static sig_desc0 sig_streamOPgetc_image_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPgetc_image_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPgetc_image = {0, 2, (sig_desc*)&sig_streamOPgetc_image_1, (sig_desc*)&sig_streamOPgetc_image_2};
static Vlist8 locals_streamOPgetc_image = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPgetc_image = {0, 0};
Slist0 tformals_streamOPgetc_image = {0, 0};
Slist0 opformals_streamOPgetc_image = {0, 0};
dbg_info_streamOPgetc_image_actual dbg_info_streamOPgetc_image_data = {0, 12, 
    "streamOPgetc_image", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPgetc_image, 1, 
    &vals_streamOPgetc_image, &sigs_streamOPgetc_image, &locals_streamOPgetc_image, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPgetc_image = (struct dbg_info*)&dbg_info_streamOPgetc_image_data;
extern struct dbg_info* dbg_info_streamOPpeekc;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPpeekc_TRACE
int streamOPpeekc_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPpeekc_own_init = 0;

/**** BEGIN PROCEDURE peekc ****/

errcode streamOPpeekc(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF index;
        CLUREF tb;
        CLUREF c;
        CLUREF sb;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.c.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPpeekc;
    locals.st = st;
        if (streamOPpeekc_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPpeekc_own_init = 1;
    }
    enter_proc(445);

  LINE(447);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(449);
            {
                {CLUREF T_3_1;
                T_3_1.num = locals.rb.vec->data[2];
                locals.index.num = T_3_1.num;
                }
                }

  LINE(450);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[4];
            T_3_2.num = (locals.index.num > T_3_1.num)? true : false;
            if (T_3_2.num == true) {

  LINE(451);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                CLUREF T_4_3;
                T_4_1.num = locals.rb.vec->data[1];
                T_4_2.num = locals.rb.vec->data[0];
                locals.err = _chanOPgetb(T_4_1, T_4_2, &T_4_3);
                if (locals.err != ERR_ok) goto ex_1;
                locals.rb.vec->data[4]  = T_4_3.num;
                }

  LINE(452);
                {
                locals.rb.vec->data[2]  = 1;
                }

  LINE(453);
                {
                locals.index.num = 1;
                }
                }
                }/* end if */

  LINE(455);
            {
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[0];
            locals.err = _bytevecOPfetch(T_3_1, locals.index, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            ret_1->num = T_3_2.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(457);
            {
            locals.err = streamOPflush(locals.st);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(458);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            T_3_2.num = locals.tb.vec->data[7];
            T_3_1.num = T_3_2.num;
            if (T_3_2.num) {
                T_3_3.num = locals.tb.vec->data[8];
                T_3_1.num = T_3_3.num;
            }
            if (T_3_1.num == true) {

  LINE(459);
                {
                {signal (ERR_end_of_file);}}
                }
                }/* end if */

  LINE(460);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.tb.vec->data[18];
            T_3_2.num = (T_3_1.array->ext_size == 0)? true : false;
            if (T_3_2.num == true) {

  LINE(461);
                {
                    {CLUREF T_4_1;
                    CLUREF T_4_2;
                    T_4_1.num = locals.tb.vec->data[2];
                    locals.err = _chanOPgetc(T_4_1, CLU_1, &T_4_2);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.c.num = T_4_2.num;
                    }
                    }

  LINE(462);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                CLUREF T_4_3;
                CLUREF T_4_4;
                T_4_2.ch = '\004';
                T_4_3.num = (locals.c.ch == T_4_2.ch)? true : false;
                T_4_1.num = T_4_3.num;
                if (T_4_3.num) {
                    T_4_4.num = locals.tb.vec->data[8];
                    T_4_1.num = T_4_4.num;
                }
                if (T_4_1.num == true) {

  LINE(463);
                    {
                    locals.tb.vec->data[7]  = true;
                    }

  LINE(464);
                    {
                    {signal (ERR_end_of_file);}}
                    }
                    }/* end if */

  LINE(466);
                {
                CLUREF T_4_1;
                T_4_1.num = locals.tb.vec->data[18];
                locals.err = arrayOPaddh(T_4_1, locals.c);
                if (locals.err != ERR_ok) goto ex_1;
                }

  LINE(467);
                {
                locals.tb.vec->data[5]  = true;
                }
                }
                }/* end if */

  LINE(469);
            {
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.tb.vec->data[18];
            locals.err = arrayOPbottom(T_3_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            ret_1->num = T_3_2.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 2: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.sb.num = T_2_4.num;

  LINE(471);
            {
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            T_4_1.num = locals.sb.vec->data[0];
            T_4_2.num = locals.sb.vec->data[1];
            locals.err = stringOPfetch(T_4_1, T_4_2, &T_4_3);
            if (locals.err != ERR_ok) goto ex_2;
            ret_1->num = T_4_3.num;
            }
            {signal (ERR_ok);}}
                goto end_2;
                ex_2:
                    if ((locals.err == ERR_bounds)) {

  LINE(473);
                        {
                        CLUREF T_4_1;
                        CLUREF T_4_2;
                        CLUREF T_4_3;
                        T_4_1.num = locals.sb.vec->data[3];
                        T_4_2.ch = ' ';
                        T_4_3.num = (T_4_1.ch == T_4_2.ch)? true : false;
                        if (T_4_3.num == true) {

  LINE(474);
                            {
                            {signal (ERR_end_of_file);}}
                            }
                            }/* end if */

  LINE(475);
                        {
                        {
                        CLUREF T_4_1;
                        T_4_1.ch = '\n';
                        ret_1->num = T_4_1.num;
                        }
                        {signal (ERR_ok);}}
                    }
                    else {
                        goto ex_1;
                    }
                end_2:;
            break;
            }
    case 3: 
         {

  LINE(478);
            {
            {signal (ERR_end_of_file);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(480);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_end_of_file) {signal(ERR_end_of_file);}
        else if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE peekc ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPpeekc_actual;
static Vlist1 vals_streamOPpeekc = {0, 1, { {0, 2, "", &char_ops}}
};
static sig_desc0 sig_streamOPpeekc_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPpeekc_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPpeekc = {0, 2, (sig_desc*)&sig_streamOPpeekc_1, (sig_desc*)&sig_streamOPpeekc_2};
static Vlist8 locals_streamOPpeekc = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "c", &char_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPpeekc = {0, 0};
Slist0 tformals_streamOPpeekc = {0, 0};
Slist0 opformals_streamOPpeekc = {0, 0};
dbg_info_streamOPpeekc_actual dbg_info_streamOPpeekc_data = {0, 12, 
    "streamOPpeekc", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPpeekc, 1, 
    &vals_streamOPpeekc, &sigs_streamOPpeekc, &locals_streamOPpeekc, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPpeekc = (struct dbg_info*)&dbg_info_streamOPpeekc_data;
extern struct dbg_info* dbg_info_streamOPpending;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPpending_TRACE
int streamOPpending_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPpending_own_init = 0;

/**** BEGIN PROCEDURE pending ****/

errcode streamOPpending(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPpending;
    locals.st = st;
        if (streamOPpending_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPpending_own_init = 1;
    }
    enter_proc(484);

  LINE(485);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 6: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.tb.num = T_2_2.num;

  LINE(487);
            {
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            CLUREF T_3_5;
            CLUREF T_3_6;
            CLUREF T_3_7;
            CLUREF T_3_8;
            CLUREF T_3_9;
            CLUREF T_3_10;
            CLUREF T_3_11;
            T_3_3.num = locals.tb.vec->data[7];
            T_3_2.num = T_3_3.num;
            if (T_3_3.num) {
                T_3_4.num = locals.tb.vec->data[8];
                T_3_2.num = T_3_4.num;
            }
            T_3_5.num = T_3_2.num ^ 1;
            T_3_1.num = T_3_5.num;
            if (T_3_5.num) {
                T_3_7.num = locals.tb.vec->data[18];
                T_3_8.num = (T_3_7.array->ext_size == 0)? true : false;
                T_3_9.num = T_3_8.num ^ 1;
                T_3_6.num = T_3_9.num;
                if (!T_3_9.num) {
                    T_3_10.num = locals.tb.vec->data[2];
                    locals.err = _chanOPpending(T_3_10, CLU_0, &T_3_11);
                    if (locals.err != ERR_ok) goto ex_1;
                    T_3_6.num = T_3_11.num;
                }
                T_3_1.num = T_3_6.num;
            }
            ret_1->num = T_3_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(491);
        {
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        locals.err = streamOPempty(locals.st, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        T_3_2.num = T_3_1.num ^ 1;
        ret_1->num = T_3_2.num;
        }
        {signal (ERR_ok);}}
    }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE pending ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPpending_actual;
static Vlist1 vals_streamOPpending = {0, 1, { {0, 2, "", &bool_ops}}
};
static sig_desc1 sig_streamOPpending_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPpending = {0, 1, (sig_desc*)&sig_streamOPpending_1};
static Vlist4 locals_streamOPpending = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPpending = {0, 0};
Slist0 tformals_streamOPpending = {0, 0};
Slist0 opformals_streamOPpending = {0, 0};
dbg_info_streamOPpending_actual dbg_info_streamOPpending_data = {0, 12, 
    "streamOPpending", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPpending, 1, 
    &vals_streamOPpending, &sigs_streamOPpending, &locals_streamOPpending, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPpending = (struct dbg_info*)&dbg_info_streamOPpending_data;
extern struct dbg_info* dbg_info_streamOPempty;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPempty_TRACE
int streamOPempty_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPempty_own_init = 0;

/**** BEGIN PROCEDURE empty ****/

errcode streamOPempty(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPempty;
    locals.st = st;
        if (streamOPempty_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPempty_own_init = 1;
    }
    enter_proc(495);

  LINE(496);
    {
    CLUREF T_3_1;
    T_3_1.num = locals.st.vec->data[0];
    switch (T_3_1.cell->tag) {
    case 5: 
         {CLUREF T_3_2;
        T_3_2.num = T_3_1.cell->value;
        locals.rb.num = T_3_2.num;

  LINE(498);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            T_4_1.num = locals.rb.vec->data[2];
            T_4_2.num = locals.rb.vec->data[4];
            T_4_3.num = (T_4_1.num > T_4_2.num)? true : false;
            if (T_4_3.num == true) {

  LINE(499);
                {
                CLUREF T_5_1;
                CLUREF T_5_2;
                CLUREF T_5_3;
                T_5_1.num = locals.rb.vec->data[1];
                T_5_2.num = locals.rb.vec->data[0];
                locals.err = _chanOPgetb(T_5_1, T_5_2, &T_5_3);
                if (locals.err != ERR_ok) goto ex_2;
                locals.rb.vec->data[4]  = T_5_3.num;
                }

  LINE(500);
                {
                locals.rb.vec->data[2]  = 1;
                }
                }
                }/* end if */

  LINE(502);
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
         {CLUREF T_3_3;
        T_3_3.num = T_3_1.cell->value;
        locals.tb.num = T_3_3.num;

  LINE(504);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            T_4_1.num = locals.tb.vec->data[8];
            T_4_2.num = T_4_1.num ^ 1;
            if (T_4_2.num == true) {

  LINE(505);
                {
                {
                ret_1->tf = false;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */

  LINE(506);
            {
            CLUREF T_4_1;
            locals.err = streamOPpeekc(locals.st, &T_4_1);
            if (locals.err != ERR_ok) goto ex_2;
            }

  LINE(507);
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 2: 
         {CLUREF T_3_4;
        T_3_4.num = T_3_1.cell->value;
        locals.sb.num = T_3_4.num;

  LINE(509);
            {
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            CLUREF T_4_4;
            CLUREF T_4_5;
            CLUREF T_4_6;
            CLUREF T_4_7;
            CLUREF T_4_8;
            T_4_2.num = locals.sb.vec->data[1];
            T_4_3.num = locals.sb.vec->data[0];
            locals.err = stringOPsize(T_4_3, &T_4_4);
            if (locals.err != ERR_ok) goto ex_2;
            T_4_5.num = (T_4_2.num > T_4_4.num)? true : false;
            T_4_1.num = T_4_5.num;
            if (T_4_5.num) {
                T_4_6.num = locals.sb.vec->data[3];
                T_4_7.ch = ' ';
                T_4_8.num = (T_4_6.ch == T_4_7.ch)? true : false;
                T_4_1.num = T_4_8.num;
            }
            ret_1->num = T_4_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 3: 
         {

  LINE(511);
            {
            {
            ret_1->tf = true;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(513);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_2;
    ex_2:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_1;}
    end_2:;
        goto end_1;
        ex_1:
            if ((locals.err == ERR_end_of_file)) {

  LINE(515);
                {
                {
                ret_1->tf = true;
                }
                {signal (ERR_ok);}}
            }
            else {
                goto ex_0;
            }
        end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE empty ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPempty_actual;
static Vlist1 vals_streamOPempty = {0, 1, { {0, 2, "", &bool_ops}}
};
static sig_desc1 sig_streamOPempty_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPempty = {0, 1, (sig_desc*)&sig_streamOPempty_1};
static Vlist6 locals_streamOPempty = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPempty = {0, 0};
Slist0 tformals_streamOPempty = {0, 0};
Slist0 opformals_streamOPempty = {0, 0};
dbg_info_streamOPempty_actual dbg_info_streamOPempty_data = {0, 12, 
    "streamOPempty", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPempty, 1, 
    &vals_streamOPempty, &sigs_streamOPempty, &locals_streamOPempty, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPempty = (struct dbg_info*)&dbg_info_streamOPempty_data;
extern struct dbg_info* dbg_info_streamOPputc;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputc_TRACE
int streamOPputc_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPputc_own_init = 0;

/**** BEGIN PROCEDURE putc ****/

errcode streamOPputc(st, c)
CLUREF st;
CLUREF c;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF wb;
        CLUREF low;
        CLUREF index;
        CLUREF tb;
        CLUREF chars;
        CLUREF st;
        CLUREF c;
        } locals;
    locals.wb.num = UNINIT;
    locals.low.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.chars.num = UNINIT;
    locals.st.num = UNINIT;
    locals.c.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputc;
    locals.st = st;
    locals.c = c;
        if (streamOPputc_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputc_own_init = 1;
    }
    enter_proc(518);

  LINE(519);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 7: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.wb.num = T_2_2.num;

  LINE(521);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.wb.vec->data[3];
            if (T_3_1.num == true) {

  LINE(522);
                {
                    {CLUREF T_4_1;
                    CLUREF T_4_2;
                    CLUREF T_4_3;
                    CLUREF T_4_4;
                    CLUREF T_4_5;
                    CLUREF T_4_6;
                    T_4_1.num = locals.wb.vec->data[1];
                    T_4_2.num = locals.wb.vec->data[0];
                    T_4_3.num = locals.wb.vec->data[2];
                    locals.err = stringOPc2s(locals.c, &T_4_4);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.err = _chanOPput(T_4_1, T_4_2, CLU_1, T_4_3, T_4_4, CLU_0, &T_4_5, &T_4_6);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.low.num = T_4_5.num;
                    locals.index.num = T_4_6.num;
                    }
                    }

  LINE(525);
                {
                locals.wb.vec->data[2]  = locals.index.num;
                }
                }
            else {

  LINE(526);
                {
                CLUREF T_4_1;
                T_4_1.num = locals.wb.vec->data[1];
                locals.err = _chanOPputc(T_4_1, locals.c, CLU_0);
                if (locals.err != ERR_ok) goto ex_1;
                }
                }}/* end if */
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(529);
            {
            CLUREF T_3_1;
            locals.err = stringOPc2s(locals.c, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.err = streamOPtty_put(locals.tb, T_3_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 4: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.chars.num = T_2_4.num;

  LINE(531);
            {
            locals.err = arrayOPaddh(locals.chars, locals.c);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 3: 
         {
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(534);
            {
            elist[0] = STR_cannot_040write_040to_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(536);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(537);
        {
        CLUREF T_2_1;
        locals.err = stringOPc2s(locals.c, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = streamOPscript(locals.st, T_2_1, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE putc ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist9 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputc_actual;
static Vlist0 vals_streamOPputc = {0, 0};
static sig_desc1 sig_streamOPputc_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPputc = {0, 1, (sig_desc*)&sig_streamOPputc_1};
static Vlist9 locals_streamOPputc = {0, 9,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "low", &int_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "chars", &array_of_char_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "c", &char_ops}}
};
static Vlist0 popowns_streamOPputc = {0, 0};
Slist0 tformals_streamOPputc = {0, 0};
Slist0 opformals_streamOPputc = {0, 0};
dbg_info_streamOPputc_actual dbg_info_streamOPputc_data = {0, 12, 
    "streamOPputc", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputc, 2, 
    &vals_streamOPputc, &sigs_streamOPputc, &locals_streamOPputc, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputc = (struct dbg_info*)&dbg_info_streamOPputc_data;
extern struct dbg_info* dbg_info_streamOPputc_image;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputc_image_TRACE
int streamOPputc_image_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPputc_image_own_init = 0;

/**** BEGIN PROCEDURE putc_image ****/

errcode streamOPputc_image(st, c)
CLUREF st;
CLUREF c;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF wb;
        CLUREF low;
        CLUREF index;
        CLUREF tb;
        CLUREF chars;
        CLUREF st;
        CLUREF c;
        } locals;
    locals.wb.num = UNINIT;
    locals.low.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.chars.num = UNINIT;
    locals.st.num = UNINIT;
    locals.c.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputc_image;
    locals.st = st;
    locals.c = c;
        if (streamOPputc_image_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputc_image_own_init = 1;
    }
    enter_proc(540);

  LINE(541);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 7: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.wb.num = T_2_2.num;

  LINE(543);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.wb.vec->data[3];
            if (T_3_1.num == true) {

  LINE(544);
                {
                    {CLUREF T_4_1;
                    CLUREF T_4_2;
                    CLUREF T_4_3;
                    CLUREF T_4_4;
                    CLUREF T_4_5;
                    CLUREF T_4_6;
                    T_4_1.num = locals.wb.vec->data[1];
                    T_4_2.num = locals.wb.vec->data[0];
                    T_4_3.num = locals.wb.vec->data[2];
                    locals.err = stringOPc2s(locals.c, &T_4_4);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.err = _chanOPput(T_4_1, T_4_2, CLU_1, T_4_3, T_4_4, CLU_1, &T_4_5, &T_4_6);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.low.num = T_4_5.num;
                    locals.index.num = T_4_6.num;
                    }
                    }

  LINE(547);
                {
                locals.wb.vec->data[2]  = locals.index.num;
                }
                }
            else {

  LINE(548);
                {
                CLUREF T_4_1;
                T_4_1.num = locals.wb.vec->data[1];
                locals.err = _chanOPputc(T_4_1, locals.c, CLU_1);
                if (locals.err != ERR_ok) goto ex_1;
                }
                }}/* end if */
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(551);
            {
            CLUREF T_3_1;
            locals.err = stringOPc2s(locals.c, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.err = streamOPtty_put(locals.tb, T_3_1, CLU_1);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 4: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.chars.num = T_2_4.num;

  LINE(553);
            {
            locals.err = arrayOPaddh(locals.chars, locals.c);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 3: 
         {
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(556);
            {
            elist[0] = STR_cannot_040write_040to_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(558);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(559);
        {
        CLUREF T_2_1;
        locals.err = stringOPc2s(locals.c, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = streamOPscript(locals.st, T_2_1, CLU_1);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE putc_image ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist9 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputc_image_actual;
static Vlist0 vals_streamOPputc_image = {0, 0};
static sig_desc1 sig_streamOPputc_image_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPputc_image = {0, 1, (sig_desc*)&sig_streamOPputc_image_1};
static Vlist9 locals_streamOPputc_image = {0, 9,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "low", &int_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "chars", &array_of_char_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "c", &char_ops}}
};
static Vlist0 popowns_streamOPputc_image = {0, 0};
Slist0 tformals_streamOPputc_image = {0, 0};
Slist0 opformals_streamOPputc_image = {0, 0};
dbg_info_streamOPputc_image_actual dbg_info_streamOPputc_image_data = {0, 12, 
    "streamOPputc_image", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputc_image, 2, 
    &vals_streamOPputc_image, &sigs_streamOPputc_image, &locals_streamOPputc_image, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputc_image = (struct dbg_info*)&dbg_info_streamOPputc_image_data;
extern struct dbg_info* dbg_info_streamOPget_lineno;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_lineno_TRACE
int streamOPget_lineno_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_lineno_own_init = 0;

/**** BEGIN PROCEDURE get_lineno ****/

errcode streamOPget_lineno(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_lineno;
    locals.st = st;
        if (streamOPget_lineno_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_lineno_own_init = 1;
    }
    enter_proc(562);

  LINE(563);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 5: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.rb.num = T_1_2.num;

  LINE(565);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.rb.vec->data[3];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
         {CLUREF T_1_3;
        T_1_3.num = T_1_1.cell->value;
        locals.tb.num = T_1_3.num;

  LINE(567);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[13];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 2: 
         {CLUREF T_1_4;
        T_1_4.num = T_1_1.cell->value;
        locals.sb.num = T_1_4.num;

  LINE(569);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.sb.vec->data[2];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(571);
        {
        elist[0] = STR_no_040line_040numbers;
        {signal (ERR_not_possible);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_lineno ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_lineno_actual;
static Vlist1 vals_streamOPget_lineno = {0, 1, { {0, 2, "", &int_ops}}
};
static sig_desc1 sig_streamOPget_lineno_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPget_lineno = {0, 1, (sig_desc*)&sig_streamOPget_lineno_1};
static Vlist6 locals_streamOPget_lineno = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_lineno = {0, 0};
Slist0 tformals_streamOPget_lineno = {0, 0};
Slist0 opformals_streamOPget_lineno = {0, 0};
dbg_info_streamOPget_lineno_actual dbg_info_streamOPget_lineno_data = {0, 12, 
    "streamOPget_lineno", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_lineno, 1, 
    &vals_streamOPget_lineno, &sigs_streamOPget_lineno, &locals_streamOPget_lineno, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_lineno = (struct dbg_info*)&dbg_info_streamOPget_lineno_data;
extern struct dbg_info* dbg_info_streamOPset_lineno;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPset_lineno_TRACE
int streamOPset_lineno_TRACE;

/**** BEGIN PROCEDURE set_lineno ****/

errcode streamOPset_lineno(st, ln)
CLUREF st;
CLUREF ln;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        CLUREF ln;
        } locals;
    locals.st.num = UNINIT;
    locals.ln.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPset_lineno;
    locals.st = st;
    locals.ln = ln;
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
    enter_proc(575);
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE set_lineno ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPset_lineno_actual;
static Vlist0 vals_streamOPset_lineno = {0, 0};
static sig_desc1 sig_streamOPset_lineno_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPset_lineno = {0, 1, (sig_desc*)&sig_streamOPset_lineno_1};
static Vlist4 locals_streamOPset_lineno = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "ln", &int_ops}}
};
static Vlist0 popowns_streamOPset_lineno = {0, 0};
Slist0 tformals_streamOPset_lineno = {0, 0};
Slist0 opformals_streamOPset_lineno = {0, 0};
dbg_info_streamOPset_lineno_actual dbg_info_streamOPset_lineno_data = {0, 12, 
    "streamOPset_lineno", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPset_lineno, 2, 
    &vals_streamOPset_lineno, &sigs_streamOPset_lineno, &locals_streamOPset_lineno, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPset_lineno = (struct dbg_info*)&dbg_info_streamOPset_lineno_data;
extern struct dbg_info* dbg_info_streamOPreset;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPreset_TRACE
int streamOPreset_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPreset_own_init = 0;

/**** BEGIN PROCEDURE reset ****/

errcode streamOPreset(st)
CLUREF st;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF wb;
        CLUREF tb;
        CLUREF sb;
        CLUREF chars;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.wb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.chars.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPreset;
    locals.st = st;
        if (streamOPreset_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPreset_own_init = 1;
    }
    enter_proc(578);

  LINE(579);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(581);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.rb.vec->data[1];
            locals.err = _chanOPreset(T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(582);
            {
            locals.rb.vec->data[3]  = 1;
            }

  LINE(583);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[4];
            locals.err = intOPadd(T_3_1, CLU_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            locals.rb.vec->data[2]  = T_3_2.num;
            }
            break;
            }
    case 7: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.wb.num = T_2_3.num;

  LINE(585);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.wb.vec->data[1];
            locals.err = _chanOPreset(T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(586);
            {
            locals.wb.vec->data[2]  = 0;
            }
            break;
            }
    case 6: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.tb.num = T_2_4.num;

  LINE(588);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[2];
            locals.err = _chanOPreset(T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(589);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            T_3_2.num = locals.tb.vec->data[4];
            T_3_3.num = (T_3_2.num > 1)? true : false;
            T_3_1.num = T_3_3.num;
            if (!T_3_3.num) {
                T_3_4.num = locals.tb.vec->data[7];
                T_3_1.num = T_3_4.num;
            }
            if (T_3_1.num == true) {

  LINE(590);
                {
                CLUREF T_5_1;
                CLUREF T_5_2;
                T_5_1.num = locals.tb.vec->data[2];
                T_5_2.ch = '\n';
                locals.err = _chanOPputc(T_5_1, T_5_2, CLU_0);
                if (locals.err != ERR_ok) goto ex_2;
                }
                    goto end_2;
                    ex_2:
                        if ((locals.err == ERR_not_possible)) {
                        }
                        else {
                            goto ex_1;
                        }
                    end_2:;
                }
                }/* end if */

  LINE(593);
            {
            locals.tb.vec->data[4]  = 1;
            }

  LINE(594);
            {
            locals.tb.vec->data[11]  = 0;
            }

  LINE(595);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[18];
            locals.err = arrayOPset_low(T_3_1, CLU_1);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(596);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[18];
            locals.err = arrayOPtrim(T_3_1, CLU_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(597);
            {
            locals.tb.vec->data[5]  = false;
            }

  LINE(598);
            {
            locals.tb.vec->data[7]  = false;
            }

  LINE(599);
            {
            locals.tb.vec->data[13]  = 1;
            }
            break;
            }
    case 2: 
         {CLUREF T_2_5;
        T_2_5.num = T_2_1.cell->value;
        locals.sb.num = T_2_5.num;

  LINE(601);
            {
            locals.sb.vec->data[1]  = 1;
            }

  LINE(602);
            {
            locals.sb.vec->data[2]  = 1;
            }

  LINE(603);
            {
            CLUREF T_3_1;
            T_3_1.ch = ' ';
            locals.sb.vec->data[3]  = T_3_1.num;
            }

  LINE(604);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            CLUREF T_4_4;
            CLUREF T_4_5;
            CLUREF T_4_6;
            CLUREF T_4_7;
            T_4_1.num = locals.sb.vec->data[0];
            T_4_2.num = locals.sb.vec->data[0];
            locals.err = stringOPsize(T_4_2, &T_4_3);
            if (locals.err != ERR_ok) goto ex_3;
            locals.err = stringOPfetch(T_4_1, T_4_3, &T_4_4);
            if (locals.err != ERR_ok) goto ex_3;
            T_4_5.ch = '\n';
            T_4_6.num = (T_4_4.ch == T_4_5.ch)? true : false;
            T_4_7.num = T_4_6.num ^ 1;
            if (T_4_7.num == true) {

  LINE(605);
                {
                CLUREF T_5_1;
                T_5_1.ch = '\n';
                locals.sb.vec->data[3]  = T_5_1.num;
                }
                }
                }/* end if */
                goto end_3;
                ex_3:
                    if ((locals.err == ERR_bounds)) {
                    }
                    else {
                        goto ex_1;
                    }
                end_3:;
            break;
            }
    case 4: 
         {CLUREF T_2_6;
        T_2_6.num = T_2_1.cell->value;
        locals.chars.num = T_2_6.num;

  LINE(608);
            {
            locals.err = arrayOPtrim(locals.chars, CLU_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 3: 
    case 1: 
         {
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE reset ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPreset_actual;
static Vlist0 vals_streamOPreset = {0, 0};
static sig_desc1 sig_streamOPreset_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPreset = {0, 1, (sig_desc*)&sig_streamOPreset_1};
static Vlist8 locals_streamOPreset = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "chars", &array_of_char_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPreset = {0, 0};
Slist0 tformals_streamOPreset = {0, 0};
Slist0 opformals_streamOPreset = {0, 0};
dbg_info_streamOPreset_actual dbg_info_streamOPreset_data = {0, 12, 
    "streamOPreset", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPreset, 1, 
    &vals_streamOPreset, &sigs_streamOPreset, &locals_streamOPreset, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPreset = (struct dbg_info*)&dbg_info_streamOPreset_data;
extern struct dbg_info* dbg_info_streamOPflush;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPflush_TRACE
int streamOPflush_TRACE;
extern errcode streamOPflush_IB_1();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPflush_own_init = 0;

/**** BEGIN PROCEDURE flush ****/

errcode streamOPflush(st)
CLUREF st;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF wb;
        CLUREF tb;
        CLUREF scr;
        CLUREF st;
        } locals;
    locals.wb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.scr.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPflush;
    locals.st = st;
        if (streamOPflush_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPflush_own_init = 1;
    }
    enter_proc(613);

  LINE(614);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 7: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.wb.num = T_2_2.num;

  LINE(616);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            T_3_1.num = locals.wb.vec->data[1];
            T_3_2.num = locals.wb.vec->data[0];
            T_3_3.num = locals.wb.vec->data[2];
            locals.err = _chanOPputb(T_3_1, T_3_2, CLU_1, T_3_3, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(617);
            {
            locals.wb.vec->data[2]  = 0;
            }
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(619);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            CLUREF T_3_5;
            T_3_1.num = locals.tb.vec->data[2];
            T_3_2.num = locals.tb.vec->data[1];
            T_3_3.num = locals.tb.vec->data[4];
            T_3_4.num = locals.tb.vec->data[11];
            T_3_5.num = locals.tb.vec->data[10];
            locals.err = _chanOPputb(T_3_1, T_3_2, T_3_3, T_3_4, T_3_5);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(620);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.tb.vec->data[11];
            locals.err = intOPadd(T_3_1, CLU_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            locals.tb.vec->data[4]  = T_3_2.num;
            }

  LINE(621);
            {
            locals.tb.vec->data[10]  = false;
            }
            break;
            }
    case 5: 
    case 2: 
    case 4: 
    case 3: 
         {
            break;
            }
    case 1: 
         {

  LINE(624);
            {
            {signal (ERR_ok);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(626);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(627);
        {
            CLUREF T_3_1;
            T_3_1.num = locals.st.vec->data[3];
            locals.err = sequenceOPelements(T_3_1, streamOPflush_IB_1, &locals, &locals.ecode2);
            if (locals.err == ERR_iterbodyreturn) {
            signal(ERR_ok);}
            if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
            if (locals.err == ERR_break) locals.err = ERR_ok;
            if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
            if (locals.err != ERR_ok) goto ex_2;
            }
        goto end_2;
        ex_2:
            if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
            else {
                goto ex_0;}
        end_2:;
        }
        }/* end if */
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE flush ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPflush_actual;
static Vlist0 vals_streamOPflush = {0, 0};
static sig_desc1 sig_streamOPflush_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPflush = {0, 1, (sig_desc*)&sig_streamOPflush_1};
static Vlist6 locals_streamOPflush = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "scr", &stream_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPflush = {0, 0};
Slist0 tformals_streamOPflush = {0, 0};
Slist0 opformals_streamOPflush = {0, 0};
dbg_info_streamOPflush_actual dbg_info_streamOPflush_data = {0, 12, 
    "streamOPflush", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPflush, 1, 
    &vals_streamOPflush, &sigs_streamOPflush, &locals_streamOPflush, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPflush = (struct dbg_info*)&dbg_info_streamOPflush_data;

/**** BEGIN ITERATOR BODIES for flush ****/

errcode streamOPflush_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF wb;
    CLUREF tb;
    CLUREF scr;
    CLUREF st;
    } *locals;
{
    locals->scr.num = iv_1.num;
    enter_iter_body_proc(628);

  FB_LINE(628);
    {
    locals->err = streamOPflush(locals->scr);
    if (locals->err != ERR_ok) goto ex_0;
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPflush_IB_1 */

/**** END ITERATOR BODIES for flush ****/

extern struct dbg_info* dbg_info_streamOPget_line_length;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_line_length_TRACE
int streamOPget_line_length_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_line_length_own_init = 0;

/**** BEGIN PROCEDURE get_line_length ****/

errcode streamOPget_line_length(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_line_length;
    locals.st = st;
        if (streamOPget_line_length_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_line_length_own_init = 1;
    }
    enter_proc(633);

  LINE(634);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(636);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = locals.tb.vec->data[14];
            T_2_2.num = (T_2_1.num > 0)? true : false;
            if (T_2_2.num == true) {

  LINE(637);
                {
                {
                CLUREF T_3_1;
                T_3_1.num = locals.tb.vec->data[14];
                ret_1->num = T_3_1.num;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */
            break;
            }
    default: {
    }
    }
    }

  LINE(640);
    {
    {signal (ERR_no_limit);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_line_length ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_line_length_actual;
static Vlist1 vals_streamOPget_line_length = {0, 1, { {0, 2, "", &int_ops}}
};
static sig_desc0 sig_streamOPget_line_length_1 = {0, 3, "no_limit", {0, 0
}};
static siglist1 sigs_streamOPget_line_length = {0, 1, (sig_desc*)&sig_streamOPget_line_length_1};
static Vlist4 locals_streamOPget_line_length = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_line_length = {0, 0};
Slist0 tformals_streamOPget_line_length = {0, 0};
Slist0 opformals_streamOPget_line_length = {0, 0};
dbg_info_streamOPget_line_length_actual dbg_info_streamOPget_line_length_data = {0, 12, 
    "streamOPget_line_length", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_line_length, 1, 
    &vals_streamOPget_line_length, &sigs_streamOPget_line_length, &locals_streamOPget_line_length, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_line_length = (struct dbg_info*)&dbg_info_streamOPget_line_length_data;
extern struct dbg_info* dbg_info_streamOPget_page_length;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_page_length_TRACE
int streamOPget_page_length_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_page_length_own_init = 0;

/**** BEGIN PROCEDURE get_page_length ****/

errcode streamOPget_page_length(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_page_length;
    locals.st = st;
        if (streamOPget_page_length_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_page_length_own_init = 1;
    }
    enter_proc(643);

  LINE(644);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(646);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = locals.tb.vec->data[16];
            T_2_2.num = (T_2_1.num > 0)? true : false;
            if (T_2_2.num == true) {

  LINE(647);
                {
                {
                CLUREF T_3_1;
                T_3_1.num = locals.tb.vec->data[16];
                ret_1->num = T_3_1.num;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */
            break;
            }
    default: {
    }
    }
    }

  LINE(650);
    {
    {signal (ERR_no_limit);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_page_length ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_page_length_actual;
static Vlist1 vals_streamOPget_page_length = {0, 1, { {0, 2, "", &int_ops}}
};
static sig_desc0 sig_streamOPget_page_length_1 = {0, 3, "no_limit", {0, 0
}};
static siglist1 sigs_streamOPget_page_length = {0, 1, (sig_desc*)&sig_streamOPget_page_length_1};
static Vlist4 locals_streamOPget_page_length = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_page_length = {0, 0};
Slist0 tformals_streamOPget_page_length = {0, 0};
Slist0 opformals_streamOPget_page_length = {0, 0};
dbg_info_streamOPget_page_length_actual dbg_info_streamOPget_page_length_data = {0, 12, 
    "streamOPget_page_length", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_page_length, 1, 
    &vals_streamOPget_page_length, &sigs_streamOPget_page_length, &locals_streamOPget_page_length, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_page_length = (struct dbg_info*)&dbg_info_streamOPget_page_length_data;
extern struct dbg_info* dbg_info_streamOPget_date;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_date_TRACE
int streamOPget_date_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_date_own_init = 0;

/**** BEGIN PROCEDURE get_date ****/

errcode streamOPget_date(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF wb;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.wb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_date;
    locals.st = st;
        if (streamOPget_date_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_date_own_init = 1;
    }
    enter_proc(653);

  LINE(654);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(656);
            {
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.rb.vec->data[1];
            locals.err = _chanOPget_date(T_3_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            ret_1->num = T_3_2.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 7: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.wb.num = T_2_3.num;

  LINE(658);
            {
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.wb.vec->data[1];
            locals.err = _chanOPget_date(T_3_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            ret_1->num = T_3_2.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(660);
        {
        elist[0] = STR_cannot_040get_040date;
        {signal (ERR_not_possible);}}
    }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_date ****/

extern struct OPS *date_ops;
typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_date_actual;
static Vlist1 vals_streamOPget_date = {0, 1, { {0, 2, "", &date_ops}}
};
static sig_desc1 sig_streamOPget_date_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPget_date = {0, 1, (sig_desc*)&sig_streamOPget_date_1};
static Vlist5 locals_streamOPget_date = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_date = {0, 0};
Slist0 tformals_streamOPget_date = {0, 0};
Slist0 opformals_streamOPget_date = {0, 0};
dbg_info_streamOPget_date_actual dbg_info_streamOPget_date_data = {0, 12, 
    "streamOPget_date", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_date, 1, 
    &vals_streamOPget_date, &sigs_streamOPget_date, &locals_streamOPget_date, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_date = (struct dbg_info*)&dbg_info_streamOPget_date_data;
extern struct dbg_info* dbg_info_streamOPset_date;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPset_date_TRACE
int streamOPset_date_TRACE;
static int streamOPset_date_own_init = 0;

/**** BEGIN PROCEDURE set_date ****/

errcode streamOPset_date(st, ndate)
CLUREF st;
CLUREF ndate;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        CLUREF ndate;
        } locals;
    locals.st.num = UNINIT;
    locals.ndate.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPset_date;
    locals.st = st;
    locals.ndate = ndate;
        if (streamOPset_date_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPset_date_own_init = 1;
    }
    enter_proc(664);

  LINE(665);
    {
    elist[0] = STR_cannot_040set_040date;
    {signal (ERR_not_possible);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE set_date ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPset_date_actual;
static Vlist0 vals_streamOPset_date = {0, 0};
static sig_desc1 sig_streamOPset_date_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPset_date = {0, 1, (sig_desc*)&sig_streamOPset_date_1};
static Vlist4 locals_streamOPset_date = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "ndate", &date_ops}}
};
static Vlist0 popowns_streamOPset_date = {0, 0};
Slist0 tformals_streamOPset_date = {0, 0};
Slist0 opformals_streamOPset_date = {0, 0};
dbg_info_streamOPset_date_actual dbg_info_streamOPset_date_data = {0, 12, 
    "streamOPset_date", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPset_date, 2, 
    &vals_streamOPset_date, &sigs_streamOPset_date, &locals_streamOPset_date, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPset_date = (struct dbg_info*)&dbg_info_streamOPset_date_data;
extern struct dbg_info* dbg_info_streamOPget_name;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_name_TRACE
int streamOPget_name_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_name_own_init = 0;

/**** BEGIN PROCEDURE get_name ****/

errcode streamOPget_name(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        } locals;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_name;
    locals.st = st;
        if (streamOPget_name_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_name_own_init = 1;
    }
    enter_proc(668);

  LINE(669);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 2: 
    case 4: 
         {

  LINE(671);
            {
            elist[0] = STR_no_040name_040for_040string_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    default: {

  LINE(673);
        {
        {
        CLUREF T_2_1;
        T_2_1.num = locals.st.vec->data[1];
        ret_1->num = T_2_1.num;
        }
        {signal (ERR_ok);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_name ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist3 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_name_actual;
static Vlist1 vals_streamOPget_name = {0, 1, { {0, 2, "", &file_name_ops}}
};
static sig_desc1 sig_streamOPget_name_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPget_name = {0, 1, (sig_desc*)&sig_streamOPget_name_1};
static Vlist3 locals_streamOPget_name = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_name = {0, 0};
Slist0 tformals_streamOPget_name = {0, 0};
Slist0 opformals_streamOPget_name = {0, 0};
dbg_info_streamOPget_name_actual dbg_info_streamOPget_name_data = {0, 12, 
    "streamOPget_name", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_name, 1, 
    &vals_streamOPget_name, &sigs_streamOPget_name, &locals_streamOPget_name, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_name = (struct dbg_info*)&dbg_info_streamOPget_name_data;
extern struct dbg_info* dbg_info_streamOPclose;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPclose_TRACE
int streamOPclose_TRACE;
extern errcode streamOPclose_IB_1();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
static int streamOPclose_own_init = 0;

/**** BEGIN PROCEDURE close ****/

errcode streamOPclose(st)
CLUREF st;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF wb;
        CLUREF tb;
        CLUREF opens;
        CLUREF i;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.wb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.opens.num = UNINIT;
    locals.i.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPclose;
    locals.st = st;
        if (streamOPclose_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPclose_own_init = 1;
    }
    enter_proc(677);

  LINE(678);
    {
    locals.err = streamOPflush(locals.st);
    if (locals.err != ERR_ok) goto ex_1;
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(680);
    {
    CLUREF T_3_1;
    T_3_1.num = locals.st.vec->data[0];
    switch (T_3_1.cell->tag) {
    case 5: 
         {CLUREF T_3_2;
        T_3_2.num = T_3_1.cell->value;
        locals.rb.num = T_3_2.num;

  LINE(682);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.rb.vec->data[1];
            locals.err = _chanOPclose(T_4_1);
            if (locals.err != ERR_ok) goto ex_3;
            }

  LINE(683);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.rb.vec->data[0];
            streamOPfreebuf.num = T_4_1.num;
            }

  LINE(684);
            {
            streamOPfree.tf = true;
            }
            break;
            }
    case 7: 
         {CLUREF T_3_3;
        T_3_3.num = T_3_1.cell->value;
        locals.wb.num = T_3_3.num;

  LINE(686);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.wb.vec->data[1];
            locals.err = _chanOPclose(T_4_1);
            if (locals.err != ERR_ok) goto ex_3;
            }

  LINE(687);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.wb.vec->data[0];
            streamOPfreebuf.num = T_4_1.num;
            }

  LINE(688);
            {
            streamOPfree.tf = true;
            }
            break;
            }
    case 6: 
         {CLUREF T_3_4;
        T_3_4.num = T_3_1.cell->value;
        locals.tb.num = T_3_4.num;

  LINE(690);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.tb.vec->data[2];
            locals.err = _chanOPclose(T_4_1);
            if (locals.err != ERR_ok) goto ex_3;
            }

  LINE(691);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.tb.vec->data[1];
            streamOPfreebuf.num = T_4_1.num;
            }

  LINE(692);
            {
            streamOPfree.tf = true;
            }
            break;
            }
    case 3: 
    case 2: 
    case 4: 
         {
            break;
            }
    case 1: 
         {

  LINE(695);
            {
            {signal (ERR_ok);}}
            break;
            }
    }
    }
    goto end_3;
    ex_3:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_2;}
    end_3:;
        goto end_2;
        ex_2:
            if ((locals.err == ERR_permanent)) {

  LINE(697);
                {
                {signal (ERR_ok);}}
            }
            else {
                goto ex_0;
            }
        end_2:;

  LINE(698);
    {
    CLUREF T_1_1;
    CellAlloc(1, nil, T_1_1);
    locals.st.vec->data[0]  = T_1_1.num;
    }

  LINE(699);
    {
    CLUREF T_1_1;
    locals.err = sequenceOPnew(&T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    locals.st.vec->data[3]  = T_1_1.num;
    }

  LINE(700);
    {
    locals.st.vec->data[2]  = false;
    }

  LINE(701);
    {
        {CLUREF T_1_1;
        locals.err = streamOPopen_streams(&T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.opens.num = T_1_1.num;
        }
        }

  LINE(702);
    {
        locals.err = arrayOPindexes(locals.opens, streamOPclose_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE close ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPclose_actual;
static Vlist0 vals_streamOPclose = {0, 0};
static sig_desc1 sig_streamOPclose_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPclose = {0, 1, (sig_desc*)&sig_streamOPclose_1};
static Vlist8 locals_streamOPclose = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "opens", &array_of_stream_ops},  {0, 2, "i", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPclose = {0, 0};
Slist0 tformals_streamOPclose = {0, 0};
Slist0 opformals_streamOPclose = {0, 0};
dbg_info_streamOPclose_actual dbg_info_streamOPclose_data = {0, 12, 
    "streamOPclose", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPclose, 1, 
    &vals_streamOPclose, &sigs_streamOPclose, &locals_streamOPclose, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPclose = (struct dbg_info*)&dbg_info_streamOPclose_data;

/**** BEGIN ITERATOR BODIES for close ****/

errcode streamOPclose_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF rb;
    CLUREF wb;
    CLUREF tb;
    CLUREF opens;
    CLUREF i;
    CLUREF st;
    } *locals;
{
    locals->i.num = iv_1.num;
    enter_iter_body_proc(703);

  FB_LINE(703);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    locals->err = arrayOPfetch(locals->opens, locals->i, &T_1_1);
    if (locals->err != ERR_ok) goto ex_0;
    T_1_2.num = (locals->st.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {

  FB_LINE(704);
        {
        CLUREF T_3_1;
        locals->err = arrayOPremh(locals->opens, &T_3_1);
        if (locals->err != ERR_ok) goto ex_1;
        locals->err = arrayOPstore(locals->opens, locals->i, T_3_1);
        if (locals->err != ERR_ok) goto ex_1;
        }
            goto end_1;
            ex_1:
                if ((locals->err == ERR_bounds)) {
                }
                else {
                    goto ex_0;
                }
            end_1:;

  FB_LINE(706);
        {
        *iecode = ERR_ok;
        {signal(ERR_iterbodyreturn);}
        }
        }
        }/* end if */
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPclose_IB_1 */

/**** END ITERATOR BODIES for close ****/

extern struct dbg_info* dbg_info_streamOPabort;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPabort_TRACE
int streamOPabort_TRACE;
extern errcode streamOPabort_IB_1();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
static int streamOPabort_own_init = 0;

/**** BEGIN PROCEDURE abort ****/

errcode streamOPabort(st)
CLUREF st;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF wb;
        CLUREF tb;
        CLUREF opens;
        CLUREF i;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.wb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.opens.num = UNINIT;
    locals.i.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPabort;
    locals.st = st;
        if (streamOPabort_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPabort_own_init = 1;
    }
    enter_proc(711);

  LINE(712);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(714);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.rb.vec->data[1];
            locals.err = _chanOPabort(T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(715);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.rb.vec->data[0];
            streamOPfreebuf.num = T_3_1.num;
            }

  LINE(716);
            {
            streamOPfree.tf = true;
            }
            break;
            }
    case 7: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.wb.num = T_2_3.num;

  LINE(718);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.wb.vec->data[1];
            locals.err = _chanOPabort(T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(719);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.wb.vec->data[0];
            streamOPfreebuf.num = T_3_1.num;
            }

  LINE(720);
            {
            streamOPfree.tf = true;
            }
            break;
            }
    case 6: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.tb.num = T_2_4.num;

  LINE(722);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[2];
            locals.err = _chanOPabort(T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(723);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[1];
            streamOPfreebuf.num = T_3_1.num;
            }

  LINE(724);
            {
            streamOPfree.tf = true;
            }
            break;
            }
    case 3: 
    case 2: 
    case 4: 
         {
            break;
            }
    case 1: 
         {

  LINE(727);
            {
            {signal (ERR_ok);}}
            break;
            }
    }
    }
        goto end_1;
        ex_1:
            if ((locals.err == ERR_permanent)
             || (locals.err == ERR_not_possible)) {

  LINE(728);
                {
                {signal (ERR_ok);}}
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(729);
    {
    CLUREF T_1_1;
    CellAlloc(1, nil, T_1_1);
    locals.st.vec->data[0]  = T_1_1.num;
    }

  LINE(730);
    {
    CLUREF T_1_1;
    locals.err = sequenceOPnew(&T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    locals.st.vec->data[3]  = T_1_1.num;
    }

  LINE(731);
    {
    locals.st.vec->data[2]  = false;
    }

  LINE(732);
    {
        {CLUREF T_1_1;
        locals.err = streamOPopen_streams(&T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.opens.num = T_1_1.num;
        }
        }

  LINE(733);
    {
        locals.err = arrayOPindexes(locals.opens, streamOPabort_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE abort ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPabort_actual;
static Vlist0 vals_streamOPabort = {0, 0};
static siglist0 sigs_streamOPabort = {0, 0};
static Vlist8 locals_streamOPabort = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "opens", &array_of_stream_ops},  {0, 2, "i", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPabort = {0, 0};
Slist0 tformals_streamOPabort = {0, 0};
Slist0 opformals_streamOPabort = {0, 0};
dbg_info_streamOPabort_actual dbg_info_streamOPabort_data = {0, 12, 
    "streamOPabort", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPabort, 1, 
    &vals_streamOPabort, &sigs_streamOPabort, &locals_streamOPabort, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPabort = (struct dbg_info*)&dbg_info_streamOPabort_data;

/**** BEGIN ITERATOR BODIES for abort ****/

errcode streamOPabort_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF rb;
    CLUREF wb;
    CLUREF tb;
    CLUREF opens;
    CLUREF i;
    CLUREF st;
    } *locals;
{
    locals->i.num = iv_1.num;
    enter_iter_body_proc(734);

  FB_LINE(734);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    locals->err = arrayOPfetch(locals->opens, locals->i, &T_1_1);
    if (locals->err != ERR_ok) goto ex_0;
    T_1_2.num = (locals->st.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {

  FB_LINE(735);
        {
        CLUREF T_3_1;
        locals->err = arrayOPremh(locals->opens, &T_3_1);
        if (locals->err != ERR_ok) goto ex_1;
        locals->err = arrayOPstore(locals->opens, locals->i, T_3_1);
        if (locals->err != ERR_ok) goto ex_1;
        }
            goto end_1;
            ex_1:
                if ((locals->err == ERR_bounds)) {
                }
                else {
                    goto ex_0;
                }
            end_1:;

  FB_LINE(737);
        {
        *iecode = ERR_ok;
        {signal(ERR_iterbodyreturn);}
        }
        }
        }/* end if */
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPabort_IB_1 */

/**** END ITERATOR BODIES for abort ****/

extern struct dbg_info* dbg_info_streamOPis_closed;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPis_closed_TRACE
int streamOPis_closed_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPis_closed_own_init = 0;

/**** BEGIN PROCEDURE is_closed ****/

errcode streamOPis_closed(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        } locals;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPis_closed;
    locals.st = st;
        if (streamOPis_closed_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPis_closed_own_init = 1;
    }
    enter_proc(742);

  LINE(743);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.st.vec->data[0];
    if (T_1_1.cell->tag == 1) T_1_2.num = true; else T_1_2.num = false;
    ret_1->num = T_1_2.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE is_closed ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist3 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPis_closed_actual;
static Vlist1 vals_streamOPis_closed = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPis_closed = {0, 0};
static Vlist3 locals_streamOPis_closed = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPis_closed = {0, 0};
Slist0 tformals_streamOPis_closed = {0, 0};
Slist0 opformals_streamOPis_closed = {0, 0};
dbg_info_streamOPis_closed_actual dbg_info_streamOPis_closed_data = {0, 12, 
    "streamOPis_closed", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPis_closed, 1, 
    &vals_streamOPis_closed, &sigs_streamOPis_closed, &locals_streamOPis_closed, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPis_closed = (struct dbg_info*)&dbg_info_streamOPis_closed_data;
extern struct dbg_info* dbg_info_streamOPis_terminal;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPis_terminal_TRACE
int streamOPis_terminal_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPis_terminal_own_init = 0;

/**** BEGIN PROCEDURE is_terminal ****/

errcode streamOPis_terminal(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        } locals;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPis_terminal;
    locals.st = st;
        if (streamOPis_terminal_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPis_terminal_own_init = 1;
    }
    enter_proc(746);

  LINE(747);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.st.vec->data[0];
    if (T_1_1.cell->tag == 6) T_1_2.num = true; else T_1_2.num = false;
    ret_1->num = T_1_2.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE is_terminal ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist3 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPis_terminal_actual;
static Vlist1 vals_streamOPis_terminal = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPis_terminal = {0, 0};
static Vlist3 locals_streamOPis_terminal = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPis_terminal = {0, 0};
Slist0 tformals_streamOPis_terminal = {0, 0};
Slist0 opformals_streamOPis_terminal = {0, 0};
dbg_info_streamOPis_terminal_actual dbg_info_streamOPis_terminal_data = {0, 12, 
    "streamOPis_terminal", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPis_terminal, 1, 
    &vals_streamOPis_terminal, &sigs_streamOPis_terminal, &locals_streamOPis_terminal, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPis_terminal = (struct dbg_info*)&dbg_info_streamOPis_terminal_data;
extern struct dbg_info* dbg_info_streamOPgetl;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPgetl_TRACE
int streamOPgetl_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPgetl_own_init = 0;

/**** BEGIN PROCEDURE getl ****/

errcode streamOPgetl(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF line;
        CLUREF rb;
        CLUREF index;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        } locals;
    locals.line.num = UNINIT;
    locals.rb.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPgetl;
    locals.st = st;
        if (streamOPgetl_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPgetl_own_init = 1;
    }
    enter_proc(750);

  LINE(752);
    {
        {CLUREF T_2_1;
        locals.err = streamOPgets(locals.st, STR__012, &T_2_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.line.num = T_2_1.num;
        }
        }
    goto end_1;
    ex_1:
        if (locals.err == ERR_end_of_file) {signal(ERR_end_of_file);}
        else if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(754);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 5: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.rb.num = T_1_2.num;

  LINE(756);
            {
                {CLUREF T_2_1;
                T_2_1.num = locals.rb.vec->data[2];
                locals.index.num = T_2_1.num;
                }
                }

  LINE(757);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = locals.rb.vec->data[4];
            T_2_2.num = (locals.index.num > T_2_1.num)? true : false;
            if (T_2_2.num == true) {

  LINE(758);
                {
                {
                ret_1->num = locals.line.num;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */

  LINE(759);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = locals.rb.vec->data[3];
            locals.err = intOPadd(T_2_1, CLU_1, &T_2_2);
            if (locals.err != ERR_ok) goto ex_0;
            locals.rb.vec->data[3]  = T_2_2.num;
            }

  LINE(760);
            {
            CLUREF T_2_1;
            locals.err = intOPadd(locals.index, CLU_1, &T_2_1);
            if (locals.err != ERR_ok) goto ex_0;
            locals.rb.vec->data[2]  = T_2_1.num;
            }
            break;
            }
    case 6: 
         {CLUREF T_1_3;
        T_1_3.num = T_1_1.cell->value;
        locals.tb.num = T_1_3.num;

  LINE(762);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.tb.vec->data[18];
            locals.err = arrayOPreml(T_3_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_2;
            }
                goto end_2;
                ex_2:
                    if ((locals.err == ERR_bounds)) {

  LINE(763);
                        {
                        {
                        ret_1->num = locals.line.num;
                        }
                        {signal (ERR_ok);}}
                    }
                    else {
                        goto ex_0;
                    }
                end_2:;

  LINE(764);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[5];
            if (T_3_1.num == true) {

  LINE(765);
                {
                locals.tb.vec->data[5]  = false;
                }

  LINE(766);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                T_4_1.num = locals.tb.vec->data[2];
                T_4_2.ch = '\n';
                locals.err = _chanOPputc(T_4_1, T_4_2, CLU_0);
                if (locals.err != ERR_ok) goto ex_3;
                }
                }
                }/* end if */
                goto end_3;
                ex_3:
                    if ((locals.err == ERR_not_possible)) {
                    }
                    else {
                        goto ex_0;
                    }
                end_3:;

  LINE(768);
            {
            locals.tb.vec->data[11]  = 0;
            }

  LINE(769);
            {
            locals.tb.vec->data[4]  = 1;
            }
            break;
            }
    case 2: 
         {CLUREF T_1_4;
        T_1_4.num = T_1_1.cell->value;
        locals.sb.num = T_1_4.num;

  LINE(771);
            {
                {CLUREF T_2_1;
                T_2_1.num = locals.sb.vec->data[1];
                locals.index.num = T_2_1.num;
                }
                }

  LINE(772);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            T_2_1.num = locals.sb.vec->data[0];
            locals.err = stringOPsize(T_2_1, &T_2_2);
            if (locals.err != ERR_ok) goto ex_0;
            T_2_3.num = (locals.index.num > T_2_2.num)? true : false;
            if (T_2_3.num == true) {

  LINE(773);
                {
                CLUREF T_3_1;
                T_3_1.ch = ' ';
                locals.sb.vec->data[3]  = T_3_1.num;
                }

  LINE(774);
                {
                {
                ret_1->num = locals.line.num;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */

  LINE(776);
            {
            CLUREF T_2_1;
            locals.err = intOPadd(locals.index, CLU_1, &T_2_1);
            if (locals.err != ERR_ok) goto ex_0;
            locals.sb.vec->data[1]  = T_2_1.num;
            }

  LINE(777);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = locals.sb.vec->data[2];
            locals.err = intOPadd(T_2_1, CLU_1, &T_2_2);
            if (locals.err != ERR_ok) goto ex_0;
            locals.sb.vec->data[2]  = T_2_2.num;
            }
            break;
            }
    default: {
    }
    }
    }

  LINE(780);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(781);
        {
        locals.err = streamOPscript(locals.st, STR__012, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(782);
    {
    {
    ret_1->num = locals.line.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE getl ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPgetl_actual;
static Vlist1 vals_streamOPgetl = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc0 sig_streamOPgetl_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPgetl_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPgetl = {0, 2, (sig_desc*)&sig_streamOPgetl_1, (sig_desc*)&sig_streamOPgetl_2};
static Vlist8 locals_streamOPgetl = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "line", &string_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPgetl = {0, 0};
Slist0 tformals_streamOPgetl = {0, 0};
Slist0 opformals_streamOPgetl = {0, 0};
dbg_info_streamOPgetl_actual dbg_info_streamOPgetl_data = {0, 12, 
    "streamOPgetl", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPgetl, 1, 
    &vals_streamOPgetl, &sigs_streamOPgetl, &locals_streamOPgetl, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPgetl = (struct dbg_info*)&dbg_info_streamOPgetl_data;
extern struct dbg_info* dbg_info_streamOPputl;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputl_TRACE
int streamOPputl_TRACE;
static int streamOPputl_own_init = 0;

/**** BEGIN PROCEDURE putl ****/

errcode streamOPputl(st, line)
CLUREF st;
CLUREF line;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        CLUREF line;
        } locals;
    locals.st.num = UNINIT;
    locals.line.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputl;
    locals.st = st;
    locals.line = line;
        if (streamOPputl_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputl_own_init = 1;
    }
    enter_proc(785);

  LINE(786);
    {

  LINE(787);
        {
        locals.err = streamOPputs(locals.st, locals.line);
        if (locals.err != ERR_ok) goto ex_1;
        }

  LINE(788);
        {
        CLUREF T_3_1;
        T_3_1.ch = '\n';
        locals.err = streamOPputc(locals.st, T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        }
        }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE putl ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputl_actual;
static Vlist0 vals_streamOPputl = {0, 0};
static sig_desc1 sig_streamOPputl_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPputl = {0, 1, (sig_desc*)&sig_streamOPputl_1};
static Vlist4 locals_streamOPputl = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &stream_ops},  {0, 2, "line", &string_ops}}
};
static Vlist0 popowns_streamOPputl = {0, 0};
Slist0 tformals_streamOPputl = {0, 0};
Slist0 opformals_streamOPputl = {0, 0};
dbg_info_streamOPputl_actual dbg_info_streamOPputl_data = {0, 12, 
    "streamOPputl", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputl, 2, 
    &vals_streamOPputl, &sigs_streamOPputl, &locals_streamOPputl, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputl = (struct dbg_info*)&dbg_info_streamOPputl_data;
extern struct dbg_info* dbg_info_streamOPgets;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPgets_TRACE
int streamOPgets_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPgets_own_init = 0;

/**** BEGIN PROCEDURE gets ****/

errcode streamOPgets(st, term, ret_1)
CLUREF st;
CLUREF term;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF s;
        CLUREF rb;
        CLUREF index;
        CLUREF max;
        CLUREF i;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        CLUREF term;
        } locals;
    locals.s.num = UNINIT;
    locals.rb.num = UNINIT;
    locals.index.num = UNINIT;
    locals.max.num = UNINIT;
    locals.i.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.term.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPgets;
    locals.st = st;
    locals.term = term;
        if (streamOPgets_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPgets_own_init = 1;
    }
    enter_proc(792);

  LINE(794);
    locals.s.num = UNINIT;

  LINE(795);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(797);
            locals.index.num = UNINIT;
            locals.max.num = UNINIT;

  LINE(798);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            CLUREF T_3_5;
            CLUREF T_3_6;
            CLUREF T_3_7;
            T_3_1.num = locals.rb.vec->data[1];
            T_3_2.num = locals.rb.vec->data[0];
            T_3_3.num = locals.rb.vec->data[2];
            T_3_4.num = locals.rb.vec->data[4];
            locals.err = _chanOPget(T_3_1, T_3_2, T_3_3, T_3_4, locals.term, CLU_0, &T_3_5, &T_3_6, &T_3_7);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_5.num;
            locals.index.num = T_3_6.num;
            locals.max.num = T_3_7.num;
            }

  LINE(800);
            {
            locals.rb.vec->data[2]  = locals.index.num;
            }

  LINE(801);
            {
            locals.rb.vec->data[4]  = locals.max.num;
            }

  LINE(802);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            T_3_1.ch = '\n';
            locals.err = stringOPindexc(T_3_1, locals.term, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            T_3_3.num = (T_3_2.num == 0)? true : false;
            if (T_3_3.num == true) {

  LINE(803);
                {
                    {CLUREF T_4_1;
                    CLUREF T_4_2;
                    T_4_1.ch = '\n';
                    locals.err = stringOPindexc(T_4_1, locals.s, &T_4_2);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.i.num = T_4_2.num;
                    }
                    }

  LINE(804);
                {
                CLUREF T_4_1;
                T_4_1.num = (locals.i.num > 0)? true : false;
                if (T_4_1.num == true) {

  LINE(805);
                    {
                    CLUREF T_5_1;
                    CLUREF T_5_2;
                    CLUREF T_5_3;
                    T_5_1.num = locals.rb.vec->data[3];
                    locals.err = streamOPlines(locals.s, locals.i, &T_5_2);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.err = intOPadd(T_5_1, T_5_2, &T_5_3);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.rb.vec->data[3]  = T_5_3.num;
                    }
                    }
                    }/* end if */
                }
                }/* end if */
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(808);
            {
            locals.err = streamOPflush(locals.st);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(809);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[9];
            if (T_3_1.num == true) {

  LINE(810);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                CLUREF T_4_3;
                CLUREF T_4_4;
                CLUREF T_4_5;
                CLUREF T_4_6;
                T_4_2.num = locals.st.vec->data[2];
                T_4_1.num = T_4_2.num;
                if (T_4_2.num) {
                    T_4_4.num = locals.tb.vec->data[11];
                    T_4_5.num = (T_4_4.num == 0)? true : false;
                    T_4_3.num = T_4_5.num;
                    if (!T_4_5.num) {
                        T_4_6.num = locals.tb.vec->data[10];
                        T_4_3.num = T_4_6.num;
                    }
                    T_4_1.num = T_4_3.num;
                }
                if (T_4_1.num == true) {

  LINE(811);
                    {
                    CLUREF T_5_1;
                    T_5_1.num = locals.tb.vec->data[17];
                    locals.err = streamOPscript(locals.st, T_5_1, CLU_0);
                    if (locals.err != ERR_ok) goto ex_1;
                    }
                    }
                    }/* end if */

  LINE(812);
                {
                CLUREF T_4_1;
                locals.err = streamOPedit(locals.tb, locals.term, &T_4_1);
                if (locals.err != ERR_ok) goto ex_1;
                locals.s.num = T_4_1.num;
                }
                }
            else {

  LINE(813);
                {
                CLUREF T_4_1;
                locals.err = streamOPtty_get(locals.tb, locals.term, CLU_0, &T_4_1);
                if (locals.err != ERR_ok) goto ex_1;
                locals.s.num = T_4_1.num;
                }
                }}/* end if */
            break;
            }
    case 2: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.sb.num = T_2_4.num;

  LINE(816);
            {
            CLUREF T_3_1;
            locals.err = streamOPstr_get(locals.sb, locals.term, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_1.num;
            }
            break;
            }
    case 3: 
         {

  LINE(818);
            {
            {signal (ERR_end_of_file);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(820);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_end_of_file) {signal(ERR_end_of_file);}
        else if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(822);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(823);
        {
        locals.err = streamOPscript(locals.st, locals.s, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(824);
    {
    {
    ret_1->num = locals.s.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE gets ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist11 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPgets_actual;
static Vlist1 vals_streamOPgets = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc0 sig_streamOPgets_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPgets_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPgets = {0, 2, (sig_desc*)&sig_streamOPgets_1, (sig_desc*)&sig_streamOPgets_2};
static Vlist11 locals_streamOPgets = {0, 11,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "s", &string_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "index", &int_ops},  {0, 2, "max", &int_ops},  {0, 2, "i", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "term", &string_ops}}
};
static Vlist0 popowns_streamOPgets = {0, 0};
Slist0 tformals_streamOPgets = {0, 0};
Slist0 opformals_streamOPgets = {0, 0};
dbg_info_streamOPgets_actual dbg_info_streamOPgets_data = {0, 12, 
    "streamOPgets", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPgets, 2, 
    &vals_streamOPgets, &sigs_streamOPgets, &locals_streamOPgets, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPgets = (struct dbg_info*)&dbg_info_streamOPgets_data;
extern struct dbg_info* dbg_info_streamOPgets_image;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPgets_image_TRACE
int streamOPgets_image_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPgets_image_own_init = 0;

/**** BEGIN PROCEDURE gets_image ****/

errcode streamOPgets_image(st, term, ret_1)
CLUREF st;
CLUREF term;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF s;
        CLUREF rb;
        CLUREF index;
        CLUREF max;
        CLUREF i;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        CLUREF term;
        } locals;
    locals.s.num = UNINIT;
    locals.rb.num = UNINIT;
    locals.index.num = UNINIT;
    locals.max.num = UNINIT;
    locals.i.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.term.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPgets_image;
    locals.st = st;
    locals.term = term;
        if (streamOPgets_image_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPgets_image_own_init = 1;
    }
    enter_proc(827);

  LINE(829);
    locals.s.num = UNINIT;

  LINE(830);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(832);
            locals.index.num = UNINIT;
            locals.max.num = UNINIT;

  LINE(833);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            CLUREF T_3_5;
            CLUREF T_3_6;
            CLUREF T_3_7;
            T_3_1.num = locals.rb.vec->data[1];
            T_3_2.num = locals.rb.vec->data[0];
            T_3_3.num = locals.rb.vec->data[2];
            T_3_4.num = locals.rb.vec->data[4];
            locals.err = _chanOPget(T_3_1, T_3_2, T_3_3, T_3_4, locals.term, CLU_1, &T_3_5, &T_3_6, &T_3_7);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_5.num;
            locals.index.num = T_3_6.num;
            locals.max.num = T_3_7.num;
            }

  LINE(835);
            {
            locals.rb.vec->data[2]  = locals.index.num;
            }

  LINE(836);
            {
            locals.rb.vec->data[4]  = locals.max.num;
            }

  LINE(837);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            T_3_1.ch = '\n';
            locals.err = stringOPindexc(T_3_1, locals.term, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            T_3_3.num = (T_3_2.num == 0)? true : false;
            if (T_3_3.num == true) {

  LINE(838);
                {
                    {CLUREF T_4_1;
                    CLUREF T_4_2;
                    T_4_1.ch = '\n';
                    locals.err = stringOPindexc(T_4_1, locals.s, &T_4_2);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.i.num = T_4_2.num;
                    }
                    }

  LINE(839);
                {
                CLUREF T_4_1;
                T_4_1.num = (locals.i.num > 0)? true : false;
                if (T_4_1.num == true) {

  LINE(840);
                    {
                    CLUREF T_5_1;
                    CLUREF T_5_2;
                    CLUREF T_5_3;
                    T_5_1.num = locals.rb.vec->data[3];
                    locals.err = streamOPlines(locals.s, locals.i, &T_5_2);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.err = intOPadd(T_5_1, T_5_2, &T_5_3);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.rb.vec->data[3]  = T_5_3.num;
                    }
                    }
                    }/* end if */
                }
                }/* end if */
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(843);
            {
            locals.err = streamOPflush(locals.st);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(844);
            {
            CLUREF T_3_1;
            locals.err = streamOPtty_get(locals.tb, locals.term, CLU_1, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_1.num;
            }
            break;
            }
    case 2: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.sb.num = T_2_4.num;

  LINE(846);
            {
            CLUREF T_3_1;
            locals.err = streamOPstr_get(locals.sb, locals.term, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_1.num;
            }
            break;
            }
    case 3: 
         {

  LINE(848);
            {
            {signal (ERR_end_of_file);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(850);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_end_of_file) {signal(ERR_end_of_file);}
        else if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(852);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(853);
        {
        locals.err = streamOPscript(locals.st, locals.s, CLU_1);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(854);
    {
    {
    ret_1->num = locals.s.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE gets_image ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist11 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPgets_image_actual;
static Vlist1 vals_streamOPgets_image = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc0 sig_streamOPgets_image_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPgets_image_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPgets_image = {0, 2, (sig_desc*)&sig_streamOPgets_image_1, (sig_desc*)&sig_streamOPgets_image_2};
static Vlist11 locals_streamOPgets_image = {0, 11,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "s", &string_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "index", &int_ops},  {0, 2, "max", &int_ops},  {0, 2, "i", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "term", &string_ops}}
};
static Vlist0 popowns_streamOPgets_image = {0, 0};
Slist0 tformals_streamOPgets_image = {0, 0};
Slist0 opformals_streamOPgets_image = {0, 0};
dbg_info_streamOPgets_image_actual dbg_info_streamOPgets_image_data = {0, 12, 
    "streamOPgets_image", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPgets_image, 2, 
    &vals_streamOPgets_image, &sigs_streamOPgets_image, &locals_streamOPgets_image, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPgets_image = (struct dbg_info*)&dbg_info_streamOPgets_image_data;
extern struct dbg_info* dbg_info_streamOPtty_get1;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPtty_get1_TRACE
int streamOPtty_get1_TRACE;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPtty_get1_own_init = 0;

/**** BEGIN PROCEDURE tty_get1 ****/

errcode streamOPtty_get1(tb, image, ret_1)
CLUREF tb;
CLUREF image;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF c;
        CLUREF tb;
        CLUREF image;
        } locals;
    locals.c.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.image.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPtty_get1;
    locals.tb = tb;
    locals.image = image;
        if (streamOPtty_get1_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPtty_get1_own_init = 1;
    }
    enter_proc(857);

  LINE(859);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_2.num = locals.tb.vec->data[7];
    T_1_1.num = T_1_2.num;
    if (T_1_2.num) {
        T_1_3.num = locals.tb.vec->data[8];
        T_1_1.num = T_1_3.num;
    }
    if (T_1_1.num == true) {

  LINE(860);
        {
        {signal (ERR_end_of_file);}}
        }
        }/* end if */

  LINE(861);
    locals.c.num = UNINIT;

  LINE(862);
    {
    CLUREF T_3_1;
    CLUREF T_3_2;
    CLUREF T_3_3;
    T_3_1.num = locals.tb.vec->data[18];
    T_3_2.num = (T_3_1.array->ext_size == 0)? true : false;
    T_3_3.num = T_3_2.num ^ 1;
    if (T_3_3.num == true) {

  LINE(863);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        T_4_1.num = locals.tb.vec->data[18];
        locals.err = arrayOPreml(T_4_1, &T_4_2);
        if (locals.err != ERR_ok) goto ex_2;
        locals.c.num = T_4_2.num;
        }

  LINE(864);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        CLUREF T_4_3;
        T_4_2.num = locals.tb.vec->data[5];
        T_4_1.num = T_4_2.num;
        if (T_4_2.num) {
            T_4_3.num = locals.image.num ^ 1;
            T_4_1.num = T_4_3.num;
        }
        if (T_4_1.num == true) {

  LINE(865);
            {
            CLUREF T_5_1;
            T_5_1.num = locals.tb.vec->data[2];
            locals.err = streamOPecho(T_5_1, locals.c);
            if (locals.err != ERR_ok) goto ex_2;
            }
            }
            }/* end if */

  LINE(866);
        {
        locals.tb.vec->data[5]  = false;
        }
        }
    else {

  LINE(867);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        T_4_1.num = locals.tb.vec->data[2];
        locals.err = _chanOPgetc(T_4_1, locals.image, &T_4_2);
        if (locals.err != ERR_ok) goto ex_2;
        locals.c.num = T_4_2.num;
        }
        }}/* end if */
    goto end_2;
    ex_2:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_1;}
    end_2:;
        goto end_1;
        ex_1:
            if ((locals.err == ERR_end_of_file)) {

  LINE(871);
                {
                locals.tb.vec->data[7]  = true;
                }

  LINE(872);
                {
                {signal (ERR_end_of_file);}}
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(874);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.ch = '\n';
    T_1_2.num = (locals.c.ch == T_1_1.ch)? true : false;
    if (T_1_2.num == true) {

  LINE(875);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[13];
        locals.err = intOPadd(T_2_1, CLU_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.tb.vec->data[13]  = T_2_2.num;
        }

  LINE(876);
        {
        {
        ret_1->num = locals.c.num;
        }
        {signal (ERR_ok);}}
        }
    else {
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    CLUREF T_1_6;
    CLUREF T_1_7;
    T_1_4.ch = '\004';
    T_1_5.num = (locals.c.ch == T_1_4.ch)? true : false;
    T_1_3.num = T_1_5.num;
    if (T_1_5.num) {
        T_1_6.num = locals.tb.vec->data[8];
        T_1_3.num = T_1_6.num;
    }
    T_1_7.num = T_1_3.num ^ 1;
    if (T_1_7.num == true) {

  LINE(878);
        {
        {
        ret_1->num = locals.c.num;
        }
        {signal (ERR_ok);}}
        }
        }}/* end if */

  LINE(879);
    {
    locals.tb.vec->data[7]  = true;
    }

  LINE(880);
    {
    {signal (ERR_end_of_file);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE tty_get1 ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPtty_get1_actual;
static Vlist1 vals_streamOPtty_get1 = {0, 1, { {0, 2, "", &char_ops}}
};
static sig_desc0 sig_streamOPtty_get1_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPtty_get1_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPtty_get1 = {0, 2, (sig_desc*)&sig_streamOPtty_get1_1, (sig_desc*)&sig_streamOPtty_get1_2};
static Vlist5 locals_streamOPtty_get1 = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "image", &bool_ops}}
};
static Vlist0 popowns_streamOPtty_get1 = {0, 0};
Slist0 tformals_streamOPtty_get1 = {0, 0};
Slist0 opformals_streamOPtty_get1 = {0, 0};
dbg_info_streamOPtty_get1_actual dbg_info_streamOPtty_get1_data = {0, 12, 
    "streamOPtty_get1", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPtty_get1, 2, 
    &vals_streamOPtty_get1, &sigs_streamOPtty_get1, &locals_streamOPtty_get1, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPtty_get1 = (struct dbg_info*)&dbg_info_streamOPtty_get1_data;
extern struct dbg_info* dbg_info_streamOPtty_get;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPtty_get_TRACE
int streamOPtty_get_TRACE;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPtty_get_own_init = 0;
CLUREF streamOPtty_getOPtmp;
CLUREF streamOPtty_getOPinuse;

/**** BEGIN PROCEDURE tty_get ****/

errcode streamOPtty_get(tb, term, image, ret_1)
CLUREF tb;
CLUREF term;
CLUREF image;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF temp;
        CLUREF used;
        CLUREF c;
        CLUREF s;
        CLUREF tb;
        CLUREF term;
        CLUREF image;
        } locals;
    locals.temp.num = UNINIT;
    locals.used.num = UNINIT;
    locals.c.num = UNINIT;
    locals.s.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.term.num = UNINIT;
    locals.image.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPtty_get;
    locals.tb = tb;
    locals.term = term;
    locals.image = image;
        if (streamOPtty_get_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPtty_get_own_init = 1;
        {
            {CLUREF T_0_1;
            locals.err = arrayOPnew(&T_0_1);
            if (locals.err != ERR_ok) goto ex_0;
            streamOPtty_getOPtmp.num = T_0_1.num;
            }
            }
        {
            {streamOPtty_getOPinuse.tf = false;
            }
            }
    }
    enter_proc(883);

  LINE(887);
    {
        {locals.temp.num = streamOPtty_getOPtmp.num;
        }
        }

  LINE(888);
    {
        {locals.used.num = streamOPtty_getOPinuse.num;
        }
        }

  LINE(889);
    {
    streamOPtty_getOPinuse.tf = true;
    }

  LINE(890);
    {
    if (locals.used.num == true) {

  LINE(891);
        {
        CLUREF T_2_1;
        locals.err = arrayOPnew(&T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.temp.num = T_2_1.num;
        }
        }
    else {

  LINE(892);
        {
        locals.err = arrayOPtrim(locals.temp, CLU_1, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }}/* end if */

  LINE(894);
    for (;;) {
        if (true != true) { break; }

  LINE(895);
        {
            {CLUREF T_4_1;
            locals.err = streamOPtty_get1(locals.tb, locals.image, &T_4_1);
            if (locals.err != ERR_ok) goto ex_2;
            locals.c.num = T_4_1.num;
            }
            }

  LINE(896);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        locals.err = stringOPindexc(locals.c, locals.term, &T_4_1);
        if (locals.err != ERR_ok) goto ex_2;
        T_4_2.num = (T_4_1.num > 0)? true : false;
        if (T_4_2.num == true) {

  LINE(897);
            {
            CLUREF T_5_1;
            T_5_1.num = locals.tb.vec->data[18];
            locals.err = arrayOPaddl(T_5_1, locals.c);
            if (locals.err != ERR_ok) goto ex_2;
            }

  LINE(898);
            goto end_while_1;
            }
            }/* end if */

  LINE(900);
        {
        CLUREF T_4_1;
        T_4_1.num = locals.image.num ^ 1;
        if (T_4_1.num == true) {

  LINE(901);
            {
            locals.err = streamOPtty_put1(locals.tb, locals.c);
            if (locals.err != ERR_ok) goto ex_2;
            }
            }
            }/* end if */

  LINE(902);
        {
        locals.err = arrayOPaddh(locals.temp, locals.c);
        if (locals.err != ERR_ok) goto ex_2;
        }
        }
        end_while_1:;
    goto end_2;
    ex_2:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_1;}
    end_2:;
        goto end_1;
        ex_1:
            if ((locals.err == ERR_end_of_file)) {

  LINE(905);
                {
                CLUREF T_2_1;
                T_2_1.num = (locals.temp.array->ext_size == 0)? true : false;
                if (T_2_1.num == true) {

  LINE(906);
                    {
                    streamOPtty_getOPinuse.num = locals.used.num;
                    }

  LINE(907);
                    {
                    {signal (ERR_end_of_file);}}
                    }
                    }/* end if */
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(910);
    {
        {CLUREF T_1_1;
        locals.err = stringOPac2s(locals.temp, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.s.num = T_1_1.num;
        }
        }

  LINE(911);
    {
    locals.err = arrayOPtrim(locals.temp, CLU_1, CLU_0);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(912);
    {
    streamOPtty_getOPinuse.num = locals.used.num;
    }

  LINE(913);
    {
    {
    ret_1->num = locals.s.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE tty_get ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist9 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPtty_get_actual;
static Vlist1 vals_streamOPtty_get = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc0 sig_streamOPtty_get_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPtty_get_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPtty_get = {0, 2, (sig_desc*)&sig_streamOPtty_get_1, (sig_desc*)&sig_streamOPtty_get_2};
static Vlist9 locals_streamOPtty_get = {0, 9,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "temp", &array_of_char_ops},  {0, 2, "used", &bool_ops},  {0, 2, "c", &char_ops},  {0, 2, "s", &string_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "term", &string_ops},  {0, 2, "image", &bool_ops}}
};
static Vlist0 popowns_streamOPtty_get = {0, 0};
Slist0 tformals_streamOPtty_get = {0, 0};
Slist0 opformals_streamOPtty_get = {0, 0};
dbg_info_streamOPtty_get_actual dbg_info_streamOPtty_get_data = {0, 12, 
    "streamOPtty_get", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPtty_get, 3, 
    &vals_streamOPtty_get, &sigs_streamOPtty_get, &locals_streamOPtty_get, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPtty_get = (struct dbg_info*)&dbg_info_streamOPtty_get_data;
extern struct dbg_info* dbg_info_streamOPstr_get;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPstr_get_TRACE
int streamOPstr_get_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
static int streamOPstr_get_own_init = 0;

/**** BEGIN PROCEDURE str_get ****/

errcode streamOPstr_get(sb, term, ret_1)
CLUREF sb;
CLUREF term;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF first;
        CLUREF chars;
        CLUREF last;
        CLUREF s;
        CLUREF sb;
        CLUREF term;
        } locals;
    locals.first.num = UNINIT;
    locals.chars.num = UNINIT;
    locals.last.num = UNINIT;
    locals.s.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.term.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPstr_get;
    locals.sb = sb;
    locals.term = term;
        if (streamOPstr_get_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPstr_get_own_init = 1;
    }
    enter_proc(916);

  LINE(917);
    {
        {CLUREF T_1_1;
        T_1_1.num = locals.sb.vec->data[1];
        locals.first.num = T_1_1.num;
        }
        }

  LINE(918);
    {
        {CLUREF T_1_1;
        T_1_1.num = locals.sb.vec->data[0];
        locals.chars.num = T_1_1.num;
        }
        }

  LINE(919);
    {
        {locals.last.num = locals.first.num;
        }
        }

  LINE(920);
    for (;;) {
        if (true != true) { break; }

  LINE(921);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        CLUREF T_3_3;
        locals.err = stringOPfetch(locals.chars, locals.last, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.err = stringOPindexc(T_3_1, locals.term, &T_3_2);
        if (locals.err != ERR_ok) goto ex_1;
        T_3_3.num = (T_3_2.num > 0)? true : false;
        if (T_3_3.num == true) {

  LINE(922);
            {
            locals.sb.vec->data[1]  = locals.last.num;
            }

  LINE(923);
            {
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            locals.err = intOPsub(locals.last, locals.first, &T_4_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.err = stringOPsubstr(locals.chars, locals.first, T_4_1, &T_4_2);
            if (locals.err != ERR_ok) goto ex_1;
            ret_1->num = T_4_2.num;
            }
            {signal (ERR_ok);}}
            }
        else {
        CLUREF T_3_4;
        CLUREF T_3_5;
        CLUREF T_3_6;
        locals.err = stringOPfetch(locals.chars, locals.last, &T_3_4);
        if (locals.err != ERR_ok) goto ex_1;
        T_3_5.ch = '\n';
        T_3_6.num = (T_3_4.ch == T_3_5.ch)? true : false;
        if (T_3_6.num == true) {

  LINE(925);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            T_4_1.num = locals.sb.vec->data[2];
            locals.err = intOPadd(T_4_1, CLU_1, &T_4_2);
            if (locals.err != ERR_ok) goto ex_1;
            locals.sb.vec->data[2]  = T_4_2.num;
            }
            }
            }}/* end if */

  LINE(926);
        {
        CLUREF T_3_1;
        locals.err = intOPadd(locals.last, CLU_1, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.last.num = T_3_1.num;
        }
        }
        end_while_1:;
        goto end_1;
        ex_1:
            if ((locals.err == ERR_bounds)) {
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(929);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.first.num == locals.last.num)? true : false;
    if (T_1_1.num == true) {

  LINE(930);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        T_2_1.num = locals.sb.vec->data[3];
        T_2_2.ch = ' ';
        T_2_3.num = (T_2_1.ch == T_2_2.ch)? true : false;
        if (T_2_3.num == true) {

  LINE(931);
            {
            {signal (ERR_end_of_file);}}
            }
            }/* end if */

  LINE(932);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        T_2_1.ch = '\n';
        locals.err = stringOPindexc(T_2_1, locals.term, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        T_2_3.num = (T_2_2.num > 0)? true : false;
        if (T_2_3.num == true) {

  LINE(933);
            {
            {
            ret_1->str = STR_.str;
            }
            {signal (ERR_ok);}}
            }
            }/* end if */

  LINE(934);
        {
        CLUREF T_2_1;
        T_2_1.ch = ' ';
        locals.sb.vec->data[3]  = T_2_1.num;
        }

  LINE(935);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.sb.vec->data[2];
        locals.err = intOPadd(T_2_1, CLU_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.sb.vec->data[2]  = T_2_2.num;
        }

  LINE(936);
        {
        {
        ret_1->str = STR__012.str;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(938);
    {
    locals.sb.vec->data[1]  = locals.last.num;
    }

  LINE(939);
    {
        {CLUREF T_1_1;
        locals.err = stringOPrest(locals.chars, locals.first, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.s.num = T_1_1.num;
        }
        }

  LINE(940);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.ch = '\n';
    locals.err = stringOPindexc(T_1_1, locals.term, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_3.num = (T_1_2.num == 0)? true : false;
    if (T_1_3.num == true) {

  LINE(941);
        {
        CLUREF T_2_1;
        T_2_1.ch = ' ';
        locals.sb.vec->data[3]  = T_2_1.num;
        }

  LINE(942);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.sb.vec->data[2];
        locals.err = intOPadd(T_2_1, CLU_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.sb.vec->data[2]  = T_2_2.num;
        }

  LINE(943);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.ch = '\n';
        locals.err = stringOPappend(locals.s, T_2_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.s.num = T_2_2.num;
        }
        }
        }/* end if */

  LINE(945);
    {
    {
    ret_1->num = locals.s.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE str_get ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPstr_get_actual;
static Vlist1 vals_streamOPstr_get = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc0 sig_streamOPstr_get_1 = {0, 3, "end_of_file", {0, 0
}};
static siglist1 sigs_streamOPstr_get = {0, 1, (sig_desc*)&sig_streamOPstr_get_1};
static Vlist8 locals_streamOPstr_get = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "first", &int_ops},  {0, 2, "chars", &string_ops},  {0, 2, "last", &int_ops},  {0, 2, "s", &string_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "term", &string_ops}}
};
static Vlist0 popowns_streamOPstr_get = {0, 0};
Slist0 tformals_streamOPstr_get = {0, 0};
Slist0 opformals_streamOPstr_get = {0, 0};
dbg_info_streamOPstr_get_actual dbg_info_streamOPstr_get_data = {0, 12, 
    "streamOPstr_get", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPstr_get, 2, 
    &vals_streamOPstr_get, &sigs_streamOPstr_get, &locals_streamOPstr_get, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPstr_get = (struct dbg_info*)&dbg_info_streamOPstr_get_data;
extern struct dbg_info* dbg_info_streamOPputs;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputs_TRACE
int streamOPputs_TRACE;
extern errcode streamOPputs_IB_1();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPputs_own_init = 0;

/**** BEGIN PROCEDURE puts ****/

errcode streamOPputs(st, s)
CLUREF st;
CLUREF s;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF wb;
        CLUREF low;
        CLUREF index;
        CLUREF tb;
        CLUREF chars;
        CLUREF c;
        CLUREF st;
        CLUREF s;
        } locals;
    locals.wb.num = UNINIT;
    locals.low.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.chars.num = UNINIT;
    locals.c.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputs;
    locals.st = st;
    locals.s = s;
        if (streamOPputs_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputs_own_init = 1;
    }
    enter_proc(948);

  LINE(949);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 7: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.wb.num = T_2_2.num;

  LINE(951);
            {
                {CLUREF T_3_1;
                CLUREF T_3_2;
                CLUREF T_3_3;
                CLUREF T_3_4;
                CLUREF T_3_5;
                T_3_1.num = locals.wb.vec->data[1];
                T_3_2.num = locals.wb.vec->data[0];
                T_3_3.num = locals.wb.vec->data[2];
                locals.err = _chanOPput(T_3_1, T_3_2, CLU_1, T_3_3, locals.s, CLU_0, &T_3_4, &T_3_5);
                if (locals.err != ERR_ok) goto ex_1;
                locals.low.num = T_3_4.num;
                locals.index.num = T_3_5.num;
                }
                }

  LINE(953);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.wb.vec->data[3];
            T_3_2.num = T_3_1.num ^ 1;
            if (T_3_2.num == true) {

  LINE(954);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                T_4_1.num = locals.wb.vec->data[1];
                T_4_2.num = locals.wb.vec->data[0];
                locals.err = _chanOPputb(T_4_1, T_4_2, CLU_1, locals.index, CLU_0);
                if (locals.err != ERR_ok) goto ex_1;
                }

  LINE(955);
                {
                locals.index.num = 0;
                }
                }
                }/* end if */

  LINE(957);
            {
            locals.wb.vec->data[2]  = locals.index.num;
            }
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(959);
            {
            locals.err = streamOPtty_put(locals.tb, locals.s, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 4: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.chars.num = T_2_4.num;

  LINE(961);
            {
                locals.err = stringOPchars(locals.s, streamOPputs_IB_1, &locals, &locals.ecode2);
                if (locals.err == ERR_iterbodyreturn) {
                signal(ERR_ok);}
                if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
                if (locals.err == ERR_break) locals.err = ERR_ok;
                if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
                if (locals.err != ERR_ok) goto ex_1;
                }
            break;
            }
    case 3: 
         {
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(966);
            {
            elist[0] = STR_cannot_040write_040to_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(968);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(969);
        {
        locals.err = streamOPscript(locals.st, locals.s, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE puts ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist10 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputs_actual;
static Vlist0 vals_streamOPputs = {0, 0};
static sig_desc1 sig_streamOPputs_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPputs = {0, 1, (sig_desc*)&sig_streamOPputs_1};
static Vlist10 locals_streamOPputs = {0, 10,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "low", &int_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "chars", &array_of_char_ops},  {0, 2, "c", &char_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "s", &string_ops}}
};
static Vlist0 popowns_streamOPputs = {0, 0};
Slist0 tformals_streamOPputs = {0, 0};
Slist0 opformals_streamOPputs = {0, 0};
dbg_info_streamOPputs_actual dbg_info_streamOPputs_data = {0, 12, 
    "streamOPputs", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputs, 2, 
    &vals_streamOPputs, &sigs_streamOPputs, &locals_streamOPputs, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputs = (struct dbg_info*)&dbg_info_streamOPputs_data;

/**** BEGIN ITERATOR BODIES for puts ****/

errcode streamOPputs_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF wb;
    CLUREF low;
    CLUREF index;
    CLUREF tb;
    CLUREF chars;
    CLUREF c;
    CLUREF st;
    CLUREF s;
    } *locals;
{
    locals->c.num = iv_1.num;
    enter_iter_body_proc(962);

  FB_LINE(962);
    {
    locals->err = arrayOPaddh(locals->chars, locals->c);
    if (locals->err != ERR_ok) goto ex_0;
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPputs_IB_1 */

/**** END ITERATOR BODIES for puts ****/

extern struct dbg_info* dbg_info_streamOPputs_image;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputs_image_TRACE
int streamOPputs_image_TRACE;
extern errcode streamOPputs_image_IB_1();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPputs_image_own_init = 0;

/**** BEGIN PROCEDURE puts_image ****/

errcode streamOPputs_image(st, s)
CLUREF st;
CLUREF s;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF wb;
        CLUREF low;
        CLUREF index;
        CLUREF tb;
        CLUREF chars;
        CLUREF c;
        CLUREF st;
        CLUREF s;
        } locals;
    locals.wb.num = UNINIT;
    locals.low.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.chars.num = UNINIT;
    locals.c.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputs_image;
    locals.st = st;
    locals.s = s;
        if (streamOPputs_image_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputs_image_own_init = 1;
    }
    enter_proc(972);

  LINE(973);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 7: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.wb.num = T_2_2.num;

  LINE(975);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.wb.vec->data[3];
            if (T_3_1.num == true) {

  LINE(976);
                {
                    {CLUREF T_4_1;
                    CLUREF T_4_2;
                    CLUREF T_4_3;
                    CLUREF T_4_4;
                    CLUREF T_4_5;
                    T_4_1.num = locals.wb.vec->data[1];
                    T_4_2.num = locals.wb.vec->data[0];
                    T_4_3.num = locals.wb.vec->data[2];
                    locals.err = _chanOPput(T_4_1, T_4_2, CLU_1, T_4_3, locals.s, CLU_1, &T_4_4, &T_4_5);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.low.num = T_4_4.num;
                    locals.index.num = T_4_5.num;
                    }
                    }

  LINE(978);
                {
                locals.wb.vec->data[2]  = locals.index.num;
                }
                }
            else {

  LINE(979);
                {
                CLUREF T_4_1;
                T_4_1.num = locals.wb.vec->data[1];
                locals.err = _chanOPputs(T_4_1, locals.s, CLU_1);
                if (locals.err != ERR_ok) goto ex_1;
                }
                }}/* end if */
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(982);
            {
            locals.err = streamOPtty_put(locals.tb, locals.s, CLU_1);
            if (locals.err != ERR_ok) goto ex_1;
            }
            break;
            }
    case 4: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.chars.num = T_2_4.num;

  LINE(984);
            {
                locals.err = stringOPchars(locals.s, streamOPputs_image_IB_1, &locals, &locals.ecode2);
                if (locals.err == ERR_iterbodyreturn) {
                signal(ERR_ok);}
                if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
                if (locals.err == ERR_break) locals.err = ERR_ok;
                if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
                if (locals.err != ERR_ok) goto ex_1;
                }
            break;
            }
    case 3: 
         {
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(989);
            {
            elist[0] = STR_cannot_040write_040to_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(991);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(992);
        {
        locals.err = streamOPscript(locals.st, locals.s, CLU_1);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE puts_image ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist10 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputs_image_actual;
static Vlist0 vals_streamOPputs_image = {0, 0};
static sig_desc1 sig_streamOPputs_image_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPputs_image = {0, 1, (sig_desc*)&sig_streamOPputs_image_1};
static Vlist10 locals_streamOPputs_image = {0, 10,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "low", &int_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "chars", &array_of_char_ops},  {0, 2, "c", &char_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "s", &string_ops}}
};
static Vlist0 popowns_streamOPputs_image = {0, 0};
Slist0 tformals_streamOPputs_image = {0, 0};
Slist0 opformals_streamOPputs_image = {0, 0};
dbg_info_streamOPputs_image_actual dbg_info_streamOPputs_image_data = {0, 12, 
    "streamOPputs_image", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputs_image, 2, 
    &vals_streamOPputs_image, &sigs_streamOPputs_image, &locals_streamOPputs_image, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputs_image = (struct dbg_info*)&dbg_info_streamOPputs_image_data;

/**** BEGIN ITERATOR BODIES for puts_image ****/

errcode streamOPputs_image_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF wb;
    CLUREF low;
    CLUREF index;
    CLUREF tb;
    CLUREF chars;
    CLUREF c;
    CLUREF st;
    CLUREF s;
    } *locals;
{
    locals->c.num = iv_1.num;
    enter_iter_body_proc(985);

  FB_LINE(985);
    {
    locals->err = arrayOPaddh(locals->chars, locals->c);
    if (locals->err != ERR_ok) goto ex_0;
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPputs_image_IB_1 */

/**** END ITERATOR BODIES for puts_image ****/

extern struct dbg_info* dbg_info_streamOPtty_put1;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPtty_put1_TRACE
int streamOPtty_put1_TRACE;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPtty_put1_own_init = 0;

/**** BEGIN PROCEDURE tty_put1 ****/

errcode streamOPtty_put1(tb, c)
CLUREF tb;
CLUREF c;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF c;
        } locals;
    locals.tb.num = UNINIT;
    locals.c.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPtty_put1;
    locals.tb = tb;
    locals.c = c;
        if (streamOPtty_put1_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPtty_put1_own_init = 1;
    }
    enter_proc(995);

  LINE(996);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    T_2_1.ch = '\n';
    T_2_2.num = (locals.c.ch == T_2_1.ch)? true : false;
    if (T_2_2.num == true) {

  LINE(997);
        {
        locals.tb.vec->data[11]  = 0;
        }

  LINE(998);
        {
        locals.tb.vec->data[4]  = 1;
        }
        }
    else {

  LINE(999);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        T_3_1.num = locals.tb.vec->data[11];
        locals.err = intOPadd(T_3_1, CLU_1, &T_3_2);
        if (locals.err != ERR_ok) goto ex_1;
        locals.tb.vec->data[11]  = T_3_2.num;
        }

  LINE(1000);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        T_3_1.num = locals.tb.vec->data[1];
        T_3_2.num = locals.tb.vec->data[11];
        locals.err = _bytevecOPstore(T_3_1, T_3_2, locals.c);
        if (locals.err != ERR_ok) goto ex_1;
        }

  LINE(1001);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        T_3_1.num = locals.tb.vec->data[11];
        locals.err = intOPadd(T_3_1, CLU_1, &T_3_2);
        if (locals.err != ERR_ok) goto ex_1;
        locals.tb.vec->data[4]  = T_3_2.num;
        }
        }}/* end if */
        goto end_1;
        ex_1:
            if ((locals.err == ERR_bounds)) {

  LINE(1002);
                {
                CLUREF T_2_1;
                CLUREF T_2_2;
                T_2_1.num = locals.tb.vec->data[11];
                locals.err = intOPsub(T_2_1, CLU_1, &T_2_2);
                if (locals.err != ERR_ok) goto ex_0;
                locals.tb.vec->data[11]  = T_2_2.num;
                }
            }
            else {
                goto ex_0;
            }
        end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE tty_put1 ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPtty_put1_actual;
static Vlist0 vals_streamOPtty_put1 = {0, 0};
static siglist0 sigs_streamOPtty_put1 = {0, 0};
static Vlist4 locals_streamOPtty_put1 = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "c", &char_ops}}
};
static Vlist0 popowns_streamOPtty_put1 = {0, 0};
Slist0 tformals_streamOPtty_put1 = {0, 0};
Slist0 opformals_streamOPtty_put1 = {0, 0};
dbg_info_streamOPtty_put1_actual dbg_info_streamOPtty_put1_data = {0, 12, 
    "streamOPtty_put1", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPtty_put1, 2, 
    &vals_streamOPtty_put1, &sigs_streamOPtty_put1, &locals_streamOPtty_put1, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPtty_put1 = (struct dbg_info*)&dbg_info_streamOPtty_put1_data;
extern struct dbg_info* dbg_info_streamOPtty_put;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPtty_put_TRACE
int streamOPtty_put_TRACE;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPtty_put_own_init = 0;

/**** BEGIN PROCEDURE tty_put ****/

errcode streamOPtty_put(tb, s, image)
CLUREF tb;
CLUREF s;
CLUREF image;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF disp;
        CLUREF index;
        CLUREF tb;
        CLUREF s;
        CLUREF image;
        } locals;
    locals.disp.num = UNINIT;
    locals.index.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.s.num = UNINIT;
    locals.image.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPtty_put;
    locals.tb = tb;
    locals.s = s;
    locals.image = image;
        if (streamOPtty_put_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPtty_put_own_init = 1;
    }
    enter_proc(1005);

  LINE(1007);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = locals.tb.vec->data[10];
    T_1_2.num = (locals.image.tf == T_1_1.tf)? true : false;
    T_1_3.num = T_1_2.num ^ 1;
    if (T_1_3.num == true) {

  LINE(1008);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        CLUREF T_2_5;
        T_2_1.num = locals.tb.vec->data[2];
        T_2_2.num = locals.tb.vec->data[1];
        T_2_3.num = locals.tb.vec->data[4];
        T_2_4.num = locals.tb.vec->data[11];
        T_2_5.num = locals.tb.vec->data[10];
        locals.err = _chanOPputb(T_2_1, T_2_2, T_2_3, T_2_4, T_2_5);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1009);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[11];
        locals.err = intOPadd(T_2_1, CLU_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.tb.vec->data[4]  = T_2_2.num;
        }

  LINE(1010);
        {
        locals.tb.vec->data[10]  = locals.image.num;
        }
        }
        }/* end if */

  LINE(1012);
    {
        {CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        CLUREF T_2_5;
        CLUREF T_2_6;
        T_2_1.num = locals.tb.vec->data[2];
        T_2_2.num = locals.tb.vec->data[1];
        T_2_3.num = locals.tb.vec->data[4];
        T_2_4.num = locals.tb.vec->data[11];
        locals.err = _chanOPput(T_2_1, T_2_2, T_2_3, T_2_4, locals.s, locals.image, &T_2_5, &T_2_6);
        if (locals.err != ERR_ok) goto ex_1;
        locals.disp.num = T_2_5.num;
        locals.index.num = T_2_6.num;
        }
        }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(1015);
    {
    locals.tb.vec->data[11]  = locals.index.num;
    }

  LINE(1016);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.tb.vec->data[15];
    T_1_2.num = T_1_1.num ^ 1;
    if (T_1_2.num == true) {

  LINE(1017);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[2];
        T_2_2.num = locals.tb.vec->data[1];
        locals.err = _chanOPputb(T_2_1, T_2_2, locals.disp, locals.index, locals.image);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1018);
        {
        CLUREF T_2_1;
        locals.err = intOPadd(locals.index, CLU_1, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.disp.num = T_2_1.num;
        }
        }
        }/* end if */

  LINE(1020);
    {
    locals.tb.vec->data[4]  = locals.disp.num;
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE tty_put ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist7 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPtty_put_actual;
static Vlist0 vals_streamOPtty_put = {0, 0};
static sig_desc1 sig_streamOPtty_put_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPtty_put = {0, 1, (sig_desc*)&sig_streamOPtty_put_1};
static Vlist7 locals_streamOPtty_put = {0, 7,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "disp", &int_ops},  {0, 2, "index", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "s", &string_ops},  {0, 2, "image", &bool_ops}}
};
static Vlist0 popowns_streamOPtty_put = {0, 0};
Slist0 tformals_streamOPtty_put = {0, 0};
Slist0 opformals_streamOPtty_put = {0, 0};
dbg_info_streamOPtty_put_actual dbg_info_streamOPtty_put_data = {0, 12, 
    "streamOPtty_put", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPtty_put, 3, 
    &vals_streamOPtty_put, &sigs_streamOPtty_put, &locals_streamOPtty_put, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPtty_put = (struct dbg_info*)&dbg_info_streamOPtty_put_data;
extern struct dbg_info* dbg_info_streamOPputzero;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputzero_TRACE
int streamOPputzero_TRACE;
extern errcode streamOPputzero_IB_1();
extern OWN_req int_ownreqs;
static int streamOPputzero_own_init = 0;

/**** BEGIN PROCEDURE putzero ****/

errcode streamOPputzero(st, s, size)
CLUREF st;
CLUREF s;
CLUREF size;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF not_inserted;
        CLUREF diff;
        CLUREF c;
        CLUREF st;
        CLUREF s;
        CLUREF size;
        } locals;
    locals.not_inserted.num = UNINIT;
    locals.diff.num = UNINIT;
    locals.c.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.size.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputzero;
    locals.st = st;
    locals.s = s;
    locals.size = size;
        if (streamOPputzero_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputzero_own_init = 1;
    }
    enter_proc(1023);

  LINE(1025);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.size.num < 0)? true : false;
    if (T_1_1.num == true) {

  LINE(1026);
        {
        {signal (ERR_negative_field_width);}}
        }
        }/* end if */

  LINE(1027);
    {
        {locals.not_inserted.tf = true;
        }
        }

  LINE(1028);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        locals.err = stringOPsize(locals.s, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = intOPsub(locals.size, T_1_1, &T_1_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.diff.num = T_1_2.num;
        }
        }

  LINE(1029);
    {
        locals.err = stringOPchars(locals.s, streamOPputzero_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_1;
        }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(1041);
    {
    if (locals.not_inserted.num == true) {

  LINE(1042);
        for (;;) {
            CLUREF T_3_1;
            T_3_1.num = (locals.diff.num > 0)? true : false;
            if (T_3_1.num != true) { break; }

  LINE(1043);
            {
            CLUREF T_4_1;
            T_4_1.ch = '0';
            locals.err = streamOPputc(locals.st, T_4_1);
            if (locals.err != ERR_ok) goto ex_2;
            }

  LINE(1044);
            {
            CLUREF T_4_1;
            locals.err = intOPsub(locals.diff, CLU_1, &T_4_1);
            if (locals.err != ERR_ok) goto ex_2;
            locals.diff.num = T_4_1.num;
            }
            }
            end_while_1:;
        goto end_2;
        ex_2:
            if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
            else {
                goto ex_0;}
        end_2:;
        }
        }/* end if */
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE putzero ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist2 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputzero_actual;
static Vlist0 vals_streamOPputzero = {0, 0};
static sig_desc0 sig_streamOPputzero_1 = {0, 3, "negative_field_width", {0, 0
}};
static sig_desc1 sig_streamOPputzero_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPputzero = {0, 2, (sig_desc*)&sig_streamOPputzero_1, (sig_desc*)&sig_streamOPputzero_2};
static Vlist8 locals_streamOPputzero = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "not_inserted", &bool_ops},  {0, 2, "diff", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "st", &stream_ops},  {0, 2, "s", &string_ops},  {0, 2, "size", &int_ops}}
};
static Vlist0 popowns_streamOPputzero = {0, 0};
Slist0 tformals_streamOPputzero = {0, 0};
Slist0 opformals_streamOPputzero = {0, 0};
dbg_info_streamOPputzero_actual dbg_info_streamOPputzero_data = {0, 12, 
    "streamOPputzero", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputzero, 3, 
    &vals_streamOPputzero, &sigs_streamOPputzero, &locals_streamOPputzero, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputzero = (struct dbg_info*)&dbg_info_streamOPputzero_data;

/**** BEGIN ITERATOR BODIES for putzero ****/

errcode streamOPputzero_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF not_inserted;
    CLUREF diff;
    CLUREF c;
    CLUREF st;
    CLUREF s;
    CLUREF size;
    } *locals;
{
    locals->c.num = iv_1.num;
    enter_iter_body_proc(1030);

  FB_LINE(1030);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    CLUREF T_1_6;
    CLUREF T_1_7;
    CLUREF T_1_8;
    CLUREF T_1_9;
    T_1_1.num = locals->not_inserted.num;
    if (locals->not_inserted.num) {
        T_1_3.ch = '.';
        T_1_4.num = (locals->c.ch == T_1_3.ch)? true : false;
        T_1_2.num = T_1_4.num;
        if (!T_1_4.num) {
            T_1_6.ch = '0';
            locals->err = charOPge(locals->c, T_1_6, &T_1_7);
            if (locals->err != ERR_ok) goto ex_0;
            T_1_5.num = T_1_7.num;
            if (T_1_7.num) {
                T_1_8.ch = '9';
                locals->err = charOPle(locals->c, T_1_8, &T_1_9);
                if (locals->err != ERR_ok) goto ex_0;
                T_1_5.num = T_1_9.num;
            }
            T_1_2.num = T_1_5.num;
        }
        T_1_1.num = T_1_2.num;
    }
    if (T_1_1.num == true) {

  FB_LINE(1032);
        {
        locals->not_inserted.tf = false;
        }

  FB_LINE(1033);
        for (;;) {
            CLUREF T_2_1;
            T_2_1.num = (locals->diff.num > 0)? true : false;
            if (T_2_1.num != true) { break; }

  FB_LINE(1034);
            {
            CLUREF T_3_1;
            T_3_1.ch = '0';
            locals->err = streamOPputc(locals->st, T_3_1);
            if (locals->err != ERR_ok) goto ex_0;
            }

  FB_LINE(1035);
            {
            CLUREF T_3_1;
            locals->err = intOPsub(locals->diff, CLU_1, &T_3_1);
            if (locals->err != ERR_ok) goto ex_0;
            locals->diff.num = T_3_1.num;
            }
            }
            end_while_2:;
        }
        }/* end if */

  FB_LINE(1038);
    {
    locals->err = streamOPputc(locals->st, locals->c);
    if (locals->err != ERR_ok) goto ex_0;
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPputzero_IB_1 */

/**** END ITERATOR BODIES for putzero ****/

extern struct dbg_info* dbg_info_streamOPputleft;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputleft_TRACE
int streamOPputleft_TRACE;
static int streamOPputleft_own_init = 0;

/**** BEGIN PROCEDURE putleft ****/

errcode streamOPputleft(st, s, size)
CLUREF st;
CLUREF s;
CLUREF size;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF diff;
        CLUREF st;
        CLUREF s;
        CLUREF size;
        } locals;
    locals.diff.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.size.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputleft;
    locals.st = st;
    locals.s = s;
    locals.size = size;
        if (streamOPputleft_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputleft_own_init = 1;
    }
    enter_proc(1050);

  LINE(1052);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.size.num < 0)? true : false;
    if (T_1_1.num == true) {

  LINE(1053);
        {
        {signal (ERR_negative_field_width);}}
        }
        }/* end if */

  LINE(1054);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        locals.err = stringOPsize(locals.s, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = intOPsub(locals.size, T_1_1, &T_1_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.diff.num = T_1_2.num;
        }
        }

  LINE(1055);
    {

  LINE(1056);
        {
        locals.err = streamOPputs(locals.st, locals.s);
        if (locals.err != ERR_ok) goto ex_1;
        }

  LINE(1057);
        {
        CLUREF T_3_1;
        T_3_1.num = (locals.diff.num > 0)? true : false;
        if (T_3_1.num == true) {

  LINE(1058);
            {
            locals.err = streamOPputspace(locals.st, locals.diff);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }
            }/* end if */
        }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE putleft ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist2 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputleft_actual;
static Vlist0 vals_streamOPputleft = {0, 0};
static sig_desc0 sig_streamOPputleft_1 = {0, 3, "negative_field_width", {0, 0
}};
static sig_desc1 sig_streamOPputleft_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPputleft = {0, 2, (sig_desc*)&sig_streamOPputleft_1, (sig_desc*)&sig_streamOPputleft_2};
static Vlist6 locals_streamOPputleft = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "diff", &int_ops},  {0, 2, "st", &stream_ops},  {0, 2, "s", &string_ops},  {0, 2, "size", &int_ops}}
};
static Vlist0 popowns_streamOPputleft = {0, 0};
Slist0 tformals_streamOPputleft = {0, 0};
Slist0 opformals_streamOPputleft = {0, 0};
dbg_info_streamOPputleft_actual dbg_info_streamOPputleft_data = {0, 12, 
    "streamOPputleft", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputleft, 3, 
    &vals_streamOPputleft, &sigs_streamOPputleft, &locals_streamOPputleft, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputleft = (struct dbg_info*)&dbg_info_streamOPputleft_data;
extern struct dbg_info* dbg_info_streamOPputright;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputright_TRACE
int streamOPputright_TRACE;
static int streamOPputright_own_init = 0;

/**** BEGIN PROCEDURE putright ****/

errcode streamOPputright(st, s, size)
CLUREF st;
CLUREF s;
CLUREF size;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF diff;
        CLUREF st;
        CLUREF s;
        CLUREF size;
        } locals;
    locals.diff.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.size.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputright;
    locals.st = st;
    locals.s = s;
    locals.size = size;
        if (streamOPputright_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputright_own_init = 1;
    }
    enter_proc(1062);

  LINE(1064);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.size.num < 0)? true : false;
    if (T_1_1.num == true) {

  LINE(1065);
        {
        {signal (ERR_negative_field_width);}}
        }
        }/* end if */

  LINE(1066);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        locals.err = stringOPsize(locals.s, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = intOPsub(locals.size, T_1_1, &T_1_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.diff.num = T_1_2.num;
        }
        }

  LINE(1067);
    {

  LINE(1068);
        {
        CLUREF T_3_1;
        T_3_1.num = (locals.diff.num > 0)? true : false;
        if (T_3_1.num == true) {

  LINE(1069);
            {
            locals.err = streamOPputspace(locals.st, locals.diff);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }
            }/* end if */

  LINE(1070);
        {
        locals.err = streamOPputs(locals.st, locals.s);
        if (locals.err != ERR_ok) goto ex_1;
        }
        }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE putright ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist2 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputright_actual;
static Vlist0 vals_streamOPputright = {0, 0};
static sig_desc0 sig_streamOPputright_1 = {0, 3, "negative_field_width", {0, 0
}};
static sig_desc1 sig_streamOPputright_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPputright = {0, 2, (sig_desc*)&sig_streamOPputright_1, (sig_desc*)&sig_streamOPputright_2};
static Vlist6 locals_streamOPputright = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "diff", &int_ops},  {0, 2, "st", &stream_ops},  {0, 2, "s", &string_ops},  {0, 2, "size", &int_ops}}
};
static Vlist0 popowns_streamOPputright = {0, 0};
Slist0 tformals_streamOPputright = {0, 0};
Slist0 opformals_streamOPputright = {0, 0};
dbg_info_streamOPputright_actual dbg_info_streamOPputright_data = {0, 12, 
    "streamOPputright", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputright, 3, 
    &vals_streamOPputright, &sigs_streamOPputright, &locals_streamOPputright, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputright = (struct dbg_info*)&dbg_info_streamOPputright_data;
extern struct dbg_info* dbg_info_streamOPputspace;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPputspace_TRACE
int streamOPputspace_TRACE;
static int streamOPputspace_own_init = 0;

/**** BEGIN PROCEDURE putspace ****/

errcode streamOPputspace(st, len)
CLUREF st;
CLUREF len;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF st;
        CLUREF len;
        } locals;
    locals.st.num = UNINIT;
    locals.len.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPputspace;
    locals.st = st;
    locals.len = len;
        if (streamOPputspace_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPputspace_own_init = 1;
    }
    enter_proc(1074);

  LINE(1076);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.len.num < 0)? true : false;
    if (T_1_1.num == true) {

  LINE(1077);
        {
        {signal (ERR_negative_field_width);}}
        }
        }/* end if */

  LINE(1078);
    for (;;) {
        CLUREF T_2_1;
        T_2_1.num = (locals.len.num > 0)? true : false;
        if (T_2_1.num != true) { break; }

  LINE(1079);
        {
        CLUREF T_3_1;
        T_3_1.ch = ' ';
        locals.err = streamOPputc(locals.st, T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        }

  LINE(1080);
        {
        CLUREF T_3_1;
        locals.err = intOPsub(locals.len, CLU_1, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.len.num = T_3_1.num;
        }
        }
        end_while_1:;
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE putspace ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist2 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPputspace_actual;
static Vlist0 vals_streamOPputspace = {0, 0};
static sig_desc0 sig_streamOPputspace_1 = {0, 3, "negative_field_width", {0, 0
}};
static sig_desc1 sig_streamOPputspace_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPputspace = {0, 2, (sig_desc*)&sig_streamOPputspace_1, (sig_desc*)&sig_streamOPputspace_2};
static Vlist4 locals_streamOPputspace = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "st", &stream_ops},  {0, 2, "len", &int_ops}}
};
static Vlist0 popowns_streamOPputspace = {0, 0};
Slist0 tformals_streamOPputspace = {0, 0};
Slist0 opformals_streamOPputspace = {0, 0};
dbg_info_streamOPputspace_actual dbg_info_streamOPputspace_data = {0, 12, 
    "streamOPputspace", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPputspace, 2, 
    &vals_streamOPputspace, &sigs_streamOPputspace, &locals_streamOPputspace, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPputspace = (struct dbg_info*)&dbg_info_streamOPputspace_data;
extern struct dbg_info* dbg_info_streamOPcreate_input;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPcreate_input_TRACE
int streamOPcreate_input_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPcreate_input_own_init = 0;

/**** BEGIN PROCEDURE create_input ****/

errcode streamOPcreate_input(s, ret_1)
CLUREF s;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF newln;
        CLUREF s;
        } locals;
    locals.newln.num = UNINIT;
    locals.s.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPcreate_input;
    locals.s = s;
        if (streamOPcreate_input_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPcreate_input_own_init = 1;
    }
    enter_proc(1085);

  LINE(1086);
    {
        {CLUREF T_1_1;
        T_1_1.ch = ' ';
        locals.newln.num = T_1_1.num;
        }
        }

  LINE(1087);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    CLUREF T_2_3;
    CLUREF T_2_4;
    CLUREF T_2_5;
    locals.err = stringOPsize(locals.s, &T_2_1);
    if (locals.err != ERR_ok) goto ex_1;
    locals.err = stringOPfetch(locals.s, T_2_1, &T_2_2);
    if (locals.err != ERR_ok) goto ex_1;
    T_2_3.ch = '\n';
    T_2_4.num = (T_2_2.ch == T_2_3.ch)? true : false;
    T_2_5.num = T_2_4.num ^ 1;
    if (T_2_5.num == true) {

  LINE(1088);
        {
        CLUREF T_3_1;
        T_3_1.ch = '\n';
        locals.newln.num = T_3_1.num;
        }
        }
        }/* end if */
        goto end_1;
        ex_1:
            if ((locals.err == ERR_bounds)) {
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(1090);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    RecordAlloc(4, T_1_1);
    locals.err = file_nameOPparse(STR_, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[1]  = T_1_2.num;
    locals.err = sequenceOPnew(&T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[3]  = T_1_3.num;
    T_1_1.vec->data[2]  = false;
    RecordAlloc(4, T_1_4);
    T_1_4.vec->data[0]  = locals.s.num;
    T_1_4.vec->data[1]  = 1;
    T_1_4.vec->data[2]  = 1;
    T_1_4.vec->data[3]  = locals.newln.num;
    CellAlloc(2, T_1_4.num, T_1_5);
    T_1_1.vec->data[0]  = T_1_5.num;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE create_input ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPcreate_input_actual;
static Vlist1 vals_streamOPcreate_input = {0, 1, { {0, 2, "", &record_buf_name_scripting_scripts_ops}}
};
static siglist0 sigs_streamOPcreate_input = {0, 0};
static Vlist4 locals_streamOPcreate_input = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "newln", &char_ops},  {0, 2, "s", &string_ops}}
};
static Vlist0 popowns_streamOPcreate_input = {0, 0};
Slist0 tformals_streamOPcreate_input = {0, 0};
Slist0 opformals_streamOPcreate_input = {0, 0};
dbg_info_streamOPcreate_input_actual dbg_info_streamOPcreate_input_data = {0, 12, 
    "streamOPcreate_input", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPcreate_input, 1, 
    &vals_streamOPcreate_input, &sigs_streamOPcreate_input, &locals_streamOPcreate_input, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPcreate_input = (struct dbg_info*)&dbg_info_streamOPcreate_input_data;
extern struct dbg_info* dbg_info_streamOPcreate_output;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPcreate_output_TRACE
int streamOPcreate_output_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPcreate_output_own_init = 0;

/**** BEGIN PROCEDURE create_output ****/

errcode streamOPcreate_output(ret_1)
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        } locals;
    locals.DBG_INFO = dbg_info_streamOPcreate_output;
        if (streamOPcreate_output_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPcreate_output_own_init = 1;
    }
    enter_proc(1099);

  LINE(1100);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    RecordAlloc(4, T_1_1);
    locals.err = file_nameOPparse(STR_, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[1]  = T_1_2.num;
    locals.err = sequenceOPnew(&T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.vec->data[3]  = T_1_3.num;
    T_1_1.vec->data[2]  = false;
    locals.err = arrayOPnew(&T_1_4);
    if (locals.err != ERR_ok) goto ex_0;
    CellAlloc(4, T_1_4.num, T_1_5);
    T_1_1.vec->data[0]  = T_1_5.num;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE create_output ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist2 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPcreate_output_actual;
static Vlist1 vals_streamOPcreate_output = {0, 1, { {0, 2, "", &record_buf_name_scripting_scripts_ops}}
};
static siglist0 sigs_streamOPcreate_output = {0, 0};
static Vlist2 locals_streamOPcreate_output = {0, 2,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops}}
};
static Vlist0 popowns_streamOPcreate_output = {0, 0};
Slist0 tformals_streamOPcreate_output = {0, 0};
Slist0 opformals_streamOPcreate_output = {0, 0};
dbg_info_streamOPcreate_output_actual dbg_info_streamOPcreate_output_data = {0, 12, 
    "streamOPcreate_output", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPcreate_output, 0, 
    &vals_streamOPcreate_output, &sigs_streamOPcreate_output, &locals_streamOPcreate_output, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPcreate_output = (struct dbg_info*)&dbg_info_streamOPcreate_output_data;
extern struct dbg_info* dbg_info_streamOPget_contents;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_contents_TRACE
int streamOPget_contents_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_contents_own_init = 0;

/**** BEGIN PROCEDURE get_contents ****/

errcode streamOPget_contents(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF chars;
        CLUREF st;
        } locals;
    locals.chars.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_contents;
    locals.st = st;
        if (streamOPget_contents_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_contents_own_init = 1;
    }
    enter_proc(1106);

  LINE(1107);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 4: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.chars.num = T_1_2.num;

  LINE(1109);
            {
            {
            CLUREF T_2_1;
            locals.err = stringOPac2s(locals.chars, &T_2_1);
            if (locals.err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(1111);
        {
        elist[0] = STR_not_040a_040string_040output_040stream;
        {signal (ERR_not_possible);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_contents ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_contents_actual;
static Vlist1 vals_streamOPget_contents = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc1 sig_streamOPget_contents_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPget_contents = {0, 1, (sig_desc*)&sig_streamOPget_contents_1};
static Vlist4 locals_streamOPget_contents = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "chars", &array_of_char_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_contents = {0, 0};
Slist0 tformals_streamOPget_contents = {0, 0};
Slist0 opformals_streamOPget_contents = {0, 0};
dbg_info_streamOPget_contents_actual dbg_info_streamOPget_contents_data = {0, 12, 
    "streamOPget_contents", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_contents, 1, 
    &vals_streamOPget_contents, &sigs_streamOPget_contents, &locals_streamOPget_contents, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_contents = (struct dbg_info*)&dbg_info_streamOPget_contents_data;
extern struct dbg_info* dbg_info_streamOPgetbuf;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPgetbuf_TRACE
int streamOPgetbuf_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPgetbuf_own_init = 0;

/**** BEGIN PROCEDURE getbuf ****/

errcode streamOPgetbuf(st, term, ret_1)
CLUREF st;
CLUREF term;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF s;
        CLUREF rb;
        CLUREF index;
        CLUREF max;
        CLUREF i;
        CLUREF tb;
        CLUREF sb;
        CLUREF st;
        CLUREF term;
        } locals;
    locals.s.num = UNINIT;
    locals.rb.num = UNINIT;
    locals.index.num = UNINIT;
    locals.max.num = UNINIT;
    locals.i.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.sb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.term.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPgetbuf;
    locals.st = st;
    locals.term = term;
        if (streamOPgetbuf_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPgetbuf_own_init = 1;
    }
    enter_proc(1115);

  LINE(1117);
    locals.s.num = UNINIT;

  LINE(1118);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 5: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.rb.num = T_2_2.num;

  LINE(1120);
            locals.index.num = UNINIT;
            locals.max.num = UNINIT;

  LINE(1121);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            CLUREF T_3_5;
            CLUREF T_3_6;
            CLUREF T_3_7;
            T_3_1.num = locals.rb.vec->data[1];
            T_3_2.num = locals.rb.vec->data[0];
            T_3_3.num = locals.rb.vec->data[2];
            T_3_4.num = locals.rb.vec->data[4];
            locals.err = _chanOPget(T_3_1, T_3_2, T_3_3, T_3_4, locals.term, CLU_0, &T_3_5, &T_3_6, &T_3_7);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_5.num;
            locals.index.num = T_3_6.num;
            locals.max.num = T_3_7.num;
            }

  LINE(1123);
            {
            locals.rb.vec->data[2]  = locals.index.num;
            }

  LINE(1124);
            {
            locals.rb.vec->data[4]  = locals.max.num;
            }

  LINE(1125);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            T_3_1.ch = '\n';
            locals.err = stringOPindexc(T_3_1, locals.term, &T_3_2);
            if (locals.err != ERR_ok) goto ex_1;
            T_3_3.num = (T_3_2.num == 0)? true : false;
            if (T_3_3.num == true) {

  LINE(1126);
                {
                    {CLUREF T_4_1;
                    CLUREF T_4_2;
                    T_4_1.ch = '\n';
                    locals.err = stringOPindexc(T_4_1, locals.s, &T_4_2);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.i.num = T_4_2.num;
                    }
                    }

  LINE(1127);
                {
                CLUREF T_4_1;
                T_4_1.num = (locals.i.num > 0)? true : false;
                if (T_4_1.num == true) {

  LINE(1128);
                    {
                    CLUREF T_5_1;
                    CLUREF T_5_2;
                    CLUREF T_5_3;
                    T_5_1.num = locals.rb.vec->data[3];
                    locals.err = streamOPlines(locals.s, locals.i, &T_5_2);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.err = intOPadd(T_5_1, T_5_2, &T_5_3);
                    if (locals.err != ERR_ok) goto ex_1;
                    locals.rb.vec->data[3]  = T_5_3.num;
                    }
                    }
                    }/* end if */
                }
                }/* end if */
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(1131);
            {
            locals.err = streamOPflush(locals.st);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(1132);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            CLUREF T_3_5;
            CLUREF T_3_6;
            T_3_2.num = locals.st.vec->data[2];
            T_3_1.num = T_3_2.num;
            if (T_3_2.num) {
                T_3_4.num = locals.tb.vec->data[11];
                T_3_5.num = (T_3_4.num == 0)? true : false;
                T_3_3.num = T_3_5.num;
                if (!T_3_5.num) {
                    T_3_6.num = locals.tb.vec->data[10];
                    T_3_3.num = T_3_6.num;
                }
                T_3_1.num = T_3_3.num;
            }
            if (T_3_1.num == true) {

  LINE(1133);
                {
                CLUREF T_4_1;
                T_4_1.num = locals.tb.vec->data[17];
                locals.err = streamOPscript(locals.st, T_4_1, CLU_0);
                if (locals.err != ERR_ok) goto ex_1;
                }
                }
                }/* end if */

  LINE(1134);
            {
            CLUREF T_3_1;
            locals.err = streamOPedit(locals.tb, locals.term, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_1.num;
            }
            break;
            }
    case 2: 
         {CLUREF T_2_4;
        T_2_4.num = T_2_1.cell->value;
        locals.sb.num = T_2_4.num;

  LINE(1136);
            {
            CLUREF T_3_1;
            locals.err = streamOPstr_get(locals.sb, locals.term, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.s.num = T_3_1.num;
            }
            break;
            }
    case 3: 
         {

  LINE(1138);
            {
            {signal (ERR_end_of_file);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(1140);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_end_of_file) {signal(ERR_end_of_file);}
        else if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;

  LINE(1142);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[2];
    if (T_1_1.num == true) {

  LINE(1143);
        {
        locals.err = streamOPscript(locals.st, locals.s, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(1144);
    {
    {
    ret_1->num = locals.s.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE getbuf ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist11 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPgetbuf_actual;
static Vlist1 vals_streamOPgetbuf = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc0 sig_streamOPgetbuf_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPgetbuf_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPgetbuf = {0, 2, (sig_desc*)&sig_streamOPgetbuf_1, (sig_desc*)&sig_streamOPgetbuf_2};
static Vlist11 locals_streamOPgetbuf = {0, 11,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "s", &string_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "index", &int_ops},  {0, 2, "max", &int_ops},  {0, 2, "i", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "sb", &record_chars_index_line_newln_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "term", &string_ops}}
};
static Vlist0 popowns_streamOPgetbuf = {0, 0};
Slist0 tformals_streamOPgetbuf = {0, 0};
Slist0 opformals_streamOPgetbuf = {0, 0};
dbg_info_streamOPgetbuf_actual dbg_info_streamOPgetbuf_data = {0, 12, 
    "streamOPgetbuf", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPgetbuf, 2, 
    &vals_streamOPgetbuf, &sigs_streamOPgetbuf, &locals_streamOPgetbuf, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPgetbuf = (struct dbg_info*)&dbg_info_streamOPgetbuf_data;
extern struct dbg_info* dbg_info_streamOPlines;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPlines_TRACE
int streamOPlines_TRACE;
static int streamOPlines_own_init = 0;

/**** BEGIN PROCEDURE lines ****/

errcode streamOPlines(s, i, ret_1)
CLUREF s;
CLUREF i;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF cnt;
        CLUREF s;
        CLUREF i;
        } locals;
    locals.cnt.num = UNINIT;
    locals.s.num = UNINIT;
    locals.i.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPlines;
    locals.s = s;
    locals.i = i;
        if (streamOPlines_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPlines_own_init = 1;
    }
    enter_proc(1147);

  LINE(1148);
    {
        {locals.cnt.num = 0;
        }
        }

  LINE(1149);
    for (;;) {
        CLUREF T_1_1;
        T_1_1.num = (locals.i.num > 0)? true : false;
        if (T_1_1.num != true) { break; }

  LINE(1150);
        {
        CLUREF T_2_1;
        locals.err = intOPadd(locals.cnt, CLU_1, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.cnt.num = T_2_1.num;
        }

  LINE(1151);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        T_2_1.ch = '\n';
        T_2_2.num = locals.s.num;
        locals.err = intOPadd(locals.i, CLU_1, &T_2_3);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = _bytevecOPindexc(T_2_1, T_2_2, T_2_3, &T_2_4);
        if (locals.err != ERR_ok) goto ex_0;
        locals.i.num = T_2_4.num;
        }
        }
        end_while_1:;

  LINE(1153);
    {
    {
    ret_1->num = locals.cnt.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE lines ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPlines_actual;
static Vlist1 vals_streamOPlines = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_streamOPlines = {0, 0};
static Vlist5 locals_streamOPlines = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "cnt", &int_ops},  {0, 2, "s", &string_ops},  {0, 2, "i", &int_ops}}
};
static Vlist0 popowns_streamOPlines = {0, 0};
Slist0 tformals_streamOPlines = {0, 0};
Slist0 opformals_streamOPlines = {0, 0};
dbg_info_streamOPlines_actual dbg_info_streamOPlines_data = {0, 12, 
    "streamOPlines", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPlines, 2, 
    &vals_streamOPlines, &sigs_streamOPlines, &locals_streamOPlines, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPlines = (struct dbg_info*)&dbg_info_streamOPlines_data;
extern struct dbg_info* dbg_info_streamOPscript;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPscript_TRACE
int streamOPscript_TRACE;
extern errcode streamOPscript_IB_1();
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPscript_own_init = 0;

/**** BEGIN PROCEDURE script ****/

errcode streamOPscript(st, s, image)
CLUREF st;
CLUREF s;
CLUREF image;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF scr;
        CLUREF st;
        CLUREF s;
        CLUREF image;
        } locals;
    locals.scr.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.image.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPscript;
    locals.st = st;
    locals.s = s;
    locals.image = image;
        if (streamOPscript_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPscript_own_init = 1;
    }
    enter_proc(1156);

  LINE(1157);
    {
        CLUREF T_1_1;
        T_1_1.num = locals.st.vec->data[3];
        locals.err = sequenceOPelements(T_1_1, streamOPscript_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE script ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPscript_actual;
static Vlist0 vals_streamOPscript = {0, 0};
static siglist0 sigs_streamOPscript = {0, 0};
static Vlist6 locals_streamOPscript = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "scr", &stream_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "s", &string_ops},  {0, 2, "image", &bool_ops}}
};
static Vlist0 popowns_streamOPscript = {0, 0};
Slist0 tformals_streamOPscript = {0, 0};
Slist0 opformals_streamOPscript = {0, 0};
dbg_info_streamOPscript_actual dbg_info_streamOPscript_data = {0, 12, 
    "streamOPscript", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPscript, 3, 
    &vals_streamOPscript, &sigs_streamOPscript, &locals_streamOPscript, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPscript = (struct dbg_info*)&dbg_info_streamOPscript_data;

/**** BEGIN ITERATOR BODIES for script ****/

errcode streamOPscript_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF scr;
    CLUREF st;
    CLUREF s;
    CLUREF image;
    } *locals;
{
    locals->scr.num = iv_1.num;
    enter_iter_body_proc(1161);

  FB_LINE(1158);
    {
    if (locals->image.num == true) {

  FB_LINE(1159);
        {
        locals->err = streamOPputs_image(locals->scr, locals->s);
        if (locals->err != ERR_ok) goto ex_1;
        }
        }
    else {

  FB_LINE(1160);
        {
        locals->err = streamOPputs(locals->scr, locals->s);
        if (locals->err != ERR_ok) goto ex_1;
        }
        }}/* end if */
        goto end_1;
        ex_1:
            if ((locals->err == ERR_not_possible)) {
            }
            else {
                goto ex_0;
            }
        end_1:;
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPscript_IB_1 */

/**** END ITERATOR BODIES for script ****/

extern struct dbg_info* dbg_info_streamOPedit;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPedit_TRACE
int streamOPedit_TRACE;
extern errcode streamOPedit_IB_1();
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPedit_own_init = 0;

/**** BEGIN PROCEDURE edit ****/

errcode streamOPedit(tb, term, ret_1)
CLUREF tb;
CLUREF term;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF ch;
        CLUREF bvec;
        CLUREF redisp;
        CLUREF c;
        CLUREF doecho;
        CLUREF s;
        CLUREF nl;
        CLUREF lag;
        CLUREF max;
        CLUREF i;
        CLUREF tb;
        CLUREF term;
        } locals;
    locals.ch.num = UNINIT;
    locals.bvec.num = UNINIT;
    locals.redisp.num = UNINIT;
    locals.c.num = UNINIT;
    locals.doecho.num = UNINIT;
    locals.s.num = UNINIT;
    locals.nl.num = UNINIT;
    locals.lag.num = UNINIT;
    locals.max.num = UNINIT;
    locals.i.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.term.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPedit;
    locals.tb = tb;
    locals.term = term;
        if (streamOPedit_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPedit_own_init = 1;
    }
    enter_proc(1165);

  LINE(1167);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_2.num = locals.tb.vec->data[7];
    T_1_1.num = T_1_2.num;
    if (T_1_2.num) {
        T_1_3.num = locals.tb.vec->data[8];
        T_1_1.num = T_1_3.num;
    }
    if (T_1_1.num == true) {

  LINE(1168);
        {
        {signal (ERR_end_of_file);}}
        }
        }/* end if */

  LINE(1169);
    {
    locals.err = _eventOPdefer();
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(1170);
    {
        {CLUREF T_1_1;
        T_1_1.num = locals.tb.vec->data[2];
        locals.ch.num = T_1_1.num;
        }
        }

  LINE(1171);
    {
        {CLUREF T_1_1;
        T_1_1.num = locals.tb.vec->data[1];
        locals.bvec.num = T_1_1.num;
        }
        }

  LINE(1172);
    locals.redisp.num = UNINIT;

  LINE(1173);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    T_1_2.num = locals.tb.vec->data[11];
    T_1_3.num = (T_1_2.num == 0)? true : false;
    T_1_1.num = T_1_3.num;
    if (!T_1_3.num) {
        T_1_4.num = locals.tb.vec->data[10];
        T_1_1.num = T_1_4.num;
    }
    if (T_1_1.num == true) {

  LINE(1174);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[17];
        locals.err = stringOPsize(T_2_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.tb.vec->data[11]  = T_2_2.num;
        }

  LINE(1175);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        T_2_1.num = locals.tb.vec->data[17];
        T_2_2.num = T_2_1.str;
        T_2_3.num = locals.tb.vec->data[11];
        locals.err = _bytevecOPmove_lr(T_2_2, CLU_1, locals.bvec, CLU_1, T_2_3);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1177);
        {
        locals.redisp.num = 1;
        }
        }
    else {

  LINE(1178);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[4];
        T_2_2.num = locals.tb.vec->data[11];
        locals.err = _chanOPputb(locals.ch, locals.bvec, T_2_1, T_2_2, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1179);
        {
        locals.redisp.num = 0;
        }
        }}/* end if */

  LINE(1181);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.tb.vec->data[11];
    locals.tb.vec->data[4]  = T_1_1.num;
    }

  LINE(1182);
    locals.c.num = UNINIT;

  LINE(1183);
    for (;;) {
        if (true != true) { break; }

  LINE(1184);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        T_4_1.num = (locals.redisp.num == 0)? true : false;
        T_4_2.num = T_4_1.num ^ 1;
        if (T_4_2.num == true) {

  LINE(1185);
            {
            CLUREF T_5_1;
            T_5_1.num = (locals.redisp.num < 0)? true : false;
            if (T_5_1.num == true) {

  LINE(1186);
                {
                CLUREF T_6_1;
                T_6_1.num = locals.tb.vec->data[4];
                locals.redisp.num = T_6_1.num;
                }

  LINE(1187);
                for (;;) {
                    if (true != true) { break; }

  LINE(1188);
                    {
                    CLUREF T_8_1;
                    locals.err = _bytevecOPfetch(locals.bvec, locals.redisp, &T_8_1);
                    if (locals.err != ERR_ok) goto ex_3;
                    locals.c.num = T_8_1.num;
                    }

  LINE(1189);
                    {
                    CLUREF T_8_1;
                    CLUREF T_8_2;
                    CLUREF T_8_3;
                    CLUREF T_8_4;
                    CLUREF T_8_5;
                    T_8_2.ch = '\034';
                    T_8_3.num = (locals.c.ch == T_8_2.ch)? true : false;
                    T_8_1.num = T_8_3.num;
                    if (!T_8_3.num) {
                        T_8_4.ch = '\n';
                        T_8_5.num = (locals.c.ch == T_8_4.ch)? true : false;
                        T_8_1.num = T_8_5.num;
                    }
                    if (T_8_1.num == true) {

  LINE(1190);
                        goto end_while_2;
                        }
                        }/* end if */

  LINE(1191);
                    {
                    CLUREF T_8_1;
                    locals.err = intOPsub(locals.redisp, CLU_1, &T_8_1);
                    if (locals.err != ERR_ok) goto ex_3;
                    locals.redisp.num = T_8_1.num;
                    }
                    }
                    end_while_2:;
                    goto end_3;
                    ex_3:
                        if ((locals.err == ERR_bounds)) {
                        }
                        else {
                            goto ex_2;
                        }
                    end_3:;
                }
            else {

  LINE(1193);
                {
                locals.redisp.num = 0;
                }
                }}/* end if */

  LINE(1195);
            for (;;) {
                CLUREF T_5_1;
                CLUREF T_5_2;
                T_5_1.num = locals.tb.vec->data[4];
                T_5_2.num = (locals.redisp.num < T_5_1.num)? true : false;
                if (T_5_2.num != true) { break; }

  LINE(1196);
                {
                CLUREF T_6_1;
                locals.err = intOPadd(locals.redisp, CLU_1, &T_6_1);
                if (locals.err != ERR_ok) goto ex_2;
                locals.redisp.num = T_6_1.num;
                }

  LINE(1197);
                {
                CLUREF T_6_1;
                locals.err = _bytevecOPfetch(locals.bvec, locals.redisp, &T_6_1);
                if (locals.err != ERR_ok) goto ex_2;
                locals.c.num = T_6_1.num;
                }

  LINE(1198);
                {
                locals.err = streamOPecho(locals.ch, locals.c);
                if (locals.err != ERR_ok) goto ex_2;
                }

  LINE(1199);
                {
                CLUREF T_6_1;
                CLUREF T_6_2;
                T_6_1.ch = '\034';
                T_6_2.num = (locals.c.ch == T_6_1.ch)? true : false;
                if (T_6_2.num == true) {

  LINE(1200);
                    {
                    CLUREF T_7_1;
                    T_7_1.ch = '\n';
                    locals.err = _chanOPputc(locals.ch, T_7_1, CLU_0);
                    if (locals.err != ERR_ok) goto ex_2;
                    }
                    }
                    }/* end if */
                }
                end_while_3:;

  LINE(1202);
            {
            locals.redisp.num = 0;
            }
            }
            }/* end if */

  LINE(1204);
        locals.doecho.num = UNINIT;

  LINE(1205);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        CLUREF T_4_3;
        T_4_1.num = locals.tb.vec->data[18];
        T_4_2.num = (T_4_1.array->ext_size == 0)? true : false;
        T_4_3.num = T_4_2.num ^ 1;
        if (T_4_3.num == true) {

  LINE(1206);
            {
            CLUREF T_5_1;
            CLUREF T_5_2;
            T_5_1.num = locals.tb.vec->data[18];
            locals.err = arrayOPreml(T_5_1, &T_5_2);
            if (locals.err != ERR_ok) goto ex_2;
            locals.c.num = T_5_2.num;
            }

  LINE(1207);
            {
            CLUREF T_5_1;
            T_5_1.num = locals.tb.vec->data[5];
            locals.doecho.num = T_5_1.num;
            }

  LINE(1208);
            {
            locals.tb.vec->data[5]  = false;
            }
            }
        else {

  LINE(1209);
            {
            CLUREF T_5_1;
            locals.err = _chanOPgetc(locals.ch, CLU_1, &T_5_1);
            if (locals.err != ERR_ok) goto ex_2;
            locals.c.num = T_5_1.num;
            }

  LINE(1210);
            {
            locals.doecho.tf = true;
            }
            }}/* end if */

  LINE(1212);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        T_4_1.ch = '\n';
        T_4_2.num = (locals.c.ch == T_4_1.ch)? true : false;
        if (T_4_2.num == true) {

  LINE(1213);
            {
            CLUREF T_5_1;
            CLUREF T_5_2;
            T_5_1.num = locals.tb.vec->data[13];
            locals.err = intOPadd(T_5_1, CLU_1, &T_5_2);
            if (locals.err != ERR_ok) goto ex_2;
            locals.tb.vec->data[13]  = T_5_2.num;
            }
            }
            }/* end if */

  LINE(1214);
        {
        CLUREF T_4_1;
        CLUREF T_4_2;
        locals.err = stringOPindexc(locals.c, locals.term, &T_4_1);
        if (locals.err != ERR_ok) goto ex_2;
        T_4_2.num = (T_4_1.num > 0)? true : false;
        if (T_4_2.num == true) {

  LINE(1215);
            {
            locals.tb.vec->data[5]  = locals.doecho.num;
            }

  LINE(1216);
            {
            CLUREF T_5_1;
            T_5_1.num = locals.tb.vec->data[18];
            locals.err = arrayOPaddl(T_5_1, locals.c);
            if (locals.err != ERR_ok) goto ex_2;
            }

  LINE(1217);
            goto end_while_1;
            }
        else {
        CLUREF T_4_3;
        CLUREF T_4_4;
        T_4_3.ch = '\177';
        T_4_4.num = (locals.c.ch == T_4_3.ch)? true : false;
        if (T_4_4.num == true) {

  LINE(1220);
            {
            CLUREF T_5_1;
            locals.err = streamOPrubout(locals.tb, &T_5_1);
            if (locals.err != ERR_ok) goto ex_2;
            locals.redisp.num = T_5_1.num;
            }
            }
        else {
        CLUREF T_4_5;
        CLUREF T_4_6;
        CLUREF T_4_7;
        CLUREF T_4_8;
        T_4_6.ch = '\004';
        T_4_7.num = (locals.c.ch == T_4_6.ch)? true : false;
        T_4_5.num = T_4_7.num;
        if (T_4_7.num) {
            T_4_8.num = locals.tb.vec->data[8];
            T_4_5.num = T_4_8.num;
        }
        if (T_4_5.num == true) {

  LINE(1222);
            {
            if (locals.doecho.num == true) {

  LINE(1223);
                {
                locals.err = streamOPecho(locals.ch, locals.c);
                if (locals.err != ERR_ok) goto ex_2;
                }
                }
                }/* end if */

  LINE(1224);
            {
                locals.err = ERR_end_of_file;
                goto ex_2;
                }
            }
        else {
        CLUREF T_4_9;
        CLUREF T_4_10;
        T_4_9.ch = '\030';
        T_4_10.num = (locals.c.ch == T_4_9.ch)? true : false;
        if (T_4_10.num == true) {

  LINE(1227);
            {
            CLUREF T_5_1;
            T_5_1.num = locals.tb.vec->data[11];
            locals.tb.vec->data[4]  = T_5_1.num;
            }

  LINE(1228);
            {
            CLUREF T_5_1;
            T_5_1.ch = '\n';
            locals.err = _chanOPputc(locals.ch, T_5_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_2;
            }

  LINE(1229);
            {
            locals.redisp.num = 1;
            }
            }
        else {
        CLUREF T_4_11;
        CLUREF T_4_12;
        T_4_11.ch = '\f';
        T_4_12.num = (locals.c.ch == T_4_11.ch)? true : false;
        if (T_4_12.num == true) {

  LINE(1232);
            {
            CLUREF T_5_1;
            CLUREF T_5_2;
            T_5_1.num = locals.tb.vec->data[2];
            T_5_2.num = locals.tb.vec->data[3];
            locals.err = _chanOPputs(T_5_1, T_5_2, CLU_0);
            if (locals.err != ERR_ok) goto ex_2;
            }

  LINE(1233);
            {
            locals.redisp.num = 1;
            }
            }
        else {
        CLUREF T_4_13;
        CLUREF T_4_14;
        T_4_13.ch = '\022';
        T_4_14.num = (locals.c.ch == T_4_13.ch)? true : false;
        if (T_4_14.num == true) {

  LINE(1236);
            {
            CLUREF T_5_1;
            T_5_1.ch = '\n';
            locals.err = _chanOPputc(locals.ch, T_5_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_2;
            }

  LINE(1237);
            {
            locals.redisp.num = 1;
            }
            }
        else {
        CLUREF T_4_15;
        CLUREF T_4_16;
        T_4_15.ch = '\025';
        T_4_16.num = (locals.c.ch == T_4_15.ch)? true : false;
        if (T_4_16.num == true) {

  LINE(1240);
            {
            CLUREF T_5_1;
            locals.err = streamOPerase(locals.tb, CLU_1, &T_5_1);
            if (locals.err != ERR_ok) goto ex_2;
            locals.redisp.num = T_5_1.num;
            }
            }
        else {
        CLUREF T_4_17;
        CLUREF T_4_18;
        T_4_17.ch = '\027';
        T_4_18.num = (locals.c.ch == T_4_17.ch)? true : false;
        if (T_4_18.num == true) {

  LINE(1243);
            {
            CLUREF T_5_1;
            locals.err = streamOPerase(locals.tb, CLU_0, &T_5_1);
            if (locals.err != ERR_ok) goto ex_2;
            locals.redisp.num = T_5_1.num;
            }
            }
        else {

  LINE(1244);
            {
            if (locals.doecho.num == true) {

  LINE(1245);
                {
                locals.err = streamOPecho(locals.ch, locals.c);
                if (locals.err != ERR_ok) goto ex_2;
                }
                }
                }/* end if */

  LINE(1246);
            {
            CLUREF T_5_1;
            CLUREF T_5_2;
            T_5_1.ch = '\034';
            T_5_2.num = (locals.c.ch == T_5_1.ch)? true : false;
            if (T_5_2.num == true) {

  LINE(1247);
                {
                CLUREF T_6_1;
                T_6_1.ch = '\n';
                locals.err = _chanOPputc(locals.ch, T_6_1, CLU_0);
                if (locals.err != ERR_ok) goto ex_2;
                }
                }
                }/* end if */

  LINE(1248);
            {
            CLUREF T_5_1;
            CLUREF T_5_2;
            T_5_1.num = locals.tb.vec->data[4];
            locals.err = intOPadd(T_5_1, CLU_1, &T_5_2);
            if (locals.err != ERR_ok) goto ex_2;
            locals.tb.vec->data[4]  = T_5_2.num;
            }

  LINE(1249);
            {
            CLUREF T_5_1;
            T_5_1.num = locals.tb.vec->data[4];
            locals.err = _bytevecOPstore(locals.bvec, T_5_1, locals.c);
            if (locals.err != ERR_ok) goto ex_2;
            }
            }}}}}}}}}/* end if */
        }
        end_while_1:;
    goto end_2;
    ex_2:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_1;}
    end_2:;
        goto end_1;
        ex_1:
            if ((locals.err == ERR_end_of_file)) {

  LINE(1254);
                {
                locals.tb.vec->data[7]  = true;
                }

  LINE(1255);
                {
                CLUREF T_2_1;
                CLUREF T_2_2;
                CLUREF T_2_3;
                T_2_1.num = locals.tb.vec->data[4];
                T_2_2.num = locals.tb.vec->data[11];
                T_2_3.num = (T_2_1.num == T_2_2.num)? true : false;
                if (T_2_3.num == true) {

  LINE(1256);
                    {
                    CLUREF T_3_1;
                    CLUREF T_3_2;
                    T_3_1.num = locals.tb.vec->data[11];
                    locals.err = intOPadd(T_3_1, CLU_1, &T_3_2);
                    if (locals.err != ERR_ok) goto ex_0;
                    locals.tb.vec->data[4]  = T_3_2.num;
                    }

  LINE(1257);
                    {
                    {signal (ERR_end_of_file);}}
                    }
                    }/* end if */
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(1260);
    {
        {locals.s = STR_;
        }
        }

  LINE(1261);
    {
        {locals.nl.num = 0;
        }
        }

  LINE(1262);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        T_1_1.num = locals.tb.vec->data[11];
        locals.err = intOPadd(T_1_1, CLU_1, &T_1_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.lag.num = T_1_2.num;
        }
        }

  LINE(1263);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        T_1_1.num = locals.tb.vec->data[4];
        locals.err = intOPadd(T_1_1, CLU_1, &T_1_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.max.num = T_1_2.num;
        }
        }

  LINE(1264);
    {
    CLUREF T_1_1;
    T_1_1.ch = '\034';
    locals.err = _bytevecOPstore(locals.bvec, locals.max, T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(1265);
    {
        locals.err = intOPfrom_to(locals.lag, locals.max, streamOPedit_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        ret_1->num = elist[0].num;
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1276);
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.nl.num > 0)? true : false;
    if (T_1_1.num == true) {

  LINE(1277);
        {
        CLUREF T_2_1;
        locals.err = intOPsub(locals.max, locals.nl, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.tb.vec->data[11]  = T_2_1.num;
        }

  LINE(1278);
        {
        CLUREF T_2_1;
        T_2_1.num = locals.tb.vec->data[11];
        locals.err = _bytevecOPmove_lr(locals.bvec, locals.nl, locals.bvec, CLU_1, T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1279);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[11];
        locals.err = intOPadd(T_2_1, CLU_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.tb.vec->data[4]  = T_2_2.num;
        }
        }
    else {

  LINE(1280);
        {
        CLUREF T_2_1;
        T_2_1.num = locals.tb.vec->data[4];
        locals.tb.vec->data[11]  = T_2_1.num;
        }

  LINE(1281);
        {
        locals.tb.vec->data[4]  = locals.max.num;
        }
        }}/* end if */

  LINE(1283);
    {
    locals.err = _eventOPundefer();
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(1284);
    {
    {
    ret_1->num = locals.s.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE edit ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist2 *sigs;
    Vlist14 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPedit_actual;
static Vlist1 vals_streamOPedit = {0, 1, { {0, 2, "", &string_ops}}
};
static sig_desc0 sig_streamOPedit_1 = {0, 3, "end_of_file", {0, 0
}};
static sig_desc1 sig_streamOPedit_2 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist2 sigs_streamOPedit = {0, 2, (sig_desc*)&sig_streamOPedit_1, (sig_desc*)&sig_streamOPedit_2};
static Vlist14 locals_streamOPedit = {0, 14,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "ch", &_chan_ops},  {0, 2, "bvec", &_bytevec_ops},  {0, 2, "redisp", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "doecho", &bool_ops},  {0, 2, "s", &string_ops},  {0, 2, "nl", &int_ops},  {0, 2, "lag", &int_ops},  {0, 2, "max", &int_ops},  {0, 2, "i", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "term", &string_ops}}
};
static Vlist0 popowns_streamOPedit = {0, 0};
Slist0 tformals_streamOPedit = {0, 0};
Slist0 opformals_streamOPedit = {0, 0};
dbg_info_streamOPedit_actual dbg_info_streamOPedit_data = {0, 12, 
    "streamOPedit", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPedit, 2, 
    &vals_streamOPedit, &sigs_streamOPedit, &locals_streamOPedit, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPedit = (struct dbg_info*)&dbg_info_streamOPedit_data;

/**** BEGIN ITERATOR BODIES for edit ****/

errcode streamOPedit_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF ch;
    CLUREF bvec;
    CLUREF redisp;
    CLUREF c;
    CLUREF doecho;
    CLUREF s;
    CLUREF nl;
    CLUREF lag;
    CLUREF max;
    CLUREF i;
    CLUREF tb;
    CLUREF term;
    } *locals;
{
    locals->i.num = iv_1.num;
    enter_iter_body_proc(1266);

  FB_LINE(1266);
    {
    CLUREF T_1_1;
    locals->err = _bytevecOPfetch(locals->bvec, locals->i, &T_1_1);
    if (locals->err != ERR_ok) goto ex_0;
    locals->c.num = T_1_1.num;
    }

  FB_LINE(1267);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.ch = '\034';
    T_1_2.num = (locals->c.ch == T_1_1.ch)? true : false;
    if (T_1_2.num == true) {

  FB_LINE(1268);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        T_2_1.num = locals->bvec.num;
        locals->err = intOPsub(locals->i, locals->lag, &T_2_2);
        if (locals->err != ERR_ok) goto ex_0;
        locals->err = stringOPsubstr(T_2_1, locals->lag, T_2_2, &T_2_3);
        if (locals->err != ERR_ok) goto ex_0;
        locals->err = stringOPconcat(locals->s, T_2_3, &T_2_4);
        if (locals->err != ERR_ok) goto ex_0;
        locals->s.num = T_2_4.num;
        }

  FB_LINE(1270);
        {
        CLUREF T_2_1;
        locals->err = intOPadd(locals->i, CLU_1, &T_2_1);
        if (locals->err != ERR_ok) goto ex_0;
        locals->lag.num = T_2_1.num;
        }

  FB_LINE(1271);
        {
        CLUREF T_2_1;
        T_2_1.num = (locals->lag.num < locals->max.num)? true : false;
        if (T_2_1.num == true) {

  FB_LINE(1272);
            {
            locals->nl.num = locals->lag.num;
            }
            }
            }/* end if */
        }
    else {
    CLUREF T_1_3;
    CLUREF T_1_4;
    T_1_3.ch = '\n';
    T_1_4.num = (locals->c.ch == T_1_3.ch)? true : false;
    if (T_1_4.num == true) {

  FB_LINE(1274);
        {
        CLUREF T_2_1;
        locals->err = intOPadd(locals->i, CLU_1, &T_2_1);
        if (locals->err != ERR_ok) goto ex_0;
        locals->nl.num = T_2_1.num;
        }
        }
        }}/* end if */
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPedit_IB_1 */

/**** END ITERATOR BODIES for edit ****/

extern struct dbg_info* dbg_info_streamOPecho;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPecho_TRACE
int streamOPecho_TRACE;
extern OWN_req char_ownreqs;
static int streamOPecho_own_init = 0;

/**** BEGIN PROCEDURE echo ****/

errcode streamOPecho(ch, c)
CLUREF ch;
CLUREF c;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF ch;
        CLUREF c;
        } locals;
    locals.ch.num = UNINIT;
    locals.c.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPecho;
    locals.ch = ch;
    locals.c = c;
        if (streamOPecho_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPecho_own_init = 1;
    }
    enter_proc(1287);

  LINE(1288);
    {
    CLUREF T_2_1;
    CLUREF T_2_2;
    T_2_1.ch = '\177';
    locals.err = charOPge(locals.c, T_2_1, &T_2_2);
    if (locals.err != ERR_ok) goto ex_1;
    if (T_2_2.num == true) {

  LINE(1289);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        T_3_1.ch = '\177';
        T_3_2.num = (locals.c.ch == T_3_1.ch)? true : false;
        if (T_3_2.num == true) {

  LINE(1290);
            {
            locals.err = _chanOPputs(locals.ch, STR__136_077, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }
        else {
        CLUREF T_3_3;
        CLUREF T_3_4;
        CLUREF T_3_5;
        CLUREF T_3_6;
        CLUREF T_3_7;
        CLUREF T_3_8;
        CLUREF T_3_9;
        T_3_4.num = (int)(locals.c.ch & 0xff);
        T_3_5.num = 160;
        T_3_6.num = (T_3_4.num < T_3_5.num)? true : false;
        T_3_3.num = T_3_6.num;
        if (!T_3_6.num) {
            T_3_7.num = (int)(locals.c.ch & 0xff);
            T_3_8.num = 255;
            T_3_9.num = (T_3_7.num == T_3_8.num)? true : false;
            T_3_3.num = T_3_9.num;
        }
        if (T_3_3.num == true) {

  LINE(1293);
            {
            CLUREF T_4_1;
            T_4_1.ch = '!';
            locals.err = _chanOPputc(locals.ch, T_4_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(1294);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            CLUREF T_4_4;
            CLUREF T_4_5;
            T_4_1.num = (int)(locals.c.ch & 0xff);
            T_4_2.num = 64;
            locals.err = intOPsub(T_4_1, T_4_2, &T_4_3);
            if (locals.err != ERR_ok) goto ex_1;
            T_4_4.num = 128;
            locals.err = intOPmod(T_4_3, T_4_4, &T_4_5);
            if (locals.err != ERR_ok) goto ex_1;
            locals.err = _chanOPputi(locals.ch, T_4_5, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }
        else {

  LINE(1295);
            {
            CLUREF T_4_1;
            T_4_1.ch = '&';
            locals.err = _chanOPputc(locals.ch, T_4_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(1296);
            {
            CLUREF T_4_1;
            CLUREF T_4_2;
            CLUREF T_4_3;
            T_4_1.num = (int)(locals.c.ch & 0xff);
            T_4_2.num = 128;
            locals.err = intOPsub(T_4_1, T_4_2, &T_4_3);
            if (locals.err != ERR_ok) goto ex_1;
            locals.err = _chanOPputi(locals.ch, T_4_3, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }}}/* end if */
        }
    else {
    CLUREF T_2_3;
    CLUREF T_2_4;
    CLUREF T_2_5;
    CLUREF T_2_6;
    CLUREF T_2_7;
    CLUREF T_2_8;
    CLUREF T_2_9;
    CLUREF T_2_10;
    T_2_5.ch = ' ';
    locals.err = charOPge(locals.c, T_2_5, &T_2_6);
    if (locals.err != ERR_ok) goto ex_1;
    T_2_4.num = T_2_6.num;
    if (!T_2_6.num) {
        T_2_7.ch = '\n';
        T_2_8.num = (locals.c.ch == T_2_7.ch)? true : false;
        T_2_4.num = T_2_8.num;
    }
    T_2_3.num = T_2_4.num;
    if (!T_2_4.num) {
        T_2_9.ch = '\t';
        T_2_10.num = (locals.c.ch == T_2_9.ch)? true : false;
        T_2_3.num = T_2_10.num;
    }
    if (T_2_3.num == true) {

  LINE(1299);
        {
        locals.err = _chanOPputc(locals.ch, locals.c, CLU_0);
        if (locals.err != ERR_ok) goto ex_1;
        }
        }
    else {

  LINE(1300);
        {
        CLUREF T_3_1;
        T_3_1.ch = '^';
        locals.err = _chanOPputc(locals.ch, T_3_1, CLU_0);
        if (locals.err != ERR_ok) goto ex_1;
        }

  LINE(1301);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        CLUREF T_3_3;
        T_3_1.num = (int)(locals.c.ch & 0xff);
        T_3_2.num = 64;
        locals.err = intOPadd(T_3_1, T_3_2, &T_3_3);
        if (locals.err != ERR_ok) goto ex_1;
        locals.err = _chanOPputi(locals.ch, T_3_3, CLU_0);
        if (locals.err != ERR_ok) goto ex_1;
        }
        }}}/* end if */
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE echo ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPecho_actual;
static Vlist0 vals_streamOPecho = {0, 0};
static sig_desc1 sig_streamOPecho_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPecho = {0, 1, (sig_desc*)&sig_streamOPecho_1};
static Vlist4 locals_streamOPecho = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "ch", &_chan_ops},  {0, 2, "c", &char_ops}}
};
static Vlist0 popowns_streamOPecho = {0, 0};
Slist0 tformals_streamOPecho = {0, 0};
Slist0 opformals_streamOPecho = {0, 0};
dbg_info_streamOPecho_actual dbg_info_streamOPecho_data = {0, 12, 
    "streamOPecho", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPecho, 2, 
    &vals_streamOPecho, &sigs_streamOPecho, &locals_streamOPecho, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPecho = (struct dbg_info*)&dbg_info_streamOPecho_data;
extern struct dbg_info* dbg_info_streamOPrubout;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPrubout_TRACE
int streamOPrubout_TRACE;
extern errcode streamOPrubout_IB_1();
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPrubout_own_init = 0;

/**** BEGIN PROCEDURE rubout ****/

errcode streamOPrubout(tb, ret_1)
CLUREF tb;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF c;
        CLUREF cnt;
        CLUREF i;
        CLUREF tb;
        } locals;
    locals.c.num = UNINIT;
    locals.cnt.num = UNINIT;
    locals.i.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPrubout;
    locals.tb = tb;
        if (streamOPrubout_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPrubout_own_init = 1;
    }
    enter_proc(1305);

  LINE(1306);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = locals.tb.vec->data[4];
    T_1_2.num = locals.tb.vec->data[11];
    T_1_3.num = (T_1_1.num <= T_1_2.num)? true : false;
    if (T_1_3.num == true) {

  LINE(1307);
        {
        {
        ret_1->num = 0;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(1308);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        T_1_1.num = locals.tb.vec->data[1];
        T_1_2.num = locals.tb.vec->data[4];
        locals.err = _bytevecOPfetch(T_1_1, T_1_2, &T_1_3);
        if (locals.err != ERR_ok) goto ex_0;
        locals.c.num = T_1_3.num;
        }
        }

  LINE(1309);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.tb.vec->data[4];
    locals.err = intOPsub(T_1_1, CLU_1, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    locals.tb.vec->data[4]  = T_1_2.num;
    }

  LINE(1310);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.tb.vec->data[6];
    T_1_2.num = T_1_1.num ^ 1;
    if (T_1_2.num == true) {

  LINE(1311);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        CLUREF T_2_5;
        T_2_2.ch = '\034';
        T_2_3.num = (locals.c.ch == T_2_2.ch)? true : false;
        T_2_1.num = T_2_3.num;
        if (!T_2_3.num) {
            T_2_4.ch = '\n';
            T_2_5.num = (locals.c.ch == T_2_4.ch)? true : false;
            T_2_1.num = T_2_5.num;
        }
        if (T_2_1.num == true) {

  LINE(1312);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.tb.vec->data[2];
            T_3_2.ch = '\n';
            locals.err = _chanOPputc(T_3_1, T_3_2, CLU_0);
            if (locals.err != ERR_ok) goto ex_0;
            }

  LINE(1313);
            {
            {
            ret_1->num = -1;
            }
            {signal (ERR_ok);}}
            }
            }/* end if */

  LINE(1315);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[2];
        T_2_2.ch = '\\';
        locals.err = _chanOPputc(T_2_1, T_2_2, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1316);
        {
        CLUREF T_2_1;
        T_2_1.num = locals.tb.vec->data[2];
        locals.err = _chanOPputc(T_2_1, locals.c, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1317);
        {
        {
        ret_1->num = 0;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(1319);
    locals.cnt.num = UNINIT;

  LINE(1320);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    T_1_2.ch = ' ';
    locals.err = charOPge(locals.c, T_1_2, &T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_1.num = T_1_3.num;
    if (T_1_3.num) {
        T_1_4.ch = '\177';
        locals.err = charOPlt(locals.c, T_1_4, &T_1_5);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_1.num = T_1_5.num;
    }
    if (T_1_1.num == true) {

  LINE(1321);
        {
        locals.cnt.num = 1;
        }
        }
    else {
    CLUREF T_1_6;
    CLUREF T_1_7;
    T_1_6.ch = '\t';
    T_1_7.num = (locals.c.ch == T_1_6.ch)? true : false;
    if (T_1_7.num == true) {

  LINE(1323);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        locals.err = streamOPcalc_pos(locals.tb, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = intOPmod(T_2_1, CLU_8, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = intOPsub(CLU_8, T_2_2, &T_2_3);
        if (locals.err != ERR_ok) goto ex_0;
        locals.cnt.num = T_2_3.num;
        }
        }
    else {
    CLUREF T_1_8;
    CLUREF T_1_9;
    CLUREF T_1_10;
    CLUREF T_1_11;
    CLUREF T_1_12;
    T_1_9.ch = '\034';
    T_1_10.num = (locals.c.ch == T_1_9.ch)? true : false;
    T_1_8.num = T_1_10.num;
    if (!T_1_10.num) {
        T_1_11.ch = '\n';
        T_1_12.num = (locals.c.ch == T_1_11.ch)? true : false;
        T_1_8.num = T_1_12.num;
    }
    if (T_1_8.num == true) {

  LINE(1325);
        {
        {
        ret_1->num = -1;
        }
        {signal (ERR_ok);}}
        }
    else {

  LINE(1326);
        {
        locals.cnt.num = 2;
        }
        }}}}/* end if */

  LINE(1327);
    {
        CLUREF T_1_1;
        T_1_1.num = -1;
        locals.err = intOPfrom_to_by(locals.cnt, CLU_1, T_1_1, streamOPrubout_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        ret_1->num = elist[0].num;
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1330);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.tb.vec->data[2];
    T_1_2.num = locals.tb.vec->data[12];
    locals.err = _chanOPputs(T_1_1, T_1_2, CLU_0);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(1331);
    {
    {
    ret_1->num = 0;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE rubout ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPrubout_actual;
static Vlist1 vals_streamOPrubout = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_streamOPrubout = {0, 0};
static Vlist6 locals_streamOPrubout = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "cnt", &int_ops},  {0, 2, "i", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops}}
};
static Vlist0 popowns_streamOPrubout = {0, 0};
Slist0 tformals_streamOPrubout = {0, 0};
Slist0 opformals_streamOPrubout = {0, 0};
dbg_info_streamOPrubout_actual dbg_info_streamOPrubout_data = {0, 12, 
    "streamOPrubout", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPrubout, 1, 
    &vals_streamOPrubout, &sigs_streamOPrubout, &locals_streamOPrubout, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPrubout = (struct dbg_info*)&dbg_info_streamOPrubout_data;

/**** BEGIN ITERATOR BODIES for rubout ****/

errcode streamOPrubout_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF c;
    CLUREF cnt;
    CLUREF i;
    CLUREF tb;
    } *locals;
{
    locals->i.num = iv_1.num;
    enter_iter_body_proc(1328);

  FB_LINE(1328);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals->tb.vec->data[2];
    T_1_2.num = locals->tb.vec->data[0];
    locals->err = _chanOPputs(T_1_1, T_1_2, CLU_0);
    if (locals->err != ERR_ok) goto ex_0;
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPrubout_IB_1 */

/**** END ITERATOR BODIES for rubout ****/

extern struct dbg_info* dbg_info_streamOPerase;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPerase_TRACE
int streamOPerase_TRACE;
extern errcode streamOPerase_IB_1();
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPerase_own_init = 0;

/**** BEGIN PROCEDURE erase ****/

errcode streamOPerase(tb, all, ret_1)
CLUREF tb;
CLUREF all;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF redisp;
        CLUREF pre;
        CLUREF post;
        CLUREF c;
        CLUREF wchar;
        CLUREF i;
        CLUREF tb;
        CLUREF all;
        } locals;
    locals.redisp.num = UNINIT;
    locals.pre.num = UNINIT;
    locals.post.num = UNINIT;
    locals.c.num = UNINIT;
    locals.wchar.num = UNINIT;
    locals.i.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.all.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPerase;
    locals.tb = tb;
    locals.all = all;
        if (streamOPerase_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPerase_own_init = 1;
    }
    enter_proc(1334);

  LINE(1335);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = locals.tb.vec->data[4];
    T_1_2.num = locals.tb.vec->data[11];
    T_1_3.num = (T_1_1.num <= T_1_2.num)? true : false;
    if (T_1_3.num == true) {

  LINE(1336);
        {
        {
        ret_1->num = 0;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(1337);
    {
        {locals.redisp.num = 0;
        }
        }

  LINE(1338);
    {
        {CLUREF T_1_1;
        locals.err = streamOPcalc_pos(locals.tb, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.pre.num = T_1_1.num;
        }
        }

  LINE(1339);
    locals.post.num = UNINIT;

  LINE(1340);
    {
    if (locals.all.num == true) {

  LINE(1341);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        CLUREF T_2_5;
        T_2_1.ch = '\034';
        T_2_2.num = locals.tb.vec->data[1];
        T_2_3.num = locals.tb.vec->data[11];
        locals.err = intOPadd(T_2_3, CLU_1, &T_2_4);
        if (locals.err != ERR_ok) goto ex_0;
        locals.err = _bytevecOPindexc(T_2_1, T_2_2, T_2_4, &T_2_5);
        if (locals.err != ERR_ok) goto ex_0;
        locals.post.num = T_2_5.num;
        }

  LINE(1342);
        {
        CLUREF T_2_1;
        T_2_1.num = (locals.post.num == 0)? true : false;
        if (T_2_1.num == true) {

  LINE(1343);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            CLUREF T_3_4;
            CLUREF T_3_5;
            T_3_1.ch = '\n';
            T_3_2.num = locals.tb.vec->data[1];
            T_3_3.num = locals.tb.vec->data[11];
            locals.err = intOPadd(T_3_3, CLU_1, &T_3_4);
            if (locals.err != ERR_ok) goto ex_0;
            locals.err = _bytevecOPindexc(T_3_1, T_3_2, T_3_4, &T_3_5);
            if (locals.err != ERR_ok) goto ex_0;
            locals.post.num = T_3_5.num;
            }
            }
            }/* end if */

  LINE(1345);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        T_2_2.num = (locals.post.num > 0)? true : false;
        T_2_1.num = T_2_2.num;
        if (T_2_2.num) {
            T_2_3.num = locals.tb.vec->data[4];
            T_2_4.num = (locals.post.num <= T_2_3.num)? true : false;
            T_2_1.num = T_2_4.num;
        }
        if (T_2_1.num == true) {

  LINE(1346);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.tb.vec->data[2];
            T_3_2.ch = '\n';
            locals.err = _chanOPputc(T_3_1, T_3_2, CLU_0);
            if (locals.err != ERR_ok) goto ex_0;
            }

  LINE(1347);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.tb.vec->data[11];
            locals.tb.vec->data[4]  = T_3_1.num;
            }

  LINE(1348);
            {
            {
            ret_1->num = -1;
            }
            {signal (ERR_ok);}}
            }
            }/* end if */

  LINE(1350);
        {
        CLUREF T_2_1;
        T_2_1.num = locals.tb.vec->data[11];
        locals.tb.vec->data[4]  = T_2_1.num;
        }

  LINE(1351);
        {
        CLUREF T_2_1;
        locals.err = streamOPcalc_pos(locals.tb, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.post.num = T_2_1.num;
        }
        }
    else {

  LINE(1352);
        for (;;) {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            T_2_1.num = locals.tb.vec->data[4];
            T_2_2.num = locals.tb.vec->data[11];
            T_2_3.num = (T_2_1.num > T_2_2.num)? true : false;
            if (T_2_3.num != true) { break; }

  LINE(1353);
            {
                {CLUREF T_3_1;
                CLUREF T_3_2;
                CLUREF T_3_3;
                T_3_1.num = locals.tb.vec->data[1];
                T_3_2.num = locals.tb.vec->data[4];
                locals.err = _bytevecOPfetch(T_3_1, T_3_2, &T_3_3);
                if (locals.err != ERR_ok) goto ex_0;
                locals.c.num = T_3_3.num;
                }
                }

  LINE(1354);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.ch = '\034';
            T_3_2.num = (locals.c.ch == T_3_1.ch)? true : false;
            if (T_3_2.num == true) {

  LINE(1355);
                {
                locals.redisp.num = -1;
                }

  LINE(1356);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                T_4_1.num = locals.tb.vec->data[4];
                locals.err = intOPsub(T_4_1, CLU_1, &T_4_2);
                if (locals.err != ERR_ok) goto ex_0;
                locals.tb.vec->data[4]  = T_4_2.num;
                }

  LINE(1357);
                continue;
                }
            else {
            CLUREF T_3_3;
            CLUREF T_3_4;
            T_3_3.ch = '\n';
            T_3_4.num = (locals.c.ch == T_3_3.ch)? true : false;
            if (T_3_4.num == true) {

  LINE(1359);
                {
                locals.redisp.num = -1;
                }
                }
                }}/* end if */

  LINE(1360);
            {
                {CLUREF T_3_1;
                CLUREF T_3_2;
                CLUREF T_3_3;
                CLUREF T_3_4;
                CLUREF T_3_5;
                CLUREF T_3_6;
                CLUREF T_3_7;
                CLUREF T_3_8;
                CLUREF T_3_9;
                CLUREF T_3_10;
                CLUREF T_3_11;
                CLUREF T_3_12;
                CLUREF T_3_13;
                CLUREF T_3_14;
                CLUREF T_3_15;
                CLUREF T_3_16;
                CLUREF T_3_17;
                CLUREF T_3_18;
                CLUREF T_3_19;
                CLUREF T_3_20;
                T_3_5.ch = 'a';
                locals.err = charOPge(locals.c, T_3_5, &T_3_6);
                if (locals.err != ERR_ok) goto ex_0;
                T_3_4.num = T_3_6.num;
                if (T_3_6.num) {
                    T_3_7.ch = 'z';
                    locals.err = charOPle(locals.c, T_3_7, &T_3_8);
                    if (locals.err != ERR_ok) goto ex_0;
                    T_3_4.num = T_3_8.num;
                }
                T_3_3.num = T_3_4.num;
                if (!T_3_4.num) {
                    T_3_10.ch = '0';
                    locals.err = charOPge(locals.c, T_3_10, &T_3_11);
                    if (locals.err != ERR_ok) goto ex_0;
                    T_3_9.num = T_3_11.num;
                    if (T_3_11.num) {
                        T_3_12.ch = '9';
                        locals.err = charOPle(locals.c, T_3_12, &T_3_13);
                        if (locals.err != ERR_ok) goto ex_0;
                        T_3_9.num = T_3_13.num;
                    }
                    T_3_3.num = T_3_9.num;
                }
                T_3_2.num = T_3_3.num;
                if (!T_3_3.num) {
                    T_3_15.ch = 'A';
                    locals.err = charOPge(locals.c, T_3_15, &T_3_16);
                    if (locals.err != ERR_ok) goto ex_0;
                    T_3_14.num = T_3_16.num;
                    if (T_3_16.num) {
                        T_3_17.ch = 'Z';
                        locals.err = charOPle(locals.c, T_3_17, &T_3_18);
                        if (locals.err != ERR_ok) goto ex_0;
                        T_3_14.num = T_3_18.num;
                    }
                    T_3_2.num = T_3_14.num;
                }
                T_3_1.num = T_3_2.num;
                if (!T_3_2.num) {
                    T_3_19.ch = '_';
                    T_3_20.num = (locals.c.ch == T_3_19.ch)? true : false;
                    T_3_1.num = T_3_20.num;
                }
                locals.wchar.num = T_3_1.num;
                }
                }

  LINE(1364);
            {
            CLUREF T_3_1;
            T_3_1.num = locals.all.num ^ 1;
            if (T_3_1.num == true) {

  LINE(1365);
                {
                locals.all.num = locals.wchar.num;
                }
                }
            else {
            CLUREF T_3_2;
            T_3_2.num = locals.wchar.num ^ 1;
            if (T_3_2.num == true) {

  LINE(1367);
                goto end_while_1;
                }
                }}/* end if */

  LINE(1368);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            T_3_1.num = locals.tb.vec->data[4];
            locals.err = intOPsub(T_3_1, CLU_1, &T_3_2);
            if (locals.err != ERR_ok) goto ex_0;
            locals.tb.vec->data[4]  = T_3_2.num;
            }
            }
            end_while_1:;

  LINE(1370);
        {
        CLUREF T_2_1;
        T_2_1.num = (locals.redisp.num < 0)? true : false;
        if (T_2_1.num == true) {

  LINE(1371);
            {
            locals.post.num = 0;
            }
            }
        else {

  LINE(1372);
            {
            CLUREF T_3_1;
            locals.err = streamOPcalc_pos(locals.tb, &T_3_1);
            if (locals.err != ERR_ok) goto ex_0;
            locals.post.num = T_3_1.num;
            }
            }}/* end if */
        }}/* end if */

  LINE(1375);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.tb.vec->data[6];
    T_1_2.num = T_1_1.num ^ 1;
    if (T_1_2.num == true) {

  LINE(1376);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = locals.tb.vec->data[2];
        T_2_2.ch = '\n';
        locals.err = _chanOPputc(T_2_1, T_2_2, CLU_0);
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1377);
        {
        {
        ret_1->num = -1;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(1379);
    {
        CLUREF T_1_1;
        CLUREF T_1_2;
        locals.err = intOPsub(locals.pre, locals.post, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        T_1_2.num = -1;
        locals.err = intOPfrom_to_by(T_1_1, CLU_1, T_1_2, streamOPerase_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        ret_1->num = elist[0].num;
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1382);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.tb.vec->data[2];
    T_1_2.num = locals.tb.vec->data[12];
    locals.err = _chanOPputs(T_1_1, T_1_2, CLU_0);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(1383);
    {
    {
    ret_1->num = locals.redisp.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE erase ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist10 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPerase_actual;
static Vlist1 vals_streamOPerase = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_streamOPerase = {0, 0};
static Vlist10 locals_streamOPerase = {0, 10,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "redisp", &int_ops},  {0, 2, "pre", &int_ops},  {0, 2, "post", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "wchar", &bool_ops},  {0, 2, "i", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "all", &bool_ops}}
};
static Vlist0 popowns_streamOPerase = {0, 0};
Slist0 tformals_streamOPerase = {0, 0};
Slist0 opformals_streamOPerase = {0, 0};
dbg_info_streamOPerase_actual dbg_info_streamOPerase_data = {0, 12, 
    "streamOPerase", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPerase, 2, 
    &vals_streamOPerase, &sigs_streamOPerase, &locals_streamOPerase, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPerase = (struct dbg_info*)&dbg_info_streamOPerase_data;

/**** BEGIN ITERATOR BODIES for erase ****/

errcode streamOPerase_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF redisp;
    CLUREF pre;
    CLUREF post;
    CLUREF c;
    CLUREF wchar;
    CLUREF i;
    CLUREF tb;
    CLUREF all;
    } *locals;
{
    locals->i.num = iv_1.num;
    enter_iter_body_proc(1380);

  FB_LINE(1380);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals->tb.vec->data[2];
    T_1_2.num = locals->tb.vec->data[0];
    locals->err = _chanOPputs(T_1_1, T_1_2, CLU_0);
    if (locals->err != ERR_ok) goto ex_0;
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPerase_IB_1 */

/**** END ITERATOR BODIES for erase ****/

extern struct dbg_info* dbg_info_streamOPcalc_pos;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPcalc_pos_TRACE
int streamOPcalc_pos_TRACE;
extern errcode streamOPcalc_pos_IB_1();
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPcalc_pos_own_init = 0;

/**** BEGIN PROCEDURE calc_pos ****/

errcode streamOPcalc_pos(tb, ret_1)
CLUREF tb;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF pos;
        CLUREF i;
        CLUREF c;
        CLUREF tb;
        } locals;
    locals.pos.num = UNINIT;
    locals.i.num = UNINIT;
    locals.c.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPcalc_pos;
    locals.tb = tb;
        if (streamOPcalc_pos_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPcalc_pos_own_init = 1;
    }
    enter_proc(1386);

  LINE(1387);
    {
        {locals.pos.num = 0;
        }
        }

  LINE(1388);
    {
        CLUREF T_1_1;
        T_1_1.num = locals.tb.vec->data[4];
        locals.err = intOPfrom_to(CLU_1, T_1_1, streamOPcalc_pos_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        ret_1->num = elist[0].num;
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1398);
    {
    {
    ret_1->num = locals.pos.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE calc_pos ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPcalc_pos_actual;
static Vlist1 vals_streamOPcalc_pos = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_streamOPcalc_pos = {0, 0};
static Vlist6 locals_streamOPcalc_pos = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "pos", &int_ops},  {0, 2, "i", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops}}
};
static Vlist0 popowns_streamOPcalc_pos = {0, 0};
Slist0 tformals_streamOPcalc_pos = {0, 0};
Slist0 opformals_streamOPcalc_pos = {0, 0};
dbg_info_streamOPcalc_pos_actual dbg_info_streamOPcalc_pos_data = {0, 12, 
    "streamOPcalc_pos", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPcalc_pos, 1, 
    &vals_streamOPcalc_pos, &sigs_streamOPcalc_pos, &locals_streamOPcalc_pos, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPcalc_pos = (struct dbg_info*)&dbg_info_streamOPcalc_pos_data;

/**** BEGIN ITERATOR BODIES for calc_pos ****/

errcode streamOPcalc_pos_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF pos;
    CLUREF i;
    CLUREF c;
    CLUREF tb;
    } *locals;
{
    locals->i.num = iv_1.num;
    enter_iter_body_proc(1389);

  FB_LINE(1389);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        T_1_1.num = locals->tb.vec->data[1];
        locals->err = _bytevecOPfetch(T_1_1, locals->i, &T_1_2);
        if (locals->err != ERR_ok) goto ex_0;
        locals->c.num = T_1_2.num;
        }
        }

  FB_LINE(1390);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    CLUREF T_1_5;
    T_1_2.ch = ' ';
    locals->err = charOPge(locals->c, T_1_2, &T_1_3);
    if (locals->err != ERR_ok) goto ex_0;
    T_1_1.num = T_1_3.num;
    if (T_1_3.num) {
        T_1_4.ch = '\177';
        locals->err = charOPlt(locals->c, T_1_4, &T_1_5);
        if (locals->err != ERR_ok) goto ex_0;
        T_1_1.num = T_1_5.num;
    }
    if (T_1_1.num == true) {

  FB_LINE(1391);
        {
        CLUREF T_2_1;
        locals->err = intOPadd(locals->pos, CLU_1, &T_2_1);
        if (locals->err != ERR_ok) goto ex_0;
        locals->pos.num = T_2_1.num;
        }
        }
    else {
    CLUREF T_1_6;
    CLUREF T_1_7;
    T_1_6.ch = '\t';
    T_1_7.num = (locals->c.ch == T_1_6.ch)? true : false;
    if (T_1_7.num == true) {

  FB_LINE(1393);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        locals->err = intOPadd(locals->pos, CLU_8, &T_2_1);
        if (locals->err != ERR_ok) goto ex_0;
        locals->err = intOPmod(locals->pos, CLU_8, &T_2_2);
        if (locals->err != ERR_ok) goto ex_0;
        locals->err = intOPsub(T_2_1, T_2_2, &T_2_3);
        if (locals->err != ERR_ok) goto ex_0;
        locals->pos.num = T_2_3.num;
        }
        }
    else {
    CLUREF T_1_8;
    CLUREF T_1_9;
    CLUREF T_1_10;
    CLUREF T_1_11;
    CLUREF T_1_12;
    T_1_9.ch = '\034';
    T_1_10.num = (locals->c.ch == T_1_9.ch)? true : false;
    T_1_8.num = T_1_10.num;
    if (!T_1_10.num) {
        T_1_11.ch = '\n';
        T_1_12.num = (locals->c.ch == T_1_11.ch)? true : false;
        T_1_8.num = T_1_12.num;
    }
    if (T_1_8.num == true) {

  FB_LINE(1395);
        {
        locals->pos.num = 0;
        }
        }
    else {

  FB_LINE(1396);
        {
        CLUREF T_2_1;
        locals->err = intOPadd(locals->pos, CLU_2, &T_2_1);
        if (locals->err != ERR_ok) goto ex_0;
        locals->pos.num = T_2_1.num;
        }
        }}}}/* end if */
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOPcalc_pos_IB_1 */

/**** END ITERATOR BODIES for calc_pos ****/

extern struct dbg_info* dbg_info_streamOPdisplay;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPdisplay_TRACE
int streamOPdisplay_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPdisplay_own_init = 0;

/**** BEGIN PROCEDURE display ****/

errcode streamOPdisplay(st, s, ret_1)
CLUREF st;
CLUREF s;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        CLUREF s;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPdisplay;
    locals.st = st;
    locals.s = s;
        if (streamOPdisplay_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPdisplay_own_init = 1;
    }
    enter_proc(1401);

  LINE(1403);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 6: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.tb.num = T_2_2.num;

  LINE(1405);
            {
            locals.err = streamOPflush(locals.st);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(1406);
            {
            {
            CLUREF T_3_1;
            locals.err = streamOPttydsp(locals.tb, locals.s, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            ret_1->num = T_3_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 7: 
    case 3: 
    case 4: 
         {

  LINE(1408);
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(1410);
            {
            elist[0] = STR_cannot_040write_040to_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE display ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPdisplay_actual;
static Vlist1 vals_streamOPdisplay = {0, 1, { {0, 2, "", &bool_ops}}
};
static sig_desc1 sig_streamOPdisplay_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPdisplay = {0, 1, (sig_desc*)&sig_streamOPdisplay_1};
static Vlist5 locals_streamOPdisplay = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "s", &string_ops}}
};
static Vlist0 popowns_streamOPdisplay = {0, 0};
Slist0 tformals_streamOPdisplay = {0, 0};
Slist0 opformals_streamOPdisplay = {0, 0};
dbg_info_streamOPdisplay_actual dbg_info_streamOPdisplay_data = {0, 12, 
    "streamOPdisplay", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPdisplay, 2, 
    &vals_streamOPdisplay, &sigs_streamOPdisplay, &locals_streamOPdisplay, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPdisplay = (struct dbg_info*)&dbg_info_streamOPdisplay_data;
extern struct dbg_info* dbg_info_streamOPmodify_display;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPmodify_display_TRACE
int streamOPmodify_display_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPmodify_display_own_init = 0;

/**** BEGIN PROCEDURE modify_display ****/

errcode streamOPmodify_display(st, term)
CLUREF st;
CLUREF term;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        CLUREF term;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.term.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPmodify_display;
    locals.st = st;
    locals.term = term;
        if (streamOPmodify_display_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPmodify_display_own_init = 1;
    }
    enter_proc(1414);

  LINE(1415);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1417);
            {
            locals.tb.vec->data[6]  = false;
            }

  LINE(1418);
            {
            locals.tb.vec->data[0]  = STR_.num;
            }

  LINE(1419);
            {
            locals.tb.vec->data[12]  = STR_.num;
            }

  LINE(1420);
            {
            locals.tb.vec->data[3]  = STR_.num;
            }

  LINE(1421);
            {
            locals.err = streamOPtermcap(locals.tb, locals.term);
            if (locals.err != ERR_ok) goto ex_0;
            }
            break;
            }
    default: {

  LINE(1423);
        {
        elist[0] = STR_not_040a_040terminal_040stream;
        {signal (ERR_not_possible);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE modify_display ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPmodify_display_actual;
static Vlist0 vals_streamOPmodify_display = {0, 0};
static sig_desc1 sig_streamOPmodify_display_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPmodify_display = {0, 1, (sig_desc*)&sig_streamOPmodify_display_1};
static Vlist5 locals_streamOPmodify_display = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "term", &string_ops}}
};
static Vlist0 popowns_streamOPmodify_display = {0, 0};
Slist0 tformals_streamOPmodify_display = {0, 0};
Slist0 opformals_streamOPmodify_display = {0, 0};
dbg_info_streamOPmodify_display_actual dbg_info_streamOPmodify_display_data = {0, 12, 
    "streamOPmodify_display", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPmodify_display, 2, 
    &vals_streamOPmodify_display, &sigs_streamOPmodify_display, &locals_streamOPmodify_display, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPmodify_display = (struct dbg_info*)&dbg_info_streamOPmodify_display_data;
extern struct dbg_info* dbg_info_streamOPttydsp;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPttydsp_TRACE
int streamOPttydsp_TRACE;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
static int streamOPttydsp_own_init = 0;

/**** BEGIN PROCEDURE ttydsp ****/

errcode streamOPttydsp(tb, s, ret_1)
CLUREF tb;
CLUREF s;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF ch;
        CLUREF i;
        CLUREF max;
        CLUREF c;
        CLUREF tb;
        CLUREF s;
        } locals;
    locals.ch.num = UNINIT;
    locals.i.num = UNINIT;
    locals.max.num = UNINIT;
    locals.c.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.s.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPttydsp;
    locals.tb = tb;
    locals.s = s;
        if (streamOPttydsp_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPttydsp_own_init = 1;
    }
    enter_proc(1427);

  LINE(1428);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = locals.tb.vec->data[6];
    T_1_2.num = T_1_1.num ^ 1;
    if (T_1_2.num == true) {

  LINE(1429);
        {
        {
        ret_1->tf = false;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(1430);
    {
        {CLUREF T_1_1;
        T_1_1.num = locals.tb.vec->data[2];
        locals.ch.num = T_1_1.num;
        }
        }

  LINE(1431);
    {
        {locals.i.num = 1;
        }
        }

  LINE(1432);
    {
        {CLUREF T_1_1;
        locals.err = stringOPsize(locals.s, &T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.max.num = T_1_1.num;
        }
        }

  LINE(1433);
    for (;;) {
        CLUREF T_2_1;
        T_2_1.num = (locals.i.num <= locals.max.num)? true : false;
        if (T_2_1.num != true) { break; }

  LINE(1434);
        {
            {CLUREF T_3_1;
            locals.err = stringOPfetch(locals.s, locals.i, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.c.num = T_3_1.num;
            }
            }

  LINE(1435);
        {
        CLUREF T_3_1;
        locals.err = intOPadd(locals.i, CLU_1, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.i.num = T_3_1.num;
        }

  LINE(1436);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        CLUREF T_3_3;
        CLUREF T_3_4;
        CLUREF T_3_5;
        T_3_2.ch = '\020';
        T_3_3.num = (locals.c.ch == T_3_2.ch)? true : false;
        T_3_1.num = T_3_3.num;
        if (T_3_3.num) {
            T_3_4.num = (locals.i.num <= locals.max.num)? true : false;
            T_3_1.num = T_3_4.num;
        }
        T_3_5.num = T_3_1.num ^ 1;
        if (T_3_5.num == true) {

  LINE(1437);
            {
            locals.err = _chanOPputc(locals.ch, locals.c, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(1438);
            continue;
            }
            }/* end if */

  LINE(1440);
        {
        CLUREF T_3_1;
        locals.err = stringOPfetch(locals.s, locals.i, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.c.num = T_3_1.num;
        }

  LINE(1441);
        {
        CLUREF T_3_1;
        locals.err = intOPadd(locals.i, CLU_1, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.i.num = T_3_1.num;
        }

  LINE(1442);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        T_3_1.ch = 'C';
        T_3_2.num = (locals.c.ch == T_3_1.ch)? true : false;
        if (T_3_2.num == true) {

  LINE(1443);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.tb.vec->data[3];
            locals.err = _chanOPputs(locals.ch, T_4_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }
        else {
        CLUREF T_3_3;
        CLUREF T_3_4;
        T_3_3.ch = 'B';
        T_3_4.num = (locals.c.ch == T_3_3.ch)? true : false;
        if (T_3_4.num == true) {

  LINE(1445);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.tb.vec->data[0];
            locals.err = _chanOPputs(locals.ch, T_4_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }
        else {
        CLUREF T_3_5;
        CLUREF T_3_6;
        T_3_5.ch = 'L';
        T_3_6.num = (locals.c.ch == T_3_5.ch)? true : false;
        if (T_3_6.num == true) {

  LINE(1447);
            {
            CLUREF T_4_1;
            T_4_1.num = locals.tb.vec->data[12];
            locals.err = _chanOPputs(locals.ch, T_4_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }
        else {

  LINE(1448);
            {
            CLUREF T_4_1;
            T_4_1.ch = '\020';
            locals.err = _chanOPputc(locals.ch, T_4_1, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }

  LINE(1449);
            {
            locals.err = _chanOPputc(locals.ch, locals.c, CLU_0);
            if (locals.err != ERR_ok) goto ex_1;
            }
            }}}}/* end if */
        }
        end_while_1:;
        goto end_1;
        ex_1:
            if ((locals.err == ERR_not_possible)) {

  LINE(1451);
                {
                {
                ret_1->tf = false;
                }
                {signal (ERR_ok);}}
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(1452);
    {
    {
    ret_1->tf = true;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE ttydsp ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist8 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPttydsp_actual;
static Vlist1 vals_streamOPttydsp = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPttydsp = {0, 0};
static Vlist8 locals_streamOPttydsp = {0, 8,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "ch", &_chan_ops},  {0, 2, "i", &int_ops},  {0, 2, "max", &int_ops},  {0, 2, "c", &char_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "s", &string_ops}}
};
static Vlist0 popowns_streamOPttydsp = {0, 0};
Slist0 tformals_streamOPttydsp = {0, 0};
Slist0 opformals_streamOPttydsp = {0, 0};
dbg_info_streamOPttydsp_actual dbg_info_streamOPttydsp_data = {0, 12, 
    "streamOPttydsp", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPttydsp, 2, 
    &vals_streamOPttydsp, &sigs_streamOPttydsp, &locals_streamOPttydsp, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPttydsp = (struct dbg_info*)&dbg_info_streamOPttydsp_data;
extern struct dbg_info* dbg_info_streamOPget_prompt;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_prompt_TRACE
int streamOPget_prompt_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_prompt_own_init = 0;

/**** BEGIN PROCEDURE get_prompt ****/

errcode streamOPget_prompt(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_prompt;
    locals.st = st;
        if (streamOPget_prompt_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_prompt_own_init = 1;
    }
    enter_proc(1455);

  LINE(1456);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1458);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[17];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(1460);
        {
        {
        ret_1->str = STR_.str;
        }
        {signal (ERR_ok);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_prompt ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_prompt_actual;
static Vlist1 vals_streamOPget_prompt = {0, 1, { {0, 2, "", &string_ops}}
};
static siglist0 sigs_streamOPget_prompt = {0, 0};
static Vlist4 locals_streamOPget_prompt = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_prompt = {0, 0};
Slist0 tformals_streamOPget_prompt = {0, 0};
Slist0 opformals_streamOPget_prompt = {0, 0};
dbg_info_streamOPget_prompt_actual dbg_info_streamOPget_prompt_data = {0, 12, 
    "streamOPget_prompt", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_prompt, 1, 
    &vals_streamOPget_prompt, &sigs_streamOPget_prompt, &locals_streamOPget_prompt, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_prompt = (struct dbg_info*)&dbg_info_streamOPget_prompt_data;
extern struct dbg_info* dbg_info_streamOPset_prompt;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPset_prompt_TRACE
int streamOPset_prompt_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPset_prompt_own_init = 0;

/**** BEGIN PROCEDURE set_prompt ****/

errcode streamOPset_prompt(st, prompt)
CLUREF st;
CLUREF prompt;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        CLUREF prompt;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.prompt.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPset_prompt;
    locals.st = st;
    locals.prompt = prompt;
        if (streamOPset_prompt_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPset_prompt_own_init = 1;
    }
    enter_proc(1464);

  LINE(1465);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1467);
            {
            locals.tb.vec->data[17]  = locals.prompt.num;
            }
            break;
            }
    default: {
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE set_prompt ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPset_prompt_actual;
static Vlist0 vals_streamOPset_prompt = {0, 0};
static siglist0 sigs_streamOPset_prompt = {0, 0};
static Vlist5 locals_streamOPset_prompt = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "prompt", &string_ops}}
};
static Vlist0 popowns_streamOPset_prompt = {0, 0};
Slist0 tformals_streamOPset_prompt = {0, 0};
Slist0 opformals_streamOPset_prompt = {0, 0};
dbg_info_streamOPset_prompt_actual dbg_info_streamOPset_prompt_data = {0, 12, 
    "streamOPset_prompt", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPset_prompt, 2, 
    &vals_streamOPset_prompt, &sigs_streamOPset_prompt, &locals_streamOPset_prompt, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPset_prompt = (struct dbg_info*)&dbg_info_streamOPset_prompt_data;
extern struct dbg_info* dbg_info_streamOPget_rescan;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_rescan_TRACE
int streamOPget_rescan_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_rescan_own_init = 0;

/**** BEGIN PROCEDURE get_rescan ****/

errcode streamOPget_rescan(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF s;
        CLUREF st;
        } locals;
    locals.tb.num = UNINIT;
    locals.s.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_rescan;
    locals.st = st;
        if (streamOPget_rescan_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_rescan_own_init = 1;
    }
    enter_proc(1472);

  LINE(1473);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1475);
            {
                {CLUREF T_2_1;
                CLUREF T_2_2;
                T_2_1.num = locals.tb.vec->data[18];
                locals.err = stringOPac2s(T_2_1, &T_2_2);
                if (locals.err != ERR_ok) goto ex_0;
                locals.s.num = T_2_2.num;
                }
                }

  LINE(1476);
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[5];
            if (T_2_1.num == true) {

  LINE(1477);
                {
                CLUREF T_3_1;
                locals.err = stringOPrest(locals.s, CLU_2, &T_3_1);
                if (locals.err != ERR_ok) goto ex_0;
                locals.s.num = T_3_1.num;
                }
                }
                }/* end if */

  LINE(1478);
            {
            {
            ret_1->num = locals.s.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(1480);
        {
        {
        ret_1->str = STR_.str;
        }
        {signal (ERR_ok);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_rescan ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_rescan_actual;
static Vlist1 vals_streamOPget_rescan = {0, 1, { {0, 2, "", &string_ops}}
};
static siglist0 sigs_streamOPget_rescan = {0, 0};
static Vlist5 locals_streamOPget_rescan = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "s", &string_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_rescan = {0, 0};
Slist0 tformals_streamOPget_rescan = {0, 0};
Slist0 opformals_streamOPget_rescan = {0, 0};
dbg_info_streamOPget_rescan_actual dbg_info_streamOPget_rescan_data = {0, 12, 
    "streamOPget_rescan", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_rescan, 1, 
    &vals_streamOPget_rescan, &sigs_streamOPget_rescan, &locals_streamOPget_rescan, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_rescan = (struct dbg_info*)&dbg_info_streamOPget_rescan_data;
extern struct dbg_info* dbg_info_streamOPset_rescan;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPset_rescan_TRACE
int streamOPset_rescan_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPset_rescan_own_init = 0;

/**** BEGIN PROCEDURE set_rescan ****/

errcode streamOPset_rescan(st, s)
CLUREF st;
CLUREF s;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF scan;
        CLUREF st;
        CLUREF s;
        } locals;
    locals.tb.num = UNINIT;
    locals.scan.num = UNINIT;
    locals.st.num = UNINIT;
    locals.s.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPset_rescan;
    locals.st = st;
    locals.s = s;
        if (streamOPset_rescan_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPset_rescan_own_init = 1;
    }
    enter_proc(1484);

  LINE(1485);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1487);
            {
                {CLUREF T_2_1;
                locals.err = stringOPs2ac(locals.s, &T_2_1);
                if (locals.err != ERR_ok) goto ex_0;
                locals.scan.num = T_2_1.num;
                }
                }

  LINE(1488);
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[5];
            if (T_2_1.num == true) {

  LINE(1489);
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                T_3_1.num = locals.tb.vec->data[18];
                locals.err = arrayOPbottom(T_3_1, &T_3_2);
                if (locals.err != ERR_ok) goto ex_0;
                locals.err = arrayOPaddl(locals.scan, T_3_2);
                if (locals.err != ERR_ok) goto ex_0;
                }
                }
                }/* end if */

  LINE(1490);
            {
            locals.tb.vec->data[18]  = locals.scan.num;
            }
            break;
            }
    default: {

  LINE(1492);
        {
        elist[0] = STR_cannot_040rescan_040on_040this_040stream;
        {signal (ERR_not_possible);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE set_rescan ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPset_rescan_actual;
static Vlist0 vals_streamOPset_rescan = {0, 0};
static sig_desc1 sig_streamOPset_rescan_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPset_rescan = {0, 1, (sig_desc*)&sig_streamOPset_rescan_1};
static Vlist6 locals_streamOPset_rescan = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "scan", &array_of_char_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "s", &string_ops}}
};
static Vlist0 popowns_streamOPset_rescan = {0, 0};
Slist0 tformals_streamOPset_rescan = {0, 0};
Slist0 opformals_streamOPset_rescan = {0, 0};
dbg_info_streamOPset_rescan_actual dbg_info_streamOPset_rescan_data = {0, 12, 
    "streamOPset_rescan", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPset_rescan, 2, 
    &vals_streamOPset_rescan, &sigs_streamOPset_rescan, &locals_streamOPset_rescan, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPset_rescan = (struct dbg_info*)&dbg_info_streamOPset_rescan_data;
extern struct dbg_info* dbg_info_streamOPget_input_buffered;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_input_buffered_TRACE
int streamOPget_input_buffered_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_input_buffered_own_init = 0;

/**** BEGIN PROCEDURE get_input_buffered ****/

errcode streamOPget_input_buffered(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_input_buffered;
    locals.st = st;
        if (streamOPget_input_buffered_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_input_buffered_own_init = 1;
    }
    enter_proc(1496);

  LINE(1497);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 5: 
    case 2: 
    case 3: 
         {

  LINE(1499);
            {
            {
            ret_1->tf = true;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1501);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[9];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(1503);
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            break;
            }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_input_buffered ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_input_buffered_actual;
static Vlist1 vals_streamOPget_input_buffered = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPget_input_buffered = {0, 0};
static Vlist4 locals_streamOPget_input_buffered = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_input_buffered = {0, 0};
Slist0 tformals_streamOPget_input_buffered = {0, 0};
Slist0 opformals_streamOPget_input_buffered = {0, 0};
dbg_info_streamOPget_input_buffered_actual dbg_info_streamOPget_input_buffered_data = {0, 12, 
    "streamOPget_input_buffered", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_input_buffered, 1, 
    &vals_streamOPget_input_buffered, &sigs_streamOPget_input_buffered, &locals_streamOPget_input_buffered, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_input_buffered = (struct dbg_info*)&dbg_info_streamOPget_input_buffered_data;
extern struct dbg_info* dbg_info_streamOPset_input_buffered;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPset_input_buffered_TRACE
int streamOPset_input_buffered_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPset_input_buffered_own_init = 0;

/**** BEGIN PROCEDURE set_input_buffered ****/

errcode streamOPset_input_buffered(st, flag)
CLUREF st;
CLUREF flag;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        CLUREF flag;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.flag.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPset_input_buffered;
    locals.st = st;
    locals.flag = flag;
        if (streamOPset_input_buffered_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPset_input_buffered_own_init = 1;
    }
    enter_proc(1507);

  LINE(1508);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 5: 
    case 2: 
    case 3: 
         {

  LINE(1510);
            {
            CLUREF T_2_1;
            T_2_1.num = locals.flag.num ^ 1;
            if (T_2_1.num == true) {

  LINE(1511);
                {
                elist[0] = STR_input_040is_040always_040buffered;
                {signal (ERR_not_possible);}}
                }
                }/* end if */
            break;
            }
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1513);
            {
            locals.tb.vec->data[9]  = locals.flag.num;
            }
            break;
            }
    case 7: 
    case 4: 
    case 1: 
         {

  LINE(1515);
            {
            elist[0] = STR_cannot_040read_040from_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE set_input_buffered ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPset_input_buffered_actual;
static Vlist0 vals_streamOPset_input_buffered = {0, 0};
static sig_desc1 sig_streamOPset_input_buffered_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPset_input_buffered = {0, 1, (sig_desc*)&sig_streamOPset_input_buffered_1};
static Vlist5 locals_streamOPset_input_buffered = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "flag", &bool_ops}}
};
static Vlist0 popowns_streamOPset_input_buffered = {0, 0};
Slist0 tformals_streamOPset_input_buffered = {0, 0};
Slist0 opformals_streamOPset_input_buffered = {0, 0};
dbg_info_streamOPset_input_buffered_actual dbg_info_streamOPset_input_buffered_data = {0, 12, 
    "streamOPset_input_buffered", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPset_input_buffered, 2, 
    &vals_streamOPset_input_buffered, &sigs_streamOPset_input_buffered, &locals_streamOPset_input_buffered, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPset_input_buffered = (struct dbg_info*)&dbg_info_streamOPset_input_buffered_data;
extern struct dbg_info* dbg_info_streamOPget_output_buffered;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_output_buffered_TRACE
int streamOPget_output_buffered_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_output_buffered_own_init = 0;

/**** BEGIN PROCEDURE get_output_buffered ****/

errcode streamOPget_output_buffered(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF wb;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.wb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_output_buffered;
    locals.st = st;
        if (streamOPget_output_buffered_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_output_buffered_own_init = 1;
    }
    enter_proc(1519);

  LINE(1520);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 7: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.wb.num = T_1_2.num;

  LINE(1522);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.wb.vec->data[3];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
         {CLUREF T_1_3;
        T_1_3.num = T_1_1.cell->value;
        locals.tb.num = T_1_3.num;

  LINE(1524);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[15];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 4: 
    case 3: 
         {

  LINE(1526);
            {
            {
            ret_1->tf = true;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(1528);
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            break;
            }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_output_buffered ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_output_buffered_actual;
static Vlist1 vals_streamOPget_output_buffered = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPget_output_buffered = {0, 0};
static Vlist5 locals_streamOPget_output_buffered = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_output_buffered = {0, 0};
Slist0 tformals_streamOPget_output_buffered = {0, 0};
Slist0 opformals_streamOPget_output_buffered = {0, 0};
dbg_info_streamOPget_output_buffered_actual dbg_info_streamOPget_output_buffered_data = {0, 12, 
    "streamOPget_output_buffered", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_output_buffered, 1, 
    &vals_streamOPget_output_buffered, &sigs_streamOPget_output_buffered, &locals_streamOPget_output_buffered, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_output_buffered = (struct dbg_info*)&dbg_info_streamOPget_output_buffered_data;
extern struct dbg_info* dbg_info_streamOPset_output_buffered;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPset_output_buffered_TRACE
int streamOPset_output_buffered_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPset_output_buffered_own_init = 0;

/**** BEGIN PROCEDURE set_output_buffered ****/

errcode streamOPset_output_buffered(st, flag)
CLUREF st;
CLUREF flag;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF wb;
        CLUREF tb;
        CLUREF st;
        CLUREF flag;
        } locals;
    locals.wb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.flag.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPset_output_buffered;
    locals.st = st;
    locals.flag = flag;
        if (streamOPset_output_buffered_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPset_output_buffered_own_init = 1;
    }
    enter_proc(1532);

  LINE(1533);
    {
    CLUREF T_2_1;
    T_2_1.num = locals.st.vec->data[0];
    switch (T_2_1.cell->tag) {
    case 7: 
         {CLUREF T_2_2;
        T_2_2.num = T_2_1.cell->value;
        locals.wb.num = T_2_2.num;

  LINE(1535);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            T_3_2.num = locals.flag.num ^ 1;
            T_3_1.num = T_3_2.num;
            if (T_3_2.num) {
                T_3_3.num = locals.wb.vec->data[3];
                T_3_1.num = T_3_3.num;
            }
            if (T_3_1.num == true) {

  LINE(1536);
                {
                locals.err = streamOPflush(locals.st);
                if (locals.err != ERR_ok) goto ex_1;
                }
                }
                }/* end if */

  LINE(1537);
            {
            locals.wb.vec->data[3]  = locals.flag.num;
            }
            break;
            }
    case 6: 
         {CLUREF T_2_3;
        T_2_3.num = T_2_1.cell->value;
        locals.tb.num = T_2_3.num;

  LINE(1539);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            T_3_2.num = locals.flag.num ^ 1;
            T_3_1.num = T_3_2.num;
            if (T_3_2.num) {
                T_3_3.num = locals.tb.vec->data[15];
                T_3_1.num = T_3_3.num;
            }
            if (T_3_1.num == true) {

  LINE(1540);
                {
                locals.err = streamOPflush(locals.st);
                if (locals.err != ERR_ok) goto ex_1;
                }
                }
                }/* end if */

  LINE(1541);
            {
            locals.tb.vec->data[15]  = locals.flag.num;
            }
            break;
            }
    case 4: 
    case 3: 
         {

  LINE(1543);
            {
            elist[0] = STR_output_040is_040always_040buffered;
            {signal (ERR_not_possible);}}
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(1545);
            {
            elist[0] = STR_cannot_040write_040to_040this_040stream;
            {signal (ERR_not_possible);}}
            break;
            }
    }
    }
    goto end_1;
    ex_1:
        if (locals.err == ERR_not_possible) {signal(ERR_not_possible);}
        else {
            goto ex_0;}
    end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE set_output_buffered ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPset_output_buffered_actual;
static Vlist0 vals_streamOPset_output_buffered = {0, 0};
static sig_desc1 sig_streamOPset_output_buffered_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPset_output_buffered = {0, 1, (sig_desc*)&sig_streamOPset_output_buffered_1};
static Vlist6 locals_streamOPset_output_buffered = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "flag", &bool_ops}}
};
static Vlist0 popowns_streamOPset_output_buffered = {0, 0};
Slist0 tformals_streamOPset_output_buffered = {0, 0};
Slist0 opformals_streamOPset_output_buffered = {0, 0};
dbg_info_streamOPset_output_buffered_actual dbg_info_streamOPset_output_buffered_data = {0, 12, 
    "streamOPset_output_buffered", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPset_output_buffered, 2, 
    &vals_streamOPset_output_buffered, &sigs_streamOPset_output_buffered, &locals_streamOPset_output_buffered, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPset_output_buffered = (struct dbg_info*)&dbg_info_streamOPset_output_buffered_data;
extern struct dbg_info* dbg_info_streamOPget_eof_flag;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_eof_flag_TRACE
int streamOPget_eof_flag_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_eof_flag_own_init = 0;

/**** BEGIN PROCEDURE get_eof_flag ****/

errcode streamOPget_eof_flag(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_eof_flag;
    locals.st = st;
        if (streamOPget_eof_flag_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_eof_flag_own_init = 1;
    }
    enter_proc(1549);

  LINE(1550);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1552);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[8];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(1554);
            {
            {
            ret_1->tf = true;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(1556);
        {
        {
        ret_1->tf = false;
        }
        {signal (ERR_ok);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_eof_flag ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_eof_flag_actual;
static Vlist1 vals_streamOPget_eof_flag = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPget_eof_flag = {0, 0};
static Vlist4 locals_streamOPget_eof_flag = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_eof_flag = {0, 0};
Slist0 tformals_streamOPget_eof_flag = {0, 0};
Slist0 opformals_streamOPget_eof_flag = {0, 0};
dbg_info_streamOPget_eof_flag_actual dbg_info_streamOPget_eof_flag_data = {0, 12, 
    "streamOPget_eof_flag", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_eof_flag, 1, 
    &vals_streamOPget_eof_flag, &sigs_streamOPget_eof_flag, &locals_streamOPget_eof_flag, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_eof_flag = (struct dbg_info*)&dbg_info_streamOPget_eof_flag_data;
extern struct dbg_info* dbg_info_streamOPset_eof_flag;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPset_eof_flag_TRACE
int streamOPset_eof_flag_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPset_eof_flag_own_init = 0;

/**** BEGIN PROCEDURE set_eof_flag ****/

errcode streamOPset_eof_flag(st, eofok)
CLUREF st;
CLUREF eofok;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF tb;
        CLUREF st;
        CLUREF eofok;
        } locals;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.eofok.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPset_eof_flag;
    locals.st = st;
    locals.eofok = eofok;
        if (streamOPset_eof_flag_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPset_eof_flag_own_init = 1;
    }
    enter_proc(1560);

  LINE(1561);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 6: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.tb.num = T_1_2.num;

  LINE(1563);
            {
            locals.tb.vec->data[8]  = locals.eofok.num;
            }
            break;
            }
    case 5: 
    case 2: 
    case 1: 
         {

  LINE(1565);
            {
            CLUREF T_2_1;
            T_2_1.num = locals.eofok.num ^ 1;
            if (T_2_1.num == true) {

  LINE(1566);
                {
                elist[0] = STR_cannot_040disable_040eof_040on_040this_040stream;
                {signal (ERR_not_possible);}}
                }
                }/* end if */
            break;
            }
    default: {

  LINE(1569);
        {
        if (locals.eofok.num == true) {

  LINE(1570);
            {
            elist[0] = STR_cannot_040enable_040eof_040on_040this_040stream;
            {signal (ERR_not_possible);}}
            }
            }/* end if */
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE set_eof_flag ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist1 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPset_eof_flag_actual;
static Vlist0 vals_streamOPset_eof_flag = {0, 0};
static sig_desc1 sig_streamOPset_eof_flag_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPset_eof_flag = {0, 1, (sig_desc*)&sig_streamOPset_eof_flag_1};
static Vlist5 locals_streamOPset_eof_flag = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops},  {0, 2, "eofok", &bool_ops}}
};
static Vlist0 popowns_streamOPset_eof_flag = {0, 0};
Slist0 tformals_streamOPset_eof_flag = {0, 0};
Slist0 opformals_streamOPset_eof_flag = {0, 0};
dbg_info_streamOPset_eof_flag_actual dbg_info_streamOPset_eof_flag_data = {0, 12, 
    "streamOPset_eof_flag", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPset_eof_flag, 2, 
    &vals_streamOPset_eof_flag, &sigs_streamOPset_eof_flag, &locals_streamOPset_eof_flag, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPset_eof_flag = (struct dbg_info*)&dbg_info_streamOPset_eof_flag_data;
extern struct dbg_info* dbg_info_streamOPequal;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPequal_TRACE
int streamOPequal_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPequal_own_init = 0;

/**** BEGIN PROCEDURE equal ****/

errcode streamOPequal(x, y, ret_1)
CLUREF x;
CLUREF y;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF x;
        CLUREF y;
        } locals;
    locals.x.num = UNINIT;
    locals.y.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPequal;
    locals.x = x;
    locals.y = y;
        if (streamOPequal_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPequal_own_init = 1;
    }
    enter_proc(1575);

  LINE(1576);
    {
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.x.num == locals.y.num)? true : false;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE equal ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPequal_actual;
static Vlist1 vals_streamOPequal = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPequal = {0, 0};
static Vlist4 locals_streamOPequal = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "x", &record_buf_name_scripting_scripts_ops},  {0, 2, "y", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPequal = {0, 0};
Slist0 tformals_streamOPequal = {0, 0};
Slist0 opformals_streamOPequal = {0, 0};
dbg_info_streamOPequal_actual dbg_info_streamOPequal_data = {0, 12, 
    "streamOPequal", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPequal, 2, 
    &vals_streamOPequal, &sigs_streamOPequal, &locals_streamOPequal, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPequal = (struct dbg_info*)&dbg_info_streamOPequal_data;
extern struct dbg_info* dbg_info_streamOPsimilar;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPsimilar_TRACE
int streamOPsimilar_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPsimilar_own_init = 0;

/**** BEGIN PROCEDURE similar ****/

errcode streamOPsimilar(x, y, ret_1)
CLUREF x;
CLUREF y;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF x;
        CLUREF y;
        } locals;
    locals.x.num = UNINIT;
    locals.y.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPsimilar;
    locals.x = x;
    locals.y = y;
        if (streamOPsimilar_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPsimilar_own_init = 1;
    }
    enter_proc(1579);

  LINE(1580);
    {
    {
    CLUREF T_1_1;
    T_1_1.num = (locals.x.num == locals.y.num)? true : false;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE similar ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPsimilar_actual;
static Vlist1 vals_streamOPsimilar = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_streamOPsimilar = {0, 0};
static Vlist4 locals_streamOPsimilar = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "x", &record_buf_name_scripting_scripts_ops},  {0, 2, "y", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPsimilar = {0, 0};
Slist0 tformals_streamOPsimilar = {0, 0};
Slist0 opformals_streamOPsimilar = {0, 0};
dbg_info_streamOPsimilar_actual dbg_info_streamOPsimilar_data = {0, 12, 
    "streamOPsimilar", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPsimilar, 2, 
    &vals_streamOPsimilar, &sigs_streamOPsimilar, &locals_streamOPsimilar, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPsimilar = (struct dbg_info*)&dbg_info_streamOPsimilar_data;
extern struct dbg_info* dbg_info_streamOPcopy;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPcopy_TRACE
int streamOPcopy_TRACE;

/**** BEGIN PROCEDURE copy ****/

errcode streamOPcopy(x, ret_1)
CLUREF x;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF x;
        } locals;
    locals.x.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPcopy;
    locals.x = x;
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
    enter_proc(1583);

  LINE(1584);
    {
    {
    ret_1->num = locals.x.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE copy ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist3 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPcopy_actual;
static Vlist1 vals_streamOPcopy = {0, 1, { {0, 2, "", &stream_ops}}
};
static siglist0 sigs_streamOPcopy = {0, 0};
static Vlist3 locals_streamOPcopy = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "x", &stream_ops}}
};
static Vlist0 popowns_streamOPcopy = {0, 0};
Slist0 tformals_streamOPcopy = {0, 0};
Slist0 opformals_streamOPcopy = {0, 0};
dbg_info_streamOPcopy_actual dbg_info_streamOPcopy_data = {0, 12, 
    "streamOPcopy", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPcopy, 1, 
    &vals_streamOPcopy, &sigs_streamOPcopy, &locals_streamOPcopy, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPcopy = (struct dbg_info*)&dbg_info_streamOPcopy_data;
extern struct dbg_info* dbg_info_streamOPprint;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPprint_TRACE
int streamOPprint_TRACE;
extern OWN_req pstream_ownreqs;
extern struct OPS *pstream_ops;
static int streamOPprint_own_init = 0;

/**** BEGIN PROCEDURE print ****/

errcode streamOPprint(x, ps)
CLUREF x;
CLUREF ps;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF x;
        CLUREF ps;
        } locals;
    locals.x.num = UNINIT;
    locals.ps.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPprint;
    locals.x = x;
    locals.ps = ps;
        if (streamOPprint_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPprint_own_init = 1;
    }
    enter_proc(1587);

  LINE(1588);
    {
    CLUREF T_1_1;
    locals.err = pstreamOPtext(locals.ps, STR_stream_133, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(1589);
    {
    CLUREF T_1_1;
    locals.err = streamOPcan_read(locals.x, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(1590);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.ch = 'R';
        locals.err = pstreamOPtextc(locals.ps, T_2_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(1591);
    {
    CLUREF T_1_1;
    locals.err = streamOPcan_write(locals.x, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(1592);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.ch = 'W';
        locals.err = pstreamOPtextc(locals.ps, T_2_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(1593);
    {
    CLUREF T_1_1;
    locals.err = streamOPis_closed(locals.x, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(1594);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.ch = 'C';
        locals.err = pstreamOPtextc(locals.ps, T_2_1, &T_2_2);
        if (locals.err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(1595);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.ch = ' ';
    locals.err = pstreamOPtextc(locals.ps, T_1_1, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    }

  LINE(1596);
    {
    CLUREF T_2_1;
    locals.err = streamOPget_name(locals.x, &T_2_1);
    if (locals.err != ERR_ok) goto ex_1;
    locals.err = file_nameOPprint(T_2_1, locals.ps);
    if (locals.err != ERR_ok) goto ex_1;
    }
        goto end_1;
        ex_1:
            if ((locals.err == ERR_not_possible)) {

  LINE(1597);
                {
                CLUREF T_2_1;
                locals.err = pstreamOPtext(locals.ps, STR__050internal_051, &T_2_1);
                if (locals.err != ERR_ok) goto ex_0;
                }
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(1598);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.ch = ']';
    locals.err = pstreamOPtextc(locals.ps, T_1_1, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE print ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPprint_actual;
static Vlist0 vals_streamOPprint = {0, 0};
static siglist0 sigs_streamOPprint = {0, 0};
static Vlist4 locals_streamOPprint = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "x", &stream_ops},  {0, 2, "ps", &pstream_ops}}
};
static Vlist0 popowns_streamOPprint = {0, 0};
Slist0 tformals_streamOPprint = {0, 0};
Slist0 opformals_streamOPprint = {0, 0};
dbg_info_streamOPprint_actual dbg_info_streamOPprint_data = {0, 12, 
    "streamOPprint", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPprint, 2, 
    &vals_streamOPprint, &sigs_streamOPprint, &locals_streamOPprint, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPprint = (struct dbg_info*)&dbg_info_streamOPprint_data;
extern struct dbg_info* dbg_info_streamOPget_chan;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPget_chan_TRACE
int streamOPget_chan_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPget_chan_own_init = 0;

/**** BEGIN PROCEDURE get_chan ****/

errcode streamOPget_chan(st, ret_1)
CLUREF st;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF rb;
        CLUREF wb;
        CLUREF tb;
        CLUREF st;
        } locals;
    locals.rb.num = UNINIT;
    locals.wb.num = UNINIT;
    locals.tb.num = UNINIT;
    locals.st.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPget_chan;
    locals.st = st;
        if (streamOPget_chan_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPget_chan_own_init = 1;
    }
    enter_proc(1601);

  LINE(1602);
    {
    CLUREF T_1_1;
    T_1_1.num = locals.st.vec->data[0];
    switch (T_1_1.cell->tag) {
    case 5: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        locals.rb.num = T_1_2.num;

  LINE(1604);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.rb.vec->data[1];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 7: 
         {CLUREF T_1_3;
        T_1_3.num = T_1_1.cell->value;
        locals.wb.num = T_1_3.num;

  LINE(1606);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.wb.vec->data[1];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
         {CLUREF T_1_4;
        T_1_4.num = T_1_1.cell->value;
        locals.tb.num = T_1_4.num;

  LINE(1608);
            {
            {
            CLUREF T_2_1;
            T_2_1.num = locals.tb.vec->data[2];
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(1610);
        {
        elist[0] = STR_does_040not_040contain_040a_040_137chan;
        {signal (ERR_not_possible);}}
    }
    }
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE get_chan ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPget_chan_actual;
static Vlist1 vals_streamOPget_chan = {0, 1, { {0, 2, "", &_chan_ops}}
};
static sig_desc1 sig_streamOPget_chan_1 = {0, 4, "not_possible", {0, 1
, { {0, 2, "", &string_ops}}}};
static siglist1 sigs_streamOPget_chan = {0, 1, (sig_desc*)&sig_streamOPget_chan_1};
static Vlist6 locals_streamOPget_chan = {0, 6,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "rb", &record_bvec_chan_index_line_max_ops},  {0, 2, "wb", &record_bvec_chan_index_obf_ops},  {0, 2, "tb", &record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops},  {0, 2, "st", &record_buf_name_scripting_scripts_ops}}
};
static Vlist0 popowns_streamOPget_chan = {0, 0};
Slist0 tformals_streamOPget_chan = {0, 0};
Slist0 opformals_streamOPget_chan = {0, 0};
dbg_info_streamOPget_chan_actual dbg_info_streamOPget_chan_data = {0, 12, 
    "streamOPget_chan", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPget_chan, 1, 
    &vals_streamOPget_chan, &sigs_streamOPget_chan, &locals_streamOPget_chan, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPget_chan = (struct dbg_info*)&dbg_info_streamOPget_chan_data;
extern struct dbg_info* dbg_info_streamOP_open_streams;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOP_open_streams_TRACE
int streamOP_open_streams_TRACE;
extern errcode streamOP_open_streams_IB_1();
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
static int streamOP_open_streams_own_init = 0;

/**** BEGIN ITERATOR _open_streams ****/

errcode streamOP_open_streams(proc, user_locals, iecode)
errcode (*proc)();
char **user_locals;
errcode *iecode;
    {
    errcode ecode;
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        char **user_locals;
        errcode (*proc)();
        errcode err;
        errcode ecode2;
        bool body_ctrl_req;
        CLUREF s;
        } locals;
    locals.s.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOP_open_streams;
    locals.proc = proc;
    locals.user_locals = user_locals;
    locals.user_locals = user_locals;
    locals.proc = proc;
        if (streamOP_open_streams_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOP_open_streams_own_init = 1;
    }
    enter_proc(1614);

  LINE(1615);
    {
        CLUREF T_2_1;
        locals.err = streamOPopen_streams(&T_2_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.body_ctrl_req = false;
        locals.err = arrayOPelements(T_2_1, streamOP_open_streams_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {signal(ERR_iterbodyreturn);}
        if (locals.err == ERR_iterbodysignal) {
            *iecode = locals.ecode2; signal(ERR_iterbodysignal);}
        if (locals.err == ERR_iterbodyexit) {
            *iecode = locals.ecode2; signal(ERR_iterbodyexit);}
        if (locals.body_ctrl_req == true) {
            locals.body_ctrl_req = false;
            if (locals.err == ERR_iteriterbodyreturn) {signal(ERR_ok);}
            if (locals.err == ERR_iteriterbodysignal) {signal(locals.ecode2);}
            if (locals.err == ERR_break) locals.err = ERR_ok;
            if (locals.err == ERR_iteriterbodyexit) locals.err = locals.ecode2;
            }
        else {
            if (locals.err == ERR_iteriterbodyreturn) {signal(ERR_iteriterbodyreturn);}
            if (locals.err == ERR_break) {signal(ERR_break);}
            if (locals.err == ERR_iteriterbodysignal) {
                  *iecode = locals.ecode2; signal(ERR_iteriterbodysignal);}
            if (locals.err == ERR_iteriterbodyexit) {
                  *iecode = locals.ecode2; signal(ERR_iteriterbodyexit);}}
        if (locals.err != ERR_ok) goto ex_1;
        }
        goto end_1;
        ex_1:
            if ((locals.err == ERR_bounds)) {
            }
            else {
                goto ex_0;
            }
        end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END ITERATOR _open_streams ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist6 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOP_open_streams_actual;
static Vlist1 vals_streamOP_open_streams = {0, 1, { {0, 2, "", &stream_ops}}
};
static siglist0 sigs_streamOP_open_streams = {0, 0};
static Vlist6 locals_streamOP_open_streams = {0, 6,{ {0, 2, "user_locals", &int_ops},  {0, 2, "proc", &int_ops},  {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "body_ctrl_req", &int_ops},  {0, 2, "s", &stream_ops}}
};
static Vlist0 popowns_streamOP_open_streams = {0, 0};
Slist0 tformals_streamOP_open_streams = {0, 0};
Slist0 opformals_streamOP_open_streams = {0, 0};
dbg_info_streamOP_open_streams_actual dbg_info_streamOP_open_streams_data = {0, 12, 
    "streamOP_open_streams", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 1, 0, (int)streamOP_open_streams, 0, 
    &vals_streamOP_open_streams, &sigs_streamOP_open_streams, &locals_streamOP_open_streams, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOP_open_streams = (struct dbg_info*)&dbg_info_streamOP_open_streams_data;

/**** BEGIN ITERATOR BODIES for _open_streams ****/

errcode streamOP_open_streams_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    char **user_locals;
    errcode (*proc)();
    errcode err;
    errcode ecode2;
    bool body_ctrl_req;
    CLUREF s;
    } *locals;
{
    locals->s.num = iv_1.num;
    enter_iter_body_proc(1616);

  FB_LINE(1616);
    {
    locals->err = locals->proc(locals->s, locals->user_locals, iecode);
    if ((locals->body_ctrl_req == true) && (locals->err == ERR_iteriterbodyexit)) {
        locals->err = *iecode;
        goto ex_0;}
    if (locals->err != ERR_ok) {
    signal(locals->err);
    }
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            locals->body_ctrl_req = true;
            {signal(ERR_iteriterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOP_open_streams_IB_1 */

/**** END ITERATOR BODIES for _open_streams ****/

extern struct dbg_info* dbg_info_streamOP_close_all;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOP_close_all_TRACE
int streamOP_close_all_TRACE;
extern errcode streamOP_close_all_IB_1();
extern errcode streamOP_close_all_IB_2();
struct OPS *array_of_stream_table;
struct OPS *array_of_stream_ops;
struct OPS *array_of_stream_ops;
OWNPTR array_of_stream_owns;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOP_close_all_own_init = 0;

/**** BEGIN PROCEDURE _close_all ****/

errcode streamOP_close_all()
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF opens;
        CLUREF st;
        CLUREF i;
        } locals;
    locals.opens.num = UNINIT;
    locals.st.num = UNINIT;
    locals.i.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOP_close_all;
        if (streamOP_close_all_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOP_close_all_own_init = 1;
    }
    enter_proc(1620);

  LINE(1621);
    {
        {CLUREF T_1_1;
        locals.err = streamOPopen_streams(&T_1_1);
        if (locals.err != ERR_ok) goto ex_0;
        locals.opens.num = T_1_1.num;
        }
        }

  LINE(1622);
    {
        locals.err = arrayOPelements(locals.opens, streamOP_close_all_IB_1, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1626);
    {
        locals.err = arrayOPelements(locals.opens, streamOP_close_all_IB_2, &locals, &locals.ecode2);
        if (locals.err == ERR_iterbodyreturn) {
        signal(ERR_ok);}
        if (locals.err == ERR_iterbodysignal) {signal(locals.ecode2);}
        if (locals.err == ERR_break) locals.err = ERR_ok;
        if (locals.err == ERR_iterbodyexit) locals.err = locals.ecode2;
        if (locals.err != ERR_ok) goto ex_0;
        }

  LINE(1630);
    {
        {locals.i.num = 1;
        }
        }

  LINE(1631);
    for (;;) {
        if (true != true) { break; }

  LINE(1632);
        {
            {CLUREF T_3_1;
            locals.err = arrayOPfetch(locals.opens, locals.i, &T_3_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.st.num = T_3_1.num;
            }
            }

  LINE(1633);
        {
        locals.err = streamOPclose(locals.st);
        if (locals.err != ERR_ok) goto ex_2;
        }
            goto end_2;
            ex_2:
                if ((locals.err == ERR_not_possible)) {

  LINE(1634);
                    {
                    locals.err = streamOPabort(locals.st);
                    if (locals.err != ERR_ok) goto ex_1;
                    }
                }
                else {
                    goto ex_1;
                }
            end_2:;

  LINE(1635);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        locals.err = arrayOPfetch(locals.opens, locals.i, &T_3_1);
        if (locals.err != ERR_ok) goto ex_1;
        locals.err = streamOPequal(locals.st, T_3_1, &T_3_2);
        if (locals.err != ERR_ok) goto ex_1;
        if (T_3_2.num == true) {

  LINE(1636);
            {
            CLUREF T_4_1;
            locals.err = intOPadd(locals.i, CLU_1, &T_4_1);
            if (locals.err != ERR_ok) goto ex_1;
            locals.i.num = T_4_1.num;
            }
            }
            }/* end if */
        }
        end_while_1:;
        goto end_1;
        ex_1:
            if ((locals.err == ERR_bounds)) {
            }
            else {
                goto ex_0;
            }
        end_1:;
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE _close_all ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOP_close_all_actual;
static Vlist0 vals_streamOP_close_all = {0, 0};
static siglist0 sigs_streamOP_close_all = {0, 0};
static Vlist5 locals_streamOP_close_all = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "opens", &array_of_stream_ops},  {0, 2, "st", &stream_ops},  {0, 2, "i", &int_ops}}
};
static Vlist0 popowns_streamOP_close_all = {0, 0};
Slist0 tformals_streamOP_close_all = {0, 0};
Slist0 opformals_streamOP_close_all = {0, 0};
dbg_info_streamOP_close_all_actual dbg_info_streamOP_close_all_data = {0, 12, 
    "streamOP_close_all", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOP_close_all, 0, 
    &vals_streamOP_close_all, &sigs_streamOP_close_all, &locals_streamOP_close_all, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOP_close_all = (struct dbg_info*)&dbg_info_streamOP_close_all_data;

/**** BEGIN ITERATOR BODIES for _close_all ****/

errcode streamOP_close_all_IB_1(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF opens;
    CLUREF st;
    CLUREF i;
    } *locals;
{
    locals->st.num = iv_1.num;
    enter_iter_body_proc(1624);

  FB_LINE(1623);
    {
    locals->err = streamOPflush(locals->st);
    if (locals->err != ERR_ok) goto ex_1;
    }
        goto end_1;
        ex_1:
            if ((locals->err == ERR_not_possible)) {
            }
            else {
                goto ex_0;
            }
        end_1:;
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOP_close_all_IB_1 */
errcode streamOP_close_all_IB_2(iv_1, locals, iecode)
errcode *iecode;
CLUREF iv_1;
struct {
    struct dbg_info *DBG_INFO;
    int DBG_LINE;
    errcode err;
    errcode ecode2;
    CLUREF opens;
    CLUREF st;
    CLUREF i;
    } *locals;
{
    locals->st.num = iv_1.num;
    enter_iter_body_proc(1627);

  FB_LINE(1627);
    {
    CLUREF T_1_1;
    locals->err = sequenceOPnew(&T_1_1);
    if (locals->err != ERR_ok) goto ex_0;
    locals->st.vec->data[3]  = T_1_1.num;
    }

  FB_LINE(1628);
    {
    locals->st.vec->data[2]  = false;
    }
    {signal(ERR_ok);}
    ex_0:
        {
            *iecode = locals->err;
            {signal(ERR_iterbodyexit);}}
    end_0: {signal(ERR_ok);}
    }/* end streamOP_close_all_IB_2 */

/**** END ITERATOR BODIES for _close_all ****/

extern struct dbg_info* dbg_info_streamOPdebug_print;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG streamOPdebug_print_TRACE
int streamOPdebug_print_TRACE;
struct OPS  *record_chars_index_line_newln_ops;
struct OPS *array_of_char_table;
struct OPS *array_of_char_ops;
struct OPS *array_of_char_ops;
OWNPTR array_of_char_owns;
struct OPS  *record_bvec_chan_index_line_max_ops;
struct OPS  *record_back_bvec_chan_clear_disp_echo_edit_eof_eofok_ibf_image_index_kill_line_llen_obf_plen_prompt_rescan_ops;
struct OPS  *record_bvec_chan_index_obf_ops;
struct OPS  *oneof_closed_istr_nul_ostr_read_tty_write_ops;
struct OPS *sequence_of_stream_table;
struct OPS *sequence_of_stream_ops;
struct OPS *sequence_of_stream_ops;
OWNPTR sequence_of_stream_owns;
struct OPS  *record_buf_name_scripting_scripts_ops;
static int streamOPdebug_print_own_init = 0;

/**** BEGIN PROCEDURE debug_print ****/

errcode streamOPdebug_print(_rep, ps)
CLUREF _rep;
CLUREF ps;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        CLUREF _rep;
        CLUREF ps;
        } locals;
    locals._rep.num = UNINIT;
    locals.ps.num = UNINIT;
    locals.DBG_INFO = dbg_info_streamOPdebug_print;
    locals._rep = _rep;
    locals.ps = ps;
        if (streamOPdebug_print_own_init == 0) {
        if (stream_own_init == 0) {
            locals.err = stream_own_init_proc();
            if (locals.err != ERR_ok) goto ex_0;
            }
        streamOPdebug_print_own_init = 1;
    }
    enter_proc(1);

  LINE(2);
    {
    locals.err = streamOPprint(locals._rep, locals.ps);
    if (locals.err != ERR_ok) goto ex_0;
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE debug_print ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist96 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info_streamOPdebug_print_actual;
static Vlist0 vals_streamOPdebug_print = {0, 0};
static siglist0 sigs_streamOPdebug_print = {0, 0};
static Vlist4 locals_streamOPdebug_print = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "_rep", &record_buf_name_scripting_scripts_ops},  {0, 2, "ps", &pstream_ops}}
};
static Vlist0 popowns_streamOPdebug_print = {0, 0};
Slist0 tformals_streamOPdebug_print = {0, 0};
Slist0 opformals_streamOPdebug_print = {0, 0};
dbg_info_streamOPdebug_print_actual dbg_info_streamOPdebug_print_data = {0, 12, 
    "streamOPdebug_print", "/common/pub/dcurtis-temp/pclu/sys/clu/stream", 0, 0, (int)streamOPdebug_print, 2, 
    &vals_streamOPdebug_print, &sigs_streamOPdebug_print, &locals_streamOPdebug_print, &owns_stream, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info_streamOPdebug_print = (struct dbg_info*)&dbg_info_streamOPdebug_print_data;
typedef struct{
    int count;
    OWNPTR type_owns;
    OWNPTR op_owns;
    struct OP_ENTRY entry[63];
} stream_OPS;

CLU_proc stream_oe__close_all = {{0,0,0,0}, streamOP_close_all, 0};
CLU_proc stream_oe__open_streams = {{0,0,0,0}, streamOP_open_streams, 0};
CLU_proc stream_oe_abort = {{0,0,0,0}, streamOPabort, 0};
CLU_proc stream_oe_add_script = {{0,0,0,0}, streamOPadd_script, 0};
CLU_proc stream_oe_can_read = {{0,0,0,0}, streamOPcan_read, 0};
CLU_proc stream_oe_can_write = {{0,0,0,0}, streamOPcan_write, 0};
CLU_proc stream_oe_close = {{0,0,0,0}, streamOPclose, 0};
CLU_proc stream_oe_copy = {{0,0,0,0}, streamOPcopy, 0};
CLU_proc stream_oe_create_input = {{0,0,0,0}, streamOPcreate_input, 0};
CLU_proc stream_oe_create_output = {{0,0,0,0}, streamOPcreate_output, 0};
CLU_proc stream_oe_display = {{0,0,0,0}, streamOPdisplay, 0};
CLU_proc stream_oe_empty = {{0,0,0,0}, streamOPempty, 0};
CLU_proc stream_oe_equal = {{0,0,0,0}, streamOPequal, 0};
CLU_proc stream_oe_error_output = {{0,0,0,0}, streamOPerror_output, 0};
CLU_proc stream_oe_flush = {{0,0,0,0}, streamOPflush, 0};
CLU_proc stream_oe_get_contents = {{0,0,0,0}, streamOPget_contents, 0};
CLU_proc stream_oe_get_date = {{0,0,0,0}, streamOPget_date, 0};
CLU_proc stream_oe_get_eof_flag = {{0,0,0,0}, streamOPget_eof_flag, 0};
CLU_proc stream_oe_get_input_buffered = {{0,0,0,0}, streamOPget_input_buffered, 0};
CLU_proc stream_oe_get_line_length = {{0,0,0,0}, streamOPget_line_length, 0};
CLU_proc stream_oe_get_lineno = {{0,0,0,0}, streamOPget_lineno, 0};
CLU_proc stream_oe_get_name = {{0,0,0,0}, streamOPget_name, 0};
CLU_proc stream_oe_get_output_buffered = {{0,0,0,0}, streamOPget_output_buffered, 0};
CLU_proc stream_oe_get_page_length = {{0,0,0,0}, streamOPget_page_length, 0};
CLU_proc stream_oe_get_prompt = {{0,0,0,0}, streamOPget_prompt, 0};
CLU_proc stream_oe_get_rescan = {{0,0,0,0}, streamOPget_rescan, 0};
CLU_proc stream_oe_getbuf = {{0,0,0,0}, streamOPgetbuf, 0};
CLU_proc stream_oe_getc = {{0,0,0,0}, streamOPgetc, 0};
CLU_proc stream_oe_getc_image = {{0,0,0,0}, streamOPgetc_image, 0};
CLU_proc stream_oe_getl = {{0,0,0,0}, streamOPgetl, 0};
CLU_proc stream_oe_gets = {{0,0,0,0}, streamOPgets, 0};
CLU_proc stream_oe_gets_image = {{0,0,0,0}, streamOPgets_image, 0};
CLU_proc stream_oe_is_closed = {{0,0,0,0}, streamOPis_closed, 0};
CLU_proc stream_oe_is_terminal = {{0,0,0,0}, streamOPis_terminal, 0};
CLU_proc stream_oe_modify_display = {{0,0,0,0}, streamOPmodify_display, 0};
CLU_proc stream_oe_open = {{0,0,0,0}, streamOPopen, 0};
CLU_proc stream_oe_peekc = {{0,0,0,0}, streamOPpeekc, 0};
CLU_proc stream_oe_pending = {{0,0,0,0}, streamOPpending, 0};
CLU_proc stream_oe_primary_input = {{0,0,0,0}, streamOPprimary_input, 0};
CLU_proc stream_oe_primary_output = {{0,0,0,0}, streamOPprimary_output, 0};
CLU_proc stream_oe_print = {{0,0,0,0}, streamOPprint, 0};
CLU_proc stream_oe_putc = {{0,0,0,0}, streamOPputc, 0};
CLU_proc stream_oe_putc_image = {{0,0,0,0}, streamOPputc_image, 0};
CLU_proc stream_oe_putl = {{0,0,0,0}, streamOPputl, 0};
CLU_proc stream_oe_putleft = {{0,0,0,0}, streamOPputleft, 0};
CLU_proc stream_oe_putright = {{0,0,0,0}, streamOPputright, 0};
CLU_proc stream_oe_puts = {{0,0,0,0}, streamOPputs, 0};
CLU_proc stream_oe_puts_image = {{0,0,0,0}, streamOPputs_image, 0};
CLU_proc stream_oe_putspace = {{0,0,0,0}, streamOPputspace, 0};
CLU_proc stream_oe_putzero = {{0,0,0,0}, streamOPputzero, 0};
CLU_proc stream_oe_rem_script = {{0,0,0,0}, streamOPrem_script, 0};
CLU_proc stream_oe_reset = {{0,0,0,0}, streamOPreset, 0};
CLU_proc stream_oe_scripts = {{0,0,0,0}, streamOPscripts, 0};
CLU_proc stream_oe_set_date = {{0,0,0,0}, streamOPset_date, 0};
CLU_proc stream_oe_set_eof_flag = {{0,0,0,0}, streamOPset_eof_flag, 0};
CLU_proc stream_oe_set_input_buffered = {{0,0,0,0}, streamOPset_input_buffered, 0};
CLU_proc stream_oe_set_lineno = {{0,0,0,0}, streamOPset_lineno, 0};
CLU_proc stream_oe_set_output_buffered = {{0,0,0,0}, streamOPset_output_buffered, 0};
CLU_proc stream_oe_set_prompt = {{0,0,0,0}, streamOPset_prompt, 0};
CLU_proc stream_oe_set_rescan = {{0,0,0,0}, streamOPset_rescan, 0};
CLU_proc stream_oe_similar = {{0,0,0,0}, streamOPsimilar, 0};
CLU_proc stream_oe_unscript = {{0,0,0,0}, streamOPunscript, 0};
CLU_proc stream_oe_debug_print = {{0,0,0,0}, streamOPdebug_print, 0};

stream_OPS stream_ops_actual = {63, (OWNPTR)&stream_own_init, (OWNPTR)&stream_own_init, {
    {&stream_oe__close_all, "_close_all"},
    {&stream_oe__open_streams, "_open_streams"},
    {&stream_oe_abort, "abort"},
    {&stream_oe_add_script, "add_script"},
    {&stream_oe_can_read, "can_read"},
    {&stream_oe_can_write, "can_write"},
    {&stream_oe_close, "close"},
    {&stream_oe_copy, "copy"},
    {&stream_oe_create_input, "create_input"},
    {&stream_oe_create_output, "create_output"},
    {&stream_oe_display, "display"},
    {&stream_oe_empty, "empty"},
    {&stream_oe_equal, "equal"},
    {&stream_oe_error_output, "error_output"},
    {&stream_oe_flush, "flush"},
    {&stream_oe_get_contents, "get_contents"},
    {&stream_oe_get_date, "get_date"},
    {&stream_oe_get_eof_flag, "get_eof_flag"},
    {&stream_oe_get_input_buffered, "get_input_buffered"},
    {&stream_oe_get_line_length, "get_line_length"},
    {&stream_oe_get_lineno, "get_lineno"},
    {&stream_oe_get_name, "get_name"},
    {&stream_oe_get_output_buffered, "get_output_buffered"},
    {&stream_oe_get_page_length, "get_page_length"},
    {&stream_oe_get_prompt, "get_prompt"},
    {&stream_oe_get_rescan, "get_rescan"},
    {&stream_oe_getbuf, "getbuf"},
    {&stream_oe_getc, "getc"},
    {&stream_oe_getc_image, "getc_image"},
    {&stream_oe_getl, "getl"},
    {&stream_oe_gets, "gets"},
    {&stream_oe_gets_image, "gets_image"},
    {&stream_oe_is_closed, "is_closed"},
    {&stream_oe_is_terminal, "is_terminal"},
    {&stream_oe_modify_display, "modify_display"},
    {&stream_oe_open, "open"},
    {&stream_oe_peekc, "peekc"},
    {&stream_oe_pending, "pending"},
    {&stream_oe_primary_input, "primary_input"},
    {&stream_oe_primary_output, "primary_output"},
    {&stream_oe_print, "print"},
    {&stream_oe_putc, "putc"},
    {&stream_oe_putc_image, "putc_image"},
    {&stream_oe_putl, "putl"},
    {&stream_oe_putleft, "putleft"},
    {&stream_oe_putright, "putright"},
    {&stream_oe_puts, "puts"},
    {&stream_oe_puts_image, "puts_image"},
    {&stream_oe_putspace, "putspace"},
    {&stream_oe_putzero, "putzero"},
    {&stream_oe_rem_script, "rem_script"},
    {&stream_oe_reset, "reset"},
    {&stream_oe_scripts, "scripts"},
    {&stream_oe_set_date, "set_date"},
    {&stream_oe_set_eof_flag, "set_eof_flag"},
    {&stream_oe_set_input_buffered, "set_input_buffered"},
    {&stream_oe_set_lineno, "set_lineno"},
    {&stream_oe_set_output_buffered, "set_output_buffered"},
    {&stream_oe_set_prompt, "set_prompt"},
    {&stream_oe_set_rescan, "set_rescan"},
    {&stream_oe_similar, "similar"},
    {&stream_oe_unscript, "unscript"},
    {&stream_oe_debug_print, "debug_print"}}};

struct OPS *stream_ops = (struct OPS *)&stream_ops_actual;

/**** END CLUSTER stream ****/
