projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a bug in frequencies.q which would crash on alpha values
[pspp-builds.git]
/
src
/
data-in.c
diff --git
a/src/data-in.c
b/src/data-in.c
index 9bdda48cf3113877ee3f4c8c982522df17cac8fb..eca83d0b44a96764d18b69171a15644284ad4bee 100644
(file)
--- a/
src/data-in.c
+++ b/
src/data-in.c
@@
-18,6
+18,7
@@
02111-1307, USA. */
#include <config.h>
02111-1307, USA. */
#include <config.h>
+#include "data-in.h"
#include <assert.h>
#include <math.h>
#include <ctype.h>
#include <assert.h>
#include <math.h>
#include <ctype.h>
@@
-25,7
+26,6
@@
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include "data-in.h"
#include "error.h"
#include "getline.h"
#include "julcal/julcal.h"
#include "error.h"
#include "getline.h"
#include "julcal/julcal.h"
@@
-36,8
+36,6
@@
#include "str.h"
#include "var.h"
\f
#include "str.h"
#include "var.h"
\f
-#undef DEBUGGING
-/*#define DEBUGGING 1 */
#include "debug-print.h"
\f
#include "debug-print.h"
\f
@@
-288,6
+286,7
@@
parse_N (struct data_in *i)
{
const unsigned char *cp;
{
const unsigned char *cp;
+ i->v->f = 0;
for (cp = i->s; cp < i->e; cp++)
{
if (!isdigit (*cp))
for (cp = i->s; cp < i->e; cp++)
{
if (!isdigit (*cp))
@@
-574,11
+573,6
@@
parse_A (struct data_in *i)
memset (i->v->s + len, ' ', i->format.w - len);
}
memset (i->v->s + len, ' ', i->format.w - len);
}
-#if __CHECKER__
- memset (i->v->s + i->format.w, '%',
- REM_RND_UP (i->format.w, MAX_SHORT_STRING));
-#endif
-
return 1;
}
return 1;
}
@@
-613,11
+607,6
@@
parse_AHEX (struct data_in *i)
memset (i->v->s + (i->e - i->s) / 2, ' ', (i->format.w - (i->e - i->s)) / 2);
}
memset (i->v->s + (i->e - i->s) / 2, ' ', (i->format.w - (i->e - i->s)) / 2);
}
-#if __CHECKER__
- memset (i->v->s + i->format.w / 2, '%',
- REM_RND_UP (i->format.w / 2, MAX_SHORT_STRING));
-#endif
-
return 1;
}
\f
return 1;
}
\f
@@
-1497,13
+1486,7
@@
default_result (struct data_in *i)
/* Default to SYSMIS or blanks. */
if (fmt->cat & FCAT_STRING)
/* Default to SYSMIS or blanks. */
if (fmt->cat & FCAT_STRING)
- {
-#if __CHECKER__
- memset (i->v->s, ' ', ROUND_UP (i->format.w, MAX_SHORT_STRING));
-#else
- memset (i->v->s, ' ', i->format.w);
-#endif
- }
+ memset (i->v->s, ' ', i->format.w);
else
i->v->f = set_blanks;
}
else
i->v->f = set_blanks;
}