--- mstools/samples/deb/linklist.c 2018/08/09 18:20:39 1.1.1.1 +++ mstools/samples/deb/linklist.c 2018/08/09 18:21:31 1.1.1.2 @@ -1,9 +1,12 @@ // ************************************************************************ -// LinkList.C - Ordered Double Linked List Package -// ************************************************************************ -// PURPOSE: Provide a generalized sorted double linked list package // -// FUNCTIONS: +// Microsoft Developer Support +// Copyright (c) 1992 Microsoft Corporation +// +// ************************************************************************ +// MODULE : LinkList.C +// PURPOSE : Provide a generalized sorted double linked list package +// FUNCTIONS : // InitList - initialize/clear list // CreateNode - allocate a new node that can be put into list // InsertNode - insert a new node into the list @@ -35,7 +38,7 @@ #include "LinkList.H" //-- NULL pointer dereferencing checking macro -#define CHECH_POINTER( Node ) \ +#define CHECK_POINTER( Node ) \ if( Node == NULL ) { \ printf("Attempt to dereference NULL.\n"); \ return(pList->ListError = DEREFERENCE_NULL_ERROR); \ @@ -267,7 +270,7 @@ DeleteCurrentNode( PLIST pList ) int GetNextNode( PLIST pList, PNODE* ppNode ) { - CHECH_POINTER( ppNode ); + CHECK_POINTER( ppNode ); if( ((*ppNode)->pRightLink) == NULL ) return( (pList->ListError) = NO_NEXT_NODE_ERROR ); (*ppNode) = ((*ppNode)->pRightLink); @@ -285,7 +288,7 @@ GetNextNode( PLIST pList, PNODE* ppNode int GetPreviousNode( PLIST pList, PNODE* ppNode ) { - CHECH_POINTER( ppNode ); + CHECK_POINTER( ppNode ); if( ((*ppNode)->pLeftLink) == NULL ) return( (pList->ListError) = NO_PREV_NODE_ERROR); (*ppNode) = ((*ppNode)->pLeftLink);