free(dp);
}
-int updatePM(PointMap * pm, int x, int y, int v)
-{
- mpair *p;
- mpair dummy;
- int old;
-
- dummy.id.x = x;
- dummy.id.y = y;
- dummy.v = v;
- p = dtinsert(pm, &dummy);
- old = p->v;
- p->v = v;
- return old;
-}
-
int insertPM(PointMap * pm, int x, int y, int v)
{
mpair *p;
POINTSET_API void clearPM(PointMap *);
POINTSET_API void freePM(PointMap *);
POINTSET_API int insertPM(PointMap *, int, int, int);
- POINTSET_API int updatePM(PointMap * pm, int x, int y, int v);
#undef POINTSET_API
#ifdef __cplusplus