User Tools

Site Tools


haas:summer2015:data:projects:dll1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:summer2015:data:projects:dll1 [2015/06/27 20:31] – [Errata] wedgehaas:summer2015:data:projects:dll1 [2015/06/27 20:39] (current) – [Project Overview] wedge
Line 31: Line 31:
  
 <code> <code>
-unsigned char  rmlist (List **);                  // deallocate empty list+code_t  rmlist (List **);                  // deallocate empty list
  
-unsigned char  obtain (List **, Node **);         // obtain/disconnect node from list+code_t  obtain (List **, Node **);         // disconnect node  from list
  
-unsigned char  compare(List *,  List *, long int *);          // compare two lists for equality +code_t  compare(List  *, List *, ulli  *); // compare two lists 
-unsigned char  empty  (List **);                  // empty an existing list+code_t  empty  (List **);                  // empty an existing list
  
-unsigned char  sort   (List **, char);            // sort list (according to mode) +code_t  sort   (List **, int);             // sort list by mode 
-unsigned char  swap   (List **, Node *, Node *);  // swap positions of given nodes in list+code_t  swap   (List **, Node *, Node  *); // swap nodes in list
 </code> </code>
  
Line 54: Line 54:
   * **DLL_EMPTY** - result is an empty list (may or may not be in error)   * **DLL_EMPTY** - result is an empty list (may or may not be in error)
   * **DLL_DEFAULT_FAIL** - default state of unimplemented functions (default error)   * **DLL_DEFAULT_FAIL** - default state of unimplemented functions (default error)
-  * **DLL_FAIL** - some error occurred+  * **DLL_ERROR** - some error occurred 
 +  * **DLL_INVALID** - invalid list condition
  
 For example, in the case of "DLL_MALLOC_FAIL", there are actually a total of three states raised: For example, in the case of "DLL_MALLOC_FAIL", there are actually a total of three states raised:
-  * DLL_FAIL (a problem has occurred)+  * DLL_ERROR (a problem has occurred)
   * DLL_MALLOC_FAIL (a problem has occurred when using malloc())   * DLL_MALLOC_FAIL (a problem has occurred when using malloc())
   * DLL_NULL (no memory allocated, so list cannot be anything but NULL)   * DLL_NULL (no memory allocated, so list cannot be anything but NULL)
Line 100: Line 101:
 To assist you in verifying a correct implementation, a fully working implementation of the node and list libraries should resemble the following (when running the respective verify script): To assist you in verifying a correct implementation, a fully working implementation of the node and list libraries should resemble the following (when running the respective verify script):
  
-====node library==== 
-Here is what you should get for node: 
  
-<cli> 
-lab46:~/src/data/dll1$ bin/verify-node.sh  
-==================================================== 
-=    Verifying Doubly-Linked Node Functionality    = 
-==================================================== 
-  [mknode] Total:   5, Matches:   5, Mismatches:   0 
-  [cpnode] Total:   6, Matches:   6, Mismatches:   0 
-  [rmnode] Total:   2, Matches:   2, Mismatches:   0 
-==================================================== 
- [RESULTS] Total:  13, Matches:  13, Mismatches:   0 
-==================================================== 
-lab46:~/src/data/dll1$  
-</cli> 
- 
-There were no changes required to the node library between dll0 and dll1, so once you achieved a working implementation, the results should remain the same here. 
 ====list library==== ====list library====
 Here is what you should get for list: Here is what you should get for list:
haas/summer2015/data/projects/dll1.1435437086.txt.gz · Last modified: 2015/06/27 20:31 by wedge