/*
 * This file was generated automatically by ExtUtils::ParseXS version 2.19 from the
 * contents of perlglue.xs. Do not edit this file, edit perlglue.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST! 
 *
 */

#line 1 "perlglue.xs"
/* -*- mode: c; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifdef HAVE_LIBZEPHYR
#include <zephyr/zephyr.h>
#endif
#include <EXTERN.h>

#define OWL_PERL
#include "owl.h"

#define SV_IS_CODEREF(sv) (SvROK((sv)) && SvTYPE(SvRV((sv))) == SVt_PVCV)

typedef char utf8;

	/*************************************************************
	 * NOTE
	 *************************************************************
	 * These functions, when they are intended to be user-visible,
	 * are documented in perl/lib/BarnOwl.pm. If you add functions
	 * to this file, add the appropriate documentation there!
	 *
	 * If the function is simple enough, we simply define its
	 * entire functionality here in XS. If, however, it needs
	 * complex argument processing or something, we define a
	 * simple version here that takes arguments in as flat a
	 * manner as possible, to simplify the XS code, put it in
	 * BarnOwl::Internal::, and write a perl wrapper in BarnOwl.pm
	 * that munges the arguments as appropriate and calls the
	 * internal version.
	 */

#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#line 45 "perlglue.c"

XS(XS_BarnOwl_command); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_command)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items < 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::command", "cmd, ...");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	cmd = (const char *)SvPV_nolen(ST(0));
#line 37 "perlglue.xs"
		char *rv = NULL;
		const char **argv;
		int i;
#line 64 "perlglue.c"
	const utf8 *	RETVAL;
#line 41 "perlglue.xs"
	{
		if (items == 1) {
			rv = owl_function_command(cmd);
		} else {
			argv = owl_malloc((items + 1) * sizeof *argv);
			argv[0] = cmd;
			for(i = 1; i < items; i++) {
				argv[i] = SvPV_nolen(ST(i));
			}
			rv = owl_function_command_argv(argv, items);
			owl_free(argv);
		}
		RETVAL = rv;
	}
#line 81 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
#line 58 "perlglue.xs"
		if (rv) owl_free(rv);
#line 87 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_getcurmsg); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_getcurmsg)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::getcurmsg", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	SV *	RETVAL;
#line 63 "perlglue.xs"
		RETVAL = owl_perlconfig_curmessage2hashref();
#line 108 "perlglue.c"
	ST(0) = RETVAL;
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_getnumcols); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_getnumcols)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::getnumcols", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	RETVAL;
	dXSTARG;
#line 70 "perlglue.xs"
		RETVAL = owl_global_get_cols(&g);
#line 132 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_getidletime); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_getidletime)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::getidletime", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	time_t	RETVAL;
	dXSTARG;
#line 77 "perlglue.xs"
		RETVAL = owl_global_get_idletime(&g);
#line 155 "perlglue.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_zephyr_getrealm); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_zephyr_getrealm)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::zephyr_getrealm", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const utf8 *	RETVAL;
#line 84 "perlglue.xs"
		RETVAL = owl_zephyr_get_realm();
#line 177 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_zephyr_getsender); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_zephyr_getsender)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::zephyr_getsender", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const utf8 *	RETVAL;
#line 91 "perlglue.xs"
		RETVAL = owl_zephyr_get_sender();
#line 201 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_zephyr_zwrite); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_zephyr_zwrite)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::zephyr_zwrite", "cmd, msg");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	cmd = (const char *)SvPV_nolen(ST(0));
	const char *	msg = (const char *)SvPV_nolen(ST(1));
#line 100 "perlglue.xs"
		int i;
#line 226 "perlglue.c"
#line 102 "perlglue.xs"
		i = owl_zwrite_create_and_send_from_line(cmd, msg);
#line 229 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_ztext_stylestrip); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_ztext_stylestrip)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::ztext_stylestrip", "ztext");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	ztext = (const char *)SvPV_nolen(ST(0));
#line 108 "perlglue.xs"
		char *rv = NULL;
