/*
 * Copyright (c) 1994 Malcolm Beattie.
 * You may distribute under the terms of the GNU General Public License,
 * as specified in the README file.
 */

#ifndef lint
static char rcsid[] = "$Id: tkpUvars.c,v 1.1 1994/09/05 16:03:30 mbeattie Exp $";
#endif

/* $Log: tkpUvars.c,v $
 * Revision 1.1  1994/09/05  16:03:30  mbeattie
 * Initial revision
 *
 */

#include "tkperl.h"

static char *cookies = "#abcdfhkmopstvwxyABDEKNORSTWXY";

void init_uvars _((void))
{
    GV *gv;
    SV *sv;
    static char uvarname[8] = "Tk::Ev-";
    char *p;
    struct ufuncs *ufp;
    
    for (p = cookies; *p; p++)
    {
	uvarname[6] = *p;
	gv = gv_fetchpv(uvarname, TRUE, SVt_PV);
	sv = GvSV(gv);
	sv_magic(sv, 0, 'U', 0, 0);
	New(666, ufp, 1, struct ufuncs); 
	ufp->uf_val = uvarEvget;
	ufp->uf_set = 0;
	ufp->uf_index = *p;
	SvMAGIC(sv)->mg_ptr = (char *) ufp;
    }
}
