Tabs to spaces, more consistent formatting.
[AROS.git] / workbench / libs / camd / nextmidi.c
blob15eccbe1c91b231d66571e132664e56b5752b281
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
10 #include "camd_intern.h"
13 /*****************************************************************************
15 NAME */
17 AROS_LH1(struct MidiNode *, NextMidi,
19 /* SYNOPSIS */
20 AROS_LHA(struct MidiNode *, midinode, A0),
22 /* LOCATION */
23 struct CamdBase *, CamdBase, 11, Camd)
25 /* FUNCTION
26 Returns the next midinode in the list of midinodes, or NULL
27 if midinode was the last one.
29 INPUTS
30 midinode - The midinode to begin searching from. If NULL,
31 returns the first midinode in the list.
33 RESULT
35 NOTES
36 CL_Linkages must be locked.
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 HISTORY
48 2001-01-12 ksvalast first created
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct Node *node=CB(CamdBase)->mymidinodes.lh_Head;
56 if(midinode==NULL){
57 if(IsListEmpty(&CB(CamdBase)->mymidinodes)) return NULL;
58 return (struct MidiNode *)node;
61 if(midinode->mi_Node.ln_Succ->ln_Succ==NULL) return NULL;
63 return (struct MidiNode *)midinode->mi_Node.ln_Succ;
65 AROS_LIBFUNC_EXIT