#line 250 "perlglue.c"
	const utf8 *	RETVAL;
#line 110 "perlglue.xs"
		rv = owl_function_ztext_stylestrip(ztext);
		RETVAL = rv;
#line 255 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
#line 115 "perlglue.xs"
		if (rv) owl_free(rv);
#line 261 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_zephyr_smartstrip_user); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_zephyr_smartstrip_user)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::zephyr_smartstrip_user", "in");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	in = (const char *)SvPV_nolen(ST(0));
#line 121 "perlglue.xs"
		char *rv = NULL;
#line 282 "perlglue.c"
	const utf8 *	RETVAL;
#line 123 "perlglue.xs"
	{
		rv = owl_zephyr_smartstripped_user(in);
		RETVAL = rv;
	}
#line 289 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
#line 130 "perlglue.xs"
		owl_free(rv);
#line 295 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_zephyr_getsubs); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_zephyr_getsubs)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::zephyr_getsubs", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 135 "perlglue.xs"
		char *rv = NULL;
#line 315 "perlglue.c"
	const utf8 *	RETVAL;
#line 137 "perlglue.xs"
		rv = owl_zephyr_getsubs();
		RETVAL = rv;
#line 320 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
#line 142 "perlglue.xs"
		if (rv) owl_free(rv);
#line 326 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_queue_message); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_queue_message)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::queue_message", "msg");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	SV *	msg = ST(0);
#line 148 "perlglue.xs"
		owl_message *m;
#line 347 "perlglue.c"
#line 150 "perlglue.xs"
	{
		if(!SvROK(msg) || SvTYPE(SvRV(msg)) != SVt_PVHV) {
			croak("Usage: BarnOwl::queue_message($message)");
		}

		m = owl_perlconfig_hashref2message(msg);

		owl_global_messagequeue_addmsg(&g, m);
	}
#line 358 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_admin_message); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_admin_message)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::admin_message", "header, body");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	header = (const char *)SvPV_nolen(ST(0));
	const char *	body = (const char *)SvPV_nolen(ST(1));
#line 165 "perlglue.xs"
	{
		owl_function_adminmsg(header, body);		
	}
#line 382 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_start_question); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_start_question)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::start_question", "line, callback");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	line = (const char *)SvPV_nolen(ST(0));
	SV *	callback = ST(1);
#line 174 "perlglue.xs"
		owl_editwin *e;
#line 404 "perlglue.c"
#line 176 "perlglue.xs"
	{
		if(!SV_IS_CODEREF(callback))
			croak("Callback must be a subref");

		e = owl_function_start_question(line);

		owl_editwin_set_cbdata(e,
				       newSVsv(callback),
				       owl_perlconfig_dec_refcnt);
		owl_editwin_set_callback(e, owl_perlconfig_edit_callback);
	}
#line 417 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_start_password); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_start_password)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::start_password", "line, callback");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	line = (const char *)SvPV_nolen(ST(0));
	SV *	callback = ST(1);
#line 193 "perlglue.xs"
		owl_editwin *e;
#line 439 "perlglue.c"
#line 195 "perlglue.xs"
	{
		if(!SV_IS_CODEREF(callback))
			croak("Callback must be a subref");

		e = owl_function_start_password(line);

		owl_editwin_set_cbdata(e,
				       newSVsv(callback),
				       owl_perlconfig_dec_refcnt);
		owl_editwin_set_callback(e, owl_perlconfig_edit_callback);
	}
#line 452 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_start_edit_win); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_start_edit_win)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::start_edit_win", "line, callback");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	line = (const char *)SvPV_nolen(ST(0));
	SV *	callback = ST(1);
#line 212 "perlglue.xs"
	{
		if(!SV_IS_CODEREF(callback))
			croak("Callback must be a subref");

		owl_function_start_edit_win(line,
					    owl_perlconfig_edit_callback,
					    newSVsv(callback),
					    owl_perlconfig_dec_refcnt);
	}
