[Commits] .cvsignore NONE 1.1.2.1 Makefile.am NONE 1.1.2.1 Makefile.in NONE 1.1.2.1 mkderivedcomponents.pl NONE 1.1.2.1 mkderivedparameters.pl NONE 1.1.2.1 mkderivedproperties.pl NONE 1.1.2.1 mkderivedvalues.pl NONE 1.1.2.1 mkparameterrestrictions.pl NONE 1.1.2.1 mkrestrictionrecords.pl NONE 1.1.2.1 mkrestrictiontable.pl NONE 1.1.2.1 readvaluesfile.pl NONE 1.1.2.1
colin at claws-mail.org
colin at claws-mail.org
Wed Feb 13 21:50:33 CET 2013
Update of /home/claws-mail/claws/src/plugins/vcalendar/libical/scripts
In directory srv:/tmp/cvs-serv22674/src/plugins/vcalendar/libical/scripts
Added Files:
Tag: gtk2
.cvsignore Makefile.am Makefile.in mkderivedcomponents.pl
mkderivedparameters.pl mkderivedproperties.pl
mkderivedvalues.pl mkparameterrestrictions.pl
mkrestrictionrecords.pl mkrestrictiontable.pl
readvaluesfile.pl
Log Message:
2013-02-13 [colin] 3.9.0cvs65
* src/plugins/address_dup_finder/placeholder.txt
* src/plugins/synce/placeholder.txt
Removed, deprecated plugins
* src/plugins/Makefile.am
* src/plugins/vcalendar/Makefile.am
* src/plugins/vcalendar/Makefile.in
* src/plugins/vcalendar/common-views.c
* src/plugins/vcalendar/common-views.h
* src/plugins/vcalendar/day-view.c
* src/plugins/vcalendar/icaltime_as_local.c
* src/plugins/vcalendar/icaltime_as_local.h
* src/plugins/vcalendar/month-view.c
* src/plugins/vcalendar/placeholder.txt
* src/plugins/vcalendar/plugin.c
* src/plugins/vcalendar/vcal_dbus.c
* src/plugins/vcalendar/vcal_dbus.h
* src/plugins/vcalendar/vcal_folder.c
* src/plugins/vcalendar/vcal_folder.h
* src/plugins/vcalendar/vcal_interface.h
* src/plugins/vcalendar/vcal_manager.c
* src/plugins/vcalendar/vcal_manager.h
* src/plugins/vcalendar/vcal_meeting_gtk.c
* src/plugins/vcalendar/vcal_meeting_gtk.h
* src/plugins/vcalendar/vcal_prefs.c
* src/plugins/vcalendar/vcal_prefs.h
* src/plugins/vcalendar/vcalendar.c
* src/plugins/vcalendar/vcalendar.h
* src/plugins/vcalendar/version.rc
* src/plugins/vcalendar/libical/.cvsignore
* src/plugins/vcalendar/libical/Makefile.am
* src/plugins/vcalendar/libical/Makefile.in
* src/plugins/vcalendar/libical/design-data/.cvsignore
* src/plugins/vcalendar/libical/design-data/Makefile.am
* src/plugins/vcalendar/libical/design-data/Makefile.in
* src/plugins/vcalendar/libical/design-data/parameters.csv
* src/plugins/vcalendar/libical/design-data/properties.csv
* src/plugins/vcalendar/libical/design-data/restrictions.csv
* src/plugins/vcalendar/libical/design-data/status.txt
* src/plugins/vcalendar/libical/design-data/value-types.csv
* src/plugins/vcalendar/libical/libical/.cvsignore
* src/plugins/vcalendar/libical/libical/Makefile.am
* src/plugins/vcalendar/libical/libical/Makefile.in
* src/plugins/vcalendar/libical/libical/icalattendee.c
* src/plugins/vcalendar/libical/libical/icalattendee.h
* src/plugins/vcalendar/libical/libical/icalcomponent.c
* src/plugins/vcalendar/libical/libical/icalcomponent.h
* src/plugins/vcalendar/libical/libical/icalderivedparameter.c.in
* src/plugins/vcalendar/libical/libical/icalderivedparameter.h.in
* src/plugins/vcalendar/libical/libical/icalderivedproperty.c.in
* src/plugins/vcalendar/libical/libical/icalderivedproperty.h.in
* src/plugins/vcalendar/libical/libical/icalderivedvalue.c.in
* src/plugins/vcalendar/libical/libical/icalderivedvalue.h.in
* src/plugins/vcalendar/libical/libical/icalduration.c
* src/plugins/vcalendar/libical/libical/icalduration.h
* src/plugins/vcalendar/libical/libical/icalenums.c
* src/plugins/vcalendar/libical/libical/icalenums.h
* src/plugins/vcalendar/libical/libical/icalerror.c
* src/plugins/vcalendar/libical/libical/icalerror.h
* src/plugins/vcalendar/libical/libical/icallangbind.c
* src/plugins/vcalendar/libical/libical/icallangbind.h
* src/plugins/vcalendar/libical/libical/icallexer.l
* src/plugins/vcalendar/libical/libical/icalmemory.c
* src/plugins/vcalendar/libical/libical/icalmemory.h
* src/plugins/vcalendar/libical/libical/icalmime.c
* src/plugins/vcalendar/libical/libical/icalmime.h
* src/plugins/vcalendar/libical/libical/icalparameter.c
* src/plugins/vcalendar/libical/libical/icalparameter.h
* src/plugins/vcalendar/libical/libical/icalparameterimpl.h
* src/plugins/vcalendar/libical/libical/icalparser.c
* src/plugins/vcalendar/libical/libical/icalparser.h
* src/plugins/vcalendar/libical/libical/icalperiod.c
* src/plugins/vcalendar/libical/libical/icalperiod.h
* src/plugins/vcalendar/libical/libical/icalproperty.c
* src/plugins/vcalendar/libical/libical/icalproperty.h
* src/plugins/vcalendar/libical/libical/icalrecur.c
* src/plugins/vcalendar/libical/libical/icalrecur.h
* src/plugins/vcalendar/libical/libical/icalrestriction.c.in
* src/plugins/vcalendar/libical/libical/icalrestriction.h
* src/plugins/vcalendar/libical/libical/icaltime.c
* src/plugins/vcalendar/libical/libical/icaltime.h
* src/plugins/vcalendar/libical/libical/icaltypes.c
* src/plugins/vcalendar/libical/libical/icaltypes.h
* src/plugins/vcalendar/libical/libical/icalvalue.c
* src/plugins/vcalendar/libical/libical/icalvalue.h
* src/plugins/vcalendar/libical/libical/icalvalueimpl.h
* src/plugins/vcalendar/libical/libical/icalversion.h
* src/plugins/vcalendar/libical/libical/icalversion.h.in
* src/plugins/vcalendar/libical/libical/icalyacc.output
* src/plugins/vcalendar/libical/libical/icalyacc.y
* src/plugins/vcalendar/libical/libical/pvl.c
* src/plugins/vcalendar/libical/libical/pvl.h
* src/plugins/vcalendar/libical/libical/sspm.c
* src/plugins/vcalendar/libical/libical/sspm.h
* src/plugins/vcalendar/libical/libical/vsnprintf.c
* src/plugins/vcalendar/libical/scripts/.cvsignore
* src/plugins/vcalendar/libical/scripts/Makefile.am
* src/plugins/vcalendar/libical/scripts/Makefile.in
* src/plugins/vcalendar/libical/scripts/mkderivedcomponents.pl
* src/plugins/vcalendar/libical/scripts/mkderivedparameters.pl
* src/plugins/vcalendar/libical/scripts/mkderivedproperties.pl
* src/plugins/vcalendar/libical/scripts/mkderivedvalues.pl
* src/plugins/vcalendar/libical/scripts/mkparameterrestrictions.pl
* src/plugins/vcalendar/libical/scripts/mkrestrictionrecords.pl
* src/plugins/vcalendar/libical/scripts/mkrestrictiontable.pl
* src/plugins/vcalendar/libical/scripts/readvaluesfile.pl
Add vcalendar.
--- NEW FILE: .cvsignore ---
.libs
.deps
Makefile
Makefile.in
*.lo
*.la
--- NEW FILE: mkderivedparameters.pl ---
#!/usr/local/bin/perl
require "readvaluesfile.pl";
use Getopt::Std;
getopts('chspi:');
%no_xname = (RELATED=>1,RANGE=>1,RSVP=>1,XLICERRORTYPE=>1,XLICCOMPARETYPE=>1);
%params = read_parameters_file($ARGV[0]);
# Write the file inline by copying everything before a demarcation
# line, and putting the generated data after the demarcation
if ($opt_i) {
open(IN,$opt_i) || die "Can't open input file $opt_i";
while(<IN>){
if (/Do not edit/){
last;
}
print;
}
if($opt_p){
print "# Everything below this line is machine generated. Do not edit. \n";
} else {
print "/* Everything below this line is machine generated. Do not edit. */\n";
}
}
# Write parameter string map
if ($opt_c){
}
# Write parameter enumerations and datatypes
if($opt_h){
print "typedef enum icalparameter_kind {\n ICAL_ANY_PARAMETER = 0,\n";
foreach $param (sort keys %params) {
next if !$param;
next if $param eq 'NO' or $param eq 'ANY';
my $uc = join("",map {uc($_);} split(/-/,$param));
my @enums = @{$params{$param}->{'enums'}};
print " ICAL_${uc}_PARAMETER, \n";
}
print " ICAL_NO_PARAMETER\n} icalparameter_kind;\n\n";
# Now create enumerations for parameter values
$idx = 20000;
print "#define ICALPARAMETER_FIRST_ENUM $idx\n\n";
foreach $param (sort keys %params) {
next if !$param;
next if $param eq 'NO' or $prop eq 'ANY';
my $type = $params{$param}->{"C"};
my $ucv = join("",map {uc(lc($_));} split(/-/,$param));
my @enums = @{$params{$param}->{'enums'}};
if(@enums){
print "typedef enum $type {\n";
my $first = 1;
unshift(@enums,"X");
push(@enums,"NONE");
foreach $e (@enums) {
if (!$first){
print ",\n";
} else {
$first = 0;
}
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
print " ICAL_${ucv}_${uce} = $idx";
$idx++;
}
$c_type =~ s/enum //;
print "\n} $type;\n\n";
}
}
print "#define ICALPARAMETER_LAST_ENUM $idx\n\n";
}
if ($opt_c){
# Create the icalparameter_value to icalvalue_kind conversion table
print "static struct icalparameter_value_kind_map value_kind_map[] = {\n";
foreach $enum (@{$params{'VALUE'}->{'enums'}}){
next if $enum eq 'NO' or $enum eq 'ERROR';
$uc = join("",map {uc(lc($_));} split(/-/,$enum));
print " {ICAL_VALUE_${uc},ICAL_${uc}_VALUE},\n";
}
print " {ICAL_VALUE_X,ICAL_X_VALUE},\n";
print " {ICAL_VALUE_NONE,ICAL_NO_VALUE}\n};\n\n";
#Create the parameter Name map
print "static struct icalparameter_kind_map parameter_map[] = { \n";
foreach $param (sort keys %params) {
next if !$param;
next if $param eq 'NO' or $prop eq 'ANY';
my $lc = join("",map {lc($_);} split(/-/,$param));
my $uc = join("",map {uc(lc($_));} split(/-/,$param));
print " {ICAL_${uc}_PARAMETER,\"$param\"},\n";
}
print " { ICAL_NO_PARAMETER, \"\"}\n};\n\n";
# Create the parameter value map
print "static struct icalparameter_map icalparameter_map[] = {\n";
print "{ICAL_ANY_PARAMETER,0,\"\"},\n";
foreach $param (sort keys %params) {
next if !$param;
next if $param eq 'NO' or $prop eq 'ANY';
my $type = $params{$param}->{"C"};
my $uc = join("",map {uc(lc($_));} split(/-/,$param));
my @enums = @{$params{$param}->{'enums'}};
if(@enums){
foreach $e (@enums){
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
print " {ICAL_${uc}_PARAMETER,ICAL_${uc}_${uce},\"$e\"},\n";
}
}
}
print " {ICAL_NO_PARAMETER,0,\"\"}};\n\n";
}
foreach $param (keys %params){
my $type = $params{$param}->{'C'};
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$param));
my $lc = lc($ucf);
my $uc = uc($lc);
my $charorenum;
my $set_code;
my $pointer_check;
my $pointer_check_v;
my $xrange;
if ($type=~/char/ ) {
$charorenum = " icalerror_check_arg_rz( (param!=0), \"param\");\n return ($type)((struct icalparameter_impl*)param)->string;";
$set_code = "((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);";
$pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");";
$pointer_check_v = "icalerror_check_arg_rv( (v!=0),\"v\");";
} else {
$xrange =" if ( ((struct icalparameter_impl*)param)->string != 0){\n return ICAL_${uc}_X;\n }\n" if !exists $no_xname{$uc};
$charorenum= "icalerror_check_arg( (param!=0), \"param\");\n$xrange\nreturn ($type)((struct icalparameter_impl*)param)->data;";
$pointer_check = "icalerror_check_arg_rz(v >= ICAL_${uc}_X,\"v\");\n icalerror_check_arg_rz(v < ICAL_${uc}_NONE,\"v\");";
$pointer_check_v = "icalerror_check_arg_rv(v >= ICAL_${uc}_X,\"v\");\n icalerror_check_arg_rv(v < ICAL_${uc}_NONE,\"v\");";
$set_code = "((struct icalparameter_impl*)param)->data = (int)v;";
}
if ($opt_c) {
print <<EOM;
/* $param */
icalparameter* icalparameter_new_${lc}($type v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
$pointer_check
impl = icalparameter_new_impl(ICAL_${uc}_PARAMETER);
if (impl == 0) {
return 0;
}
icalparameter_set_${lc}((icalparameter*) impl,v);
if (icalerrno != ICAL_NO_ERROR) {
icalparameter_free((icalparameter*) impl);
return 0;
}
return (icalparameter*) impl;
}
${type} icalparameter_get_${lc}(icalparameter* param)
{
icalerror_clear_errno();
$charorenum
}
void icalparameter_set_${lc}(icalparameter* param, ${type} v)
{
$pointer_check_v
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
$set_code
}
EOM
} elsif( $opt_h) {
print <<EOM;
/* $param */
icalparameter* icalparameter_new_${lc}($type v);
${type} icalparameter_get_${lc}(icalparameter* value);
void icalparameter_set_${lc}(icalparameter* value, ${type} v);
EOM
}
if ($opt_p) {
print <<EOM;
# $param
package Net::ICal::Parameter::${ucf};
\@ISA=qw(Net::ICal::Parameter);
sub new
{
my \$self = [];
my \$package = shift;
my \$value = shift;
bless \$self, \$package;
my \$p;
if (\$value) {
\$p = Net::ICal::icalparameter_new_from_string(\$Net::ICal::ICAL_${uc}_PARAMETER,\$value);
} else {
\$p = Net::ICal::icalparameter_new(\$Net::ICal::ICAL_${uc}_PARAMETER);
}
\$self->[0] = \$p;
return \$self;
}
sub get
{
my \$self = shift;
my \$impl = \$self->_impl();
return Net::ICal::icalparameter_as_ical_string(\$impl);
}
sub set
{
# This is hard to implement, so I've punted for now.
die "Set is not implemented";
}
EOM
}
}
if ($opt_h){
print <<EOM;
#endif /*ICALPARAMETER_H*/
EOM
}
--- NEW FILE: Makefile.in ---
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = src/plugins/vcalendar/libical/scripts
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/check-type.m4 \
$(top_srcdir)/m4/gnupg-check-typedef.m4 \
$(top_srcdir)/m4/gnupg.m4 $(top_srcdir)/m4/gpgme.m4 \
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/spamassassin.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/claws-features.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COMPFACE_LIBS = @COMPFACE_LIBS@
CONIC_CFLAGS = @CONIC_CFLAGS@
CONIC_LIBS = @CONIC_LIBS@
CONTACTS_CFLAGS = @CONTACTS_CFLAGS@
CONTACTS_LIBS = @CONTACTS_LIBS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CRYPT_LIBS = @CRYPT_LIBS@
CURL_CFLAGS = @CURL_CFLAGS@
CURL_LIBS = @CURL_LIBS@
CYGPATH_W = @CYGPATH_W@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DOCBOOK2HTML = @DOCBOOK2HTML@
DOCBOOK2PDF = @DOCBOOK2PDF@
DOCBOOK2PS = @DOCBOOK2PS@
DOCBOOK2TXT = @DOCBOOK2TXT@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENCHANT_CFLAGS = @ENCHANT_CFLAGS@
ENCHANT_LIBS = @ENCHANT_LIBS@
EXEEXT = @EXEEXT@
EXTRA_VERSION = @EXTRA_VERSION@
FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNOME2_CFLAGS = @GNOME2_CFLAGS@
GNOME2_LIBS = @GNOME2_LIBS@
GNOME_CONFIG = @GNOME_CONFIG@
GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
GNUTLS_LIBS = @GNUTLS_LIBS@
GPGME_CFLAGS = @GPGME_CFLAGS@
GPGME_CONFIG = @GPGME_CONFIG@
GPGME_LIBS = @GPGME_LIBS@
GREP = @GREP@
GTKPRINTUNIX_CFLAGS = @GTKPRINTUNIX_CFLAGS@
GTKPRINTUNIX_LIBS = @GTKPRINTUNIX_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
JPILOT_LIBS = @JPILOT_LIBS@
LD = @LD@
LDAP_LIBS = @LDAP_LIBS@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBETPAN_FLAGS = @LIBETPAN_FLAGS@
LIBETPAN_LIBS = @LIBETPAN_LIBS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBRESOLV = @LIBRESOLV@
LIBS = @LIBS@
LIBSOUP_GNOME_CFLAGS = @LIBSOUP_GNOME_CFLAGS@
LIBSOUP_GNOME_LIBS = @LIBSOUP_GNOME_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
MAEMO_CFLAGS = @MAEMO_CFLAGS@
MAEMO_LIBS = @MAEMO_LIBS@
MAINT = @MAINT@
MAJOR_VERSION = @MAJOR_VERSION@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MICRO_VERSION = @MICRO_VERSION@
MINOR_VERSION = @MINOR_VERSION@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NETWORKMANAGER_SUPPORT_CFLAGS = @NETWORKMANAGER_SUPPORT_CFLAGS@
NETWORKMANAGER_SUPPORT_LIBS = @NETWORKMANAGER_SUPPORT_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PASSCRYPT_KEY = @PASSCRYPT_KEY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
RC = @RC@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SM_LIBS = @SM_LIBS@
STARTUP_NOTIFICATION_CFLAGS = @STARTUP_NOTIFICATION_CFLAGS@
STARTUP_NOTIFICATION_LIBS = @STARTUP_NOTIFICATION_LIBS@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VERSION = @VERSION@
WEBKIT_CFLAGS = @WEBKIT_CFLAGS@
WEBKIT_LIBS = @WEBKIT_LIBS@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_cv_enable_crash_dialog = @ac_cv_enable_crash_dialog@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
gnomedatadir = @gnomedatadir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libetpanconfig = @libetpanconfig@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
manualdir = @manualdir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = \
mkderivedcomponents.pl \
mkderivedparameters.pl \
mkderivedproperties.pl \
mkderivedvalues.pl \
mkparameterrestrictions.pl \
mkrestrictionrecords.pl \
mkrestrictiontable.pl \
readvaluesfile.pl
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/vcalendar/libical/scripts/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/plugins/vcalendar/libical/scripts/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
--- NEW FILE: mkparameterrestrictions.pl ---
#!/usr/bin/perl
# Version: 1.0
# Script last updated: 30May1999 GMD
# Change log:
# <none>
# usually open params-in-prop.txt
open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!";
print <<EOM;
/*
======================================================================
File: parameterrestrictions.c
(C) COPYRIGHT 1999 Graham Davison
mailto:g.m.davison\@computer.org
The contents of this file are subject to the Mozilla Public License
Version 1.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
======================================================================*/
/*
* THIS FILE IS MACHINE GENERATED DO NOT EDIT
*/
int icalrestriction_is_parameter_allowed(icalproperty_kind prop,icalparameter_kind param)
{
switch (prop)
{
EOM
while(<F>)
{
chop;
# split line by whitespace
my @v = split(/\s+/,$_);
# property is first item on line
my $prop = shift @v;
my $prop_name = $prop;
if (substr($prop,0,1) eq "X") { $prop = "X"; }
$prop = join("",split(/-/,$prop));
print <<EOM;
/* ${prop_name} */
case ICAL_${prop}_PROPERTY:
switch (param)
{
EOM
foreach $param (@v)
{
$param = join("",split(/-/,$param));
print "\t\t\t\tcase ICAL_${param}_PARAMETER:\n";
}
print <<EOM;
return 1;
default:
return 0;
}
EOM
}
print <<EOM;
}
return 0;
}
EOM
--- NEW FILE: readvaluesfile.pl ---
sub read_values_file {
my $path = shift;
my %h;
open(F,$path) || die "Can't open values file $path";
while(<F>){
chop;
s/#.*$//g;
s/\"//g;
next if ! $_;
@column = split(/,/,$_);
my $value_name = $column[0];
my $c_type_str = $column[1];
my $c_autogen = ($c_type_str =~ /\(a\)/);
my $c_type = $c_type_str;
$c_type =~ s/\(.\)//;
my $python_type = $column[2];
my $components = $column[3];
my $enum_values = $column[4];
my @components;
if($components ne "unitary"){
@components = split(/;/,$components);
} else {
@components = ();
}
my @enums;
if($enum_values) {
@enums = split(/;/,$enum_values);
} else {
@enums = ();
}
$h{$value_name} = { C => [$c_autogen,$c_type],
perl => $perl_type,
python => $python_type,
components=>[@components],
enums=>[@enums]
};
}
return %h;
}
sub read_properties_file {
my $path = shift;
my %h;
open(F,$path) || die "Can't open properties file $path";
while(<F>){
chop;
s/#.*$//g;
s/\"//g;
next if ! $_;
@column = split(/,/,$_);
my $property_name = $column[0];
my $lic_value = $column[1];
my $default_value = $column[2];
$h{$property_name} = { lic_value => $lic_value,
default_value => $default_value
};
}
return %h;
}
sub read_parameters_file {
my $path = shift;
my %h;
open(F,$path) || die "Can't open parameters file $path";
while(<F>){
chop;
s/#.*$//g;
s/\"//g;
next if ! $_;
@column = split(/\,/,$_);
my $parameter_name = $column[0];
my $data_type = $column[1];
my $enum_string = $column[2];
my @enums;
if($enum_string){
@enums = split(/;/,$enum_string);
}
$h{$parameter_name} = { C => $data_type,
enums => [@enums]
};
}
close(F);
return %h;
}
1;
--- NEW FILE: mkrestrictiontable.pl ---
#!/usr/bin/perl
use Getopt::Std;
getopts('i:');
# the argument should be the path to the restriction datafile, usually
# design-data/restrictions.csv
open(F,"$ARGV[0]") || die "Can't open restriction data file $ARGV[0]:$!";
# Write the file inline by copying everything before a demarcation
# line, and putting the generated data after the demarcation
if ($opt_i) {
open(IN,$opt_i) || die "Can't open input file $opt_i";
while(<IN>){
if (/Do not edit/){
last;
}
print;
}
print "/* Everything below this line is machine generated. Do not edit. */\n";
close IN;
}
# First build the property restriction table
print "icalrestriction_property_record icalrestriction_property_records[] = {\n";
while(<F>)
{
chop;
s/\#.*$//;
my($method,$targetcomp,$prop,$subcomp,$restr,$sub) = split(/,/,$_);
next if !$method;
if(!$sub) {
$sub = "0";
} else {
$sub = "icalrestriction_".$sub;
}
if($prop ne "NONE"){
print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${prop}_PROPERTY,ICAL_RESTRICTION_${restr},$sub},\n");
}
}
# Print the terminating line
print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE}\n";
print "};\n";
print "icalrestriction_component_record icalrestriction_component_records[] = {\n";
# Go back through the entire file and build the component restriction table
close(F);
open(F,"$ARGV[0]") || die "Can't open restriction data file $ARGV[0]:$!";
while(<F>)
{
chop;
s/\#.*$//;
my($method,$targetcomp,$prop,$subcomp,$restr,$sub) = split(/,/,$_);
next if !$method;
if(!$sub) {
$sub = "0";
} else {
$sub = "icalrestriction_".$sub;
}
if($subcomp ne "NONE"){
print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${subcomp}_COMPONENT,ICAL_RESTRICTION_${restr},$sub\},\n");
}
}
# print the terminating line
print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}\n";
print "};\n";
--- NEW FILE: mkderivedvalues.pl ---
#!/usr/bin/perl
use lib '.';
require 'readvaluesfile.pl';
use Getopt::Std;
getopts('chi:');
#Options
# c -> generate c code file
# h-> generate header file
# Open with value-types.txt
my %h = read_values_file($ARGV[0]);
# Write the file inline by copying everything before a demarcation
# line, and putting the generated data after the demarcation
if ($opt_i) {
open(IN,$opt_i) || die "Can't open input file $opt_i";
while(<IN>){
print;
}
}
# Map type names to the value in the icalvalue_impl data union */
%union_map = (
BOOLEAN => 'int',
CALADDRESS=>'string',
DATE=>'time',
DATETIME=>'time',
DATETIMEDATE=>'time',
DATETIMEPERIOD=>'period',
DURATION=>'duration',
INTEGER=>'int',
TEXT=>'string',
URI=>'string',
UTCOFFSET=>'int',
QUERY=>'string',
BINARY=>'string',
X=>'string'
);
if($opt_h){
# First print out the value enumerations
$idx = 5000;
print "typedef enum icalvalue_kind {\n";
print " ICAL_ANY_VALUE=$idx,\n";
foreach $value (keys %h) {
$idx++;
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
next if $value eq "NO";
print " ICAL_${ucv}_VALUE=$idx,\n";
}
$idx++;
print " ICAL_NO_VALUE=$idx\n} icalvalue_kind ;\n\n";
# Now create enumerations for property values
$idx = 10000;
print "#define ICALPROPERTY_FIRST_ENUM $idx\n\n";
foreach $value (sort keys %h) {
next if !$value;
next if $value eq 'NO' or $prop eq 'ANY';
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
my @enums = @{$h{$value}->{'enums'}};
if(@enums){
my ($c_autogen,$c_type) = @{$h{$value}->{'C'}};
print "typedef $c_type {\n";
my $first = 1;
unshift(@enums,"X");
push(@enums,"NONE");
foreach $e (@enums) {
if (!$first){
print ",\n";
} else {
$first = 0;
}
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
print " ICAL_${ucv}_${uce} = $idx";
$idx++;
}
$c_type =~ s/enum //;
print "\n} $c_type;\n\n";
}
}
print "#define ICALPROPERTY_LAST_ENUM $idx\n\n";
}
if($opt_c){
# print out the value to string map
print "static struct icalvalue_kind_map value_map[]={\n";
foreach $value (keys %h) {
$idx++;
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
next if $value eq "NO";
print " {ICAL_${ucv}_VALUE,\"$value\"},\n";
}
print " {ICAL_NO_VALUE,\"\"}\n};";
}
foreach $value (keys %h) {
my $autogen = $h{$value}->{C}->[0];
my $type = $h{$value}->{C}->[1];
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$value));
my $lc = lc($ucf);
my $uc = uc($lc);
my $pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");\n" if $type =~ /\*/;
my $pointer_check_rv = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
my $assign;
if ($type =~ /char/){
$assign = "icalmemory_strdup(v);\n\n if (impl->data.v_string == 0){\n errno = ENOMEM;\n }\n";
} else {
$assign = "v;";
}
my $union_data;
if(@{$h{$value}->{'enums'}}){
$union_data = 'enum';
} elsif (exists $union_map{$uc} ){
$union_data=$union_map{$uc};
} else {
$union_data = $lc;
}
if ($opt_c && $autogen) {
print "\n\n\
icalvalue* icalvalue_new_${lc} ($type v){\
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_${uc}_VALUE);\
$pointer_check\
icalvalue_set_${lc}((icalvalue*)impl,v);\
return (icalvalue*)impl;\
}\
void icalvalue_set_${lc}(icalvalue* value, $type v) {\
struct icalvalue_impl* impl; \
icalerror_check_arg_rv( (value!=0),\"value\");\
$pointer_check_rv\
icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
impl = (struct icalvalue_impl*)value;\n";
if( $union_data eq 'string') {
print " if(impl->data.v_${union_data}!=0) {free((void*)impl->data.v_${union_data});}\n";
}
print "\n impl->data.v_$union_data = $assign \n }\n";
if ($type =~ /char/){
print "$type\ icalvalue_get_${lc}(icalvalue* value)\ {\n\
icalerror_check_arg_rz( (value!=0),\"value\");\
icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
return ((struct icalvalue_impl*)value)->data.v_${union_data};\n}\n";
} else {
print "$type\ icalvalue_get_${lc}(icalvalue* value)\ {\n\
icalerror_check_arg( (value!=0),\"value\");\
icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
return ((struct icalvalue_impl*)value)->data.v_${union_data};\n}\n";
}
} elsif($opt_h && $autogen) {
print "\n /* $value */ \
icalvalue* icalvalue_new_${lc}($type v); \
$type icalvalue_get_${lc}(icalvalue* value); \
void icalvalue_set_${lc}(icalvalue* value, ${type} v);\n\n";
}
}
if ($opt_h){
print "#endif /*ICALVALUE_H*/\n";
}
__END__
--- NEW FILE: mkderivedproperties.pl ---
#!/usr/local/bin/perl
require "readvaluesfile.pl";
use Getopt::Std;
getopts('chspmi:');
# ARG 0 is properties.csv
%propmap = read_properties_file($ARGV[0]);
# ARG 1 is value-types.txt
%valuemap = read_values_file($ARGV[1]);
# Write the file inline by copying everything before a demarcation
# line, and putting the generated data after the demarcation
if ($opt_i) {
open(IN,$opt_i) || die "Can't open input file $opt_i";
while(<IN>){
if (/Do not edit/){
last;
}
print;
}
print "/* Everything below this line is machine generated. Do not edit. */\n";
}
sub fudge_data {
my $prop = shift;
my $value = $propmap{$prop}->{'lic_value'};
if (!$value){
die "Can't find value for property \"$prop\"\n";
}
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$prop));
my $lc = lc($ucf);
my $uc = uc($lc);
my $ucfvalue = join("",map {ucfirst(lc($_));} split(/-/,$value));
my $lcvalue = lc($ucfvalue);
my $ucvalue = uc($lcvalue);
my $type = $valuemap{$value}->{C}->[1];
return ($uc,$lc,$lcvalue,$ucvalue,$type);
}
# Create the property map data
if($opt_c){
print "static struct icalproperty_map property_map[] = {\n";
foreach $prop (sort keys %propmap) {
next if !$prop;
next if $prop eq 'NO';
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
print "{ICAL_${uc}_PROPERTY,\"$prop\",ICAL_${ucvalue}_VALUE},\n";
}
$prop = "NO";
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
print "{ICAL_${uc}_PROPERTY,\"\",ICAL_NO_VALUE}};\n\n";
print "static struct icalproperty_enum_map enum_map[] = {\n";
$idx = 10000;
foreach $value (sort keys %valuemap) {
next if !$value;
next if $value eq 'NO' or $prop eq 'ANY';
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
my @enums = @{$valuemap{$value}->{'enums'}};
if(@enums){
my ($c_autogen,$c_type) = @{$valuemap{$value}->{'C'}};
unshift(@enums,"X");
push(@enums,"NONE");
foreach $e (@enums) {
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
if($e ne "X" and $e ne "NONE"){
$str = $e;
} else {
$str = "";
}
print " {ICAL_${ucv}_PROPERTY,ICAL_${ucv}_${uce},\"$str\" }, /*$idx*/\n";
$idx++;
}
}
}
print " {ICAL_NO_PROPERTY,0,\"\"}\n};\n\n";
}
if($opt_h){
# Create the property enumerations list
print "typedef enum icalproperty_kind {\n ICAL_ANY_PROPERTY = 0,\n";
foreach $prop (sort keys %propmap) {
next if !$prop;
next if $prop eq 'NO' or $prop eq 'ANY';
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
print " ICAL_${uc}_PROPERTY, \n";
}
print " ICAL_NO_PROPERTY\n} icalproperty_kind;\n\n";
}
foreach $prop (sort keys %propmap) {
next if !$prop;
next if $prop eq 'NO' or $prop eq 'ANY';
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
my $pointer_check;
if ($type =~ /\*/){
$pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");\n" if $type =~ /\*/;
} elsif ( $type eq "void" ){
$pointer_check = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
}
my $set_pointer_check = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
if($opt_c) { # Generate C source
print<<EOM;
/* $prop */
icalproperty* icalproperty_new_${lc}($type v) {
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
icalproperty_set_${lc}((icalproperty*)impl,v);
return (icalproperty*)impl;
}
icalproperty* icalproperty_vanew_${lc}($type v, ...){
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
icalproperty_set_${lc}((icalproperty*)impl,v);
va_start(args,v);
icalproperty_add_parameters(impl, args);
va_end(args);
return (icalproperty*)impl;
}
void icalproperty_set_${lc}(icalproperty* prop, $type v){
icalvalue *value;
$set_pointer_check
icalerror_check_arg_rv( (prop!=0),"prop");
value = icalvalue_new_${lcvalue}(v);
icalproperty_set_value(prop,value);
}
$type icalproperty_get_${lc}(icalproperty* prop){
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
value = icalproperty_get_value(prop);
return icalvalue_get_${lcvalue}(value);
}
EOM
} elsif ($opt_h) { # Generate C Header file
print "\
/* $prop */\
icalproperty* icalproperty_new_${lc}($type v);\
icalproperty* icalproperty_vanew_${lc}($type v, ...);\
void icalproperty_set_${lc}(icalproperty* prop, $type v);\
$type icalproperty_get_${lc}(icalproperty* prop);";
}
} # This brace terminates the main loop
if ($opt_h){
print "\n\n#endif /*ICALPROPERTY_H*/\n"
}
--- NEW FILE: mkrestrictionrecords.pl ---
#!/usr/bin/perl
# Version: 1.0
# Script last updated: 30May1999 GMD
# Change log:
# <none>
# usually open restrictions.csv
open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!";
print <<EOM;
/*
======================================================================
File: restrictionrecords.c
(C) COPYRIGHT 1999 Graham Davison
mailto:g.m.davison\@computer.org
The contents of this file are subject to the Mozilla Public License
Version 1.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
======================================================================*/
/*
* THIS FILE IS MACHINE GENERATED DO NOT EDIT
*/
typedef struct icalrestriction_record {
icalproperty_method method;
icalcomponent_kind component;
icalproperty_kind property;
icalcomponent_kind subcomponent;
icalrestriction_kind restriction;
} icalrestriction_record;
icalrestriction_record icalrestriction_records[] =
{
EOM
my $last_method = "";
my $last_component = "";
my $last_property = "";
my $need_header = 0;
while(<F>)
{
chop;
# split line at commas
my ($method,$component,$property,$subcomponent,$restriction)=split(/\,/,$_);
#
#put in code to generate comments here!
#
if ($method ne $last_method)
{
$need_header = 1;
$last_method = $method;
}
if ($component ne $last_component)
{
$need_header = 1;
$last_component = $component;
}
if ($need_header)
{
print "\n\t/* METHOD: ${method}, COMPONENT: ${component} */\n";
$need_header = 0;
}
foreach $item ($component,$property,$subcomponent,$restriction)
{
# handle special cases.
if ($item eq "NONE")
{ $item = "NO"; }
else { if (substr($item,0,1) eq "X")
{ $item = "X"; }}
# strip out dashes
$item = join("",split(/-/,$item));
}
# strip leading V from component names
$component =~ s/^(V?)(\w+?)((SAVINGS)?)((TIME)?)$/$2/;
$subcomponent =~ s/^V(\w+)/$1/;
print "\t\{ICAL_METHOD_${method},ICAL_${component}_COMPONENT,";
print "ICAL_${property}_PROPERTY,ICAL_${subcomponent}_COMPONENT,";
print "ICAL_RESTRICTION_${restriction}\},\n";
}
print <<EOM;
/* END */
{ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}
};
EOM
--- NEW FILE: Makefile.am ---
EXTRA_DIST = \
mkderivedcomponents.pl \
mkderivedparameters.pl \
mkderivedproperties.pl \
mkderivedvalues.pl \
mkparameterrestrictions.pl \
mkrestrictionrecords.pl \
mkrestrictiontable.pl \
readvaluesfile.pl
--- NEW FILE: mkderivedcomponents.pl ---
#!/usr/local/bin/perl
use Getopt::Std;
getopts('chspi:');
# ARG 0 is components.txt
open(PV,"$ARGV[0]") || die "Can't open components file $ARGV[0]:$!";
my @components;
while (<PV>){
s/#.*//;
chop;
push(@components,$_);
}
close PV;
# Write the file inline by copying everything before a demarcation
# line, and putting the generated data after the demarcation
if ($opt_i) {
open(IN,$opt_i) || die "Can't open input file \"$opt_i\"";
while(<IN>){
if (/Do not edit/){
last;
}
print;
}
if($opt_i){
print "# Everything below this line is machine generated. Do not edit. \n";
} else {
print "/* Everything below this line is machine generated. Do not edit. */\n";
}
}
if ($opt_c or $opt_h and !$opt_i){
print <<EOM;
/* -*- Mode: C -*-
======================================================================
FILE: icalderivedproperties.{c,h}
CREATOR: eric 09 May 1999
\044Id:\044
(C) COPYRIGHT 1999 Eric Busboom
http://www.softwarestudio.org
The contents of this file are subject to the Mozilla Public License
Version 1.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
======================================================================*/
/*
* THIS FILE IS MACHINE GENERATED DO NOT EDIT
*/
#include <stdarg.h> /* for va_arg functions */
EOM
}
if ($opt_p and !$opt_i){
print <<EOM;
EOM
}
foreach $comp (@components) {
next if !$comp;
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$comp));
my $lc = lc($ucf);
my $uc = uc($lc);
if($opt_c) { # Make C source
print<<EOM;
/* $comp */
icalcomponent* icalcomponent_new_${lc}()
{
return (icalcomponent*)icalcomponent_new_impl(ICAL_${uc}_COMPONENT);
}
icalcomponent* icalcomponent_vanew_${lc}(...)
{
va_list args;
struct icalcomponent_impl *impl = icalcomponent_new_impl(ICAL_${uc}_component);
va_start(args,v);
icalcomponent_add_properties(impl, args);
va_end(args);
return (icalcomponent*)impl;
}
EOM
} elsif ($opt_h) { # Make a C header
print<<EOM;
/* $comp */
icalcomponent* icalcomponent_new_${lc}();
icalcomponent* icalcomponent_vanew_${lc}(...);
EOM
} elsif ($opt_s) { # Make something for a switch statement
print <<EOM;
case ICAL_${uc}_PROPERTY:
EOM
} elsif ($opt_p) { # make perl source
print <<EOM;
# $comp
package Net::ICal::Component::${ucf};
\@ISA=qw(Net::ICal::Component);
sub new
{
my \$package = shift;
my \$c = Net::ICal::icalcomponent_new(\$Net::ICal::ICAL_${uc}_COMPONENT);
my \$self = Net::ICal::Component::new_from_ref(\$c);
Net::ICal::Component::_add_elements(\$self,\\\@_);
# Self is blessed in new_from_ref
return \$self;
}
EOM
}
}
More information about the Commits
mailing list