/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 2003-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* *18***********************************************************************/19#include "vcwhdr.h"2021/* Close a Vcwindow_t handle22**23** Written by Kiem-Phong Vo ([email protected])24*/2526#if __STD_C27int vcwclose(Vcwindow_t* vcw)28#else29int vcwclose(vcw)30Vcwindow_t* vcw;31#endif32{33if(!vcw)34return -1;3536if(vcw->disc && vcw->disc->eventf &&37(*vcw->disc->eventf)(vcw, VCW_CLOSING, 0, vcw->disc) < 0 )38return -1;3940if(vcw->meth && vcw->meth->eventf &&41(*vcw->meth->eventf)(vcw, VCW_CLOSING) < 0 )42return -1;4344free(vcw);4546return 0;47}48495051