#line 482 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_get_data_dir); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_get_data_dir)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::get_data_dir", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	RETVAL;
	dXSTARG;
#line 226 "perlglue.xs"
		RETVAL = owl_get_datadir();
#line 504 "perlglue.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_get_config_dir); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_get_config_dir)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::get_config_dir", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	RETVAL;
	dXSTARG;
#line 233 "perlglue.xs"
		RETVAL = owl_global_get_confdir(&g);
#line 527 "perlglue.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_popless_text); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_popless_text)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::popless_text", "text");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	text = (const char *)SvPV_nolen(ST(0));
#line 241 "perlglue.xs"
	{
		owl_function_popless_text(text);
	}
#line 551 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_popless_ztext); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_popless_ztext)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::popless_ztext", "text");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	text = (const char *)SvPV_nolen(ST(0));
#line 249 "perlglue.xs"
	{
		owl_fmtext fm;
		owl_fmtext_init_null(&fm);
		owl_fmtext_append_ztext(&fm, text);
		owl_function_popless_fmtext(&fm);
		owl_fmtext_cleanup(&fm);
	}
#line 578 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_error); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_error)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::error", "text");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	text = (const char *)SvPV_nolen(ST(0));
#line 261 "perlglue.xs"
	{
		owl_function_error("%s", text);
	}
#line 601 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_debug); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_debug)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::debug", "text");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	text = (const char *)SvPV_nolen(ST(0));
#line 269 "perlglue.xs"
	{
		owl_function_debugmsg("%s", text);
	}
#line 624 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_message); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_message)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::message", "text");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	text = (const char *)SvPV_nolen(ST(0));
#line 277 "perlglue.xs"
	{
		owl_function_makemsg("%s", text);
	}
#line 647 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_create_style); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_create_style)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::create_style", "name, object");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	name = (const char *)SvPV_nolen(ST(0));
	SV *	object = ST(1);
#line 286 "perlglue.xs"
		owl_style *s;
#line 669 "perlglue.c"
#line 288 "perlglue.xs"
	{
		s = owl_malloc(sizeof(owl_style));
		owl_style_create_perl(s, name, newSVsv(object));
		owl_global_add_style(&g, s);
	}
#line 676 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_getnumcolors); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_getnumcolors)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::getnumcolors", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	RETVAL;
	dXSTARG;
#line 297 "perlglue.xs"
		RETVAL = owl_function_get_color_count();
#line 698 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__remove_filter); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__remove_filter)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::_remove_filter", "filterName");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	filterName = (const char *)SvPV_nolen(ST(0));
#line 305 "perlglue.xs"
	{
		/* Don't delete the current view, or the 'all' filter */
		if (strcmp(filterName, owl_view_get_filtname(owl_global_get_current_view(&g)))
		    && strcmp(filterName, "all")) {
			owl_global_remove_filter(&g,filterName);
		}
	}
#line 726 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_wordwrap); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_wordwrap)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::wordwrap", "in, cols");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	in = (const char *)SvPV_nolen(ST(0));
	int	cols = (int)SvIV(ST(1));
#line 318 "perlglue.xs"
		char *rv = NULL;
#line 748 "perlglue.c"
	const utf8 *	RETVAL;
#line 320 "perlglue.xs"
		rv = owl_text_wordwrap(in, cols);
		RETVAL = rv;	
#line 753 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
#line 325 "perlglue.xs"
		if (rv)
			owl_free(rv);
#line 760 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_remove_io_dispatch); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_remove_io_dispatch)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::remove_io_dispatch", "fd");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	fd = (int)SvIV(ST(0));
#line 332 "perlglue.xs"
	owl_select_remove_perl_io_dispatch(fd);
#line 781 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_all_filters); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_all_filters)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::all_filters", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 337 "perlglue.xs"
		owl_list fl;
#line 801 "perlglue.c"
	AV *	RETVAL;
