projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New implementation of long variable names. Each variable has a
[pspp]
/
src
/
compute.c
diff --git
a/src/compute.c
b/src/compute.c
index 2152b6db1a71e5addcd30cad2a56b2c1860656f4..24148fe68f94b55af0a1d0b3941dc6f10ebb0139 100644
(file)
--- a/
src/compute.c
+++ b/
src/compute.c
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
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., 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street, Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#include <config.h>
#include "error.h"
#include <config.h>
#include "error.h"
@@
-315,7
+315,7
@@
struct lvalue
struct expression *element; /* Destination vector element, or NULL. */
};
struct expression *element; /* Destination vector element, or NULL. */
};
-/* Parses the target variable or vector ele
ctor
into a new
+/* Parses the target variable or vector ele
ment
into a new
`struct lvalue', which is returned. */
static struct lvalue *
lvalue_parse (void)
`struct lvalue', which is returned. */
static struct lvalue *
lvalue_parse (void)
@@
-353,8
+353,7
@@
lvalue_parse (void)
else
{
/* Variable name. */
else
{
/* Variable name. */
- strncpy (lvalue->var_name, tokid, LONG_NAME_LEN);
- lvalue->var_name[LONG_NAME_LEN] = '\0';
+ st_trim_copy (lvalue->var_name, tokid, sizeof lvalue->var_name);
lex_get ();
}
return lvalue;
lex_get ();
}
return lvalue;
@@
-371,8
+370,7
@@
lvalue_get_type (const struct lvalue *lvalue)
{
if (lvalue->vector == NULL)
{
{
if (lvalue->vector == NULL)
{
- struct variable *var
- = dict_lookup_var (default_dict, lvalue->var_name);
+ struct variable *var = dict_lookup_var (default_dict, lvalue->var_name);
if (var == NULL)
return NUMERIC;
else
if (var == NULL)
return NUMERIC;
else