[Epic-ID: ODUHIGH-402][Task-ID: ODUHIGH-418] Harq feature changes
[o-du/l2.git] / src / cm / cm_llist.c
index e9f070d..e8c0251 100644 (file)
 *       File:  cm_llist.c
 *
 */
-#ifdef ANSI
 Void cmLListInit
 (
 CmLListCp *lCp                /* list control point */
 )
-#else 
-Void cmLListInit(lCp)
-CmLListCp *lCp;               /* list control point */
-#endif
 {
    
    lCp->first = (CmLList *)NULLP;
@@ -95,17 +90,11 @@ CmLListCp *lCp;               /* list control point */
 *       File:  cm_llist.c
 *
 */
-#ifdef ANSI
 Void cmLListAdd2Head
 (
 CmLListCp *lCp,               /* list control point */
 CmLList   *node               /* node to be added */
 )
-#else 
-Void cmLListAdd2Head(lCp, node)
-CmLListCp *lCp;               /* list control point */
-CmLList   *node;              /* node to be added */
-#endif
 {
 
 #ifdef ERRCHK
@@ -143,17 +132,11 @@ CmLList   *node;              /* node to be added */
 *       File:  cm_llist.c
 *
 */
-#ifdef ANSI
 Void cmLListAdd2Tail
 (
 CmLListCp *lCp,               /* list control point */
 CmLList   *node               /* node to be added */
 )
-#else 
-Void cmLListAdd2Tail(lCp, node)
-CmLListCp *lCp;               /* list control point */
-CmLList   *node;              /* node to be added */
-#endif
 {
 
 #ifdef ERRCHK
@@ -191,17 +174,11 @@ CmLList   *node;              /* node to be added */
 *       File:  cm_llist.c
 *
 */
-#ifdef ANSI
 Void cmLListInsCrnt
 (
 CmLListCp *lCp,               /* list control point */
 CmLList   *node               /* node to be added */
 )
-#else 
-Void cmLListInsCrnt(lCp, node)
-CmLListCp *lCp;               /* list control point */
-CmLList   *node;              /* node to be added */
-#endif
 {
 
 #ifdef ERRCHK
@@ -245,17 +222,11 @@ CmLList   *node;              /* node to be added */
 *       File:  cm_llist.c
 *
 */
-#ifdef ANSI
 Void cmLListInsAfterCrnt
 (
 CmLListCp *lCp,               /* list control point */
 CmLList   *node               /* node to be added */
 )
-#else 
-Void cmLListInsAfterCrnt(lCp, node)
-CmLListCp *lCp;               /* list control point */
-CmLList   *node;              /* node to be added */
-#endif
 {
 
 #ifdef ERRCHK
@@ -301,17 +272,11 @@ CmLList   *node;              /* node to be added */
 *       File:  cm_llist.c
 *
 */
-#ifdef ANSI
 CmLList *cmLListDelFrm
 (
 CmLListCp *lCp,                /* list control pointer */
 CmLList *node                  /* node to be removed */
 )
-#else 
-CmLList *cmLListDelFrm(lCp, node)
-CmLListCp *lCp;               /* list control pointer */
-CmLList *node;                /* node to be removed */
-#endif
 {
   
 #ifdef ERRCHK
@@ -370,17 +335,11 @@ CmLList *node;                /* node to be removed */
   *       File:  cm_llist.c
   *
   --*/
-#ifdef ANSI
 Void cmLListCatLList
 (
- CmLListCp *list1,              /*-- list control point --*/
- CmLListCp *list2               /*-- node to be added --*/
- )
-#else 
-Void cmLListCatLList(list1, list2)
-   CmLListCp *list1;              /*-- list control point --*/
-   CmLListCp *list2;              /*-- node to be added --*/
-#endif
+CmLListCp *list1,              /*-- list control point --*/
+CmLListCp *list2               /*-- node to be added --*/
+)
 {
 
    /*-- if the second list is empty nothing to do --*/
@@ -411,6 +370,32 @@ Void cmLListCatLList(list1, list2)
    return;
 } /*-- end of cmLListCatLList --*/
 
+
+/*--
+  *
+  *       Fun:   cmLListDeleteLList
+  *
+  *       Desc:  delete a linked list
+  *
+  *       Ret:   None
+  *
+  *       Notes: None
+  *
+  *       File:  cm_llist.c
+  *
+  --*/
+Void cmLListDeleteLList
+(
+CmLListCp *list              /*-- list control point --*/
+)
+{
+   while(list->count)
+   {
+      cmLListDelFrm(list, list->first);
+   }
+   return;
+}
+
 /**********************************************************************
          End of file
 **********************************************************************/