#line 339 "perlglue.xs"
	{
		owl_list_create(&fl);
		owl_dict_get_keys(&g.filters, &fl);
		RETVAL = owl_new_av(&fl, (SV*(*)(const void*))owl_new_sv);
		sv_2mortal((SV*)RETVAL);
		owl_list_cleanup(&fl, owl_free);
	}
#line 811 "perlglue.c"
	ST(0) = newRV((SV*)RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_all_styles); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_all_styles)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::all_styles", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 352 "perlglue.xs"
		owl_list l;
#line 833 "perlglue.c"
	AV *	RETVAL;
#line 354 "perlglue.xs"
	{
		owl_list_create(&l);
		owl_global_get_style_names(&g, &l);
		RETVAL = owl_new_av(&l, (SV*(*)(const void*))owl_new_sv);
		sv_2mortal((SV*)RETVAL);
	}
#line 842 "perlglue.c"
	ST(0) = newRV((SV*)RETVAL);
	sv_2mortal(ST(0));
#line 363 "perlglue.xs"
		owl_list_cleanup(&l, owl_free);
#line 847 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_all_variables); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_all_variables)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::all_variables", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 369 "perlglue.xs"
		owl_list l;
#line 867 "perlglue.c"
	AV *	RETVAL;
#line 371 "perlglue.xs"
	{
		owl_list_create(&l);
		owl_dict_get_keys(owl_global_get_vardict(&g), &l);
		RETVAL = owl_new_av(&l, (SV*(*)(const void*))owl_new_sv);
		sv_2mortal((SV*)RETVAL);
	}
#line 876 "perlglue.c"
	ST(0) = newRV((SV*)RETVAL);
	sv_2mortal(ST(0));
#line 380 "perlglue.xs"
		owl_list_cleanup(&l, owl_free);
#line 881 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_all_keymaps); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_all_keymaps)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::all_keymaps", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 386 "perlglue.xs"
		owl_list l;
		const owl_keyhandler *kh;
#line 902 "perlglue.c"
	AV *	RETVAL;
#line 389 "perlglue.xs"
	{
		owl_list_create(&l);
		kh = owl_global_get_keyhandler(&g);
		owl_keyhandler_get_keymap_names(kh, &l);
		RETVAL = owl_new_av(&l, (SV*(*)(const void*))owl_new_sv);
		sv_2mortal((SV*)RETVAL);
	}
#line 912 "perlglue.c"
	ST(0) = newRV((SV*)RETVAL);
	sv_2mortal(ST(0));
#line 399 "perlglue.xs"
		owl_list_cleanup(&l, owl_free);
#line 917 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_redisplay); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_redisplay)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::redisplay", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 404 "perlglue.xs"
	{
		owl_messagelist_invalidate_formats(owl_global_get_msglist(&g));
		owl_function_calculate_topmsg(OWL_DIRECTION_DOWNWARDS);
		owl_mainwin_redisplay(owl_global_get_mainwin(&g));
	}
#line 941 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl_get_zephyr_variable); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_get_zephyr_variable)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::get_zephyr_variable", "name");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	name = (const char *)SvPV_nolen(ST(0));
	const char *	RETVAL;
	dXSTARG;
#line 414 "perlglue.xs"
		RETVAL = owl_zephyr_get_variable(name);
#line 964 "perlglue.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS(XS_BarnOwl_skiptokens); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl_skiptokens)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::skiptokens", "str, n");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	str = (const char *)SvPV_nolen(ST(0));
	int	n = (int)SvIV(ST(1));
	const utf8 *	RETVAL;
#line 423 "perlglue.xs"
		RETVAL = skiptokens(str, n);
#line 988 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Zephyr_have_zephyr); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Zephyr_have_zephyr)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Zephyr::have_zephyr", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	RETVAL;
	dXSTARG;
#line 433 "perlglue.xs"
		RETVAL = owl_global_is_havezephyr(&g);
