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

MODULE = Zion  PACKAGE = Zion
PROTOTYPES: DISABLE
void
fields()
	PPCODE:
	  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--;
	  }

void
put(zph)
	char * zph
	CODE:
		exec_put(zph);

