]> git.sur5r.net Git - cc65/commitdiff
Added CollDeleteAll
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 30 Apr 2001 19:44:54 +0000 (19:44 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 30 Apr 2001 19:44:54 +0000 (19:44 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@698 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/coll.c
src/common/coll.h
src/common/make/gcc.mak

index 5d77ca2e8630c4fe82685d4d44f6bb3fbb940034..6748ff12d9763f20ad07025d424b6baccb98ec5f 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000     Ullrich von Bassewitz                                       */
+/* (C) 2000-2001 Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
 /* EMail:        uz@musoftware.de                                            */
@@ -211,6 +211,17 @@ void CollDelete (Collection* C, unsigned Index)
 
 
 
+void CollDeleteAll (Collection* C)
+/* Delete all items from the given collection. This will not free the items
+ * itself, it will only remove the pointers.
+ */                              
+{
+    /* This one is easy... */
+    C->Count = 0;
+}
+
+
+
 void CollReplace (Collection* C, void* Item, unsigned Index)
 /* Replace the item at the given position. The old item will not be freed,
  * just the pointer will et replaced.
index ba1d4f6013f6ed6c8fb12e9721051fbd298f8139..37c759ba8327186c10c8997e1e6e738c4b16bb21 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000     Ullrich von Bassewitz                                       */
+/* (C) 2000-2001 Ullrich von Bassewitz                                       */
 /*               Wacholderweg 14                                             */
 /*               D-70597 Stuttgart                                           */
 /* EMail:        uz@musoftware.de                                            */
@@ -108,6 +108,11 @@ void CollDelete (Collection* C, unsigned Index);
  * will get moved to a lower position.
  */
 
+void CollDeleteAll (Collection* C);
+/* Delete all items from the given collection. This will not free the items
+ * itself, it will only remove the pointers.
+ */
+
 void CollReplace (Collection* C, void* Item, unsigned Index);
 /* Replace the item at the given position. The old item will not be freed,
  * just the pointer will et replaced.
index 83b64f0c004b4ae8e791abfb50d04e84f12f4ba0..60933e52d50c7fd4e8d2216bdee90c8b2a508470 100644 (file)
@@ -60,5 +60,3 @@ depend dep:   $(OBJS:.o=.c)
        $(CC) -MM $^ > .depend
 
 
-
-