/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1996-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Phong Vo <[email protected]> *17* Glenn Fowler <[email protected]> *18* *19***********************************************************************/20#include "rshdr.h"2122/* Close a sorting context23**24** Written by Kiem-Phong Vo (07/18/96)25*/2627#if __STD_C28int rsclose(Rs_t* rs)29#else30int rsclose(rs)31Rs_t* rs;32#endif33{34reg int rv;3536while (rsdisc(rs, NIL(Rsdisc_t*), RS_POP));37if ((rv = RSNOTIFY(rs,RS_CLOSE,0,0,rs->disc)) < 0)38return rv;3940if(rs->vm)41vmclose(rs->vm);42if(rs->methdata)43vmfree(Vmheap,rs->methdata);44vmfree(Vmheap,rs);4546return 0;47}484950