Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/lib/libvcodex/Vcwindow/vcwclose.c
1810 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 2003-2011 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Phong Vo <[email protected]> *
18
* *
19
***********************************************************************/
20
#include "vcwhdr.h"
21
22
/* Close a Vcwindow_t handle
23
**
24
** Written by Kiem-Phong Vo ([email protected])
25
*/
26
27
#if __STD_C
28
int vcwclose(Vcwindow_t* vcw)
29
#else
30
int vcwclose(vcw)
31
Vcwindow_t* vcw;
32
#endif
33
{
34
if(!vcw)
35
return -1;
36
37
if(vcw->disc && vcw->disc->eventf &&
38
(*vcw->disc->eventf)(vcw, VCW_CLOSING, 0, vcw->disc) < 0 )
39
return -1;
40
41
if(vcw->meth && vcw->meth->eventf &&
42
(*vcw->meth->eventf)(vcw, VCW_CLOSING) < 0 )
43
return -1;
44
45
free(vcw);
46
47
return 0;
48
}
49
50
51