view release on metacpan or search on metacpan
PROTOTYPES: ENABLE
void
find_ (SV *target_ref)
PPCODE:
{
SV *arena, *targ;
U32 rmagical;
int i;
AV *about = newAV ();
view all matches for this distribution
view release on metacpan or search on metacpan
*/
}
SV*
sweep()
PPCODE:
{
PTR_TBL_t* tbl = sweep_root();
AV* av = newAV();
{
SV* sva;
view all matches for this distribution
view release on metacpan or search on metacpan
Gladiator.xs view on Meta::CPAN
SV*
walk_arena()
PPCODE:
{
SV* sva;
I32 visited = 0;
AV* av = newAV();
for (sva = PL_sv_arenaroot; sva; sva = (SV*)SvANY(sva)) {
view all matches for this distribution
view release on metacpan or search on metacpan
PROTOTYPES: ENABLE
void
_hook_runops()
PPCODE:
{
tools_hook_runops();
}
void
_reset_counters()
PPCODE:
{
tools_reset_counters();
}
void
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/LeakTrace.xs view on Meta::CPAN
PROTOTYPES: ENABLE
void
hook_runops()
PPCODE:
{
note_changes(NULL, 0);
PL_runops = runops_leakcheck;
}
void
reset_counters()
PPCODE:
{
if (used) g_hash_table_destroy( used );
used = NULL;
note_changes(NULL, 0);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/MAT.xs view on Meta::CPAN
keys(self)
HV *self
ALIAS:
keys = 0
values_at = 1
PPCODE:
{
struct pmat_sv_hash *hv = (struct pmat_sv_hash *)get_pmat_sv(self);
long i;
EXTEND(SP, hv->n_values);
view all matches for this distribution
view release on metacpan or search on metacpan
Mallinfo.xs view on Meta::CPAN
FILE *fp
void
malloc_info_string (options)
int options
PPCODE:
{
FILE *fp;
SV *ret = &PL_sv_undef;
int err;
view all matches for this distribution
view release on metacpan or search on metacpan
FileHandle.xs view on Meta::CPAN
char *pathname
char *mode
PREINIT:
NYTP_file fh = NYTP_open(pathname, mode);
SV *object;
PPCODE:
if(!fh)
XSRETURN(0);
object = newSV(0);
sv_usepvn(object, (char *) fh, sizeof(struct NYTP_file_t));
ST(0) = sv_bless(sv_2mortal(newRV_noinc(object)), gv_stashpvs("Devel::NYTProf::FileHandle", GV_ADD));
view all matches for this distribution
view release on metacpan or search on metacpan
parts/inc/SvPV view on Meta::CPAN
STRLEN nlen
SV *insv
PREINIT:
STRLEN slen;
const char *str;
PPCODE:
str = SvPV_const(insv, slen);
XPUSHs(sv);
mXPUSHi(SvLEN(sv));
SvPV_renew(sv, nlen);
Copy(str, SvPVX(sv), slen + 1, char);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/PatchPerl.pm view on Meta::CPAN
RETVAL = (NV)ualarm( useconds, uinterval ) / NV_1E6;
#endif
}
@@ -1266,7 +1326,9 @@ setitimer(which, seconds, interval = 0)
struct itimerval oldit;
PPCODE:
if (seconds < 0.0 || interval < 0.0)
- croak("Time::HiRes::setitimer(%"IVdf", %"NVgf", %"NVgf"): negative time not invented yet", (IV)which, seconds, interval);
+ croak("Time::HiRes::setitimer(%" IVdf ", %" NVgf ", %" NVgf
+ "): negative time not invented yet",
+ (IV)which, seconds, interval);
view all matches for this distribution
view release on metacpan or search on metacpan
PtrTable.xs view on Meta::CPAN
void
_PtrTable_init (self)
SV * self
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
_PtrTable_init(self);
if (PL_markstack_ptr != temp) {
/* truly void, because dXSARGS not invoked */
PL_markstack_ptr = temp;
PtrTable.xs view on Meta::CPAN
void
_PtrTable_make_our_table (self)
SV * self
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
_PtrTable_make_our_table(self);
if (PL_markstack_ptr != temp) {
/* truly void, because dXSARGS not invoked */
PL_markstack_ptr = temp;
PtrTable.xs view on Meta::CPAN
void
_PtrTable_freecopied (self)
SV * self
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
_PtrTable_freecopied(self);
if (PL_markstack_ptr != temp) {
/* truly void, because dXSARGS not invoked */
PL_markstack_ptr = temp;
view all matches for this distribution
view release on metacpan or search on metacpan
void
match(rx, match = -1, base = NULL)
regexp *rx
I32 match
char *base
PPCODE:
{
I32 mx;
char *s = rx->subbase, *b, *e;
if (s == 0) {
view all matches for this distribution
view release on metacpan or search on metacpan
RingBuffer.xs view on Meta::CPAN
_get_ring_size(slots, slotsz, msgarea_size)
int slots
int slotsz
int msgarea_size
PROTOTYPE: $$
PPCODE:
int ringsz = sizeof(ring_header_t) +
(slots * (slotsz + sizeof(ring_slothdr_t))) +
msgarea_size;
ST(0) = sv_2mortal(newSViv(ringsz));
XSRETURN(1);
RingBuffer.xs view on Meta::CPAN
int slots
int slotsz
int msgarea_size
int global_size
PROTOTYPE: $$$$
PPCODE:
int ringsz = sizeof(ring_header_t) +
(slots * (slotsz + sizeof(ring_slothdr_t))) +
msgarea_size;
int total = sizeof(ring_buffers_t) + global_size + count + (ringsz * count);
ST(0) = sv_2mortal(newSViv(total));
RingBuffer.xs view on Meta::CPAN
_get_rings_addr(addr, count, global_size)
SV * addr
int count
int global_size
PROTOTYPE: $$$
PPCODE:
UV tmp = SvUV(addr);
tmp += sizeof(ring_bufhdr_t) + count + global_size;
ST(0) = sv_2mortal(newSVuv(tmp));
XSRETURN(1);
RingBuffer.xs view on Meta::CPAN
UV ringnum
int slots
int slotsz
int msgarea_size
PROTOTYPE: $$$$
PPCODE:
UV tmp = SvUV(addr);
#
# computation needs to account for dynamic sized
# fields
#
RingBuffer.xs view on Meta::CPAN
void
_alloc_ring(mapaddr, count)
SV * mapaddr
int count
PROTOTYPE: $$
PPCODE:
IV tmp = SvIV(mapaddr);
char * freemap = INT2PTR(caddr_t,tmp);
int i = 0;
for (; ((i < count) && (! *freemap)); i++, freemap++);
RingBuffer.xs view on Meta::CPAN
SV * mapaddr
SV * ringaddr
int ringbufsz
int ringnum
PROTOTYPE: $$$$
PPCODE:
UV tmp = SvUV(mapaddr);
char * freemap = INT2PTR(caddr_t,tmp);
ring_bufptr_t ring;
tmp = SvUV(ringaddr);
RingBuffer.xs view on Meta::CPAN
int ringbufsz
int count
int pid
int tid
PROTOTYPE: $$$$$
PPCODE:
UV tmp = SvUV(ringaddr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t,tmp);
int i = 0;
while ((i < count) &&
RingBuffer.xs view on Meta::CPAN
SV * addr
int pid
int tid
SV * baseaddr
PROTOTYPE: $$$$
PPCODE:
UV tmp = SvUV(addr);
UV basetmp = SvUV(baseaddr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ringbuf_hdrptr_t ringbuf = INT2PTR(ringbuf_hdrptr_t, basetmp);
UV slotsaddr = tmp + sizeof(ring_header_t) + ringbuf->msgarea_sz;
RingBuffer.xs view on Meta::CPAN
#
void
_get_slots_addr(addr)
SV * addr
PROTOTYPE: $
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ringbuf_hdrptr_t ringbuf = INT2PTR(ringbuf_hdrptr_t, (tmp - ring->hdr.baseoff));
UV slotsaddr = tmp + sizeof(ring_header_t) + ringbuf->msgarea_sz;
ST(0) = sv_2mortal(newSVuv(slotsaddr));
RingBuffer.xs view on Meta::CPAN
#
void
_get_header(addr)
SV * addr
PROTOTYPE: $
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
EXTEND(SP, 4);
PUSHs(sv_2mortal(newSViv(ring->hdr.pid)));
RingBuffer.xs view on Meta::CPAN
#
void
updateSlot(addr, lineno)
SV * addr
int lineno
PPCODE:
UV tmp;
ring_bufptr_t ring;
ringbuf_hdrptr_t ringbuf;
UV slotsaddr;
ring_slotptr_t slot;
RingBuffer.xs view on Meta::CPAN
#
void
nextSlot(addr, entry)
SV * addr
SV * entry
PPCODE:
UV tmp;
ring_bufptr_t ring;
ringbuf_hdrptr_t ringbuf;
UV slotsaddr;
ring_slotptr_t slot = NULL;
RingBuffer.xs view on Meta::CPAN
# backs up one slot
#
void
freeSlot(addr)
SV * addr
PPCODE:
UV tmp;
ring_bufptr_t ring;
ringbuf_hdrptr_t ringbuf;
UV slotsaddr;
ring_slotptr_t slots = NULL;
RingBuffer.xs view on Meta::CPAN
void
_get_slot(addr, slotnum)
SV * addr
int slotnum
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ringbuf_hdrptr_t ringbuf = INT2PTR(ringbuf_hdrptr_t, (tmp - ring->hdr.baseoff));
UV slotsaddr = tmp + sizeof(ring_header_t) + ringbuf->msgarea_sz +
(slotnum * (ringbuf->slot_sz + sizeof(ring_slothdr_t)));
RingBuffer.xs view on Meta::CPAN
# DB control variables
#
void
getFlags(addr)
SV * addr
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ringbuf_hdrptr_t ringbuf = INT2PTR(ringbuf_hdrptr_t, (tmp - ring->hdr.baseoff));
int retval = (ringbuf->single ? 1 : 0) | (ring->hdr.trace ? 2 : 0) | (ring->hdr.signal ? 4 : 0);
ST(0) = sv_2mortal(newSViv(retval));
RingBuffer.xs view on Meta::CPAN
void
_get_trace(addr)
SV * addr
PROTOTYPE: $
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ST(0) = sv_2mortal(newSViv(ring->hdr.trace));
XSRETURN(1);
RingBuffer.xs view on Meta::CPAN
void
_set_trace(addr, val)
SV * addr
int val
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ST(0) = sv_2mortal(newSViv(ring->hdr.trace));
ring->hdr.trace = val;
XSRETURN(1);
void
_get_signal(addr)
SV * addr
PROTOTYPE: $
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ST(0) = sv_2mortal(newSViv(ring->hdr.signal));
XSRETURN(1);
RingBuffer.xs view on Meta::CPAN
void
_set_signal(addr, val)
SV * addr
int val
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ST(0) = sv_2mortal(newSViv(ring->hdr.signal));
ring->hdr.signal = val;
XSRETURN(1);
RingBuffer.xs view on Meta::CPAN
SV * addr
SV * resp
SV * msg
int state
PROTOTYPE: $$$$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ringbuf_hdrptr_t ringbuf = INT2PTR(ringbuf_hdrptr_t, (tmp - ring->hdr.baseoff));
int resplen = SvCUR(resp);
RingBuffer.xs view on Meta::CPAN
void
_check_for_cmd_msg(addr, state)
SV * addr
int state
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
int msglen = ring->hdr.msglen;
char lclcmd[5];
RingBuffer.xs view on Meta::CPAN
void
_get_watch_expr(addr, watch)
SV * addr
int watch
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ST(0) = &PL_sv_undef;
RingBuffer.xs view on Meta::CPAN
SV * addr
int watch
SV * result
SV * error
PROTOTYPE: $$$$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
int len;
ST(0) = &PL_sv_undef;
RingBuffer.xs view on Meta::CPAN
void
_get_watch_result(addr, watch)
SV * addr
int watch
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
int len;
char *zerobuttrue = "0E0";
RingBuffer.xs view on Meta::CPAN
void
_add_watch_expr(addr, expr)
SV * addr
SV * expr
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
int watch = 0;
ST(0) = &PL_sv_undef;
RingBuffer.xs view on Meta::CPAN
void
_free_watch_expr(addr, watch)
SV * addr
int watch
PROTOTYPE: $$
PPCODE:
UV tmp = SvUV(addr);
ring_bufptr_t ring = INT2PTR(ring_bufptr_t, tmp);
ring->hdr.watches[watch].inuse = -2;
ST(0) = &PL_sv_yes;
XSRETURN(1);
view all matches for this distribution
view release on metacpan or search on metacpan
RunBlock.xs view on Meta::CPAN
RETVAL
void
_long_wantarray(up)
int up;
PPCODE:
{
I32 cxix;
for( cxix = cxstack_ix; up>=0; --up, --cxix )
{
cxix = S_dopoptosub_at(aTHX_ cxstack, cxix);
RunBlock.xs view on Meta::CPAN
}
void
_long_return(up)
int up;
PPCODE:
{
I32 cxix;
CV* cv_retops;
#if DEBUG_MESSAGES
fprintf(stderr, "_long_return:enter(up=%d)\n", up)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/cst.xs view on Meta::CPAN
}
MODULE = Devel::cst PACKAGE = Devel::CStacktrace
void stacktrace(size_t depth)
PPCODE:
void** buffer;
Newx(buffer, depth, void*);
size_t len = backtrace(buffer, depth);
char** values = backtrace_symbols(buffer, len);
int i;
view all matches for this distribution
view release on metacpan or search on metacpan
PROTOTYPES: ENABLE
void
profile(flag)
int flag
PPCODE:
profiling = flag;
void
op_count()
PPCODE:
int i;
EXTEND(sp, PL_maxo);
for (i = 0; i < PL_maxo; i++)
PUSHs(sv_2mortal(newSViv(op_count[i])));
void
zero_stats()
PPCODE:
Zero(op_count, PL_maxo, unsigned long);
BOOT:
Newz(0, op_count, PL_maxo, unsigned long);
PL_runops = runops_opprof;
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
perliso9660_wrap.c view on Meta::CPAN
// result is of type IsoStatList_t
iso9660_stat_t *p_statbuf = result;
if (!result) goto out;
PPCODE:
/* Have Perl compute the length of the string using strlen() */
XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
perliso9660_wrap.c view on Meta::CPAN
// result is of type IsoStatList_t
iso9660_stat_t *p_statbuf = result;
if (!result) goto out;
PPCODE:
/* Have Perl compute the length of the string using strlen() */
XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
perliso9660_wrap.c view on Meta::CPAN
// result is of type IsoStatList_t
iso9660_stat_t *p_statbuf = result;
if (!result) goto out;
PPCODE:
/* Have Perl compute the length of the string using strlen() */
XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
perliso9660_wrap.c view on Meta::CPAN
// result is of type IsoStatList_t
iso9660_stat_t *p_statbuf = result;
if (!result) goto out;
PPCODE:
/* Have Perl compute the length of the string using strlen() */
XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
perliso9660_wrap.c view on Meta::CPAN
// result is of type IsoStatList_t
iso9660_stat_t *p_statbuf = result;
if (!result) goto out;
PPCODE:
/* Have Perl compute the length of the string using strlen() */
XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
perliso9660_wrap.c view on Meta::CPAN
// result is of type IsoStatList_t
iso9660_stat_t *p_statbuf = result;
if (!result) goto out;
PPCODE:
/* Have Perl compute the length of the string using strlen() */
XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
perliso9660_wrap.c view on Meta::CPAN
CdioListNode_t *p_entnode;
unsigned int num = 0;
if (!result) goto out;
PPCODE:
/* For each element in the array of strings, create a new
* mortalscalar, and stuff it into the above array. */
_CDIO_LIST_FOREACH (p_entnode, p_entlist) {
iso9660_stat_t *p_statbuf =
(iso9660_stat_t *) _cdio_list_node_data (p_entnode);
perliso9660_wrap.c view on Meta::CPAN
CdioListNode_t *p_entnode;
unsigned int num = 0;
if (!result) goto out;
PPCODE:
/* For each element in the array of strings, create a new
* mortalscalar, and stuff it into the above array. */
_CDIO_LIST_FOREACH (p_entnode, p_entlist) {
iso9660_stat_t *p_statbuf =
(iso9660_stat_t *) _cdio_list_node_data (p_entnode);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip/Adapter/Gpiod.xs view on Meta::CPAN
RETVAL
void
gpiod_read_lines(chip_ptr, ...)
SV *chip_ptr
PPCODE:
struct gpiod_chip *chip = (struct gpiod_chip*)SvIV(chip_ptr);
int *values;
unsigned int *offsets;
int num_lines = items - 1;
struct gpiod_line_bulk lines;
lib/Device/Chip/Adapter/Gpiod.xs view on Meta::CPAN
Safefree(offsets);
void
gpiod_write_lines(chip_ptr, ...)
SV *chip_ptr
PPCODE:
struct gpiod_chip *chip = (struct gpiod_chip*)SvIV(chip_ptr);
int *values;
unsigned int *offsets;
int num_lines = (items - 1) / 2;
struct gpiod_line_bulk lines;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip/SSD1306.xs view on Meta::CPAN
OUTPUT:
RETVAL
void
_framebuffer_dirty_xlohi(SV *fbsv)
PPCODE:
struct SSD1306FrameBuffer *fb = INT2PTR(struct SSD1306FrameBuffer *, SvUV(fbsv));
EXTEND(SP, 2);
mPUSHi(fb->dirty_xlo);
mPUSHi(fb->dirty_xhi);
view all matches for this distribution
view release on metacpan or search on metacpan
terminal (device, readbuf)
char * device
SV * readbuf
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
terminal(device, readbuf);
if (PL_markstack_ptr != temp) {
/* truly void, because dXSARGS not invoked */
PL_markstack_ptr = temp;
view all matches for this distribution
view release on metacpan or search on metacpan
INIT:
struct device_strings *devs, *curdev;
char *error_str = NULL;
HV *dev_descr;
SV *descr_ref;
PPCODE:
devs = _dftdi_get_device_strings(vendor, product, &error_str);
if (devs == NULL && error_str != NULL) {
croak("Failed to get list of devices: %s", error_str);
}
curdev = devs;
view all matches for this distribution
view release on metacpan or search on metacpan
char * path
INIT:
int fh;
struct termios adtio;
int portstatus, fdflags;
PPCODE:
//Setup serial port
if ((fh = open(path, O_RDWR | O_NONBLOCK | O_SYNC)) < 0)
{
// fprintf(stderr,"\nUnable to open serial device %s\n", path);
XSRETURN_UNDEF;
int fh
unsigned short addr
unsigned char nybble_count
PREINIT:
uchar buf[40];
PPCODE:
#if DEBUG
printf("got here: fh=%d addr=%04X nybbles=%d\n",fh,addr,nybble_count);
#endif
if (read_safe(fh, addr, (nybble_count+1)/2, buf)) {
int i;
view all matches for this distribution
view release on metacpan or search on metacpan
// Make sure there's a gain for every channel
if(numgains<numchannels) {
XSRETURN_UNDEF;
}
PPCODE:
// Extract the channels we got from perl...
for (n = 0; n <= numchannels; n++) {
lchannels[n]= SvNV(*av_fetch((AV *)SvRV(channels), n, 0));
}
long errorcode=0;
// int lstateD=0;
// int lstateIO=0;
PPCODE:
// Run the command
// errorcode = AISample (&idnum,demo,&stateIO,updateIO,ledOn,numCh,lchannels,lgains,disableCal,&ov,voltages);
errorcode = AOUpdate (&idnum,demo,trisD,trisIO,&stateD,&stateIO,updateDigital,resetCounter,&count,analogOut0,analogOut1);
if(numgains<numchannels) {
XSRETURN_UNDEF;
}
PPCODE:
// Extract the channels we got from perl...
for (n = 0; n <= numchannels; n++) {
lchannels[n]= SvNV(*av_fetch((AV *)SvRV(channels), n, 0));
}
INIT:
long overVoltage;
float voltage;
long errcode;
PPCODE:
errcode = EAnalogIn(&idnum, demo, channel, gain, &overVoltage, &voltage);
// Return the results to perl in a big array
if(errcode) { // RETVAL
char errorString[51];
float analogOut0
float analogOut1
INIT:
long errcode;
PPCODE:
errcode = EAnalogOut(&idnum, demo, analogOut0, analogOut1);
// Return the results to perl in a big array
if(errcode) { // RETVAL
char errorString[51];
INIT:
long errcode;
double count;
double ms;
PPCODE:
errcode = ECount(&idnum, demo, resetCounter, &count, &ms);
// Return the results to perl in a big array
if(errcode) { // RETVAL
INIT:
long *i, *j, *k;
long errcode;
long state;
PPCODE:
errcode = EDigitalIn(&idnum, 0, channel, readD, &state);
// Return the results to perl in a big array
if(errcode) {
char errorString[51];
INIT:
long errcode;
float volts;
PPCODE:
errcode = BitsToVolts(chnum, chgain, bits, &volts);
// Return the results to perl in a big array
if(errcode) {
char errorString[51];
INIT:
long errcode;
long bits;
PPCODE:
errcode = VoltsToBits(chnum, chgain, volts, &bits);
// Return the results to perl in a big array
if(errcode) {
char errorString[51];
// int nstateD;
// unsigned long *mycount;
// Check that they passed an array of channels, and count the elements
PPCODE:
// Run the command
errcode = Counter(&idnum, demo, &stateD, &stateIO, resetCounter, enableSTB, &enableSTB);
// Return the results to perl in a big array
if(errcode) {
j = &trisD;
k = &stateD;
l = &stateIO;
m = &outputD;
PPCODE:
errcode = DigitalIO(i, demo, j, trisIO, k, l, updateDigital, m);
// Return the results to perl in a big array
if(errcode) {
char errorString[51];
void
GetErrorString(errn);
long errn
INIT:
char str[255];
PPCODE:
GetErrorString ( errn, str );
XPUSHs(sv_2mortal(newSVpv(str,0)));
#// ###########################################################################
=head
long
GetWinVersion()
INIT:
unsigned long maj, min, build, platform, Packmaj, Packmin;
long errcode;
PPCODE:
errcode = GetWinVersion(&maj, &min, &build, &platform, &Packmaj, &Packmin);
// Return the results to perl in a big array
if(errcode) {
char errorString[51];
long configD
long numWriteRead
long data
INIT:
long i, errcode;
PPCODE:
errcode = Synch(&idnum, demo, mode, msDelay, husDelay, controlCS, csLine, csState, configD, numWriteRead, &data);
// Return the results to perl in a big array
if(errcode) {
char errorString[51];
long address
INIT:
long errcode;
long d0, d1, d2, d3;
PPCODE:
errcode = ReadMem(&idnum, address, &d3, &d2, &d1, &d0);
// Return the results to perl in a big array
if(errcode) {
char errorString[51];
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:
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
PREINIT:
int item_no, i, cancel, zero = 0;
uchar **item_list, **item_ptr, *item;
uchar *result;
size_t size = 0, tmpsz, len;
PPCODE:
item_no = items - 5;
New(0,item_list,2 * item_no,uchar*);
item_ptr = item_list;
for(i=0; i<item_no; i++) {
*(item_ptr++) = item = SvPV(ST(i+5), na);
PREINIT:
int item_no, i, cancel;
uchar **item_list, **item_ptr, *item;
uchar *result, *strb, *stre;
size_t size = 1, len;
PPCODE:
item_no = items - 5;
New(0,item_list,3 * item_no,uchar*);
item_ptr = item_list;
for(i=0; i<item_no; i++) {
*(item_ptr++) = item = SvPV(ST(i+5), na);
PREINIT:
int item_no, i, cancel;
uchar **item_list, **item_ptr, *item;
uchar *result;
size_t size = 0, tmpsz, len;
PPCODE:
item_no = items - 5;
New(0,item_list,3 * item_no,uchar*);
item_ptr = item_list;
for(i=0; i<item_no; i++) {
*(item_ptr++) = item = SvPV(ST(i+5), na);
char * line
PROTOTYPE: $$$$$
PREINIT:
int cancel;
uchar *result;
PPCODE:
New(0,result,MAX_LEN,char);
strncpy(result, line, MAX_LEN);
cancel = dialog_inputbox(title, prompt, height, width, result);
if(!cancel) XPUSHs(sv_2mortal(newSVpv(result, 0)));
Safefree(result);
view all matches for this distribution
view release on metacpan or search on metacpan
RETVAL
void
reset (self)
Digest::BLAKE self
PPCODE:
if (Init(self, self->hashbitlen) != SUCCESS)
XSRETURN_UNDEF;
XSRETURN(1);
int
Digest::BLAKE self
PREINIT:
int i;
unsigned char *data;
STRLEN len;
PPCODE:
for (i = 1; i < items; i++) {
data = (unsigned char *)(SvPV(ST(i), len));
if (Update(self, data, len << 3) != SUCCESS)
XSRETURN_UNDEF;
}
int bitlen
PREINIT:
int i;
unsigned char *data;
STRLEN len;
PPCODE:
if (! bitlen)
XSRETURN(1);
data = (unsigned char *)(SvPV(msg, len));
if (bitlen > len << 3)
bitlen = len << 3;
view all matches for this distribution
view release on metacpan or search on metacpan
in/src/BLAKE2x.xs view on Meta::CPAN
Digest::BLAKE2x self
PREINIT:
int i;
uint8_t *in;
STRLEN inlen;
PPCODE:
for (i = 1; i < items; i++) {
in = (uint8_t *)(SvPV(ST(i), inlen));
blake2x_update(self, in, inlen);
}
XSRETURN(1);
view all matches for this distribution
view release on metacpan or search on metacpan
RETVAL
void
reset (self)
Digest::BMW self
PPCODE:
if (Init(self, self->hashbitlen) != SUCCESS)
XSRETURN_UNDEF;
XSRETURN(1);
int
Digest::BMW self
PREINIT:
int i;
unsigned char *data;
STRLEN len;
PPCODE:
for (i = 1; i < items; i++) {
data = (unsigned char *)(SvPV(ST(i), len));
if (Update(self, data, len << 3) != SUCCESS)
XSRETURN_UNDEF;
}
int bitlen
PREINIT:
int i;
unsigned char *data;
STRLEN len;
PPCODE:
if (! bitlen)
XSRETURN(1);
data = (unsigned char *)(SvPV(msg, len));
if (bitlen > len << 3)
bitlen = len << 3;
view all matches for this distribution