[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/data datasheet.c [simpler-proc]
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp/src/data datasheet.c [simpler-proc] |
Date: |
Wed, 18 Apr 2007 05:41:26 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Branch: simpler-proc
Changes by: Ben Pfaff <blp> 07/04/18 05:41:26
Modified files:
src/data : datasheet.c
Log message:
Use insert_range function.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/datasheet.c?cvsroot=pspp&only_with_tag=simpler-proc&r1=1.1.2.7&r2=1.1.2.8
Patches:
Index: datasheet.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/Attic/datasheet.c,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -b -r1.1.2.7 -r1.1.2.8
--- datasheet.c 18 Apr 2007 05:07:32 -0000 1.1.2.7
+++ datasheet.c 18 Apr 2007 05:41:26 -0000 1.1.2.8
@@ -1172,9 +1172,8 @@
for (i = 0; i < row_cnt; i++)
{
- /* We could use an insert_range function here. */
- memmove (&data[i][pos + cnt], &data[i][pos],
- (column_cnt - pos) * sizeof data[i][pos]);
+ insert_range (&data[i][0], column_cnt, sizeof data[i][0],
+ pos, cnt);
for (j = 0; j < cnt; j++)
data[i][pos + j] = new[j].f;
}
@@ -1239,9 +1238,7 @@
case_data_rw_idx (&c[i], j)->f = params->next_value++;
}
- /* We could use an insert_range function here. */
- memmove (&data[pos + cnt], &data[pos],
- sizeof (double[MAX_COLS]) * (row_cnt - pos));
+ insert_range (data, row_cnt, sizeof data[pos], pos, cnt);
for (i = 0; i < cnt; i++)
for (j = 0; j < column_cnt; j++)
data[i + pos][j] = case_num_idx (&c[i], j);