/*
 * This file was generated automatically by xsubpp version 1.933 from the 
 * contents of Zion.xs. Don't edit this file, edit Zion.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST! 
 *
 */

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <string.h>
#include <stdio.h>

XS(XS_Zion_fields)
{
    dXSARGS;
    if (items != 0)
	croak("Usage: Zion::fields()");
    SP -= items;
    {
	  int nof, nfl, l;
	  char *nf;
	  char *f;
	  nof = gimme_number_of_fields();
	  nf = gimme_notice_fields();
	  nfl = gimme_notice_fields_length();
	  while(nof > 0){
	    f = get_next_field(&nf, &nfl);
            l = strlen(f);
	    XPUSHs(sv_2mortal(newSVpv(f, l)));
	    nof--;
	  }
	PUTBACK;
	return;
    }
}

XS(XS_Zion_put)
{
    dXSARGS;
    if (items != 1)
	croak("Usage: Zion::put(zph)");
    {
	char *	zph = (char *)SvPV(ST(0),na);
		exec_put(zph);
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_Zion)
{
    dXSARGS;
    char* file = __FILE__;

    XS_VERSION_BOOTCHECK ;

        newXS("Zion::fields", XS_Zion_fields, file);
        newXS("Zion::put", XS_Zion_put, file);
    ST(0) = &sv_yes;
    XSRETURN(1);
}
