User Tools

Site Tools


notes:fall2024:projects:msi2

This is an old revision of the document!


msi2

mknode() function

Node *mknode (parameters);

To make a node you need to allocate memory for it, and initialize any values that need to be, for parameters you want to pass it anything that might change between nodes, like X and Y coordinates, but anything that remains the same, like speed, can be hard-coded into the function.

rmnode() function

Node *rmnode (Node *);

mklist() function

List *mklist ();

insert() function

List *insert (List *, Node *, Node *);

append() function

List *append (List *, Node *, Node *);

Your append function will work similarly to vim, that is it will append after another node, not necessarily at the end of the list. You will need to pass the function the list you are adding the node to, the node you are appending to, and the node you are appending. Make sure you rework the next pointers, as to not lose any nodes that were already following the location node, ie change newnode → next to be location → next before changing the location's next to be the new node

obtain() function

List *obtain (List *, Node **);

clearlist() function

List *clearlist (List *);

rmlist() function

List *rmlist (List *);
notes/fall2024/projects/msi2.1726762650.txt.gz · Last modified: 2024/09/19 16:17 by cgrant9