/********************************************************************
This file is part of the abs 0.907 distribution. abs is a spreadsheet
with graphical user interface.
Copyright (C) 1998-2001 André Bertin (Andre.Bertin@ping.be)
This program 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 if in the same spirit as version 2.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Concact: abs@pi.be
http://home.pi.be/bertin/abs.shtml
*********************************************************************/
#include "range_vb.h"
#include "memory.h"
obj
vb_getrange (narg, arg)
int narg;
obj *arg;
{
obj o;
Range *range;
o.rec.s = NULL;
if (arg[0].type == STRING || arg[0].type == STRING_CONSTANT)
{
range = newrange (obj2string (arg[0]));
o.rec.s = (char *) range;
}
o.type = RANGEN;
o.label = arrayclass[RANGEN].name;
return o;
}
obj
vb_range_setobj (narg, arg)
int narg;
obj *arg;
{
obj o;
if (arg[0].type == RANGEN)
{
return o;
}
return o;
}
obj
vb_range_getobj (narg, arg)
int narg;
obj *arg;
{
obj o;
return o;
}
obj
vb_range_setvalue (narg, arg)
int narg;
obj *arg;
{
obj o;
return o;
}
obj
vb_range_getvalue (narg, arg)
int narg;
obj *arg;
{
obj o;
return o;
}
obj
vb_range_assign (narg, arg)
int narg;
obj *arg;
{
obj o;
o.type = RANGEN;
return o;
}
extern int setselectionrange (Range * ran);
obj
vb_range_select (int narg, obj * arg)
{
obj o;
obj ran;
Range *range;
if (narg > 0)
{
ran = arg[0];
if (ran.type == RANGEN)
{
range = (Range *) ran.rec.s;
o.rec.i = setselectionrange (range);
}
}
o.type = INTEGER;
return o;
}
obj
vb_range_print (int narg, obj * arg)
{
obj o;
obj ran;
Range *range;
if (narg > 0)
{
ran = arg[0];
if (ran.type == RANGEN)
{
range = (Range *) ran.rec.s;
fprintf (stderr, "print range not yet implemented\n");
}
}
o.type = INTEGER;
return o;
}
syntax highlighted by Code2HTML, v. 0.9.1