User Tools

Site Tools


notes:data:fall2022:projects:dln0

This is an old revision of the document!


BACKGROUND

Following our exploration into nodes, linked lists, and groups of linked lists. We are now moving into doubly linked nodes. Doubly linked nodes will further our learning into dealing with double pointers, passing by reference, and unions.

SPECIFICATIONS

*Our task is to ask questions on Discord or in class and document our findings on this wiki page collaboratively, regarding the functionality of this project.

*For anybody interested in editing the wiki page, here is the dokuwiki user guide: https://www.dokuwiki.org/wiki:syntax#basic_text_formatting -Ash

PROGRAM

dln0 has three different functions. These are:

mk.c
cp.c
rm.c

The general order you should complete them in is mk.c first, followed by rm.c, and cp.c last. Some general advice for each function:
mk.c - don't forget about the left and right pointers, explore into /inc/ to see what each node contains cp.c - make sure to copy the entire payload, union has different types of different sizes so don't just grab the smallest one

OUTPUT SPECIFICATIONS

All functions will return a status code, of type code_t. These codes will use bitwise operators, specifically the or operator.

UNIT TESTS

Unit tests for this project are unit-mknode, unit-rmnode, and unit-cpnode. There are 33 total tests, 12 for mknode, 4 for rmnode, and 17 for cpnode. To get a general view of your entire project, run make check to see how many tests pass. To get a more detailed view of what tests are failing, ./bin/unit-(DESIRED_TEST). If you are getting segmentation faults, consider the use of gdb.

notes/data/fall2022/projects/dln0.1666288214.txt.gz · Last modified: 2022/10/20 17:50 by hcordell