#line 1013 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Internal_new_command); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Internal_new_command)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 5)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Internal::new_command", "name, func, summary, usage, description");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	char *	name = (char *)SvPV_nolen(ST(0));
	SV *	func = ST(1);
	char *	summary = (char *)SvPV_nolen(ST(2));
	char *	usage = (char *)SvPV_nolen(ST(3));
	char *	description = (char *)SvPV_nolen(ST(4));
#line 448 "perlglue.xs"
		owl_cmd cmd;
#line 1039 "perlglue.c"
#line 450 "perlglue.xs"
	{
		if(!SV_IS_CODEREF(func)) {
			croak("Command function must be a coderef!");
		}
		cmd.name = name;
		cmd.cmd_perl = newSVsv(func);
		cmd.summary = summary;
		cmd.usage = usage;
		cmd.description = description;
		cmd.validctx = OWL_CTX_ANY;
		cmd.cmd_aliased_to = NULL;
		cmd.cmd_args_fn = NULL;
		cmd.cmd_v_fn = NULL;
		cmd.cmd_i_fn = NULL;
		cmd.cmd_ctxargs_fn = NULL;
		cmd.cmd_ctxv_fn = NULL;
		cmd.cmd_ctxi_fn = NULL;
		owl_cmddict_add_cmd(owl_global_get_cmddict(&g), &cmd);
	   }
#line 1060 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl__Internal_new_variable_string); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Internal_new_variable_string)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 4)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Internal::new_variable_string", "name, ival, summ, desc");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	name = (const char *)SvPV_nolen(ST(0));
	const char *	ival = (const char *)SvPV_nolen(ST(1));
	const char *	summ = (const char *)SvPV_nolen(ST(2));
	const char *	desc = (const char *)SvPV_nolen(ST(3));
#line 477 "perlglue.xs"
	owl_variable_dict_newvar_string(owl_global_get_vardict(&g),
					name,
					summ,
					desc,
					ival);
#line 1088 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl__Internal_new_variable_int); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Internal_new_variable_int)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 4)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Internal::new_variable_int", "name, ival, summ, desc");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	name = (const char *)SvPV_nolen(ST(0));
	int	ival = (int)SvIV(ST(1));
	const char *	summ = (const char *)SvPV_nolen(ST(2));
	const char *	desc = (const char *)SvPV_nolen(ST(3));
#line 490 "perlglue.xs"
	owl_variable_dict_newvar_int(owl_global_get_vardict(&g),
				     name,
				     summ,
				     desc,
				     ival);
#line 1116 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl__Internal_new_variable_bool); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Internal_new_variable_bool)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 4)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Internal::new_variable_bool", "name, ival, summ, desc");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	name = (const char *)SvPV_nolen(ST(0));
	int	ival = (int)SvIV(ST(1));
	const char *	summ = (const char *)SvPV_nolen(ST(2));
	const char *	desc = (const char *)SvPV_nolen(ST(3));
#line 503 "perlglue.xs"
	owl_variable_dict_newvar_bool(owl_global_get_vardict(&g),
				      name,
				      summ,
				      desc,
				      ival);
#line 1144 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl__Internal_add_io_dispatch); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Internal_add_io_dispatch)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 3)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Internal::add_io_dispatch", "fd, mode, cb");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	fd = (int)SvIV(ST(0));
	int	mode = (int)SvIV(ST(1));
	SV *	cb = ST(2);
#line 515 "perlglue.xs"
	owl_select_add_perl_io_dispatch(fd, mode, newSVsv(cb));
#line 1167 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl__Internal_add_timer); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Internal_add_timer)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 3)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Internal::add_timer", "after, interval, cb");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	after = (int)SvIV(ST(0));
	int	interval = (int)SvIV(ST(1));
	SV *	cb = ST(2);
#line 523 "perlglue.xs"
		SV *ref;
		owl_timer *t;
#line 1191 "perlglue.c"
	IV	RETVAL;
	dXSTARG;
