From 8f7cd3a9ba553c81119b2cbdbee5ed240139be49 Mon Sep 17 00:00:00 2001 From: Panayotis Skordos Date: Sun, 14 Feb 1988 00:41:37 +0000 Subject: [PATCH] array-aperiodic-downsample dropped last element on odd lengths, fixed. --- v7/src/microcode/array.c | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/v7/src/microcode/array.c b/v7/src/microcode/array.c index 8259d8a1a..ca1100847 100644 --- a/v7/src/microcode/array.c +++ b/v7/src/microcode/array.c @@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising, promotional, or sales literature without prior written consent from MIT in each case. */ -/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/array.c,v 9.28 1988/01/10 10:38:52 pas Exp $ */ +/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/array.c,v 9.29 1988/02/14 00:41:37 pas Rel $ */ /* CONTAINS: */ /* Scheme_Array constructors, and selectors */ @@ -1247,55 +1247,44 @@ Define_Primitive(Prim_Array_Periodic_Shift, 2, "ARRAY-PERIODIC-SHIFT") Arg_2_Type(TC_FIXNUM); Length = Array_Length(Arg1); Sign_Extend(Arg2, Shift); - Shift = Shift % Length; /* periodic waveform, same sign as dividend */ + Shift = Shift % Length; /* periodic waveform, same sign as dividend */ Array = Scheme_Array_To_C_Array(Arg1); Allocate_Array(Result, Length, allocated_cells); To_Here = Scheme_Array_To_C_Array(Result); - for (i=0; i