File: pwmsearch.c

package info (click to toggle)
libtfbs-perl 0.7.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,884 kB
  • sloc: perl: 10,728; ansic: 1,228; makefile: 563; sh: 9
file content (125 lines) | stat: -rw-r--r-- 3,374 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
 * This file was generated automatically by ExtUtils::ParseXS version 2.21 from the
 * contents of pwmsearch.xs. Do not edit this file, edit pwmsearch.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST! 
 *
 */

#line 1 "pwmsearch.xs"
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "pwm_searchPFF.c"
#include <stdio.h>


#line 18 "pwmsearch.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
            Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)	S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage		S_croak_xs_usage
#endif

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#line 70 "pwmsearch.c"

XS(XS_TFBS__Ext__pwmsearch_search_xs); /* prototype to pass -Wmissing-prototypes */
XS(XS_TFBS__Ext__pwmsearch_search_xs)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
    if (items != 6)
       croak_xs_usage(cv,  "matrixfile, seqfile, threshold, tfname, tfclass, outfile");
    {
	char*	matrixfile = (char *)SvPV_nolen(ST(0));
	char*	seqfile = (char *)SvPV_nolen(ST(1));
	double	threshold = (double)SvNV(ST(2));
	char*	tfname = (char *)SvPV_nolen(ST(3));
	char*	tfclass = (char *)SvPV_nolen(ST(4));
	char*	outfile = (char *)SvPV_nolen(ST(5));
	int	RETVAL;
	dXSTARG;
#line 18 "pwmsearch.xs"
	do_search(matrixfile, seqfile, threshold, tfname, tfclass, outfile);
#line 93 "pwmsearch.c"
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_TFBS__Ext__pwmsearch); /* prototype to pass -Wmissing-prototypes */
XS(boot_TFBS__Ext__pwmsearch)
{
#ifdef dVAR
    dVAR; dXSARGS;
#else
    dXSARGS;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

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

        (void)newXS("TFBS::Ext::pwmsearch::search_xs", XS_TFBS__Ext__pwmsearch_search_xs, file);
#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}