/* ---?--- * * $Id$ * * Main interface to Catacomb functionality * * (c) 2001 Straylight/Edgeware */ /*----- Licensing notice --------------------------------------------------* * * This file is part of the Perl interface to Catacomb. * * Catacomb/Perl is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Catacomb/Perl is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Catacomb/Perl; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "catacomb-perl.h" const struct consttab ct[] = { #define C(x) { #x, x } C(GRAND_CRYPTO), C(PGEN_BEGIN), C(PGEN_TRY), C(PGEN_FAIL), C(PGEN_PASS), C(PGEN_DONE), C(PGEN_ABORT), C(DH_SUBGROUP), C(KF_ENCMASK), C(KENC_BINARY), C(KENC_MP), C(KENC_STRUCT), C(KENC_ENCRYPT), C(KENC_STRING), C(KENC_EC), C(KF_CATMASK), C(KCAT_SYMM), C(KCAT_PRIV), C(KCAT_PUB), C(KCAT_SHARE), C(KF_NONSECRET), C(KF_BURN), C(KF_OPT), C(KOPEN_READ), C(KOPEN_WRITE), C(KOPEN_MASK), C(KOPEN_NOFILE), C(KEXP_FOREVER), C(KEXP_EXPIRE), C(KERR_OK), C(KERR_BADTAG), C(KERR_BADTYPE), C(KERR_BADCOMMENT), C(KERR_DUPID), C(KERR_DUPTAG), C(KERR_READONLY), C(KERR_WILLEXPIRE), C(KERR_EXPIRED), C(KERR_BADFLAGS), C(KERR_BADPASS), C(KERR_WRONGTYPE), C(KERR_NOTFOUND), C(KERR_NOTFOUND), C(KERR_BADATTR), C(KERR_MALFORMED), C(KERR_IO), C(KWRITE_OK), C(KWRITE_FAIL), C(KWRITE_BROKEN), C(FTY_PRIME), C(FTY_BINARY), #undef C { 0, 0 }, }; MODULE = Catacomb PACKAGE = Catacomb U32 _const(name) char *name PREINIT: CODE: RETVAL = findconst(ct, "Catacomb", name); OUTPUT: RETVAL void _constants() PREINIT: int i; PPCODE: for (i = 0; ct[i].name; i++) XPUSHs(sv_2mortal(newSVpv(ct[i].name, 0))); void list(name) const char *name PPCODE: PUTBACK; names(name); SPAGAIN; PROTOTYPES: DISABLE INCLUDE: algorithms.xs INCLUDE: mp.xs INCLUDE: gf.xs INCLUDE: field.xs INCLUDE: ec.xs INCLUDE: group.xs INCLUDE: pubkey.xs INCLUDE: misc.xs INCLUDE: pgen.xs INCLUDE: key.xs