grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / classes / zune / nlist / nlist_mcc / move.c
blob4b7c0e7c6c25c79c3fc69c79a84ff7f54df81c36
1 /***************************************************************************
3 NList.mcc - New List MUI Custom Class
4 Registered MUI class, Serial Number: 1d51 0x9d510030 to 0x9d5100A0
5 0x9d5100C0 to 0x9d5100FF
7 Copyright (C) 1996-2001 by Gilles Masson
8 Copyright (C) 2001-2014 NList Open Source Team
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 NList classes Support Site: http://www.sf.net/projects/nlist-classes
22 $Id$
24 ***************************************************************************/
26 #include <exec/types.h>
28 #define NO_PROTOS
29 #include "private.h"
33 * Warning: the number of octets have to be a multiple of 4
34 * and to be efficient, src and dest also have to be a multiple of 4
36 * extern void NL_Move(void *dest,void *src,LONG len);
40 void NL_Move(struct TypeEntry **dest, struct TypeEntry **src, LONG count, LONG newpos)
42 LONG i;
44 for(i = 0; i < count; i++)
46 (*src)->entpos = newpos++;
47 *dest++ = *src++;
52 void NL_MoveD(struct TypeEntry **dest, struct TypeEntry **src, LONG count, LONG newpos)
54 LONG i;
56 for(i = 0; i < count; i++)
58 *--dest = *--src;
59 (*dest)->entpos = --newpos;