#line 526 "perlglue.xs"
		ref = sv_rvweaken(newSVsv(cb));
		t = owl_select_add_timer(after,
					 interval,
					 owl_perlconfig_perl_timer,
					 owl_perlconfig_perl_timer_destroy,
					 ref);
	owl_function_debugmsg("Created timer %p", t);
	RETVAL = (IV)t;
#line 1203 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Internal_remove_timer); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Internal_remove_timer)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Internal::remove_timer", "timer");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	IV	timer = (IV)SvIV(ST(0));
#line 541 "perlglue.xs"
		owl_timer *t;
#line 1225 "perlglue.c"
#line 543 "perlglue.xs"
		t = (owl_timer*)timer;
		owl_function_debugmsg("Freeing timer %p", t);
				owl_select_remove_timer(t);
#line 1230 "perlglue.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_BarnOwl__Editwin_replace); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_replace)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 2)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::replace", "count, string");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	count = (int)SvIV(ST(0));
	const char *	string = (const char *)SvPV_nolen(ST(1));
#line 554 "perlglue.xs"
		owl_editwin *e;
#line 1252 "perlglue.c"
	int	RETVAL;
	dXSTARG;
#line 556 "perlglue.xs"
		e = owl_global_get_typwin(&g);
		if (e) {
			RETVAL = owl_editwin_replace(e, count, string);
		} else {
			RETVAL = 0;
		}
#line 1262 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Editwin_point_move); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_point_move)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::point_move", "delta");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	int	delta = (int)SvIV(ST(0));
#line 569 "perlglue.xs"
		owl_editwin *e;
#line 1284 "perlglue.c"
	int	RETVAL;
	dXSTARG;
#line 571 "perlglue.xs"
		e = owl_global_get_typwin(&g);
		if (e) {
			RETVAL = owl_editwin_point_move(e, delta);
		} else {
			RETVAL = 0;
		}
#line 1294 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Editwin_replace_region); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_replace_region)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::replace_region", "string");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	const char *	string = (const char *)SvPV_nolen(ST(0));
#line 584 "perlglue.xs"
		owl_editwin *e;
#line 1316 "perlglue.c"
	int	RETVAL;
	dXSTARG;
#line 586 "perlglue.xs"
		e = owl_global_get_typwin(&g);
		if (e) {
			RETVAL = owl_editwin_replace_region(e, string);
		} else {
			RETVAL = 0;
		}
#line 1326 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Editwin_get_region); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_get_region)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::get_region", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 598 "perlglue.xs"
		char *region;
		owl_editwin *e;
#line 1348 "perlglue.c"
	const utf8 *	RETVAL;
#line 601 "perlglue.xs"
		e = owl_global_get_typwin(&g);
		if (e) {
			region = owl_editwin_get_region(owl_global_get_typwin(&g));
		} else {
			region = NULL;
		}
		RETVAL = region;
#line 1358 "perlglue.c"
	ST(0) = sv_newmortal();
        sv_setpv((SV*)ST(0), RETVAL);
        SvUTF8_on((SV*)ST(0));
#line 611 "perlglue.xs"
		owl_free(region);
#line 1364 "perlglue.c"
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Editwin_save_excursion); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_save_excursion)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 1)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::save_excursion", "sub");
    PERL_UNUSED_VAR(cv); /* -W */
    {
	SV *	sub = ST(0);
#line 618 "perlglue.xs"
		int count;
		owl_editwin *e;
		owl_editwin_excursion *x;
#line 1387 "perlglue.c"
	SV *	RETVAL;
#line 622 "perlglue.xs"
	{
		e = owl_global_get_typwin(&g);
		if(!e)
			croak("The edit window is not currently active!");

		x = owl_editwin_begin_excursion(owl_global_get_typwin(&g));
		PUSHMARK(SP);
		count = call_sv(sub, G_SCALAR|G_EVAL|G_NOARGS);
		SPAGAIN;
		owl_editwin_end_excursion(owl_global_get_typwin(&g), x);

		if(SvTRUE(ERRSV)) {
			croak(NULL);
		}

		if(count == 1)
			RETVAL = SvREFCNT_inc(POPs);
		else
			XSRETURN_UNDEF;

	}
#line 1411 "perlglue.c"
	ST(0) = RETVAL;
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Editwin_current_column); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_current_column)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::current_column", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 649 "perlglue.xs"
		owl_editwin *e;
