summaryrefslogtreecommitdiff
path: root/scripts/mkderivedproperties.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mkderivedproperties.pl')
-rwxr-xr-xscripts/mkderivedproperties.pl22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/mkderivedproperties.pl b/scripts/mkderivedproperties.pl
index f7fb799..81e4972 100755
--- a/scripts/mkderivedproperties.pl
+++ b/scripts/mkderivedproperties.pl
@@ -179,7 +179,9 @@ foreach $prop (sort keys %propmap) {
print<<EOM;
icalproperty* icalproperty_vanew_${lc}($type v, ...){
va_list args;
- struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
+ struct icalproperty_impl *impl;
+ $pointer_check
+ impl= icalproperty_new_impl(ICAL_${uc}_PROPERTY);
icalproperty_set_${lc}((icalproperty*)impl,v);
va_start(args,v);
icalproperty_add_parameters(impl, args);
@@ -192,7 +194,9 @@ EOM
/* $prop */
icalproperty* icalproperty_new_${lc}($type v) {
- struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
+ struct icalproperty_impl *impl;
+ $pointer_check
+ impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY);
icalproperty_set_${lc}((icalproperty*)impl,v);
return (icalproperty*)impl;
}
@@ -227,6 +231,11 @@ EOM
if ($lc eq "exdate") {
print<<EOM;
$type icalproperty_get_${lc}(const icalproperty* prop){
+#ifndef _MSC_VER
+ struct icaltimetype itt;
+ icalparameter* param;
+ icaltimezone *zone;
+#endif
icalerror_check_arg( (prop!=0),"prop");
#ifndef _MSC_VER
/*
@@ -235,13 +244,10 @@ $type icalproperty_get_${lc}(const icalproperty* prop){
* it doesnot work automatically like in the other functions
* like icalproperty_get_dtstart().
*/
- struct icaltimetype itt =
- icalvalue_get_datetime(icalproperty_get_value(prop));
- icalparameter* param = icalproperty_get_first_parameter(prop,
- ICAL_TZID_PARAMETER);
+ itt = icalvalue_get_datetime(icalproperty_get_value(prop));
+ param = icalproperty_get_first_parameter(prop, ICAL_TZID_PARAMETER);
if (param) {
- const icaltimezone *zone =
- icaltimezone_get_builtin_timezone(icalparameter_get_tzid(param));
+ zone = icaltimezone_get_builtin_timezone(icalparameter_get_tzid(param));
icaltime_set_timezone(&itt, zone);
}
return itt;