require db4-devel
[platform/upstream/libical.git] / scripts / mkneticali.pl
1 #!/usr/local/bin/perl 
2
3 $pr = 1;
4 $ignore = 0;
5
6
7 print<<EOM;
8 /* -*- Mode: C -*-*/
9 /*======================================================================
10   FILE: ical.i
11
12   (C) COPYRIGHT 1999 Eric Busboom
13   http://www.softwarestudio.org
14
15   The contents of this file are subject to the Mozilla Public License
16   Version 1.0 (the "License"); you may not use this file except in
17   compliance with the License. You may obtain a copy of the License at
18   http://www.mozilla.org/MPL/
19
20   Software distributed under the License is distributed on an "AS IS"
21   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
22   the License for the specific language governing rights and
23   limitations under the License.
24
25   The original author is Eric Busboom
26
27   Contributions from:
28   Graham Davison (g.m.davison\@computer.org)
29
30   ======================================================================*/  
31
32 %module Net__ICal
33
34 %{
35 #include "ical.h"
36
37 #include <sys/types.h> /* for size_t */
38 #include <time.h>
39
40 %}
41
42 EOM
43
44 foreach $f (@ARGV)
45 {
46   @f = split(/\//,$f);
47   $fn = pop(@f);
48
49   $fn=~/pvl/ && next;
50   $fn=~/sspm/ && next;
51   $fn=~/cstp/ && next;
52    $fn=~/csdb/ && next;
53    $fn=~/vcal/ && next;
54    $fn=~/yacc/ && next;
55    $fn=~/lex/ && next;
56
57   print "\n/**********************************************************************\n";
58
59   print "\t$fn\n";
60   print "**********************************************************************/\n\n";
61
62
63   open F, $f;
64
65   while(<F>){
66     
67     s/^#.*//;
68
69     s/\/\*.*\*\///;
70     
71     /^\/\// && next;
72
73     next if /^$/;
74     
75     if(/\/\*/){ $pr = 0;}
76     
77     /icalparser_parse\(/ and $ignore = 1;
78     /vanew/ and $ignore = 1; 
79     /_stub/ and $ignore = 1; 
80     /_response/ and $ignore = 1; 
81     /line_gen_func/ and $ignore = 1; 
82     /extern/  and $ignore = 1; 
83     /sspm/  and $ignore = 1; 
84     /icalrecur/  and $ignore = 1; 
85
86     if ($pr == 1 && $ignore == 0){
87       print ;
88     }
89     
90     
91     if(/\*\//){ $pr = 1;}
92
93     if (/\;/){ $ignore = 0; }
94
95   }
96
97 }
98
99