#line 1433 "perlglue.c"
	int	RETVAL;
	dXSTARG;
#line 651 "perlglue.xs"
		e = owl_global_get_typwin(&g);
		if (e) {
			RETVAL = owl_editwin_current_column(e);
		} else {
			RETVAL = 0;
		}
#line 1443 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Editwin_point); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_point)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::point", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 663 "perlglue.xs"
		owl_editwin *e;
#line 1464 "perlglue.c"
	int	RETVAL;
	dXSTARG;
#line 665 "perlglue.xs"
		e = owl_global_get_typwin(&g);
		if (e) {
			RETVAL = owl_editwin_get_point(e);
		} else {
			RETVAL = 0;
		}
#line 1474 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_BarnOwl__Editwin_mark); /* prototype to pass -Wmissing-prototypes */
XS(XS_BarnOwl__Editwin_mark)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 0)
       Perl_croak(aTHX_ "Usage: %s(%s)", "BarnOwl::Editwin::mark", "");
    PERL_UNUSED_VAR(cv); /* -W */
    {
#line 677 "perlglue.xs"
		owl_editwin *e;
#line 1495 "perlglue.c"
	int	RETVAL;
	dXSTARG;
#line 679 "perlglue.xs"
		e = owl_global_get_typwin(&g);
		if (e) {
			RETVAL = owl_editwin_get_mark(e);
		} else {
			RETVAL = 0;
		}
#line 1505 "perlglue.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_BarnOwl); /* prototype to pass -Wmissing-prototypes */
XS(boot_BarnOwl)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    char* file = __FILE__;

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
    XS_VERSION_BOOTCHECK ;

        newXSproto("BarnOwl::command", XS_BarnOwl_command, file, "$;@");
        newXSproto("BarnOwl::getcurmsg", XS_BarnOwl_getcurmsg, file, "");
        newXSproto("BarnOwl::getnumcols", XS_BarnOwl_getnumcols, file, "");
        newXSproto("BarnOwl::getidletime", XS_BarnOwl_getidletime, file, "");
        newXSproto("BarnOwl::zephyr_getrealm", XS_BarnOwl_zephyr_getrealm, file, "");
        newXSproto("BarnOwl::zephyr_getsender", XS_BarnOwl_zephyr_getsender, file, "");
        newXSproto("BarnOwl::zephyr_zwrite", XS_BarnOwl_zephyr_zwrite, file, "$$");
        newXSproto("BarnOwl::ztext_stylestrip", XS_BarnOwl_ztext_stylestrip, file, "$");
        newXSproto("BarnOwl::zephyr_smartstrip_user", XS_BarnOwl_zephyr_smartstrip_user, file, "$");
        newXSproto("BarnOwl::zephyr_getsubs", XS_BarnOwl_zephyr_getsubs, file, "");
        newXSproto("BarnOwl::queue_message", XS_BarnOwl_queue_message, file, "$");
        newXSproto("BarnOwl::admin_message", XS_BarnOwl_admin_message, file, "$$");
        newXSproto("BarnOwl::start_question", XS_BarnOwl_start_question, file, "$$");
        newXSproto("BarnOwl::start_password", XS_BarnOwl_start_password, file, "$$");
        newXSproto("BarnOwl::start_edit_win", XS_BarnOwl_start_edit_win, file, "$$");
        newXSproto("BarnOwl::get_data_dir", XS_BarnOwl_get_data_dir, file, "");
        newXSproto("BarnOwl::get_config_dir", XS_BarnOwl_get_config_dir, file, "");
        newXSproto("BarnOwl::popless_text", XS_BarnOwl_popless_text, file, "$");
        newXSproto("BarnOwl::popless_ztext", XS_BarnOwl_popless_ztext, file, "$");
        newXSproto("BarnOwl::error", XS_BarnOwl_error, file, "$");
        newXSproto("BarnOwl::debug", XS_BarnOwl_debug, file, "$");
        newXSproto("BarnOwl::message", XS_BarnOwl_message, file, "$");
        newXSproto("BarnOwl::create_style", XS_BarnOwl_create_style, file, "$$");
        newXSproto("BarnOwl::getnumcolors", XS_BarnOwl_getnumcolors, file, "");
        newXSproto("BarnOwl::_remove_filter", XS_BarnOwl__remove_filter, file, "$");
        newXSproto("BarnOwl::wordwrap", XS_BarnOwl_wordwrap, file, "$$");
        newXSproto("BarnOwl::remove_io_dispatch", XS_BarnOwl_remove_io_dispatch, file, "$");
        newXSproto("BarnOwl::all_filters", XS_BarnOwl_all_filters, file, "");
        newXSproto("BarnOwl::all_styles", XS_BarnOwl_all_styles, file, "");
        newXSproto("BarnOwl::all_variables", XS_BarnOwl_all_variables, file, "");
        newXSproto("BarnOwl::all_keymaps", XS_BarnOwl_all_keymaps, file, "");
        newXSproto("BarnOwl::redisplay", XS_BarnOwl_redisplay, file, "");
        newXSproto("BarnOwl::get_zephyr_variable", XS_BarnOwl_get_zephyr_variable, file, "$");
        newXSproto("BarnOwl::skiptokens", XS_BarnOwl_skiptokens, file, "$$");
        newXSproto("BarnOwl::Zephyr::have_zephyr", XS_BarnOwl__Zephyr_have_zephyr, file, "");
        newXSproto("BarnOwl::Internal::new_command", XS_BarnOwl__Internal_new_command, file, "$$$$$");
        newXSproto("BarnOwl::Internal::new_variable_string", XS_BarnOwl__Internal_new_variable_string, file, "$$$$");
        newXSproto("BarnOwl::Internal::new_variable_int", XS_BarnOwl__Internal_new_variable_int, file, "$$$$");
        newXSproto("BarnOwl::Internal::new_variable_bool", XS_BarnOwl__Internal_new_variable_bool, file, "$$$$");
        newXSproto("BarnOwl::Internal::add_io_dispatch", XS_BarnOwl__Internal_add_io_dispatch, file, "$$$");
        newXSproto("BarnOwl::Internal::add_timer", XS_BarnOwl__Internal_add_timer, file, "$$$");
        newXSproto("BarnOwl::Internal::remove_timer", XS_BarnOwl__Internal_remove_timer, file, "$");
        newXSproto("BarnOwl::Editwin::replace", XS_BarnOwl__Editwin_replace, file, "$$");
        newXSproto("BarnOwl::Editwin::point_move", XS_BarnOwl__Editwin_point_move, file, "$");
        newXSproto("BarnOwl::Editwin::replace_region", XS_BarnOwl__Editwin_replace_region, file, "$");
        newXSproto("BarnOwl::Editwin::get_region", XS_BarnOwl__Editwin_get_region, file, "");
        newXSproto("BarnOwl::Editwin::save_excursion", XS_BarnOwl__Editwin_save_excursion, file, "&");
        newXSproto("BarnOwl::Editwin::current_column", XS_BarnOwl__Editwin_current_column, file, "");
        newXSproto("BarnOwl::Editwin::point", XS_BarnOwl__Editwin_point, file, "");
        newXSproto("BarnOwl::Editwin::mark", XS_BarnOwl__Editwin_mark, file, "");
    if (PL_unitcheckav)
         call_list(PL_scopestack_ix, PL_unitcheckav);
    XSRETURN_YES;
}

