]> git.pond.sub.org Git - empserver/commitdiff
(ef_zapcache): Clearing the cache doesn't make sense. No harm done if
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 24 Oct 2005 23:23:53 +0000 (23:23 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 24 Oct 2005 23:23:53 +0000 (23:23 +0000)
the next user can't use the cache, it gets automatically zapped then.
Remove.

include/file.h
src/lib/common/file.c
src/lib/subs/snxtitem.c
src/lib/subs/snxtsct.c

index e63a519044a4d9bf2b153ff6d99365b11b6a5dcd..5654e2eb2d58169318ea720db876bf5d1dd646d9 100644 (file)
@@ -141,7 +141,6 @@ extern int ef_flush(int);
 extern int ef_write(int, int, void *);
 extern int ef_extend(int, int);
 extern int ef_ensure_space(int, int, int);
-extern void ef_zapcache(int);
 extern int ef_nelem(int);
 extern int ef_flags(int);
 extern int ef_byname(char *);
index 0b924ebc82c03bd3dc1c0ed3b46a783b17be2f91..71164316dff1027b7770a3d38a45822be39fdce8 100644 (file)
@@ -376,19 +376,6 @@ ef_extend(int type, int count)
     return i == count;
 }
 
-/*
- * Mark the cache for the file containing objects of type 'type' as unused.
- */
-void
-ef_zapcache(int type)
-{
-    struct empfile *ep = &empfile[type];
-    if ((ep->flags & EFF_MEM) == 0) {
-       ep->cids = 0;
-       ep->baseid = -1;
-    }
-}
-
 struct castr *
 ef_cadef(int type)
 {
index d3ba6bcc74a4a5320f042d86c0aeb8054b36f099..2a505c66b85c2784bc0d22af06dcd8a43e84b388 100644 (file)
@@ -134,7 +134,6 @@ snxtitem_area(struct nstr_item *np, int type, struct range *range)
     np->read = ef_read;
     np->flags = ef_flags(type);
     xysize_range(&np->range);
-    ef_zapcache(type);
 }
 
 void
@@ -160,7 +159,6 @@ snxtitem_dist(struct nstr_item *np, int type, int cx, int cy,
     /* It did the wrong thing for small, hitech worlds. */
     xysize_range(&np->range);
 #endif
-    ef_zapcache(type);
 }
 
 void
@@ -176,7 +174,6 @@ snxtitem_xy(struct nstr_item *np, int type, coord x, coord y)
     np->dist = 0;
     np->read = ef_read;
     np->flags = ef_flags(type);
-    ef_zapcache(type);
 }
 
 void
@@ -190,7 +187,6 @@ snxtitem_all(struct nstr_item *np, int type)
     np->read = ef_read;
     np->flags = ef_flags(type);
     xysize_range(&np->range);
-    ef_zapcache(type);
 }
 
 void
@@ -207,7 +203,6 @@ snxtitem_group(struct nstr_item *np, int type, s_char group)
     np->read = ef_read;
     np->flags = ef_flags(type);
     xysize_range(&np->range);
-    ef_zapcache(type);
 }
 
 void
@@ -215,7 +210,6 @@ snxtitem_rewind(struct nstr_item *np)
 {
     np->cur = -1;
     np->index = -1;
-    ef_zapcache(np->type);
 }
 
 int
@@ -235,6 +229,5 @@ snxtitem_list(struct nstr_item *np, int type, int *list, int len)
     for (i = 0; i < len; i++)
        np->list[i] = list[i];
     np->size = len;
-    ef_zapcache(type);
     return 1;
 }
index c4e0baec268a8f5415be3c013d0621605289f702..ff7d2eca06bcedd7eb465054803b9bdc6b8ceb6f 100644 (file)
@@ -115,7 +115,6 @@ snxtsct_area(struct nstr_sect *np, struct range *range)
     np->dx = -1;
     np->dy = 0;
     xysize_range(&np->range);
-    ef_zapcache(EF_SECTOR);
 }
 
 void
@@ -126,7 +125,6 @@ snxtsct_rewind(struct nstr_sect *np)
     np->dx = -1;
     np->dy = 0;
     np->id = -1;
-    ef_zapcache(EF_SECTOR);
 }
 
 void
@@ -149,7 +147,6 @@ snxtsct_dist(struct nstr_sect *np, coord cx, coord cy, int dist)
     /* It was not doing the right thing when the world was small */
     xysize_range(&np->range);
 #endif
-    ef_zapcache(EF_SECTOR);
 }
 
 void