aboutsummaryrefslogtreecommitdiffstats
path: root/libical/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'libical/scripts')
-rw-r--r--libical/scripts/Makefile192
-rw-r--r--libical/scripts/readvaluesfile.pl130
2 files changed, 322 insertions, 0 deletions
diff --git a/libical/scripts/Makefile b/libical/scripts/Makefile
new file mode 100644
index 0000000000..2d19c953c3
--- /dev/null
+++ b/libical/scripts/Makefile
@@ -0,0 +1,192 @@
+# Generated automatically from Makefile.in by configure.
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 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.
+
+
+SHELL = /bin/sh
+
+srcdir = .
+top_srcdir = ..
+prefix = /opt/gnome
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sbindir = ${exec_prefix}/sbin
+libexecdir = ${exec_prefix}/libexec
+datadir = ${prefix}/share
+sysconfdir = ${prefix}/etc
+sharedstatedir = ${prefix}/com
+localstatedir = ${prefix}/var
+libdir = ${exec_prefix}/lib
+infodir = ${prefix}/info
+mandir = ${prefix}/man
+includedir = ${prefix}/include
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/libical
+pkglibdir = $(libdir)/libical
+pkgincludedir = $(includedir)/libical
+
+top_builddir = ..
+
+ACLOCAL = aclocal
+AUTOCONF = autoconf
+AUTOMAKE = automake
+AUTOHEADER = autoheader
+
+INSTALL = /usr/bin/install -c
+INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+transform = s,x,x,
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+AR = ar
+AS = @AS@
+CC = gcc
+DLLTOOL = @DLLTOOL@
+LEX = flex
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+MAINT = #
+MAKEINFO = makeinfo
+OBJDUMP = @OBJDUMP@
+PACKAGE = libical
+PERL = perl
+PY_CFLAGS = -I/usr/include/python1.5
+PY_EXTRA_LIBS = -lieee -ldl -lpthread
+PY_LIBS = python1.5
+PY_LIB_LOC = -L/usr/lib/python1.5/config
+RANLIB = ranlib
+VERSION = 0.23a
+YACC = bison -y
+python_val = true
+
+EXTRA_DIST = mkderivedcomponents.pl mkderivedparameters.pl mkderivedproperties.pl mkderivedvalues.pl mkparameterrestrictions.pl mkrestrictionrecords.pl mkrestrictiontable.pl readvaluesfile.pl
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = scripts
+
+distdir: $(DISTFILES)
+ here=`cd $(top_builddir) && pwd`; \
+ top_distdir=`cd $(top_distdir) && pwd`; \
+ distdir=`cd $(distdir) && pwd`; \
+ cd $(top_srcdir) \
+ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu scripts/Makefile
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-generic clean-am
+ -rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# 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:
diff --git a/libical/scripts/readvaluesfile.pl b/libical/scripts/readvaluesfile.pl
new file mode 100644
index 0000000000..d5e2d36fd8
--- /dev/null
+++ b/libical/scripts/readvaluesfile.pl
@@ -0,0 +1,130 @@
+
+
+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;