This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:summer2015:data:projects:sll1 [2015/05/31 12:10] – wedge | haas:summer2015:data:projects:sll1 [2015/06/01 21:17] (current) – [list library (so far)] wedge | ||
---|---|---|---|
Line 30: | Line 30: | ||
List *cplist(List *); // duplicate existing list | List *cplist(List *); // duplicate existing list | ||
void displayb(List *, int); // display list backwards | void displayb(List *, int); // display list backwards | ||
- | int compare(List *, List *); // compare two lists for equality | + | uc compare(List *, List *, ulli *); |
+ | </ | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | <code c> | ||
+ | typedef struct list List; // because we deserve nice things | ||
+ | typedef unsigned long long int ulli; // short name for biggest space | ||
+ | typedef unsigned char uc; // shorter name for smallest space | ||
+ | </ | ||
+ | |||
+ | and: | ||
+ | <code c> | ||
+ | // return status codes | ||
+ | // | ||
+ | #define CMP_EQUALITY | ||
+ | #define CMP_L1_NULL | ||
+ | #define CMP_L1_EMPTY | ||
+ | #define CMP_L1_GREATER | ||
+ | #define CMP_L1_LESS | ||
+ | #define CMP_L2_NULL | ||
+ | #define CMP_L2_EMPTY | ||
+ | #define CMP_L2_GREATER | ||
+ | #define CMP_L2_LESS | ||
</ | </ | ||
Line 39: | Line 62: | ||
In this project, **append()** can be considered that basic operation, where **cplist()** can be built using **append()** (along with any other list/node functions from this and previous projects). | In this project, **append()** can be considered that basic operation, where **cplist()** can be built using **append()** (along with any other list/node functions from this and previous projects). | ||
- | |||
====list library==== | ====list library==== | ||
In **src/ | In **src/ | ||
Line 83: | Line 105: | ||
To assist you in verifying a correct implementation, | To assist you in verifying a correct implementation, | ||
- | ====node library==== | ||
- | Here is what you should get for the node library: | ||
- | |||
- | <cli> | ||
- | lab46: | ||
- | ==================================================== | ||
- | = Verifying Singly-Linked Node Functionality | ||
- | ==================================================== | ||
- | | ||
- | | ||
- | | ||
- | ==================================================== | ||
- | [RESULTS] Total: | ||
- | ==================================================== | ||
- | lab46: | ||
- | </ | ||
====list library (so far)==== | ====list library (so far)==== | ||
Line 117: | Line 123: | ||
[cplist] Total: | [cplist] Total: | ||
[displayb] Total: | [displayb] Total: | ||
- | | + | |
====================================================== | ====================================================== | ||
- | | + | |
====================================================== | ====================================================== | ||
lab46: | lab46: |