view release on metacpan or search on metacpan
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
struct sockaddr_ll sll;
char *addrbytes;
STRLEN addrlen;
PPCODE:
if (DO_UTF8(addr) && !sv_utf8_downgrade(addr, 1))
croak("Wide character in Socket::Packet::pack_sockaddr_ll");
addrbytes = SvPVbyte(addr, addrlen);
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
STRLEN sa_len;
char *sa_bytes;
struct sockaddr_ll sll;
PPCODE:
/* variable size of structure, because of variable length of addr bytes */
sa_bytes = SvPVbyte(sa, sa_len);
if(sa_len < sll_min)
croak("Socket address too small; found %d bytes, expected at least %d", sa_len, sll_min);
if(sa_len > sll_max)
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
struct packet_mreq mreq;
char *addr_bytes;
STRLEN addr_len;
PPCODE:
if (DO_UTF8(addr) && !sv_utf8_downgrade(addr, 1))
croak("Wide character in Socket::Packet::pack_sockaddr_ll");
addr_bytes = SvPVbyte(addr, addr_len);
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
STRLEN data_len;
char *data_bytes;
struct packet_mreq mreq;
PPCODE:
data_bytes = SvPVbyte(data, data_len);
if(data_len != sizeof(mreq))
croak("packet_mreq buffer incorrect size; found %d bytes, expected %d", data_len, sizeof(mreq));
Copy(data_bytes, &mreq, data_len, char);
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
STRLEN stats_len;
char *stats_bytes;
struct tpacket_stats statsbuf;
PPCODE:
stats_bytes = SvPVbyte(stats, stats_len);
if(stats_len != sizeof(statsbuf))
croak("tpacket_stats buffer incorrect size; found %d bytes, expected %d", stats_len, sizeof(statsbuf));
Copy(stats_bytes, &statsbuf, stats_len, char);
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
int fd;
int result;
struct timeval tv;
PPCODE:
fd = PerlIO_fileno(sock);
if(ioctl(fd, SIOCGSTAMP, &tv) == -1) {
if(GIMME_V == G_ARRAY)
return;
else
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
int fd;
int result;
struct timespec ts;
PPCODE:
#ifdef SIOCGSTAMPNS
fd = PerlIO_fileno(sock);
if(ioctl(fd, SIOCGSTAMPNS, &ts) == -1) {
if(GIMME_V == G_ARRAY)
return;
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
int fd;
struct ifreq req;
PPCODE:
#ifdef SIOCGIFINDEX
fd = PerlIO_fileno(sock);
strncpy(req.ifr_name, ifname, IFNAMSIZ);
if(ioctl(fd, SIOCGIFINDEX, &req) == -1)
XSRETURN_UNDEF;
lib/Socket/Packet.xs view on Meta::CPAN
PREINIT:
int fd;
struct ifreq req;
PPCODE:
#ifdef SIOCGIFNAME
fd = PerlIO_fileno(sock);
req.ifr_ifindex = ifindex;
if(ioctl(fd, SIOCGIFNAME, &req) == -1)
XSRETURN_UNDEF;
lib/Socket/Packet.xs view on Meta::CPAN
char *bufferp;
struct sockaddr_storage addr;
socklen_t addrlen;
int len;
PPCODE:
fd = PerlIO_fileno(sock);
if(!SvOK(buffer))
sv_setpvn(buffer, "", 0);
lib/Socket/Packet.xs view on Meta::CPAN
int version;
struct tpacket_req req;
size_t size;
char *addr;
PPCODE:
#ifdef HAVE_RX_RING
fd = PerlIO_fileno(sock);
#ifdef HAVE_TPACKET2
version = TPACKET_V2;
if(setsockopt(fd, SOL_PACKET, PACKET_VERSION, &version, sizeof version) != 0)
lib/Socket/Packet.xs view on Meta::CPAN
#endif
void
get_ring_frame_status(sock)
InputStream sock
PPCODE:
#ifdef HAVE_RX_RING
{
struct packet_rxring_state *state = get_rxring_state((SV*)sv_2io(ST(0)));
char *addr = frame_ptr(state);
#if defined(HAVE_TPACKET2)
lib/Socket/Packet.xs view on Meta::CPAN
SV *buffer
HV *info
PREINIT:
PPCODE:
#ifdef HAVE_RX_RING
{
struct packet_rxring_state *state = get_rxring_state((SV*)sv_2io(ST(0)));
char *addr = frame_ptr(state);
unsigned int len;
lib/Socket/Packet.xs view on Meta::CPAN
#endif
void
done_ring_frame(sock)
InputStream sock
PPCODE:
#ifdef HAVE_RX_RING
{
struct packet_rxring_state *state = get_rxring_state((SV*)sv_2io(ST(0)));
char *addr = frame_ptr(state);
#if defined(HAVE_TPACKET2)
view all matches for this distribution
view release on metacpan or search on metacpan
void
gethostbyname2(host, af)
char * host;
int af;
PPCODE:
{
#ifdef HAVE_GETHOSTBYNAME2
struct hostent *phe;
int count, i;
}
void
unpack_sockaddr_in6(sin_sv)
SV * sin_sv
PPCODE:
{
#ifdef INET6_ADDRSTRLEN
STRLEN sockaddrlen;
struct sockaddr_in6 addr;
unsigned short port;
}
void
unpack_sockaddr_in6_all(sin_sv)
SV * sin_sv
PPCODE:
{
#ifdef INET6_ADDRSTRLEN
STRLEN sockaddrlen;
struct sockaddr_in6 addr;
unsigned short port;
char * port
int family
int socktype
int protocol
int flags
PPCODE:
{
#ifdef HAVE_GETADDRINFO
struct addrinfo hints, * res;
int err;
int count;
void
getnameinfo(sin_sv, flags = 0)
SV * sin_sv
int flags;
PPCODE:
{
#ifdef HAVE_GETNAMEINFO
STRLEN sockaddrlen;
struct sockaddr * sin = (struct sockaddr *)SvPV(sin_sv,sockaddrlen);
char host[NI_MAXHOST];
int err;
char **p;
SV *temp, *address_ref, *alias_ref;
AV *address_list, *alias_list;
#endif
PPCODE:
{
#ifdef HAVE_GETIPNODEBYNAME
he = getipnodebyname(hostname, family, flags, &err);
if (err == 0) {
SV *temp, *address_ref, *alias_ref;
AV *address_list, *alias_list;
struct in6_addr addr;
char *addr_buffer;
#endif
PPCODE:
{
#ifdef HAVE_GETIPNODEBYADDR
addr_buffer = SvPV(address_sv, addrlen);
switch(family) {
view all matches for this distribution
view release on metacpan or search on metacpan
# in $Solaris::ACL::error.
void
getfacl(file_name)
SV * file_name;
PPCODE:
{
char *file_string; /* c-string version of file_name */
int file_string_length; /* need to pass a variable to SvPV */
HV *acl_hash, *default_acl_hash, *current_acl_hash;
HV *user_hash, *default_user_hash, **current_user_hash;
void
setfacl(file_name, acl_hashref, ...)
SV *file_name;
SV *acl_hashref;
PPCODE:
{
char *file_string; /* c-string version of file_name */
int file_string_length; /* need to pass a variable to SvPV */
HV *acl_hash, *def_acl_hash;
view all matches for this distribution
view release on metacpan or search on metacpan
char *ctlbuf;
char *databuf;
struct strbuf ctl, data;
SV * sv_mid, * sv_sid, * sv_level, * sv_flags,
* sv_ltime, * sv_ttime, * sv_seq_no, * sv_pri;
PPCODE:
flags = 0;
/* set up the control buffer */
ctl.maxlen = ctl.len = sizeof(lc);
ctl.buf = (char *) &lc;
view all matches for this distribution
view release on metacpan or search on metacpan
char *p;
char *n;
char *t;
char errstr[1024];
int i, fd, ii, count;
PPCODE:
hash = newHV();
ret = (SV*)newRV_noinc((SV*)hash);
stash = gv_stashpv(class,TRUE);
sv_bless(ret,stash);
MAGIC *mg;
SV *ref;
STRLEN plen;
char *pval;
int i;
PPCODE:
mg = mg_find(SvRV(self), 'P');
if(!mg) { croak("lost P magic"); }
ref = mg->mg_obj;
PUSHMARK(SP);
XPUSHs(ref);
kvm_dev_t *kp;
kvm_var_t *kv;
struct nlist *nl;
char *t;
int i;
PPCODE:
hash = (HV*)SvRV(self);
k = SvPV(key, klen);
mg = mg_find(SvRV(self),'~');
if(!mg) { croak("lost ~ magic"); }
kp = (kvm_dev_t*)SvIVX(mg->mg_obj);
FIRSTKEY(self)
SV *self;
PREINIT:
HV *hash;
HE *he;
PPCODE:
hash = (HV*)SvRV(self);
hv_iterinit(hash);
if (he = hv_iternext(hash)) {
EXTEND(sp, 1);
PUSHs(hv_iterkeysv(he));
SV *self;
SV *lastkey;
PREINIT:
HV *hash;
HE *he;
PPCODE:
hash = (HV*)SvRV(self);
if (he = hv_iternext(hash)) {
EXTEND(sp, 1);
PUSHs(hv_iterkeysv(he));
}
SV *ret;
char *pval;
STRLEN plen;
kvm_var_t *kv;
int i;
PPCODE:
hash = (HV*)SvRV(self);
pval = SvPV(prop, plen);
var = hv_fetch(hash, pval, plen, FALSE);
if(var) {
view all matches for this distribution
view release on metacpan or search on metacpan
RETURN_UNDEF_IF_FAIL;
OUTPUT:
RETVAL
#
# Functions below convert C arrays into Perl lists. They use XS PPCODE
# directive to avoid implicit RETVAL assignments and manipulate perl
# stack directly.
#
# When called in scalar context functions return the number of elements
# in the list or undef on failure.
lgrp_cookie_t cookie;
lgrp_id_t lgrp;
PREINIT:
lgrp_id_t *lgrps;
int count;
PPCODE:
errno = 0;
if ((count = lgrp_children(cookie, lgrp, NULL, 0)) < 0)
LGRP_BADVAL();
if (GIMME_V == G_SCALAR)
lgrp_cookie_t cookie;
lgrp_id_t lgrp;
PREINIT:
lgrp_id_t *lgrps;
int count;
PPCODE:
errno = 0;
if ((count = lgrp_parents(cookie, lgrp, NULL, 0)) < 0)
LGRP_BADVAL();
if (GIMME_V == G_SCALAR)
lgrp_id_t lgrp;
lgrp_content_t content;
PREINIT:
int ncpus;
processorid_t *cpus;
PPCODE:
errno = 0;
if ((ncpus = lgrp_cpus(cookie, lgrp, NULL, 0, content)) < 0)
LGRP_BADVAL();
if (GIMME_V == G_SCALAR)
void
lgrp_resources(cookie, lgrp, type)
lgrp_cookie_t cookie;
lgrp_id_t lgrp;
int type;
PPCODE:
LGRP_RESOURCES(cookie, lgrp, type);
view all matches for this distribution
view release on metacpan or search on metacpan
FIRSTKEY(self)
SV *self;
PREINIT:
HV *hash;
HE *he;
PPCODE:
hash = (HV*)SvRV(self);
hv_iterinit(hash);
if (he = hv_iternext(hash)) {
EXTEND(sp, 1);
PUSHs(hv_iterkeysv(he));
SV *self;
SV *lastkey;
PREINIT:
HV *hash;
HE *he;
PPCODE:
hash = (HV*)SvRV(self);
if (he = hv_iternext(hash)) {
EXTEND(sp, 1);
PUSHs(hv_iterkeysv(he));
}
view all matches for this distribution
view release on metacpan or search on metacpan
loadavg(nelem=LOADAVG_NSTATS)
int nelem;
PREINIT:
double *loadavg;
int rc, i;
PPCODE:
if (nelem > 3 || nelem < 1)
croak("invalid nelem (%d)", nelem);
New(0, loadavg, sizeof(double)*nelem, double);
if ((rc = getloadavg(loadavg, nelem)) != nelem)
croak("getloadavg failed (%d)", rc);
view all matches for this distribution
view release on metacpan or search on metacpan
Kstat/Kstat.xs view on Meta::CPAN
SV*
FIRSTKEY(self)
SV* self;
PREINIT:
HE *he;
PPCODE:
self = SvRV(self);
read_kstats((HV*)self, FALSE);
hv_iterinit((HV*)self);
if (he = hv_iternext((HV*)self))
{
Kstat/Kstat.xs view on Meta::CPAN
NEXTKEY(self, lastkey)
SV* self;
SV* lastkey;
PREINIT:
HE *he;
PPCODE:
self = SvRV(self);
if (he = hv_iternext((HV*)self))
{
EXTEND(sp, 1);
PUSHs(hv_iterkeysv(he));
view all matches for this distribution
view release on metacpan or search on metacpan
RETVAL
void
sort_int32(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_int32", av_ref, int32_t, djbsort_int32, av_to_int32, int32_to_av)
void
sort_int32down(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_int32down", av_ref, int32_t, djbsort_int32down, av_to_int32, int32_to_av)
void
sort_uint32(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_uint32", av_ref, uint32_t, djbsort_uint32, av_to_uint32, uint32_to_av)
void
sort_uint32down(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_uint32down", av_ref, uint32_t, djbsort_uint32down, av_to_uint32, uint32_to_av)
void
sort_int64(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_int64", av_ref, int64_t, djbsort_int64, av_to_int64, int64_to_av)
void
sort_int64down(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_int64down", av_ref, int64_t, djbsort_int64down, av_to_int64, int64_to_av)
void
sort_uint64(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_uint64", av_ref, uint64_t, djbsort_uint64, av_to_uint64, uint64_to_av)
void
sort_uint64down(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_uint64down", av_ref, uint64_t, djbsort_uint64down, av_to_uint64, uint64_to_av)
void
sort_float32(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_float32", av_ref, float, djbsort_float32, av_to_float32, float32_to_av)
void
sort_float32down(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_float32down", av_ref, float, djbsort_float32down, av_to_float32, float32_to_av)
void
sort_float64(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_float64", av_ref, double, djbsort_float64, av_to_float64, float64_to_av)
void
sort_float64down(av_ref)
SV *av_ref
PPCODE:
SORT_BODY("sort_float64down", av_ref, double, djbsort_float64down, av_to_float64, float64_to_av)
view all matches for this distribution
view release on metacpan or search on metacpan
External.xs view on Meta::CPAN
OUTPUT: RETVAL
void
DESTROY(self)
SortExternal *self;
PPCODE:
SortEx_destroy(self);
void
feed(self, ...)
SortExternal *self;
PPCODE:
{
AV *const item_cache = self->item_cache;
I32 start = av_len(item_cache) + 1;
I32 new_size = start + items - 1;
IV space = (OVERHEAD + sizeof(SV*)) * (items - 1);
External.xs view on Meta::CPAN
}
void
fetch(self)
SortExternal *self;
PPCODE:
{
if (self->fetch_tick > av_len(self->item_cache)) {
ENTER;
SAVETMPS;
PUSHMARK(SP);
External.xs view on Meta::CPAN
void
_set_mem_bytes(self, mem_bytes)
SortExternal *self;
IV mem_bytes;
PPCODE:
self->mem_bytes = mem_bytes;
void
_set_fetch_tick(self, fetch_tick)
SortExternal *self;
IV fetch_tick;
PPCODE:
self->fetch_tick = fetch_tick;
void
_set_temp_fh(self, tempfile_fh)
SortExternal *self;
SV *tempfile_fh;
PPCODE:
SvREFCNT_dec(self->tempfile_fh);
self->tempfile_fh = newSVsv(tempfile_fh);
self->fh = IoIFP( sv_2io(tempfile_fh) );
void
_print_to_sortfile(self, input_av, fh)
SortExternal *self;
AV *input_av;
PerlIO *fh;
PPCODE:
SortEx_print_to_sortfile(self, input_av, fh);
void
_utf8_on(sv)
SV *sv;
PPCODE:
/* Testing only. */
SvUTF8_on(sv);
MODULE = Sort::External PACKAGE = Sort::External::SortExRun
External.xs view on Meta::CPAN
OUTPUT: RETVAL
void
DESTROY(self)
SortExRun *self;
PPCODE:
SortExRun_destroy(self);
SV*
_get_buffarray(self)
SortExRun *self;
External.xs view on Meta::CPAN
void
_set_buffarray(self, buffarray);
SortExRun *self;
AV *buffarray;
PPCODE:
SvREFCNT_dec((SV*)self->buffarray);
self->buffarray = (AV*)SvREFCNT_inc((SV*)buffarray);
IV
_refill_buffer(self)
view all matches for this distribution
view release on metacpan or search on metacpan
PROTOTYPES: DISABLE
void
mkkey_domain(domain = NULL)
SV *domain
PPCODE:
if (!domain)
domain = DEFSV;
EXTEND(SP, 1);
ST(0) = mkkey_domain(aTHX_ domain);
XSRETURN(1);
view all matches for this distribution
view release on metacpan or search on metacpan
pack_netipv4(netipv4=NULL)
SV *netipv4
PREINIT:
UV ip;
const char *p;
PPCODE:
if (!netipv4)
netipv4 = DEFSV;
if (parse_ip(aTHX_ SvPV_nolen(netipv4), '/', &ip, &p)) {
int len;
if (parse_len(aTHX_ p, &len)) {
view all matches for this distribution
view release on metacpan or search on metacpan
LargeInt.xs view on Meta::CPAN
MODULE = Sort::Key::LargeInt PACKAGE = Sort::Key::LargeInt
void
encode_largeint(li=NULL)
SV *li
PPCODE:
if (!li)
li = DEFSV;
{
STRLEN len;
const char *li_pv = SvPV(li, len);
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
I32 (*cmp)(pTHX_ SV *, SV *);
int min, max, pv;
SV **srci, **src0j, *k0, *i0;
SV *src0;
PPCODE:
switch (type) {
case 0:
cmp=&Perl_sv_cmp;
break;
case 1:
view all matches for this distribution
view release on metacpan or search on metacpan
PROTOTYPES: DISABLE
void
encode_oid(oid=NULL)
SV *oid
PPCODE:
if (!oid)
oid = DEFSV;
{
STRLEN len;
const char * str = SvPV(oid, len);
view all matches for this distribution
view release on metacpan or search on metacpan
rnsort = 130
risort = 131
rusort = 132
rfsort = 133
rssort = 135
PPCODE:
radix_sort(aTHX_ ix, 0, 0, 0, ax, items);
SPAGAIN;
XSRETURN(items);
void
rnkeysort = 130
rikeysort = 131
rukeysort = 132
rfkeysort = 133
rskeysort = 135
PPCODE:
radix_sort(aTHX_ ix, keygen, 0, 1, ax, items - 1);
SPAGAIN;
XSRETURN(items - 1);
view all matches for this distribution
view release on metacpan or search on metacpan
rkeytop = 128
rlkeytop = 129
rnkeytop = 130
rikeytop = 131
rukeytop = 132
PPCODE:
check_keygen(aTHX_ keygen);
XSRETURN(_keytop(aTHX_ ix, keygen, top, 0, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
top(IV top, ...)
rtop = 128
rltop = 129
rntop = 130
ritop = 131
rutop = 132
PPCODE:
XSRETURN(_keytop(aTHX_ ix, 0, top, 0, MODE_SORT, items-1, ax, (GIMME_V == G_ARRAY)));
void
keypart(SV *keygen, IV top, ...)
PROTOTYPE: &@
rkeypart = 128
rlkeypart = 129
rnkeypart = 130
rikeypart = 131
rukeypart = 132
PPCODE:
check_keygen(aTHX_ keygen);
XSRETURN(_keytop(aTHX_ ix, keygen, top, MODE_PART, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
part(IV top, ...)
rpart = 128
rlpart = 129
rnpart = 130
ripart = 131
rupart = 132
PPCODE:
XSRETURN(_keytop(aTHX_ ix, 0, top, MODE_PART, 1, items-1, ax, (GIMME_V == G_ARRAY)));
void
keypartref(SV *keygen, IV top, ...)
PROTOTYPE: &@
rkeypartref = 128
rlkeypartref = 129
rnkeypartref = 130
rikeypartref = 131
rukeypartref = 132
PPCODE:
check_keygen(aTHX_ keygen);
XSRETURN(_keytop(aTHX_ ix, keygen, top, MODE_PARTREF, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
partref(IV top, ...)
rpartref = 128
rlpartref = 129
rnpartref = 130
ripartref = 131
rupartref = 132
PPCODE:
XSRETURN(_keytop(aTHX_ ix, 0, top, MODE_PARTREF, 1, items-1, ax, (GIMME_V == G_ARRAY)));
void
keytopsort(SV *keygen, IV top, ...)
PROTOTYPE: &@
rkeytopsort = 128
rlkeytopsort = 129
rnkeytopsort = 130
rikeytopsort = 131
rukeytopsort = 132
PPCODE:
check_keygen(aTHX_ keygen);
XSRETURN(_keytop(aTHX_ ix, keygen, top, MODE_SORT, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
topsort(IV top, ...)
rtopsort = 128
rltopsort = 129
rntopsort = 130
ritopsort = 131
rutopsort = 132
PPCODE:
XSRETURN(_keytop(aTHX_ ix, 0, top, MODE_SORT, 1, items-1, ax, (GIMME_V == G_ARRAY)));
void
keyhead(SV *keygen, ...)
PROTOTYPE: &@
rkeyhead = 128
rlkeyhead = 129
rnkeyhead = 130
rikeyhead = 131
rukeyhead = 132
PPCODE:
check_keygen(aTHX_ keygen);
XSRETURN(_keytop(aTHX_ ix, keygen, 1, 0, 1, items-1, ax, 0));
void
keytail(SV *keygen, ...)
rkeytail = 128
rlkeytail = 129
rnkeytail = 130
rikeytail = 131
rukeytail = 132
PPCODE:
check_keygen(aTHX_ keygen);
XSRETURN(_keytop(aTHX_ ix, keygen, -1, 0, 1, items-1, ax, 0));
void
head(...)
rhead = 128
rlhead = 129
rnhead = 130
rihead = 131
ruhead = 132
PPCODE:
XSRETURN(_keytop(aTHX_ ix, 0, 1, 0, 0, items, ax, 0));
void
tail(...)
PROTOTYPE: @
rtail = 128
rltail = 129
rntail = 130
ritail = 131
rutail = 132
PPCODE:
XSRETURN(_keytop(aTHX_ ix, 0, -1, 0, 0, items, ax, 0));
void
keyatpos(SV *keygen, IV n, ...)
PROTOTYPE: &@
rkeyatpos = 128
rlkeyatpos = 129
rnkeyatpos = 130
rikeyatpos = 131
rukeyatpos = 132
PPCODE:
check_keygen(aTHX_ keygen);
XSRETURN(_keytop(aTHX_ ix, keygen, (n < 0 ? n : n + 1), 1, 2, items-2, ax, 0));
void
atpos(IV n, ...)
ratpos = 128
rlatpos = 129
rnatpos = 130
riatpos = 131
ruatpos = 132
PPCODE:
XSRETURN(_keytop(aTHX_ ix, 0, (n < 0 ? n : n + 1), 1, 1, items-1, ax, 0));
void
slottop(SV *slot, IV top, ...)
PROTOTYPE: @
rslottop = 128
rlslottop = 129
rnslottop = 130
rislottop = 131
ruslottop = 132
PPCODE:
check_slot(aTHX_ slot);
XSRETURN(_keytop(aTHX_ ix, slot, top, 0, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
slotpart(SV *slot, IV top, ...)
rslotpart = 128
rlslotpart = 129
rnslotpart = 130
rislotpart = 131
ruslotpart = 132
PPCODE:
check_slot(aTHX_ slot);
XSRETURN(_keytop(aTHX_ ix, slot, top, MODE_PART, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
slotpartref(SV *slot, IV top, ...)
rslotpartref = 128
rlslotpartref = 129
rnslotpartref = 130
rislotpartref = 131
ruslotpartref = 132
PPCODE:
check_slot(aTHX_ slot);
XSRETURN(_keytop(aTHX_ ix, slot, top, MODE_PARTREF, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
slottopsort(SV *slot, IV top, ...)
rslottopsort = 128
rlslottopsort = 129
rnslottopsort = 130
rislottopsort = 131
ruslottopsort = 132
PPCODE:
check_slot(aTHX_ slot);
XSRETURN(_keytop(aTHX_ ix, slot, top, MODE_SORT, 2, items-2, ax, (GIMME_V == G_ARRAY)));
void
slothead(SV *slot, ...)
rslothead = 128
rlslothead = 129
rnslothead = 130
rislothead = 131
ruslothead = 132
PPCODE:
check_slot(aTHX_ slot);
XSRETURN(_keytop(aTHX_ ix, slot, 1, 0, 1, items-1, ax, 0));
void
slottail(SV *slot, ...)
rslottail = 128
rlslottail = 129
rnslottail = 130
rislottail = 131
ruslottail = 132
PPCODE:
check_slot(aTHX_ slot);
XSRETURN(_keytop(aTHX_ ix, slot, -1, 0, 1, items-1, ax, 0));
void
slotatpos(SV *slot, IV n, ...)
rslotatpos = 128
rlslotatpos = 129
rnslotatpos = 130
rislotatpos = 131
ruslotatpos = 132
PPCODE:
check_slot(aTHX_ slot);
XSRETURN(_keytop(aTHX_ ix, slot, (n < 0 ? n : n + 1), 1, 2, items-2, ax, 0));
view all matches for this distribution
view release on metacpan or search on metacpan
rkeysort = 128
rlkeysort = 129
rnkeysort = 130
rikeysort = 131
rukeysort = 132
PPCODE:
items--;
if (items) {
_keysort(aTHX_ ix, keygen, 0, 1, ax, items);
SPAGAIN;
SP = &ST(items-1);
rkeysort_inplace = 128
rlkeysort_inplace = 129
rnkeysort_inplace = 130
rikeysort_inplace = 131
rukeysort_inplace = 132
PPCODE:
if ((len=av_len(values)+1)) {
/* warn("ix=%d\n", ix); */
if (SvMAGICAL(values) || AvREIFY(values)) {
int i;
magic_values = values;
rsort = 128
rlsort = 129
rnsort = 130
risort = 131
rusort = 132
PPCODE:
if (items) {
_keysort(aTHX_ ix, 0, 0, 0, ax, items);
SPAGAIN;
SP = &ST(items-1);
}
rsort_inplace = 128
rlsort_inplace = 129
rnsort_inplace = 130
risort_inplace = 131
rusort_inplace = 132
PPCODE:
if ((len=av_len(values)+1)) {
/* warn("ix=%d\n", ix); */
if (SvMAGICAL(values) || AvREIFY(values)) {
int i;
magic_values = values;
view all matches for this distribution
view release on metacpan or search on metacpan
const-xs.inc view on Meta::CPAN
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
type = constant(aTHX_ s, len);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
switch (type) {
case PERL_constant_NOTFOUND:
view all matches for this distribution
view release on metacpan or search on metacpan
const-xs.inc view on Meta::CPAN
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
type = constant(aTHX_ s, len);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
switch (type) {
case PERL_constant_NOTFOUND:
view all matches for this distribution
view release on metacpan or search on metacpan
void
Vosk_model_free (model)
SV * model
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
Vosk_model_free(model);
if (PL_markstack_ptr != temp) {
/* truly void, because dXSARGS not invoked */
PL_markstack_ptr = temp;
void
Vosk_recognizer_free (recognizer)
SV * recognizer
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
Vosk_recognizer_free(recognizer);
if (PL_markstack_ptr != temp) {
/* truly void, because dXSARGS not invoked */
PL_markstack_ptr = temp;
Vosk_recognizer_set_words (recognizer, words)
SV * recognizer
int words
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
Vosk_recognizer_set_words(recognizer, words);
if (PL_markstack_ptr != temp) {
/* truly void, because dXSARGS not invoked */
PL_markstack_ptr = temp;
SV * recognizer
void
Vosk_set_log_level(log_level)
int log_level
PPCODE:
vosk_set_log_level(log_level);
return;
view all matches for this distribution
view release on metacpan or search on metacpan
Audio/SPX.xs view on Meta::CPAN
cont_ad_t * cont
PREINIT:
int32 res, delta_sil, delta_speech, min_noise, max_noise,
winsize, speech_onset, sil_onset, leader, trailer;
float32 adapt_rate;
PPCODE:
#ifdef HAVE_ADAPT_RATE
res = cont_ad_get_params(cont, &delta_sil, &delta_speech,
&min_noise, &max_noise, &winsize, &speech_onset,
&sil_onset, &leader, &trailer, &adapt_rate);
#else
view all matches for this distribution
view release on metacpan or search on metacpan
int16_t *buffer = NULL;
int samples = 0;
int bytes_per_sample = 0;
int i = 0;
PPCODE:
if (SWIFT_FAILED(swift_waveform_get_samples(_wave, (const void**)&buffer, &samples, &bytes_per_sample)))
{
croak("failed to get samples from waveform object");
}
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-xs.inc view on Meta::CPAN
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-xs.inc view on Meta::CPAN
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
view all matches for this distribution
view release on metacpan or search on metacpan
SV **afetch;
int i, error, pr, gm;
mailbox mbox = -1;
char *sn, *pn, pg[MAX_GROUP_NAME];
HV *hv;
PPCODE:
MAILBOX = PRIVATE_GROUP = &PL_sv_undef;
if(!SvROK(rv) || SvTYPE(hv = (HV *)SvRV(rv))!=SVt_PVHV)
croak("not a HASH reference");
for(i=0;i<nconnect_params;i++)
if(hv_exists(hv, connect_params[i],
static char *groups=NULL;
static char *mess=NULL;
char sender[MAX_GROUP_NAME];
SV *STYPE, *MTYPE, *MESSAGE, *SENDER, *ENDMIS, *ERROR;
AV *GROUPS=(AV *)&PL_sv_undef;
PPCODE:
if(svmbox == &PL_sv_undef) {
STYPE=SENDER=MTYPE=ENDMIS=MESSAGE=&PL_sv_undef;
SetSpErrorNo(ILLEGAL_SESSION);
goto rec_ending;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Starlink/AST.xs view on Meta::CPAN
void
astStripEscapes( text )
char * text
PREINIT:
const char * RETVAL;
PPCODE:
ASTCALL(
RETVAL = astStripEscapes( text );
)
if (RETVAL) {
XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));
lib/Starlink/AST.xs view on Meta::CPAN
PREINIT:
int argoff = 1; /* number of fixed arguments */
int nargs;
char buff[200];
char * value = 0;
PPCODE:
nargs = items - argoff;
switch (nargs) {
case 0:
break;
case 1:
lib/Starlink/AST.xs view on Meta::CPAN
AstFrame * frm2
PREINIT:
int naxes;
int * caxes;
AV * axes;
PPCODE:
naxes = astGetI( frm2, "Naxes" );
caxes = get_mortalspace( naxes, 'i' );
ASTCALL(
astMatchAxes( frm1, frm2, caxes );
lib/Starlink/AST.xs view on Meta::CPAN
void
MirrorVariants( this, iframe )
AstFrameSet * this
int iframe
PPCODE:
ASTCALL(
astMirrorVariants( this, iframe );
)
lib/Starlink/AST.xs view on Meta::CPAN
PREINIT:
int nel;
double * ccoeffs;
int ncoeff;
AV * coeffs;
PPCODE:
ASTCALL(
astPolyCoeffs( this, forward, 0, 0, &ncoeff );
)
nel = ncoeff * (astGetI(this, forward ? "Nin" : "Nout") + 2);
ccoeffs = get_mortalspace( nel, 'd' );
lib/Starlink/AST.xs view on Meta::CPAN
int len;
double * clbnd;
double * cubnd;
AV * lbnd;
AV * ubnd;
PPCODE:
len = astGetI(this, forward ? "Nin" : "Nout");
clbnd = get_mortalspace( len, 'd' );
cubnd = get_mortalspace( len, 'd' );
ASTCALL(
astChebyDomain( this, forward, clbnd, cubnd );
lib/Starlink/AST.xs view on Meta::CPAN
char * cvt
AV * args
PREINIT:
int narg;
double * cargs;
PPCODE:
narg = av_len(args) + 1;
cargs = pack1D( newRV_noinc((SV*)args), 'd');
ASTCALL(
astTimeAdd( this, cvt, narg, cargs );
)
lib/Starlink/AST.xs view on Meta::CPAN
AstObject * this
PREINIT:
const char * routine;
const char * file;
int line;
PPCODE:
ASTCALL(
astCreatedAt( this, &routine, &file, &line );
)
XPUSHs(sv_2mortal(newSVpvn(routine,strlen(routine))));
XPUSHs(sv_2mortal(newSVpvn(file,strlen(file))));
lib/Starlink/AST.xs view on Meta::CPAN
void
astToString( this )
AstObject * this
PREINIT:
char * string;
PPCODE:
ASTCALL(
string = astToString( this );
)
XPUSHs(sv_2mortal(newSVpvn(string,strlen(string))));
astFree( string );
lib/Starlink/AST.xs view on Meta::CPAN
void
astMapCopy( this, that )
AstKeyMap * this
AstKeyMap * that
PPCODE:
ASTCALL(
astMapCopy( this, that );
)
void
lib/Starlink/AST.xs view on Meta::CPAN
AstKeyMap * this
char * key
PREINIT:
double RETVAL;
int status;
PPCODE:
ASTCALL(
status = astMapGet0D( this, key, &RETVAL );
)
if (status != 0) {
XPUSHs(sv_2mortal(newSVnv(RETVAL)));
lib/Starlink/AST.xs view on Meta::CPAN
PREINIT:
int RETVAL;
int status;
ALIAS:
MapGet0S = 1
PPCODE:
ASTCALL(
status = astMapGet0I( this, key, &RETVAL );
)
if (status != 0) {
XPUSHs(sv_2mortal(newSViv(RETVAL)));
lib/Starlink/AST.xs view on Meta::CPAN
AstKeyMap * this
char * key
PREINIT:
char * RETVAL;
int status;
PPCODE:
ASTCALL(
status = astMapGet0C( this, key, (const char **)&RETVAL );
)
if (status != 0) {
XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));
lib/Starlink/AST.xs view on Meta::CPAN
char * key
PREINIT:
AstObject * RETVAL;
int status;
SV * sv;
PPCODE:
ASTCALL(
status = astMapGet0A( this, key, &RETVAL );
)
if (status != 0) {
/* Have an AstObject pointer. Convert to object. */
lib/Starlink/AST.xs view on Meta::CPAN
PREINIT:
int i;
int status;
double * outarr;
int nelems;
PPCODE:
/* First we need to find out how many elements are in the KeyMap */
nelems = astMapLength( this, key );
if (nelems == 0) {
XSRETURN_EMPTY;
}
lib/Starlink/AST.xs view on Meta::CPAN
int status;
int * outarr;
int nelems;
ALIAS:
MapGet1S = 1
PPCODE:
/* First we need to find out how many elements are in the KeyMap */
nelems = astMapLength( this, key );
if (nelems == 0) {
XSRETURN_EMPTY;
}
lib/Starlink/AST.xs view on Meta::CPAN
SV * sv;
int i;
int status;
AstObject ** outarr;
int nelems;
PPCODE:
/* First we need to find out how many elements are in the KeyMap */
nelems = astMapLength( this, key );
if (nelems == 0) {
XSRETURN_EMPTY;
}
lib/Starlink/AST.xs view on Meta::CPAN
int status;
char * buffer;
char * tmpp;
int nelems;
int maxlen = 80; /* max length of each string in map. Includes NUL */
PPCODE:
/* First we need to find out how many elements are in the KeyMap */
nelems = astMapLength( this, key );
if (nelems == 0) {
XSRETURN_EMPTY;
}
lib/Starlink/AST.xs view on Meta::CPAN
astMapGetC( this, key )
AstKeyMap * this
char * key
PREINIT:
const char * RETVAL = 0;
PPCODE:
ASTCALL(
astMapGetC( this, key, &RETVAL );
)
if (RETVAL) {
XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));
lib/Starlink/AST.xs view on Meta::CPAN
void
astMapRename( this, oldkey, newkey )
AstKeyMap * this
char * oldkey
char * newkey
PPCODE:
ASTCALL(
astMapRename( this, oldkey, newkey );
)
int
lib/Starlink/AST.xs view on Meta::CPAN
ColumnName( this, index )
AstTable * this
int index
PREINIT:
const char * RETVAL;
PPCODE:
ASTCALL(
RETVAL = astColumnName( this, index );
)
XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));
lib/Starlink/AST.xs view on Meta::CPAN
char * column
PREINIT:
int ndim;
int cdims[10];
AV * dims;
PPCODE:
/* Unsure how to determine required size because astGetColumnNdim is protected.
Therefore use fixed size 10 for now. */
ASTCALL(
astColumnShape( this, column, 10, &ndim, cdims );
)
lib/Starlink/AST.xs view on Meta::CPAN
ParameterName( this, index )
AstTable * this
int index
PREINIT:
const char * cname;
PPCODE:
ASTCALL(
cname = astParameterName( this, index );
)
if (cname) {
XPUSHs(sv_2mortal(newSVpvn(cname,strlen(cname))));
lib/Starlink/AST.xs view on Meta::CPAN
}
void
PurgeRows( this )
AstTable * this
PPCODE:
ASTCALL(
astPurgeRows( this );
)
void
RemoveColumn( this, name )
AstTable * this
char * name
PPCODE:
ASTCALL(
astRemoveColumn( this, name );
)
void
RemoveParameter( this, name )
AstTable * this
char * name
PPCODE:
ASTCALL(
astRemoveParameter( this, name );
)
void
RemoveRow( this, index )
AstTable * this
int index
PPCODE:
ASTCALL(
astRemoveRow( this, index );
)
lib/Starlink/AST.xs view on Meta::CPAN
int RETVAL;
int set = 0;
int newval = 0;
int wasset;
int hasnull;
PPCODE:
nargs = items - argoff;
switch (nargs) {
case 0:
break;
case 1:
lib/Starlink/AST.xs view on Meta::CPAN
void
PutTableHeader( this, header )
AstFitsTable * this
AstFitsChan * header
PPCODE:
ASTCALL(
astPutTableHeader( this, header );
)
lib/Starlink/AST.xs view on Meta::CPAN
AV * values
PREINIT:
int nval;
double * cvalues;
AV * nvalues;
PPCODE:
nval = av_len( values ) + 1;
cvalues = pack1D( newRV_noinc((SV*)values), 'd' );
ASTCALL(
astAxNorm( this, axis, oper, nval, cvalues );
)
lib/Starlink/AST.xs view on Meta::CPAN
double * ca2;
double * cb1;
double * cb2;
double * ccross;
AV * cross;
PPCODE:
naxes = astGetI( this, "Naxes" );
len = av_len( a1 ) + 1;
if ( len != naxes ) Perl_croak( aTHX_ "a1 must contain %d elements", naxes );
ca1 = pack1D(newRV_noinc((SV*)a1), 'd');
lib/Starlink/AST.xs view on Meta::CPAN
int naxes;
double * aa;
int i;
int ncoord_in;
double * inputs;
PPCODE:
/* Create C arrays of the correct dimensions */
naxes = astGetI( this, "Naxes" );
ncoord_in = items - argoff;
/* Copy from the perl array to the C array */
lib/Starlink/AST.xs view on Meta::CPAN
double * aa;
double * bb;
double * point3;
int i;
AV * myoffset;
PPCODE:
naxes = astGetI( this, "Naxes" );
/* Copy from the perl array to the C array */
if (av_len(point1) != naxes-1)
Perl_croak(aTHX_ "Number of elements in first coord array must be %d",
lib/Starlink/AST.xs view on Meta::CPAN
double * aa;
double * point2;
int i;
double RETVAL;
AV * myoffset;
PPCODE:
naxes = astGetI( this, "Naxes" );
/* Copy from the perl array to the C array */
if (av_len(point1) != naxes-1)
Perl_croak(aTHX_ "Number of elements in first coord array must be %d",
lib/Starlink/AST.xs view on Meta::CPAN
int maxaxes;
int naxes;
int * aa;
AstMapping * map;
AstFrame * newframe;
PPCODE:
maxaxes = astGetI(this, "Naxes");
naxes = av_len(axes) + 1;
if ( naxes > maxaxes )
Perl_croak(aTHX_ "Number of axes selected must be less than number of axes in frame");
aa = pack1D( newRV_noinc((SV*)axes), 'i');
lib/Starlink/AST.xs view on Meta::CPAN
AV * point4;
double d1;
double d2;
int len;
int naxes;
PPCODE:
naxes = astGetI(this, "Naxes");
len = av_len(point1) + 1;
if ( naxes != len )
Perl_croak(aTHX_ "Number of coords in point1 must be equal to the number of axes in frame [%d != %d]", naxes, len);
len = av_len(point2) + 1;
lib/Starlink/AST.xs view on Meta::CPAN
AstMapping * map1;
AstMapping * map2;
int series;
int invert1;
int invert2;
PPCODE:
Perl_croak(aTHX_ "astDecompose not yet implemented\n");
/* May want to restrict this to CmpMap and CmpFrame classes
explicitly */
ASTCALL(
astDecompose(this, &map1, &map2, &series, &invert1, &invert2);
lib/Starlink/AST.xs view on Meta::CPAN
int nout;
int ncoeff;
double * fit;
int i;
int status;
PPCODE:
/* get the input values and verify them */
nin = astGetI( this, "Nin" );
len = av_len( lbnd ) + 1;
if ( len != nin ) Perl_croak( aTHX_ "lbnd must contain %d elements", nin );
len = av_len( ubnd ) + 1;
lib/Starlink/AST.xs view on Meta::CPAN
double * cxu = NULL;
double lbnd_out;
double ubnd_out;
AV * xl = NULL;
AV * xu = NULL;
PPCODE:
nin = astGetI( this, "Nin" );
len = av_len( lbnd_in ) + 1;
if ( len != nin ) Perl_croak( aTHX_ "lbnd must contain %d elements", nin );
len = av_len( ubnd_in ) + 1;
if ( len != nin ) Perl_croak( aTHX_ "ubnd must contain %d elements", nin );
lib/Starlink/AST.xs view on Meta::CPAN
int nin;
int nout;
int * cin;
int * cout;
AstMapping * outmap = NULL;
PPCODE:
nin = av_len( in ) + 1;
cin = pack1D(newRV_noinc((SV*)in), 'i');
/* output array */
nout = astGetI( this, "Nout" );
lib/Starlink/AST.xs view on Meta::CPAN
double RETVAL;
int nin;
int len;
double * cat;
double d2;
PPCODE:
nin = astGetI( this, "Nin");
len = av_len( at ) + 1;
if (nin != len)
Perl_croak(aTHX_ "Must supply Nin coordinates to astRate [%d != %d]",
nin, len);
lib/Starlink/AST.xs view on Meta::CPAN
double * cubnd;
double * cfit;
double rms;
int status;
AV * fit;
PPCODE:
nin = astGetI( this, "Nin" );
nout = astGetI( this, "Nout" );
len = av_len( lbnd ) + 1;
if ( len != nin ) Perl_croak( aTHX_ "lbnd must contain %d elements", nin );
len = av_len( ubnd ) + 1;
lib/Starlink/AST.xs view on Meta::CPAN
OUTPUT:
RETVAL
# astTran1
# Returns one array
# Even though we return one array, we use PPCODE so that it is closer to
# the code used for astTran2
void
astTran1( this, xin, forward )
AstMapping * this
lib/Starlink/AST.xs view on Meta::CPAN
int len1;
double * cxin;
AV* xout;
double * cxout;
SV** elem;
PPCODE:
len1 = av_len( xin ) + 1;
cxin = pack1D( newRV_noinc((SV*)xin), 'd');
cxout = get_mortalspace( len1, 'd' );
ASTCALL(
lib/Starlink/AST.xs view on Meta::CPAN
AV* xout;
AV* yout;
double * cxout;
double * cyout;
SV** elem;
PPCODE:
len1 = av_len( xin ) + 1;
len2 = av_len( yin ) + 1;
if ( len1 != len2 )
Perl_croak(aTHX_ "Number of elements in input arrays must be identical (%d != %d )",
len1, len2);
lib/Starlink/AST.xs view on Meta::CPAN
int naxout;
int ncoord_in;
int ncoord_out;
double **ptr_in;
double **ptr_out;
PPCODE:
/* Make sure we have some coordinates to transform */
ndims = items - argoff;
if (ndims > 0) {
/* Number of in and output coordinates required for this mapping */
naxin = astGetI( this, "Nin" );
lib/Starlink/AST.xs view on Meta::CPAN
AstRegion * this
PREINIT:
double ccentre[2];
double radius;
AV * centre;
PPCODE:
ASTCALL(
astGetRegionDisc( this, ccentre, &radius );
)
centre = newAV();
lib/Starlink/AST.xs view on Meta::CPAN
PREINIT:
int naxes;
int npoint;
double * cpoints;
AV * points;
PPCODE:
naxes = astGetI( this, "Naxes" );
ASTCALL(
astGetRegionPoints( this, 0, naxes, &npoint, 0 );
)
cpoints = get_mortalspace( naxes * npoint,'d');
lib/Starlink/AST.xs view on Meta::CPAN
double * cin;
int nelem;
int i;
AV * output;
int nmasked;
PPCODE:
ndims = astGetI( map, "Nout" );
len = av_len( lbnd ) + 1;
if ( len != ndims ) Perl_croak( aTHX_ "lbnd must contain %d elements", ndims );
len = av_len( ubnd ) + 1;
if ( len != ndims ) Perl_croak( aTHX_ "ubnd must contain %d elements", ndims );
lib/Starlink/AST.xs view on Meta::CPAN
int i;
double * clbnd;
double * cubnd;
AV * lbnd;
AV * ubnd;
PPCODE:
naxes = astGetI( this, "Naxes" );
clbnd = get_mortalspace( naxes, 'd' );
cubnd = get_mortalspace( naxes, 'd' );
ASTCALL(
lib/Starlink/AST.xs view on Meta::CPAN
double * cpoints;
AV * points;
AV * coord;
int i;
int axis;
PPCODE:
naxes = astGetI( this, "Naxes" );
ASTCALL(
astGetRegionMesh( this, surface, 0, 0, &maxpoint, 0 );
)
lib/Starlink/AST.xs view on Meta::CPAN
void
astShowMesh( this, format, ttl )
AstRegion * this
int format
char * ttl
PPCODE:
ASTCALL(
astShowMesh( this, format, ttl);
)
int
lib/Starlink/AST.xs view on Meta::CPAN
double * cp1;
double * cp2;
AV * centre;
AV * p1;
AV * p2;
PPCODE:
naxes = astGetI( this, "Naxes" );
ccentre = get_mortalspace( naxes, 'd' );
cp1 = get_mortalspace( naxes, 'd' );
cp2 = get_mortalspace( naxes, 'd' );
lib/Starlink/AST.xs view on Meta::CPAN
double * ccentre;
double radius;
double * cp1;
AV * centre;
AV * p1;
PPCODE:
naxes = astGetI( this, "Naxes" );
ccentre = get_mortalspace( naxes, 'd' );
cp1 = get_mortalspace( naxes, 'd' );
ASTCALL(
lib/Starlink/AST.xs view on Meta::CPAN
AstMoc * this
int icell
PREINIT:
int order;
int64_t npix;
PPCODE:
ASTCALL(
astGetCell( this, icell, &order, &npix );
)
XPUSHs(sv_2mortal(newSViv(order)));
XPUSHs(sv_2mortal(newSViv(npix)));
lib/Starlink/AST.xs view on Meta::CPAN
int nb;
size_t ln;
size_t mxsize;
void * cdata;
AV * data;
PPCODE:
nb = astGetI( this, "moctype" );
ln = astGetI( this, "moclength" );
mxsize = nb * ln;
cdata = get_mortalspace( mxsize, 'u' );
ASTCALL(
lib/Starlink/AST.xs view on Meta::CPAN
AstMoc * this
int json
PREINIT:
size_t size;
char * RETVAL;
PPCODE:
ASTCALL(
astGetMocString( this, json, 0, 0, &size );
)
RETVAL = get_mortalspace( size, 'u' );
ASTCALL(
lib/Starlink/AST.xs view on Meta::CPAN
)
void
astPurgeWCS( this )
AstFitsChan * this
PPCODE:
ASTCALL(
astPurgeWCS( this );
)
void
lib/Starlink/AST.xs view on Meta::CPAN
void
astPutTable( this, table, extnam )
AstFitsChan * this
AstFitsTable *table
char * extnam
PPCODE:
ASTCALL(
astPutTable( this, table, extnam );
)
void
astRemoveTables( this, key )
AstFitsChan * this
char * key
PPCODE:
ASTCALL(
astRemoveTables( this, key );
)
void
astRetainFits( this )
AstFitsChan * this
PPCODE:
ASTCALL(
astRetainFits( this );
)
void
astShowFits( this )
AstFitsChan * this
PPCODE:
ASTCALL(
astShowFits( this );
)
void
lib/Starlink/AST.xs view on Meta::CPAN
AstFitsChan * this
char * name
PREINIT:
int RETVAL;
int there;
PPCODE:
ASTCALL(
RETVAL = astTestFits( this, name, &there );
)
XPUSHs(sv_2mortal(newSViv(RETVAL)));
XPUSHs(sv_2mortal(newSViv(there)));
lib/Starlink/AST.xs view on Meta::CPAN
astGetFitsF( this, name )
AstFitsChan * this
char * name
PREINIT:
int status;
PPCODE:
ASTCALL(
status = astGetFitsF( this, name, &RETVAL );
)
if (status) {
XPUSHs(sv_2mortal(newSVnv(RETVAL)));
lib/Starlink/AST.xs view on Meta::CPAN
astGetFitsI( this, name )
AstFitsChan * this
char * name
PREINIT:
int status;
PPCODE:
ASTCALL(
status = astGetFitsI( this, name, &RETVAL );
)
if (status) {
XPUSHs(sv_2mortal(newSViv(RETVAL)));
lib/Starlink/AST.xs view on Meta::CPAN
astGetFitsL( this, name )
AstFitsChan * this
char * name
PREINIT:
int status;
PPCODE:
ASTCALL(
status = astGetFitsL( this, name, &RETVAL );
)
if (status) {
XPUSHs(sv_2mortal(newSViv(RETVAL)));
lib/Starlink/AST.xs view on Meta::CPAN
AstFitsChan * this
char * name
PREINIT:
char * RETVAL;
int status;
PPCODE:
ASTCALL(
status = astGetFitsS( this, name, &RETVAL );
)
if (status) {
XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));
lib/Starlink/AST.xs view on Meta::CPAN
AstFitsChan * this
char * name
PREINIT:
char * RETVAL;
int status;
PPCODE:
ASTCALL(
status = astGetFitsCN( this, name, &RETVAL );
)
if (status) {
XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));
lib/Starlink/AST.xs view on Meta::CPAN
void
astPutTables( this, tables )
AstFitsChan * this
AstKeyMap * tables
PPCODE:
ASTCALL(
astPutTables( this, tables );
)
void
astReadFits( this )
AstFitsChan * this
PPCODE:
ASTCALL(
astReadFits( this );
)
void
astWriteFits( this )
AstFitsChan * this
PPCODE:
ASTCALL(
astWriteFits( this );
)
lib/Starlink/AST.xs view on Meta::CPAN
AstSpecFrame * this
AstSkyFrame * frm
PREINIT:
double lon;
double lat;
PPCODE:
ASTCALL(
astGetRefPos( this, frm, &lon, &lat );
)
XPUSHs(sv_2mortal(newSVnv(lon)));
XPUSHs(sv_2mortal(newSVnv(lat)));
lib/Starlink/AST.xs view on Meta::CPAN
float clbnd[2];
float cubnd[2];
AV* lbnd;
AV* ubnd;
SV * arg = ST(0);
PPCODE:
PLOTCALL (arg,
astBoundingBox( this, clbnd, cubnd );
)
lbnd = newAV();
unpack1D( newRV_noinc((SV*) lbnd), clbnd, 'f', 2 );
lib/Starlink/AST.xs view on Meta::CPAN
astRegionOutline( this, region )
AstPlot * this
AstRegion * region
PREINIT:
SV * arg = ST(0);
PPCODE:
PLOTCALL(
arg,
astRegionOutline( this, region );
)
view all matches for this distribution
view release on metacpan or search on metacpan
CaseResampling.xs view on Meta::CPAN
double lower_ci = 0.;
double upper_ci = 0.;
double alpha;
INIT:
alpha = 1.-confidence;
PPCODE:
if (items == 2)
runs = 1000;
else if (items == 3)
runs = SvUV(ST(2));
else {
CaseResampling.xs view on Meta::CPAN
double lower_ci = 0.;
double upper_ci = 0.;
double alpha;
INIT:
alpha = 1.-confidence;
PPCODE:
if (confidence <= 0. || confidence >= 1.) {
croak("Confidence level has to be in (0, 1)");
}
avToCAry(aTHX_ statistics, &cstatistics, &nelem);
if (nelem != 0) {
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-xs.inc view on Meta::CPAN
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
view all matches for this distribution