fix, initialise auto_remove_nodes upon ase_make_digraph()
[sxemacs] / modules / ase / ase.c
1 /*** ase.c -- Fancifying ENT a little
2  *
3  * Copyright (C) 2006, 2007, 2008 Sebastian Freundt
4  *
5  * Author:  Sebastian Freundt <hroptatyr@sxemacs.org>
6  *
7  * This file is part of SXEmacs.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above copyright
17  *    notice, this list of conditions and the following disclaimer in the
18  *    documentation and/or other materials provided with the distribution.
19  *
20  * 3. Neither the name of the author nor the names of any contributors
21  *    may be used to endorse or promote products derived from this
22  *    software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
25  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27  * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
31  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
33  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
34  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35  *
36  ***/
37
38 /* Synched up with: Not in FSF. */
39
40 #include "config.h"
41 #include "sxemacs.h"
42 #include "lisp.h"
43 #include "ent/ent.h"
44 #include "ase.h"
45 #ifdef EMOD_ASE_MONOMOD
46 #include "ase-cartesian.h"
47 #include "ase-interval.h"
48 #include "ase-neighbourhood.h"
49 #include "ase-metric.h"
50 #endif
51
52 #define EMODNAME        ase
53 PROVIDE(ase);
54
55 Lisp_Object Qase;
56
57 \f
58 #ifdef EMOD_ASE_MONOMOD
59 void
60 LTX_PUBFUN(ase_mono, init)(void)
61 {
62         LTX_PUBFUN(ase_interval, init)();
63         LTX_PUBFUN(ase_neighbourhood, init)();
64         LTX_PUBFUN(ase_cartesian, init)();
65         LTX_PUBFUN(ase_metric, init)();
66
67         Fprovide(intern("ase-mono"));
68 }
69 #endif
70
71 void
72 EMOD_PUBINIT(void)
73 {
74 #ifdef EMOD_ASE_MONOMOD
75         LTX_PUBFUN(ase_mono, init)();
76 #endif
77         DEFSYMBOL(Qase);
78
79         Fprovide(Qase);
80 }
81
82 void
83 EMOD_PUBREINIT(void)
84 {
85 #ifdef EMOD_ASE_MONOMOD
86         LTX_PUBFUN(ase_interval, reinit)();
87         LTX_PUBFUN(ase_neighbourhood, reinit)();
88         LTX_PUBFUN(ase_cartesian, reinit)();
89         LTX_PUBFUN(ase_metric, reinit)();
90 #endif
91 }
92
93 void
94 EMOD_PUBDEINIT(void)
95 {
96         Frevoke(Qase);
97 }
98
99 /* ase ends here */