summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <winter@kde.org>2022-06-03 09:14:38 -0400
committerGitHub <noreply@github.com>2022-06-03 09:14:38 -0400
commita2be6d9ca1a1db38ce362a900675f527fc5d12b3 (patch)
tree9861c7b2e995a1650b9a52d0bf896e888ebd7bd3
parent7f704bd9dd9e76f055456fec39b5d037bfdce697 (diff)
parent6908abbf9238295910aef8d5259a8cc38c87329b (diff)
downloadlibical-git-mcclurgm-readme-mainpage.tar.gz
Merge branch 'master' into mcclurgm-readme-mainpagemcclurgm-readme-mainpage
-rw-r--r--.cmake-format.py241
-rw-r--r--.krazy1
-rw-r--r--.mdlrc1
-rw-r--r--.mdlrc.rb4
-rw-r--r--.pre-commit-config.yaml36
-rw-r--r--.pylintrc590
-rw-r--r--CMakeLists.txt88
-rw-r--r--README.md9
-rw-r--r--ReleaseNotes.txt4
-rw-r--r--appveyor.yml2
-rw-r--r--cmake/modules/FindGObjectIntrospection.cmake3
-rw-r--r--cmake/modules/GObjectIntrospectionMacros.cmake58
-rw-r--r--cmake/modules/GtkDoc.cmake38
-rw-r--r--cmake/modules/LibIcalMacrosInternal.cmake9
-rw-r--r--cmake/run_test.cmake6
-rw-r--r--design-data/parameters.csv5
-rw-r--r--design-data/properties.csv6
-rw-r--r--design-data/value-types.csv2
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--doc/UsingLibical.md231
-rwxr-xr-xscripts/buildtests.sh1
-rw-r--r--scripts/readvaluesfile.pl46
-rw-r--r--src/libical-glib/api/i-cal-derived-parameter.xml107
-rw-r--r--src/libical/icaltime.c4
-rw-r--r--src/libical/icalvalue.c7
-rw-r--r--src/test/CMakeLists.txt13
26 files changed, 1315 insertions, 199 deletions
diff --git a/.cmake-format.py b/.cmake-format.py
new file mode 100644
index 00000000..b78b7969
--- /dev/null
+++ b/.cmake-format.py
@@ -0,0 +1,241 @@
+# ----------------------------------
+# Options affecting listfile parsing
+# ----------------------------------
+with section("parse"):
+
+ # Specify structure for custom cmake functions
+ additional_commands = { 'foo': { 'flags': ['BAR', 'BAZ'],
+ 'kwargs': {'DEPENDS': '*', 'HEADERS': '*', 'SOURCES': '*'}}}
+
+ # Override configurations per-command where available
+ override_spec = {}
+
+ # Specify variable tags.
+ vartags = []
+
+ # Specify property tags.
+ proptags = []
+
+# -----------------------------
+# Options affecting formatting.
+# -----------------------------
+with section("format"):
+
+ # Disable formatting entirely, making cmake-format a no-op
+ disable = False
+
+ # How wide to allow formatted cmake files
+ line_width = 120
+
+ # How many spaces to tab for indent
+ tab_size = 2
+
+ # If true, lines are indented using tab characters (utf-8 0x09) instead of
+ # <tab_size> space characters (utf-8 0x20). In cases where the layout would
+ # require a fractional tab character, the behavior of the fractional
+ # indentation is governed by <fractional_tab_policy>
+ use_tabchars = False
+
+ # If <use_tabchars> is True, then the value of this variable indicates how
+ # fractional indentions are handled during whitespace replacement. If set to
+ # 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
+ # to `round-up` fractional indentation is replaced with a single tab character
+ # (utf-8 0x09) effectively shifting the column to the next tabstop
+ fractional_tab_policy = 'use-space'
+
+ # If an argument group contains more than this many sub-groups (parg or kwarg
+ # groups) then force it to a vertical layout.
+ max_subgroups_hwrap = 2
+
+ # If a positional argument group contains more than this many arguments, then
+ # force it to a vertical layout.
+ max_pargs_hwrap = 6
+
+ # If a cmdline positional group consumes more than this many lines without
+ # nesting, then invalidate the layout (and nest)
+ max_rows_cmdline = 2
+
+ # If true, separate flow control names from their parentheses with a space
+ separate_ctrl_name_with_space = False
+
+ # If true, separate function names from parentheses with a space
+ separate_fn_name_with_space = False
+
+ # If a statement is wrapped to more than one line, than dangle the closing
+ # parenthesis on its own line.
+ dangle_parens = False
+
+ # If the trailing parenthesis must be 'dangled' on its on line, then align it
+ # to this reference: `prefix`: the start of the statement, `prefix-indent`:
+ # the start of the statement, plus one indentation level, `child`: align to
+ # the column of the arguments
+ dangle_align = 'prefix'
+
+ # If the statement spelling length (including space and parenthesis) is
+ # smaller than this amount, then force reject nested layouts.
+ min_prefix_chars = 4
+
+ # If the statement spelling length (including space and parenthesis) is larger
+ # than the tab width by more than this amount, then force reject un-nested
+ # layouts.
+ max_prefix_chars = 10
+
+ # If a candidate layout is wrapped horizontally but it exceeds this many
+ # lines, then reject the layout.
+ max_lines_hwrap = 2
+
+ # What style line endings to use in the output.
+ line_ending = 'unix'
+
+ # Format command names consistently as 'lower' or 'upper' case
+ command_case = 'lower'
+
+ # Format keywords consistently as 'lower' or 'upper' case
+ keyword_case = 'upper'
+
+ # A list of command names which should always be wrapped
+ always_wrap = []
+
+ # If true, the argument lists which are known to be sortable will be sorted
+ # lexicographicall
+ enable_sort = True
+
+ # If true, the parsers may infer whether or not an argument list is sortable
+ # (without annotation).
+ autosort = False
+
+ # By default, if cmake-format cannot successfully fit everything into the
+ # desired linewidth it will apply the last, most agressive attempt that it
+ # made. If this flag is True, however, cmake-format will print error, exit
+ # with non-zero status code, and write-out nothing
+ require_valid_layout = False
+
+ # A dictionary mapping layout nodes to a list of wrap decisions. See the
+ # documentation for more information.
+ layout_passes = {}
+
+# ------------------------------------------------
+# Options affecting comment reflow and formatting.
+# ------------------------------------------------
+with section("markup"):
+
+ # What character to use for bulleted lists
+ bullet_char = '*'
+
+ # What character to use as punctuation after numerals in an enumerated list
+ enum_char = '.'
+
+ # If comment markup is enabled, don't reflow the first comment block in each
+ # listfile. Use this to preserve formatting of your copyright/license
+ # statements.
+ first_comment_is_literal = False
+
+ # If comment markup is enabled, don't reflow any comment block which matches
+ # this (regex) pattern. Default is `None` (disabled).
+ literal_comment_pattern = None
+
+ # Regular expression to match preformat fences in comments default=
+ # ``r'^\s*([`~]{3}[`~]*)(.*)$'``
+ fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$'
+
+ # Regular expression to match rulers in comments default=
+ # ``r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'``
+ ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$'
+
+ # If a comment line matches starts with this pattern then it is explicitly a
+ # trailing comment for the preceeding argument. Default is '#<'
+ explicit_trailing_pattern = '#<'
+
+ # If a comment line starts with at least this many consecutive hash
+ # characters, then don't lstrip() them off. This allows for lazy hash rulers
+ # where the first hash char is not separated by space
+ hashruler_min_length = 10
+
+ # If true, then insert a space between the first hash char and remaining hash
+ # chars in a hash ruler, and normalize its length to fill the column
+ canonicalize_hashrulers = True
+
+ # enable comment markup parsing and reflow
+ enable_markup = True
+
+# ----------------------------
+# Options affecting the linter
+# ----------------------------
+with section("lint"):
+
+ # a list of lint codes to disable
+ disabled_codes = []
+
+ # regular expression pattern describing valid function names
+ function_pattern = '[0-9a-z_]+'
+
+ # regular expression pattern describing valid macro names
+ macro_pattern = '[0-9a-z_]+'
+
+ # regular expression pattern describing valid names for variables with global
+ # (cache) scope
+ global_var_pattern = '[A-Z][0-9A-Z_]+'
+
+ # regular expression pattern describing valid names for variables with global
+ # scope (but internal semantic)
+ internal_var_pattern = '[A-Z][0-9A-Z_]+'
+
+ # regular expression pattern describing valid names for variables with local
+ # scope
+ local_var_pattern = '[a-z][a-z0-9_]+'
+
+ # regular expression pattern describing valid names for privatedirectory
+ # variables
+ private_var_pattern = '[0-9a-z_]+'
+
+ # regular expression pattern describing valid names for public directory
+ # variables
+ public_var_pattern = '.*'
+
+ # regular expression pattern describing valid names for function/macro
+ # arguments and loop variables.
+ argument_var_pattern = '[a-z_][a-z0-9_]+'
+
+ # regular expression pattern describing valid names for keywords used in
+ # functions or macros
+ keyword_pattern = '[A-Z][0-9A-Z_]+'
+
+ # In the heuristic for C0201, how many conditionals to match within a loop in
+ # before considering the loop a parser.
+ max_conditionals_custom_parser = 2
+
+ # Require at least this many newlines between statements
+ min_statement_spacing = 1
+
+ # Require no more than this many newlines between statements
+ max_statement_spacing = 2
+ max_returns = 6
+ max_branches = 15
+ max_arguments = 10
+ max_localvars = 15
+ max_statements = 50
+
+# -------------------------------
+# Options affecting file encoding
+# -------------------------------
+with section("encode"):
+
+ # If true, emit the unicode byte-order mark (BOM) at the start of the file
+ emit_byteorder_mark = False
+
+ # Specify the encoding of the input file. Defaults to utf-8
+ input_encoding = 'utf-8'
+
+ # Specify the encoding of the output file. Defaults to utf-8. Note that cmake
+ # only claims to support utf-8 so be careful when using anything else
+ output_encoding = 'utf-8'
+
+# -------------------------------------
+# Miscellaneous configurations options.
+# -------------------------------------
+with section("misc"):
+
+ # A dictionary containing any per-command configuration overrides. Currently
+ # only `command_case` is supported.
+ per_command = {}
+
diff --git a/.krazy b/.krazy
index 1675131f..ae81b742 100644
--- a/.krazy
+++ b/.krazy
@@ -17,6 +17,7 @@ SKIP /examples/
SKIP /java/
#For now skip python
SKIP /python/
+SKIP \.cmake-format\.py
#For now skip perl
SKIP /Net-ICal-Libical/
diff --git a/.mdlrc b/.mdlrc
new file mode 100644
index 00000000..3acbfeca
--- /dev/null
+++ b/.mdlrc
@@ -0,0 +1 @@
+style ".mdlrc.rb"
diff --git a/.mdlrc.rb b/.mdlrc.rb
new file mode 100644
index 00000000..406f45b3
--- /dev/null
+++ b/.mdlrc.rb
@@ -0,0 +1,4 @@
+all
+rule 'MD013', :line_length => 100
+rule 'MD029', :style => :ordered
+exclude_rule 'MD033'
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000..740fde24
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,36 @@
+# See https://pre-commit.com for more information
+# See https://pre-commit.com/hooks.html for more hooks
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v3.2.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: check-added-large-files
+ - id: check-case-conflict
+ - id: check-yaml
+ - id: check-json
+#- repo: https://github.com/pre-commit/mirrors-clang-format
+# rev: v13.0.0
+# hooks:
+# - id: clang-format
+- repo: https://github.com/PyCQA/pylint
+ rev: v2.12.2
+ hooks:
+ - id: pylint
+- repo: https://github.com/codespell-project/codespell
+ rev: v2.1.0
+ hooks:
+ - id: codespell
+- repo: https://github.com/cheshirekow/cmake-format-precommit
+ rev: v0.6.13
+ hooks:
+ - id: cmake-lint
+ exclude: cmake/Toolchain-*
+- repo: https://github.com/markdownlint/markdownlint
+ rev: v0.11.0
+ hooks:
+ - id: markdownlint
+ entry: mdl
+ language: ruby
+ files: \.(md|mdown|markdown)$
diff --git a/.pylintrc b/.pylintrc
new file mode 100644
index 00000000..b3bb2f6d
--- /dev/null
+++ b/.pylintrc
@@ -0,0 +1,590 @@
+[MASTER]
+
+# A comma-separated list of package or module names from where C extensions may
+# be loaded. Extensions are loading into the active Python interpreter and may
+# run arbitrary code.
+extension-pkg-allow-list=
+
+# A comma-separated list of package or module names from where C extensions may
+# be loaded. Extensions are loading into the active Python interpreter and may
+# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
+# for backward compatibility.)
+extension-pkg-whitelist=
+
+# Return non-zero exit code if any of these messages/categories are detected,
+# even if score is above --fail-under value. Syntax same as enable. Messages
+# specified are enabled, while categories only check already-enabled messages.
+fail-on=
+
+# Specify a score threshold to be exceeded before program exits with error.
+fail-under=10.0
+
+# Files or directories to be skipped. They should be base names, not paths.
+ignore=CVS
+
+# Add files or directories matching the regex patterns to the ignore-list. The
+# regex matches against paths and can be in Posix or Windows format.
+ignore-paths=
+
+# Files or directories matching the regex patterns are skipped. The regex
+# matches against base names, not paths. The default value ignores emacs file
+# locks
+ignore-patterns=^\.#
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
+# number of processors available to use.
+jobs=1
+
+# Control the amount of potential inferred values when inferring a single
+# object. This can help the performance when dealing with large functions or
+# complex, nested conditions.
+limit-inference-results=100
+
+# List of plugins (as comma separated values of python module names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# Minimum Python version to use for version dependent checks. Will default to
+# the version used to run pylint.
+py-version=3.10
+
+# Discover python modules and packages in the file system subtree.
+recursive=no
+
+# When enabled, pylint would attempt to guess common misconfiguration and emit
+# user-friendly hints instead of false-positive error messages.
+suggestion-mode=yes
+
+# Allow loading of arbitrary C extensions. Extensions are imported into the
+# active Python interpreter and may run arbitrary code.
+unsafe-load-any-extension=no
+
+
+[MESSAGES CONTROL]
+
+# Only show warnings with the listed confidence levels. Leave empty to show
+# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
+# UNDEFINED.
+confidence=
+
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifiers separated by comma (,) or put this
+# option multiple times (only on the command line, not in the configuration
+# file where it should appear only once). You can also use "--disable=all" to
+# disable everything first and then re-enable specific checks. For example, if
+# you want to run only the similarities checker, you can use "--disable=all
+# --enable=similarities". If you want to run only the classes checker, but have
+# no Warning level messages displayed, use "--disable=all --enable=classes
+# --disable=W".
+disable=raw-checker-failed,
+ bad-inline-option,
+ locally-disabled,
+ file-ignored,
+ suppressed-message,
+ useless-suppression,
+ deprecated-pragma,
+ use-symbolic-message-instead
+
+# Enable the message, report, category or checker with the given id(s). You can
+# either give multiple identifier separated by comma (,) or put this option
+# multiple time (only on the command line, not in the configuration file where
+# it should appear only once). See also the "--disable" option for examples.
+enable=c-extension-no-member
+
+
+[REPORTS]
+
+# Python expression which should return a score less than or equal to 10. You
+# have access to the variables 'fatal', 'error', 'warning', 'refactor',
+# 'convention', and 'info' which contain the number of messages in each
+# category, as well as 'statement' which is the total number of statements
+# analyzed. This score is used by the global evaluation report (RP0004).
+evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
+
+# Template used to display messages. This is a python new-style format string
+# used to format the message information. See doc for all details.
+#msg-template=
+
+# Set the output format. Available formats are text, parseable, colorized, json
+# and msvs (visual studio). You can also give a reporter class, e.g.
+# mypackage.mymodule.MyReporterClass.
+output-format=text
+
+# Tells whether to display a full report or only the messages.
+reports=no
+
+# Activate the evaluation score.
+score=yes
+
+
+[REFACTORING]
+
+# Maximum number of nested blocks for function / method body
+max-nested-blocks=5
+
+# Complete name of functions that never returns. When checking for
+# inconsistent-return-statements if a never returning function is called then
+# it will be considered as an explicit return statement and no message will be
+# printed.
+never-returning-functions=sys.exit,argparse.parse_error
+
+
+[BASIC]
+
+# Naming style matching correct argument names.
+argument-naming-style=snake_case
+
+# Regular expression matching correct argument names. Overrides argument-
+# naming-style. If left empty, argument names will be checked with the set
+# naming style.
+#argument-rgx=
+
+# Naming style matching correct attribute names.
+attr-naming-style=snake_case
+
+# Regular expression matching correct attribute names. Overrides attr-naming-
+# style. If left empty, attribute names will be checked with the set naming
+# style.
+#attr-rgx=
+
+# Bad variable names which should always be refused, separated by a comma.
+bad-names=foo,
+ bar,
+ baz,
+ toto,
+ tutu,
+ tata
+
+# Bad variable names regexes, separated by a comma. If names match any regex,
+# they will always be refused
+bad-names-rgxs=
+
+# Naming style matching correct class attribute names.
+class-attribute-naming-style=any
+
+# Regular expression matching correct class attribute names. Overrides class-
+# attribute-naming-style. If left empty, class attribute names will be checked
+# with the set naming style.
+#class-attribute-rgx=
+
+# Naming style matching correct class constant names.
+class-const-naming-style=UPPER_CASE
+
+# Regular expression matching correct class constant names. Overrides class-
+# const-naming-style. If left empty, class constant names will be checked with
+# the set naming style.
+#class-const-rgx=
+
+# Naming style matching correct class names.
+class-naming-style=PascalCase
+
+# Regular expression matching correct class names. Overrides class-naming-
+# style. If left empty, class names will be checked with the set naming style.
+#class-rgx=
+
+# Naming style matching correct constant names.
+const-naming-style=UPPER_CASE
+
+# Regular expression matching correct constant names. Overrides const-naming-
+# style. If left empty, constant names will be checked with the set naming
+# style.
+#const-rgx=
+
+# Minimum line length for functions/classes that require docstrings, shorter
+# ones are exempt.
+docstring-min-length=-1
+
+# Naming style matching correct function names.
+function-naming-style=snake_case
+
+# Regular expression matching correct function names. Overrides function-
+# naming-style. If left empty, function names will be checked with the set
+# naming style.
+#function-rgx=
+
+# Good variable names which should always be accepted, separated by a comma.
+good-names=i,
+ j,
+ k,
+ ex,
+ Run,
+ _
+
+# Good variable names regexes, separated by a comma. If names match any regex,
+# they will always be accepted
+good-names-rgxs=
+
+# Include a hint for the correct naming format with invalid-name.
+include-naming-hint=no
+
+# Naming style matching correct inline iteration names.
+inlinevar-naming-style=any
+
+# Regular expression matching correct inline iteration names. Overrides
+# inlinevar-naming-style. If left empty, inline iteration names will be checked
+# with the set naming style.
+#inlinevar-rgx=
+
+# Naming style matching correct method names.
+method-naming-style=snake_case
+
+# Regular expression matching correct method names. Overrides method-naming-
+# style. If left empty, method names will be checked with the set naming style.
+#method-rgx=
+
+# Naming style matching correct module names.
+module-naming-style=snake_case
+
+# Regular expression matching correct module names. Overrides module-naming-
+# style. If left empty, module names will be checked with the set naming style.
+#module-rgx=
+
+# Colon-delimited sets of names that determine each other's naming style when
+# the name regexes allow several styles.
+name-group=
+
+# Regular expression which should only match function or class names that do
+# not require a docstring.
+no-docstring-rgx=^_
+
+# List of decorators that produce properties, such as abc.abstractproperty. Add
+# to this list to register other decorators that produce valid properties.
+# These decorators are taken in consideration only for invalid-name.
+property-classes=abc.abstractproperty
+
+# Regular expression matching correct type variable names. If left empty, type
+# variable names will be checked with the set naming style.
+#typevar-rgx=
+
+# Naming style matching correct variable names.
+variable-naming-style=snake_case
+
+# Regular expression matching correct variable names. Overrides variable-
+# naming-style. If left empty, variable names will be checked with the set
+# naming style.
+#variable-rgx=
+
+
+[FORMAT]
+
+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
+expected-line-ending-format=
+
+# Regexp for a line that is allowed to be longer than the limit.
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
+
+# Number of spaces of indent required inside a hanging or continued line.
+indent-after-paren=4
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string=' '
+
+# Maximum number of characters on a single line.
+max-line-length=100
+
+# Maximum number of lines in a module.
+max-module-lines=1000
+
+# Allow the body of a class to be on the same line as the declaration if body
+# contains single statement.
+single-line-class-stmt=no
+
+# Allow the body of an if to be on the same line as the test if there is no
+# else.
+single-line-if-stmt=no
+
+
+[LOGGING]
+
+# The type of string formatting that logging methods do. `old` means using %
+# formatting, `new` is for `{}` formatting.
+logging-format-style=old
+
+# Logging modules to check that the string format arguments are in logging
+# function parameter format.
+logging-modules=logging
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,
+ XXX,
+ TODO
+
+# Regular expression of note tags to take in consideration.
+#notes-rgx=
+
+
+[SIMILARITIES]
+
+# Comments are removed from the similarity computation
+ignore-comments=yes
+
+# Docstrings are removed from the similarity computation
+ignore-docstrings=yes
+
+# Imports are removed from the similarity computation
+ignore-imports=no
+
+# Signatures are removed from the similarity computation
+ignore-signatures=no
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+
+[SPELLING]
+
+# Limits count of emitted suggestions for spelling mistakes.
+max-spelling-suggestions=4
+
+# Spelling dictionary name. Available dictionaries: en (aspell), en_AG
+# (hunspell), en_AU (aspell), en_BS (hunspell), en_BW (hunspell), en_BZ
+# (hunspell), en_CA (aspell), en_DK (hunspell), en_GB (aspell), en_GH
+# (hunspell), en_HK (hunspell), en_IE (hunspell), en_IN (hunspell), en_JM
+# (hunspell), en_MW (hunspell), en_NA (hunspell), en_NG (hunspell), en_NZ
+# (hunspell), en_PH (hunspell), en_SG (hunspell), en_TT (hunspell), en_US
+# (aspell), en_ZA (hunspell), en_ZM (hunspell), en_ZW (hunspell).
+spelling-dict=
+
+# List of comma separated words that should be considered directives if they
+# appear and the beginning of a comment and should not be checked.
+spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
+
+# List of comma separated words that should not be checked.
+spelling-ignore-words=
+
+# A path to a file that contains the private dictionary; one word per line.
+spelling-private-dict-file=
+
+# Tells whether to store unknown words to the private dictionary (see the
+# --spelling-private-dict-file option) instead of raising a message.
+spelling-store-unknown-words=no
+
+
+[STRING]
+
+# This flag controls whether inconsistent-quotes generates a warning when the
+# character used as a quote delimiter is used inconsistently within a module.
+check-quote-consistency=no
+
+# This flag controls whether the implicit-str-concat should generate a warning
+# on implicit string concatenation in sequences defined over several lines.
+check-str-concat-over-line-jumps=no
+
+
+[TYPECHECK]
+
+# List of decorators that produce context managers, such as
+# contextlib.contextmanager. Add to this list to register other decorators that
+# produce valid context managers.
+contextmanager-decorators=contextlib.contextmanager
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E1101 when accessed. Python regular
+# expressions are accepted.
+generated-members=
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# class is considered mixin if its name matches the mixin-class-rgx option.
+ignore-mixin-members=yes
+
+# Tells whether to warn about missing members when the owner of the attribute
+# is inferred to be None.
+ignore-none=yes
+
+# This flag controls whether pylint should warn about no-member and similar
+# checks whenever an opaque object is returned when inferring. The inference
+# can return multiple potential results while evaluating a Python object, but
+# some branches might not be evaluated, which results in partial inference. In
+# that case, it might be useful to still emit no-member and other checks for
+# the rest of the inferred objects.
+ignore-on-opaque-inference=yes
+
+# List of class names for which member attributes should not be checked (useful
+# for classes with dynamically set attributes). This supports the use of
+# qualified names.
+ignored-classes=optparse.Values,thread._local,_thread._local
+
+# List of module names for which member attributes should not be checked
+# (useful for modules/projects where namespaces are manipulated during runtime
+# and thus existing member attributes cannot be deduced by static analysis). It
+# supports qualified module names, as well as Unix pattern matching.
+ignored-modules=
+
+# Show a hint with possible names when a member name was not found. The aspect
+# of finding the hint is based on edit distance.
+missing-member-hint=yes
+
+# The minimum edit distance a name should have in order to be considered a
+# similar match for a missing member name.
+missing-member-hint-distance=1
+
+# The total number of similar names that should be taken in consideration when
+# showing a hint for a missing member.
+missing-member-max-choices=1
+
+# Regex pattern to define which classes are considered mixins ignore-mixin-
+# members is set to 'yes'
+mixin-class-rgx=.*[Mm]ixin
+
+# List of decorators that change the signature of a decorated function.
+signature-mutators=
+
+
+[VARIABLES]
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid defining new builtins when possible.
+additional-builtins=
+
+# Tells whether unused global variables should be treated as a violation.
+allow-global-unused-variables=yes
+
+# List of names allowed to shadow builtins
+allowed-redefined-builtins=
+
+# List of strings which can identify a callback function by name. A callback
+# name must start or end with one of those strings.
+callbacks=cb_,
+ _cb
+
+# A regular expression matching the name of dummy variables (i.e. expected to
+# not be used).
+dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
+
+# Argument names that match this expression will be ignored. Default to name
+# with leading underscore.
+ignored-argument-names=_.*|^ignored_|^unused_
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
+
+# List of qualified module names which can have objects that can redefine
+# builtins.
+redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
+
+
+[CLASSES]
+
+# Warn about protected attribute access inside special methods
+check-protected-access-in-special-methods=no
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,
+ __new__,
+ setUp,
+ __post_init__
+
+# List of member names, which should be excluded from the protected access
+# warning.
+exclude-protected=_asdict,
+ _fields,
+ _replace,
+ _source,
+ _make
+
+# List of valid names for the first argument in a class method.
+valid-classmethod-first-arg=cls
+
+# List of valid names for the first argument in a metaclass class method.
+valid-metaclass-classmethod-first-arg=cls
+
+
+[DESIGN]
+
+# List of regular expressions of class ancestor names to ignore when counting
+# public methods (see R0903)
+exclude-too-few-public-methods=
+
+# List of qualified class names to ignore when counting class parents (see
+# R0901)
+ignored-parents=
+
+# Maximum number of arguments for function / method.
+max-args=5
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Maximum number of boolean expressions in an if statement (see R0916).
+max-bool-expr=5
+
+# Maximum number of branch for function / method body.
+max-branches=12
+
+# Maximum number of locals for function / method body.
+max-locals=15
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+# Maximum number of return / yield for function / method body.
+max-returns=6
+
+# Maximum number of statements in function / method body.
+max-statements=50
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+
+[IMPORTS]
+
+# List of modules that can be imported at any level, not just the top level
+# one.
+allow-any-import-level=
+
+# Allow wildcard imports from modules that define __all__.
+allow-wildcard-with-all=no
+
+# Analyse import fallback blocks. This can be used to support both Python 2 and
+# 3 compatible code, which means that the block might have code that exists
+# only in one or another interpreter, leading to false positives when analysed.
+analyse-fallback-blocks=no
+
+# Deprecated modules which should not be used, separated by a comma.
+deprecated-modules=
+
+# Output a graph (.gv or any supported image format) of external dependencies
+# to the given file (report RP0402 must not be disabled).
+ext-import-graph=
+
+# Output a graph (.gv or any supported image format) of all (i.e. internal and
+# external) dependencies to the given file (report RP0402 must not be
+# disabled).
+import-graph=
+
+# Output a graph (.gv or any supported image format) of internal dependencies
+# to the given file (report RP0402 must not be disabled).
+int-import-graph=
+
+# Force import order to recognize a module as part of the standard
+# compatibility libraries.
+known-standard-library=
+
+# Force import order to recognize a module as part of a third party library.
+known-third-party=enchant
+
+# Couples of modules and preferred modules, separated by a comma.
+preferred-modules=
+
+
+[EXCEPTIONS]
+
+# Exceptions that will emit a warning when being caught. Defaults to
+# "BaseException, Exception".
+overgeneral-exceptions=BaseException,
+ Exception
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d54c5d0..f88bf312 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,7 +128,10 @@ if(MSVC)
endif()
endif()
if(BAD_C_MESSAGE)
- message(FATAL_ERROR "\nSorry, ${BAD_C_MESSAGE} is required to build this software. Please retry using a modern C compiler that supports the C99 standard.")
+ message(FATAL_ERROR
+ "\nSorry, ${BAD_C_MESSAGE} is required to build this software. "
+ "Please retry using a modern C compiler that supports the C99 standard."
+ )
endif()
# Enable the test harness
@@ -182,7 +185,10 @@ if(STATIC_ONLY)
set(LIBRARY_TYPE STATIC)
endif()
-libical_option(SHARED_ONLY "Build shared (dynamic) libraries only. Takes precedence over STATIC_ONLY." False)
+libical_option(SHARED_ONLY
+ "Build shared (dynamic) libraries only. Takes precedence over STATIC_ONLY."
+ False
+)
if(SHARED_ONLY)
set(STATIC_ONLY False)
set(LIBRARY_TYPE SHARED)
@@ -263,7 +269,7 @@ if(ICU_FOUND)
message(FATAL_ERROR
"Unable to locate the ICU runtime path. Is your ICU installation broken?")
endif()
- set(ICU_BINARY_DIR ${ICU_EXEC} CACHE STRING DOC "Runtime binaries directory for the ICU library")
+ set(ICU_BINARY_DIR ${ICU_EXEC} CACHE STRING "Runtime binaries directory for the ICU library")
endif()
# compile in Berkeley DB support
@@ -304,7 +310,10 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
if(WIN32)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DYY_NO_UNISTD_H)
- libical_option(USE_32BIT_TIME_T "Build using a 32bit time_t (ignored unless building with MSVC on Windows)." False)
+ libical_option(USE_32BIT_TIME_T
+ "Build using a 32bit time_t (ignored unless building with MSVC on Windows)."
+ False
+ )
if(USE_32BIT_TIME_T)
add_definitions(-D_USE_32BIT_TIME_T)
endif()
@@ -334,14 +343,20 @@ else()
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
endif()
-libical_option(ICAL_ERRORS_ARE_FATAL "icalerror_* calls will abort instead of internally signaling an error." False)
+libical_option(ICAL_ERRORS_ARE_FATAL
+ "icalerror_* calls will abort instead of internally signaling an error."
+ False
+)
if(ICAL_ERRORS_ARE_FATAL)
set(ICAL_ERRORS_ARE_FATAL 1)
else()
set(ICAL_ERRORS_ARE_FATAL 0)
endif()
-libical_option(ICAL_ALLOW_EMPTY_PROPERTIES "Prevents empty properties from being replaced with X-LIC-ERROR properties." False)
+libical_option(ICAL_ALLOW_EMPTY_PROPERTIES
+ "Prevents empty properties from being replaced with X-LIC-ERROR properties."
+ False
+)
if(ICAL_ALLOW_EMPTY_PROPERTIES)
set(ICAL_ALLOW_EMPTY_PROPERTIES 1)
else()
@@ -353,7 +368,12 @@ if(WIN32 OR WINCE)
else()
set(DEF_USE_BUILTIN_TZDATA False)
endif()
-libical_option(USE_BUILTIN_TZDATA "(Careful) Build using libical's built-in timezone data, else use the system timezone data on non-Windows systems. ALWAYS true on Windows. Non-Windows users should know what they're doing if they choose not to use system provided timezone data. The libical project does not guarantee that the built-in timezone data is up-to-date." ${DEF_USE_BUILTIN_TZDATA})
+libical_option(USE_BUILTIN_TZDATA
+ "(Careful) Build using libical's built-in timezone data, else use the system timezone data on non-Windows systems. \
+ ALWAYS true on Windows. Non-Windows users should know what they're doing if they choose not to use system provided \
+ timezone data. The libical project does not guarantee that the built-in timezone data is up-to-date."
+ ${DEF_USE_BUILTIN_TZDATA}
+)
mark_as_advanced(USE_BUILTIN_TZDATA)
if(USE_BUILTIN_TZDATA)
set(USE_BUILTIN_TZDATA 1)
@@ -386,7 +406,11 @@ set(INSTALL_TARGETS_DEFAULT_ARGS
find_package(PkgConfig QUIET)
set(MIN_GOBJECT_INTROSPECTION "0.6.7")
-libical_option(GOBJECT_INTROSPECTION "Build GObject introspection \"typelib\" files. Requires GObject Introspection development package ${MIN_GOBJECT_INTROSPECTION} or higher." False)
+libical_option(GOBJECT_INTROSPECTION
+ "Build GObject introspection \"typelib\" files. \
+ Requires GObject Introspection development package ${MIN_GOBJECT_INTROSPECTION} or higher."
+ False
+)
if(GOBJECT_INTROSPECTION)
if(NOT PKG_CONFIG_FOUND)
message(FATAL_ERROR
@@ -452,7 +476,11 @@ endif()
set(MIN_GLIB "2.44")
set(MIN_LIBXML "2.7.3")
-libical_option(ICAL_GLIB "Build libical-glib interface. Requires glib ${MIN_GLIB} and libxml ${MIN_LIBXML} development packages or higher." True)
+libical_option(ICAL_GLIB
+ "Build libical-glib interface. \
+ Requires glib ${MIN_GLIB} and libxml ${MIN_LIBXML} development packages or higher."
+ True
+)
if(ICAL_GLIB)
if(NOT PKG_CONFIG_FOUND)
message(FATAL_ERROR
@@ -507,7 +535,11 @@ if(DEFINED CMAKE_C_COMPILER_ID)
endif()
endif()
if(CMAKE_C_COMPILER_IS_GCC OR CMAKE_C_COMPILER_IS_CLANG)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wno-deprecated -Wall -Wno-unknown-pragmas -Wextra -Winit-self -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Werror=return-type")
+ set(CMAKE_C_FLAGS
+ "${CMAKE_C_FLAGS} -fvisibility=hidden \
+ -Wno-deprecated -Wall -Wno-unknown-pragmas -Wextra -Winit-self -Wunused -Wno-div-by-zero \
+ -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Werror=return-type"
+ )
libical_add_cflag(-Wunused-but-set-variable UNUSED_BUT_SET)
libical_add_cflag(-Wlogical-op LOGICAL_OP)
libical_add_cflag(-Wsizeof-pointer-memaccess POINTER_MEMACCESS)
@@ -531,7 +563,11 @@ if(DEFINED CMAKE_CXX_COMPILER_ID)
endif()
endif()
if(CMAKE_CXX_COMPILER_IS_GCC OR CMAKE_CXX_COMPILER_IS_CLANG)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Weffc++ -Wno-deprecated -Wall -Wextra -Woverloaded-virtual -Winit-self -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Werror=return-type")
+ set(CMAKE_CXX_FLAGS
+ "${CMAKE_CXX_FLAGS} -fvisibility=hidden \
+ -Weffc++ -Wno-deprecated -Wall -Wextra -Woverloaded-virtual -Winit-self -Wunused \
+ -Wno-div-by-zero -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Werror=return-type"
+ )
libical_add_cxxflag(-Wunused-but-set-variable UNUSED_BUT_SET)
libical_add_cxxflag(-Wlogical-op LOGICAL_OP)
libical_add_cxxflag(-Wsizeof-pointer-memaccess POINTER_MEMACCESS)
@@ -552,7 +588,11 @@ if(SIZEOF_TIME_T EQUAL 4)
endif()
################ Developer Options #####################
-libical_deprecated_option(ABI_DUMPER LIBICAL_DEVMODE_ABI_DUMPER "(Developer-only) Build for abi-dumper." False)
+libical_deprecated_option(ABI_DUMPER
+ LIBICAL_DEVMODE_ABI_DUMPER
+ "(Developer-only) Build for abi-dumper."
+ False
+)
mark_as_advanced(LIBICAL_DEVMODE_ABI_DUMPER)
if(LIBICAL_DEVMODE_ABI_DUMPER)
if(CMAKE_C_COMPILER_IS_GCC)
@@ -564,14 +604,21 @@ if(LIBICAL_DEVMODE_ABI_DUMPER)
endif()
endif()
-libical_option(LIBICAL_DEVMODE_MEMORY_CONSISTENCY "(Developer-only) Build with memory consistency functions." False)
+libical_option(LIBICAL_DEVMODE_MEMORY_CONSISTENCY
+ "(Developer-only) Build with memory consistency functions."
+ False
+)
if(LIBICAL_DEVMODE_MEMORY_CONSISTENCY)
set(CMAKE_BUILD_TYPE "Debug")
add_definitions(-DMEMORY_CONSISTENCY)
endif()
mark_as_advanced(LIBICAL_DEVMODE_MEMORY_CONSISTENCY)
-libical_deprecated_option(ADDRESS_SANITIZER LIBICAL_DEVMODE_ADDRESS_SANITIZER "(Developer-only) Build with the address sanitizer." False)
+libical_deprecated_option(ADDRESS_SANITIZER
+ LIBICAL_DEVMODE_ADDRESS_SANITIZER
+ "(Developer-only) Build with the address sanitizer."
+ False
+)
mark_as_advanced(LIBICAL_DEVMODE_ADDRESS_SANITIZER)
if(LIBICAL_DEVMODE_ADDRESS_SANITIZER)
if(CMAKE_C_COMPILER_IS_GCC OR CMAKE_C_COMPILER_IS_CLANG)
@@ -597,7 +644,11 @@ if(LIBICAL_DEVMODE_ADDRESS_SANITIZER)
endif()
endif()
-libical_deprecated_option(THREAD_SANITIZER LIBICAL_DEVMODE_THREAD_SANITIZER "(Developer-only) Build with the thread sanitizer." False)
+libical_deprecated_option(THREAD_SANITIZER
+ LIBICAL_DEVMODE_THREAD_SANITIZER
+ "(Developer-only) Build with the thread sanitizer."
+ False
+)
mark_as_advanced(LIBICAL_DEVMODE_THREAD_SANITIZER)
if(LIBICAL_DEVMODE_THREAD_SANITIZER)
if(CMAKE_C_COMPILER_IS_GCC OR CMAKE_C_COMPILER_IS_CLANG)
@@ -623,7 +674,11 @@ if(LIBICAL_DEVMODE_THREAD_SANITIZER)
endif()
endif()
-libical_deprecated_option(UNDEFINED_SANITIZER LIBICAL_DEVMODE_UNDEFINED_SANITIZER "(Developer-only) Build with the undefined sanitizer." False)
+libical_deprecated_option(UNDEFINED_SANITIZER
+ LIBICAL_DEVMODE_UNDEFINED_SANITIZER
+ "(Developer-only) Build with the undefined sanitizer."
+ False
+)
mark_as_advanced(LIBICAL_DEVMODE_UNDEFINED_SANITIZER)
if(LIBICAL_DEVMODE_UNDEFINED_SANITIZER)
if(CMAKE_C_COMPILER_IS_GCC OR CMAKE_C_COMPILER_IS_CLANG)
@@ -768,6 +823,7 @@ if(NOT TARGET uninstall)
add_custom_target(uninstall
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake"
+ COMMENT "Target for uninstalling everything"
)
endif()
diff --git a/README.md b/README.md
index 66b7a785..d749d63e 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# Libical — an implementation of iCalendar protocols and data formats {#mainpage}
-[![Appveyor status](https://ci.appveyor.com/api/projects/status/github/libical/libical?branch=master?svg=true)](https://ci.appveyor.com/api/projects/status/github/libical/libical) [![Packaging status](https://repology.org/badge/tiny-repos/libical.svg)](https://repology.org/metapackage/libical)
+[![Appveyor status](https://ci.appveyor.com/api/projects/status/github/libical/libical?branch=master?svg=true)](https://ci.appveyor.com/api/projects/status/github/libical/libical)
+[![Packaging status](https://repology.org/badge/tiny-repos/libical.svg)](https://repology.org/metapackage/libical)
## About
@@ -9,7 +10,7 @@ Libical — an implementation of iCalendar protocols and data formats
Most of the code in here was written by Eric Busboom at the end
of the last millennium with help from dozens of contributors.
It is currently maintained by Allen Winter and the libical team
-at https://github.com/libical/libical.
+at <https://github.com/libical/libical>.
Libical is an Open Source implementation of the iCalendar protocols
and protocol data units. The iCalendar specification describes how
@@ -81,15 +82,13 @@ In no particular order:
* [Cyrus Email/Calendars/Contacts Server](https://www.cyrusimap.org)
* [syncEvolution](https://syncevolution.org)
* [Fantastical](https://flexibits.com/fantastical)
-
* GNOME's EDS (evolution-data-server) which serves data to:
* [Evolution](https://wiki.gnome.org/Apps/Evolution)
* [GNOME Calendar](https://wiki.gnome.org/Apps/Calendar)
* [GNOME Notes](https://wiki.gnome.org/Apps/Notes)
* [GNOME Todo](https://wiki.gnome.org/Apps/Todo)
* and more GNOME apps...
-
-* KDE's [Kontact Suite](https://kontact.kde.org)
+* KDE's [Kontact Suite](https://kontact.kde.org) including:
* [Akonadi framework](https://kontact.kde.org/components/akonadi.html)
* [KOrganizer calendar and scheduling component](https://kontact.kde.org/components/korganizer.html)
* and more KDE apps...
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index 57a95536..da0598f3 100644
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -4,7 +4,7 @@ Release Highlights
Version 3.1.0 (NOT RELEASED YET):
--------------------------------
* MSVC 2013 or higher (when building on Windows with MSVC)
- * For the C++ bindings, a C++11 compliant complier is required
+ * For the C++ bindings, a C++11 compliant compiler is required
* Requires CMake v3.11.0 or higher
* libical-glib requires glib 2.38 or higher
* libical-glib requires a C11 compliant compiler
@@ -46,7 +46,7 @@ Version 3.1.0 (NOT RELEASED YET):
Version 3.0.15 (UNRELEASED):
----------------------------
- *
+ * Add missing property parameters into libical-glib
Version 3.0.14 (05 February 2022):
----------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index bcb85b28..5264c1b7 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -43,7 +43,7 @@ configuration:
- Debug
install:
- - sh: if [ "`uname -s`" = "Darwin" ]; then export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig; export XML_CATALOG_FILES=/usr/local/etc/xml/catalog; brew install pkg-config ninja gtk-doc glib libxml2 icu4c berkeley-db; else sudo apt-get -y install gtk-doc-tools xml-core libdb-dev gobject-introspection libgirepository1.0-dev valac; fi
+ - sh: if [ "`uname -s`" = "Darwin" ]; then export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig; export XML_CATALOG_FILES=/usr/local/etc/xml/catalog; rm -f /usr/local/include/X11; brew install pkg-config ninja gtk-doc glib libxml2 icu4c berkeley-db; else sudo apt-get -y install gtk-doc-tools xml-core libdb-dev gobject-introspection libgirepository1.0-dev valac; fi
before_build:
- cmd: call scripts\set_compiler_env.bat
diff --git a/cmake/modules/FindGObjectIntrospection.cmake b/cmake/modules/FindGObjectIntrospection.cmake
index 02841f4f..07098b82 100644
--- a/cmake/modules/FindGObjectIntrospection.cmake
+++ b/cmake/modules/FindGObjectIntrospection.cmake
@@ -16,6 +16,7 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Get gobject-introspection's specified pkg-config variable
macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} gobject-introspection-1.0
@@ -27,7 +28,7 @@ macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname)
else()
string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
string(REGEX REPLACE " +$" "" _result "${_result}")
- separate_arguments(_result)
+ separate_arguments(_result UNIX_COMMAND ${_result})
set(${_outvar} ${_result} CACHE INTERNAL "")
endif()
endmacro(_GIR_GET_PKGCONFIG_VAR)
diff --git a/cmake/modules/GObjectIntrospectionMacros.cmake b/cmake/modules/GObjectIntrospectionMacros.cmake
index d8b37f29..69b7e78f 100644
--- a/cmake/modules/GObjectIntrospectionMacros.cmake
+++ b/cmake/modules/GObjectIntrospectionMacros.cmake
@@ -3,6 +3,7 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Generate list from another list, but with each item prepended with a prefix
macro(_gir_list_prefix _outvar _listvar _prefix)
set(${_outvar})
foreach(_item IN LISTS ${_listvar})
@@ -10,13 +11,12 @@ macro(_gir_list_prefix _outvar _listvar _prefix)
endforeach()
endmacro(_gir_list_prefix)
+# cmake-lint: disable=R0915
macro(gir_add_introspections introspections_girs)
-
set(_gir_girs)
set(_gir_typelibs)
foreach(gir IN LISTS ${introspections_girs})
-
set(_gir_name "${gir}")
## Transform the gir filename to something which can reference through a variable
@@ -65,7 +65,6 @@ macro(gir_add_introspections introspections_girs)
message(ERROR "Unspecified or empty ${_gir_name}_FILES variable")
endif()
-
# Variables which provides a list of things
_gir_list_prefix(_gir_libraries ${_gir_name}_LIBS "--library=")
_gir_list_prefix(_gir_packages ${_gir_name}_PACKAGES "--pkg=")
@@ -75,45 +74,54 @@ macro(gir_add_introspections introspections_girs)
set(_gir_libtool "--no-libtool")
add_custom_command(
- COMMAND ${GObjectIntrospection_SCANNER}
- ${GObjectIntrospection_SCANNER_ARGS}
- --namespace=${_gir_namespace}
- --nsversion=${_gir_version}
- ${_gir_libtool}
- ${_gir_program}
- ${_gir_libraries}
- ${_gir_packages}
- ${_gir_includes}
- ${_gir_scannerflags}
- ${${_gir_name}_CFLAGS}
- ${_gir_files}
- --output ${CMAKE_CURRENT_BINARY_DIR}/${gir}
- --accept-unprefixed
- DEPENDS ${_gir_files}
- ${${_gir_name}_LIBS}
OUTPUT ${gir}
+ COMMAND ${GObjectIntrospection_SCANNER}
+ ${GObjectIntrospection_SCANNER_ARGS}
+ --namespace=${_gir_namespace}
+ --nsversion=${_gir_version}
+ ${_gir_libtool}
+ ${_gir_program}
+ ${_gir_libraries}
+ ${_gir_packages}
+ ${_gir_includes}
+ ${_gir_scannerflags}
+ ${${_gir_name}_CFLAGS}
+ ${_gir_files}
+ --output ${CMAKE_CURRENT_BINARY_DIR}/${gir}
+ --accept-unprefixed
+ DEPENDS ${_gir_files} ${${_gir_name}_LIBS}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
VERBATIM
+ COMMENT "Run the gobject introspection scanner"
)
list(APPEND _gir_girs ${CMAKE_CURRENT_BINARY_DIR}/${gir})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${gir} DESTINATION ${SHARE_INSTALL_DIR}/gir-1.0)
string(REPLACE ".gir" ".typelib" _typelib "${gir}")
add_custom_command(
+ OUTPUT ${_typelib}
COMMAND ${GObjectIntrospection_COMPILER}
- --includedir=.
- ${CMAKE_CURRENT_BINARY_DIR}/${gir}
- -o ${CMAKE_CURRENT_BINARY_DIR}/${_typelib}
+ --includedir=.
+ ${CMAKE_CURRENT_BINARY_DIR}/${gir}
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${_typelib}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir}
- OUTPUT ${_typelib}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Run the gobject introspection compiler"
)
list(APPEND _gir_typelibs ${CMAKE_CURRENT_BINARY_DIR}/${_typelib})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_typelib} DESTINATION ${LIB_INSTALL_DIR}/girepository-1.0)
endforeach()
- add_custom_target(gir-girs-${_gir_name} ALL DEPENDS ${_gir_girs})
- add_custom_target(gir-typelibs-${_gir_name} ALL DEPENDS ${_gir_typelibs})
+ add_custom_target(gir-girs-${_gir_name}
+ ALL
+ DEPENDS ${_gir_girs}
+ COMMENT "Target for the gobject introspection compiler"
+ )
+ add_custom_target(gir-typelibs-${_gir_name}
+ ALL
+ DEPENDS ${_gir_typelibs}
+ COMMENT "Target for the gobject introspection typelibs"
+ )
endmacro(gir_add_introspections)
diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake
index d32d4b18..4234cbb0 100644
--- a/cmake/modules/GtkDoc.cmake
+++ b/cmake/modules/GtkDoc.cmake
@@ -30,13 +30,14 @@ if(NOT (GTKDOC_SCAN AND GTKDOC_MKDB AND GTKDOC_MKHTML AND GTKDOC_FIXXREF))
endif()
if(NOT TARGET gtkdocs)
- add_custom_target(gtkdocs ALL)
+ add_custom_target(gtkdocs ALL COMMENT "Target to run gtkdoc for all modules")
endif()
if(NOT TARGET gtkdoc-rebuild-sgmls)
- add_custom_target(gtkdoc-rebuild-sgmls)
+ add_custom_target(gtkdoc-rebuild-sgmls COMMENT "Target to rebuild sgml for all modules")
endif()
+# cmake-lint: disable=R0912,R0915
macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ignoreheadersvar)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${_module}-docs.sgml.in
@@ -55,7 +56,10 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
if(APPLE)
if(NOT DEFINED ENV{XML_CATALOG_FILES})
- message(FATAL_ERROR "On OSX, please run \'export XML_CATALOG_FILES=/usr/local/etc/xml/catalog\' first; else the gtk entities cannot be located.")
+ message(FATAL_ERROR
+ "On OSX, please run \'export XML_CATALOG_FILES=/usr/local/etc/xml/catalog\' first; "
+ "else the gtk entities cannot be located."
+ )
endif()
endif()
@@ -69,7 +73,9 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
if(TARGET ${opt})
set(_target_type)
get_target_property(_target_type ${opt} TYPE)
- if((_target_type STREQUAL "STATIC_LIBRARY") OR (_target_type STREQUAL "SHARED_LIBRARY") OR (_target_type STREQUAL "MODULE_LIBRARY"))
+ if((_target_type STREQUAL "STATIC_LIBRARY") OR
+ (_target_type STREQUAL "SHARED_LIBRARY") OR
+ (_target_type STREQUAL "MODULE_LIBRARY"))
set(_compile_options)
set(_link_libraries)
@@ -107,7 +113,9 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
if(TARGET ${opt})
set(_target_type)
get_target_property(_target_type ${opt} TYPE)
- if((_target_type STREQUAL "STATIC_LIBRARY") OR (_target_type STREQUAL "SHARED_LIBRARY") OR (_target_type STREQUAL "MODULE_LIBRARY"))
+ if((_target_type STREQUAL "STATIC_LIBRARY") OR
+ (_target_type STREQUAL "SHARED_LIBRARY") OR
+ (_target_type STREQUAL "MODULE_LIBRARY"))
set(_output_name "")
get_target_property(_output_name ${opt} OUTPUT_NAME)
if(NOT _output_name)
@@ -181,7 +189,11 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/html"
- COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/html" ${GTKDOC_MKHTML} --path=.. ${_module} ../${_module}-docs.sgml
+ COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/html"
+ ${GTKDOC_MKHTML}
+ --path=..
+ ${_module}
+ ../${_module}-docs.sgml
COMMAND ${GTKDOC_FIXXREF}
--module=${_module}
@@ -197,6 +209,7 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
add_custom_target(gtkdoc-${_module}
DEPENDS html/index.html
+ COMMENT "Target for running gtkdoc for module"
)
if(${_depsvar})
@@ -226,7 +239,9 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
--rebuild-types
${_srcdirs}
- COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}" ${_scangobj_prefix} ${GTKDOC_SCANGOBJ}
+ COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}"
+ ${_scangobj_prefix}
+ ${GTKDOC_SCANGOBJ}
--module=${_module}
${_scangobj_cflags}
${_scangobj_ldflags}
@@ -240,9 +255,14 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
--output-format=xml
${_srcdirs}
- COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/tmp/${_module}-docs.sgml ${CMAKE_CURRENT_SOURCE_DIR}/${_module}-docs.sgml.in
+ COMMAND ${CMAKE_COMMAND} -E rename
+ ${CMAKE_CURRENT_BINARY_DIR}/tmp/${_module}-docs.sgml
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_module}-docs.sgml.in
- COMMAND ${CMAKE_COMMAND} -E echo "File '${CMAKE_CURRENT_SOURCE_DIR}/${_module}-docs.sgml.in' overwritten, make sure you replace generated strings with proper content before committing."
+ COMMAND ${CMAKE_COMMAND} -E echo
+ "File '${CMAKE_CURRENT_SOURCE_DIR}/${_module}-docs.sgml.in' overwritten, "
+ "make sure to replace generated strings with proper content before committing."
+ COMMENT "Target to rebuild the sgml for the specified module"
)
add_dependencies(gtkdoc-rebuild-sgmls gtkdoc-rebuild-${_module}-sgml)
diff --git a/cmake/modules/LibIcalMacrosInternal.cmake b/cmake/modules/LibIcalMacrosInternal.cmake
index ed197a15..bc527636 100644
--- a/cmake/modules/LibIcalMacrosInternal.cmake
+++ b/cmake/modules/LibIcalMacrosInternal.cmake
@@ -3,12 +3,14 @@
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
+# Call option() and then add_feature_info()
function(libical_option option description)
set(extra_option_arguments ${ARGN})
option(${option} "${description}" ${extra_option_arguments})
add_feature_info("Option ${option}" ${option} "${description}")
endfunction()
+# Warn about deprecated cmake options then call libical_option
function(libical_deprecated_option deprecated_option option description)
set(extra_option_arguments ${ARGN})
if(${deprecated_option})
@@ -18,6 +20,7 @@ function(libical_deprecated_option deprecated_option option description)
libical_option(${option} "${description}" ${extra_option_arguments})
endfunction()
+# If condition is True, append the specified value to each ARGN
function(libical_append_if condition value)
if(${condition})
foreach(variable ${ARGN})
@@ -26,11 +29,17 @@ function(libical_append_if condition value)
endif()
endfunction()
+# Create a variable C_SUPPORTS_<flag> with a boolean denoting
+# if the C compiler supports that flag; if so, append the flag
+# to the global CMAKE_C_FLAGS variable.
macro(libical_add_cflag flag name)
check_c_compiler_flag("${flag}" "C_SUPPORTS_${name}")
libical_append_if("C_SUPPORTS_${name}" "${flag}" CMAKE_C_FLAGS)
endmacro()
+# Create a variable CXX_SUPPORTS_<flag> with a boolean denoting
+# if the C++ compiler supports that flag; if so, append the flag
+# to the global CMAKE_CXX_FLAGS variable.
macro(libical_add_cxxflag flag name)
check_cxx_compiler_flag("${flag}" "CXX_SUPPORTS_${name}")
libical_append_if("CXX_SUPPORTS_${name}" "${flag}" CMAKE_CXX_FLAGS)
diff --git a/cmake/run_test.cmake b/cmake/run_test.cmake
index db6c5c4d..157ae44d 100644
--- a/cmake/run_test.cmake
+++ b/cmake/run_test.cmake
@@ -16,7 +16,7 @@ if(NOT output_test)
endif()
# convert the space-separated string to a list
-separate_arguments(test_args)
+separate_arguments(test_args UNIX_COMMAND ${test_args})
execute_process(
COMMAND ${test_cmd} ${test_args}
@@ -40,5 +40,7 @@ execute_process(
)
if(test_not_successful)
- message(SEND_ERROR "Output does not match for ${output_blessed} and ${output_test}: ${err} : shell output: ${test_not_successful}!")
+ message(SEND_ERROR
+ "Output does not match for ${output_blessed} and ${output_test}: ${err} : shell output: ${test_not_successful}!"
+ )
endif()
diff --git a/design-data/parameters.csv b/design-data/parameters.csv
index 3ff82dfb..32962c00 100644
--- a/design-data/parameters.csv
+++ b/design-data/parameters.csv
@@ -60,16 +60,15 @@
"FILENAME","42","const char*",
"#Task Extension Parameters","draft-apthorp-ical-tasks"
-"REASON","43","const char*",
+"REASON","47","const char*",
"MODIFIED","44","const char*",
"SUBSTATE","45","icalparameter_substate",X=21900;OK;ERROR;SUSPENDED;NONE=21999",
"#Parameters from New Properties for iCalendar","RFC 7986 Section 6"
"DISPLAY","46","icalparameter_display",X=22000;BADGE;GRAPHIC;FULLSIZE;THUMBNAIL;NONE=22099",
-"EMAIL","47","const char*",
+"EMAIL","50","const char*",
"FEATURE","48","icalparameter_feature",X=22100;AUDIO;CHAT;FEED;MODERATOR;PHONE;SCREEN;VIDEO;NONE=22199",
"LABEL","49","const char*",
-"EMAIL","50","const char*",
"#VPATCH Extension Parameters","draft-daboo-icalendar-vpatch"
"PATCH-ACTION","51","icalparameter_patchaction",X=22200;CREATE;BYNAME;BYVALUE;BYPARAM;NONE=22299",
diff --git a/design-data/properties.csv b/design-data/properties.csv
index 7217a582..7f019653 100644
--- a/design-data/properties.csv
+++ b/design-data/properties.csv
@@ -80,7 +80,7 @@
"MAX-COMPONENT-SIZE","44","INTEGER","INTEGER"
"MINDATE","49","DATE-TIME","DATE-TIME"
"MULTIPART","50","TEXT","TEXT"
-"NAME","51","TEXT","TEXT"
+"NAME","115","TEXT","TEXT"
"OWNER","53","TEXT","TEXT"
"PERMISSION","55","TEXT","TEXT"
"QUERY","58","QUERY","QUERY"
@@ -142,7 +142,7 @@
"TASK-MODE","114","TASKMODE","TASKMODE"
"#New Properties for iCalendar","RFC 7986 Section 5",
-"NAME","115","TEXT","TEXT"
+#"NAME","115","TEXT","TEXT" (conflicts with NAME from rfc4324#section-2.1.2)
"REFRESH-INTERVAL","116","DURATION","NO"
"SOURCE","117","URI","NO"
"COLOR","118","TEXT","TEXT"
@@ -156,7 +156,7 @@
"PATCH-DELETE","124","TEXT","TEXT"
"PATCH-PARAMETER","125","TEXT","TEXT"
-"#Event Publication Extensions Properies","RFC 9073 Section 6",
+"#Event Publication Extensions Properties","RFC 9073 Section 6",
"LOCATION-TYPE","127","TEXT","TEXT",is_multivalued
"PARTICIPANT-TYPE","128","PARTICIPANTTYPE","PARTICIPANTTYPE"
"RESOURCE-TYPE","129","RESOURCETYPE","RESOURCETYPE"
diff --git a/design-data/value-types.csv b/design-data/value-types.csv
index baafea1a..af0ac9e5 100644
--- a/design-data/value-types.csv
+++ b/design-data/value-types.csv
@@ -53,7 +53,7 @@
"TASKMODE","5035","(a)enum icalproperty_taskmode","string","unitary","X=11200;AUTOMATIC-COMPLETION;AUTOMATIC-FAILURE;AUTOMATIC-STATUS;NONE=11299"
"#VALARM Extension types","RFC 9074 Section 8.1",,,
-"PROXIMITY","5036","(a)enum icalproperty_proximity","string","unitary","X=11300;ARRIVE;DEPART;CONNECT;DISCONNECT;NONE=11399"
+"PROXIMITY","5039","(a)enum icalproperty_proximity","string","unitary","X=11300;ARRIVE;DEPART;CONNECT;DISCONNECT;NONE=11399"
"#Event Publication Extension types","RFC 9073 Section 6",,,
"PARTICIPANTTYPE","5037","(a)enum icalproperty_participanttype","string","unitary","X=11400;ACTIVE;INACTIVE;SPONSOR;CONTACT;BOOKING-CONTACT;EMERGENCY-CONTACT;PUBLICITY-CONTACT;PLANNER-CONTACT;PERFORMER;SPEAKER;NONE=11499"
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 699913f0..f2cc4d9c 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -52,9 +52,11 @@ if(DOXYGEN_FOUND)
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${_all_hdrs} ${_dox_deps} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMENT "Run Doxygen"
)
add_custom_target(docs
DEPENDS ${CMAKE_BINARY_DIR}/apidocs/html/index.html
+ COMMENT "Target to build the documentation"
)
add_dependencies(docs ical icalss icalvcal)
if(WITH_CXX_BINDINGS)
diff --git a/doc/UsingLibical.md b/doc/UsingLibical.md
index abd297ca..de3dda59 100644
--- a/doc/UsingLibical.md
+++ b/doc/UsingLibical.md
@@ -1,8 +1,8 @@
# Using Libical {#UsingLibical}
-> Author: Eric Busboom <eric@civicknowledge.com>
->
-> Date: January 2001
+> Author: Eric Busboom <eric@civicknowledge.com>
+>
+> Date: January 2001
## 1 Introduction
@@ -16,7 +16,6 @@ the CalDav scheduling extensions in [RFC6638][];
the iCalendar extensions in [RFC7986][], [RFC9073][], [RFC9074][];
and some of [RFC6047][].
-
This documentation assumes that you are familiar with the iCalendar
standards RFC5545 and RFC5546. These specifications are available
at the [IETF Tools][] website:
@@ -161,7 +160,7 @@ or union.
#### 3.2.2 The parser
-The libical parser offers a variety of ways to convert [RFC5545][] text
+The libical parser offers a variety of ways to convert [RFC5545][] text
into a libical internal component structure. The parser can parse
blocks of text as a string, or it can parse line-by-line.
@@ -174,7 +173,7 @@ errors and component usage errors.
Since many of libical's interfaces return strings, the library has its
own memory management system to eliminate the need to free every string
-returned from the library.
+returned from the library. See [Memory Management](#memory).
#### 3.2.5 Storage classes
@@ -195,7 +194,7 @@ by maintaining a self-similar interface.
Libical defines components for groups of properties that look and act
like components, but are not defined as components in the specification.
`XDAYLIGHT` and `XSTANDARD` are notable examples. These pseudo components
-group properties within the `VTIMEZONE` components. For instanace, the
+group properties within the `VTIMEZONE` components. For instance, the
timezone properties associated with daylight savings time starts with
`BEGIN:DAYLIGHT` and ends with `END:DAYLIGHT`, just like other components,
but is not defined as a component in [RFC5545][] (see [section 3.6.5][RFC5545 3.6.5])
@@ -230,7 +229,7 @@ It is natural to have interfaces that would return the value of a property,
but it is cumbersome for a single routine to return multiple types.
So, in libical, properties that can have multiple types are given
a single type that is the union of their RFC5545 types. For instance,
-in libical, the value of the `TRIGGER` property resolves to struct
+in libical, the value of the `TRIGGER` property resolves to struct
`icaltriggertype`. This type is a union of a `DURATION` and a `DATE-TIME`.
### 4.3 Multi-Valued Properties
@@ -266,10 +265,11 @@ into one.
### 5.1 Creating Components
-There are three ways to create components in Libical:
-1. creating individual objects and assembling them,
-2. building entire objects in massive vaargs calls,
-3. and parsing a text file containing iCalendar data.
+There are three ways to create components in Libical:
+
+1. creating individual objects and assembling them,
+2. building entire objects in massive vargs calls,
+3. parsing a text file containing iCalendar data.
#### 5.1.1 Constructor Interfaces
@@ -305,7 +305,7 @@ Most things you work with are objects, that are instantiated with
a constructor that has "new" in the name. Also note that, other than
the object reference, most structure data is passed in to libical
routines by value. Libical has some complex but very regular memory
-handling rules. These are detailed in section [sec:memory].
+handling rules. These are detailed in section [Memory Management](#memory).
If any of the constructors fail, they will return 0. If you try to
insert 0 into a property or component, or use a zero-valued object
@@ -354,9 +354,9 @@ calendar =
This form is similar to the constructor form, except that the constructors
have `vanew` instead of `new` in the name. The arguments are similar
too, except that the component constructor can have a list of properties,
-and the property constructor can have a list of parameters.
+and the property constructor can have a list of parameters.
-*Be sure to terminate every list with a `NULL` (or a *`(void 0)`*, or your code
+*Be sure to terminate every list with a `NULL` (or a *`(void 0)`*, or your code
will crash, if you are lucky*. The reason you can't use 0 itself is that
depending on what platform you are on, `sizeof(int) ≠ sizeof(void*)`.
@@ -372,7 +372,7 @@ icalcomponent* icalparser_parse_string(char* str);
If the string contains only one component, the parser will return the
component in libical form. If the string contains multiple components,
-the multiple components will be returned as the children of an
+the multiple components will be returned as the children of an
`ICAL_XROOT_COMPONENT` component.
Parsing a whole string may seem wasteful if you want to pull a large
@@ -409,7 +409,7 @@ char* read_stream(char *s, size_t size, void *d)
return fgets(s, size, (FILE*)d);
}
-int main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
char *line;
icalcomponent *component;
@@ -479,7 +479,7 @@ char* read_stream(char *s, size_t size, void *d)
return fgets(s, size, (FILE*)d);
}
-int main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
char* line;
icalcomponent *component;
@@ -527,13 +527,13 @@ icalcomponent* icalcomponent_get_first_component(
This routine will return a reference to the first component of the
type `kind`. The key kind values, listed in icalenums.h are:
-- `ICAL_ANY_COMPONENT`
-- `ICAL_VEVENT_COMPONENT`
-- `ICAL_VTODO_COMPONENT`
-- `ICAL_VJOURNAL_COMPONENT`
-- `ICAL_VCALENDAR_COMPONENT`
-- `ICAL_VFREEBUSY_COMPONENT`
-- `ICAL_VALARM_COMPONENT`
+- `ICAL_ANY_COMPONENT`
+- `ICAL_VEVENT_COMPONENT`
+- `ICAL_VTODO_COMPONENT`
+- `ICAL_VJOURNAL_COMPONENT`
+- `ICAL_VCALENDAR_COMPONENT`
+- `ICAL_VFREEBUSY_COMPONENT`
+- `ICAL_VALARM_COMPONENT`
These are only the most common components; there are many more listed
in icalenums.h.
@@ -618,7 +618,7 @@ Here is an example of a loop using these routines:
```c
for(i = icalcomponent_begin_component(impl->cluster, ICAL_ANY_COMPONENT);
icalcompiter_deref(&i)!= 0;
- icalcompiter_next(&i))
+ icalcompiter_next(&i))
{
icalcomponent *this = icalcompiter_deref(&i);
}
@@ -645,7 +645,7 @@ for(c = icalcomponent_get_first_component(parent_comp, ICAL_ANY_COMPONENT);
}
```
-Another way to remove components is to rely on the side effect of
+Another way to remove components is to rely on the side effect of
`icalcomponent_remove_component()`:
if component iterator in the parent component is pointing to the child
that will be removed, it will move the iterator to the component after
@@ -721,13 +721,13 @@ the properties that contain them. This involves fewer routine calls
and intermediate variables than working with them independently, and
it is type-safe.
-For each property, there are a `_get_()` and a `_set_()` routine that
-accesses the internal value. For instanace, for the `UID` property, the
+For each property, there are a `_get_()` and a `_set_()` routine that
+accesses the internal value. For instanace, for the `UID` property, the
routines are:
```c
void icalproperty_set_uid(
- icalproperty* prop,
+ icalproperty* prop,
const char* v);
const char* icalproperty_get_uid(
@@ -745,7 +745,7 @@ icalvalue* icalproperty_get_value(
icalproperty* prop);
void icalproperty_set_value(
- icalproperty* prop,
+ icalproperty* prop,
icalvalue* value);
```
@@ -759,7 +759,7 @@ struct icaltimetype icalvalue_get_datetime(
icalvalue* value);
void icalvalue_set_datetime(
- icalvalue* value,
+ icalvalue* value,
struct icaltimetype v);
```
@@ -769,7 +769,7 @@ always a string. To get and set the value, use:
```x
void icalproperty_set_x(
- icalproperty* prop,
+ icalproperty* prop,
char* v);
char* icalproperty_get_x(
@@ -784,7 +784,7 @@ char* icalproperty_get_x_name(
icalproperty* prop)
void icalproperty_set_x_name(
- icalproperty* prop,
+ icalproperty* prop,
char* name);
```
@@ -797,7 +797,7 @@ declares what operation a remote receiver should use to process a
component. For instance, if the `METHOD` is `REQUEST` and the component
is a `VEVENT`, the sender is probably asking the receiver to join in
a meeting. In this case, RFC5546 says that the component must specify
-a start time (`DTSTART`) and list the receiver as an attendee
+a start time (`DTSTART`) and list the receiver as an attendee
(`ATTENDEE`).
Libical can check these restrictions with the routine:
@@ -855,11 +855,11 @@ struct icaltimetype {
int minute;
int second;
int is_utc; /* 1-> time is in UTC timezone */
- int is_date; /* 1 -> interpret this as date. */
+ int is_date; /* 1 -> interpret this as date. */
};
```
-The `year`, `month`, `day`, `hour`, `minute` and `second` fields
+The `year`, `month`, `day`, `hour`, `minute` and `second` fields
hold the broken-out
time values. The `is_utc` field distinguishes between times in UTC and
a local time zone. The `is_date` field indicates if the time should
@@ -933,19 +933,19 @@ short icaltime_day_of_year(
struct icaltimetype t);
struct icaltimetype icaltime_from_day_of_year(
- short doy,
+ short doy,
short year);
short icaltime_day_of_week(
struct icaltimetype t);
short icaltime_start_doy_week(
- struct icaltimetype t,
+ struct icaltimetype t,
int fdow);
short icaltime_week_number(
- short day_of_month,
- short month,
+ short day_of_month,
+ short month,
short year);
short icaltime_days_in_month(
@@ -971,7 +971,7 @@ The compare routine works exactly like `strcmp()`, but on time structures.
```c
int icaltime_compare(
- struct icaltimetype a,
+ struct icaltimetype a,
struct icaltimetype b);
```
@@ -992,17 +992,17 @@ time all year.
```c
int icaltime_utc_offset(
- struct icaltimetype tt,
+ struct icaltimetype tt,
char* tzid);
int icaltime_local_utc_offset();
struct icaltimetype icaltime_as_utc(
- struct icaltimetype tt,
+ struct icaltimetype tt,
char* tzid);
struct icaltimetype icaltime_as_zone(
- struct icaltimetype tt,
+ struct icaltimetype tt,
char* tzid);
struct icaltimetype icaltime_as_local(
@@ -1040,38 +1040,38 @@ icalerrorenum icaldirset_commit(
icaldirset* store);
icalerrorenum icaldirset_add_component(
- icaldirset* store,
+ icaldirset* store,
icalcomponent* comp);
icalerrorenum icaldirset_remove_component(
- icaldirset* store,
+ icaldirset* store,
icalcomponent* comp);
int icaldirset_count_components(
- icaldirset* store,
+ icaldirset* store,
icalcomponent_kind kind);
icalerrorenum icaldirset_select(
- icaldirset* store,
+ icaldirset* store,
icalcomponent* gauge);
void icaldirset_clear(
icaldirset* store);
icalcomponent* icaldirset_fetch(
- icaldirset* store,
+ icaldirset* store,
const char* uid);
int icaldirset_has_uid(
- icaldirset* store,
+ icaldirset* store,
const char* uid);
icalcomponent* icaldirset_fetch_match(
- icaldirset* set,
+ icaldirset* set,
icalcomponent *c);
icalerrorenum icaldirset_modify(
- icaldirset* store,
+ icaldirset* store,
icalcomponent *oldc,
icalcomponent *newc);
@@ -1108,8 +1108,8 @@ icalfileset* icalfileset_new(
const char* path);
icalfileset* icalfileset_new_open(
- const char* path,
- int flags,
+ const char* path,
+ int flags,
int mode);
```
@@ -1130,7 +1130,7 @@ To add components to a set, use:
```c
icalerrorenum icalfileset_add_component(
- icalfileset* cluster,
+ icalfileset* cluster,
icalcomponent* child);
```
@@ -1175,7 +1175,7 @@ Then, you can add the gauge to the set with :
```c
icalerrorenum icalfileset_select(
- icalfileset* store,
+ icalfileset* store,
icalgauge* gauge);
```
@@ -1196,8 +1196,7 @@ DTSTART <= '20000106T120000Z'");
fs = icalfileset_new(path);
for (i = 0; i!= 10; i++){
- c = make_component(i); /* Make a new component where DTSTART
-has month of i */
+ c = make_component(i); /* Make a new component where DTSTART has month of i */
icalfileset_add_component(fs,c);
}
@@ -1222,42 +1221,42 @@ has month of i */
There are several other routines in the icalset interface, but they
not fully implemented yet.
-#### 5.5 Memory Management
+#### <a id="memory"></a>5.5 Memory Management
Libical relies heavily on dynamic allocation for both the core objects
and for the strings used to hold values. Some of this memory the library
caller owns and must free, and some of the memory is managed by the
library. Here is a summary of the memory rules.
-1. If the function name has "new" in it (such as `icalcomponent_new()`,
- or `icalproperty_new_from_string()`), the caller gets control
- of the memory. The caller also gets control over an object that is
- cloned via a function that ends with "_clone" (like `icalcomponent_clone()`)
+1. If the function name has "new" in it (such as `icalcomponent_new()`,
+ or `icalproperty_new_from_string()`), the caller gets control
+ of the memory. The caller also gets control over an object that is
+ cloned via a function that ends with "_clone" (like `icalcomponent_clone()`)
-2. If you got the memory from a routine with "clone" or "new" in it, you
- must call the corresponding `*_free()` routine to free the memory,
- for example use `icalcomponent_free()` to free objects created with
- `icalcomponent_new()` or `icalcomponent_clone()`
+2. If you got the memory from a routine with "clone" or "new" in it, you
+ must call the corresponding `*_free()` routine to free the memory,
+ for example use `icalcomponent_free()` to free objects created with
+ `icalcomponent_new()` or `icalcomponent_clone()`
-3. If the function name has "add" in it, the caller is transferring
- control of the memory to the routine, for example the function
- ` icalproperty_add_parameter()`
+3. If the function name has "add" in it, the caller is transferring
+ control of the memory to the routine, for example the function
+ ` icalproperty_add_parameter()`
-4. If the function name has "remove" in it, the caller passes in
- a pointer to an object and after the call returns, the caller owns
- the object. So, before you call `icalcomponent_remove_property(comp, foo)`,
- you do not own "foo" and after the call returns, you do.
+4. If the function name has "remove" in it, the caller passes in
+ a pointer to an object and after the call returns, the caller owns
+ the object. So, before you call `icalcomponent_remove_property(comp, foo)`,
+ you do not own "foo" and after the call returns, you do.
-5. If the routine returns a string and its name does NOT end in `_r`,
- libical owns the memory and will put it on a ring buffer to reclaim
- later. For example, `icalcomponent_as_ical_string()`. You better
- `strdup()` it if you want to keep it, and you don't have to delete it.
+5. If the routine returns a string and its name does NOT end in `_r`,
+ libical owns the memory and will put it on a ring buffer to reclaim
+ later. For example, `icalcomponent_as_ical_string()`. You better
+ `strdup()` it if you want to keep it, and you don't have to delete it.
-6. If the routine returns a string and its name *does* end in `_r`, the
- caller gets control of the memory and is responsible for freeing it.
- For example, `icalcomponent_as_ical_string_r()` does the same thing as
- `icalcomponent_as_ical_string()`, except you now have control of the
- string buffer it returns.
+6. If the routine returns a string and its name *does* end in `_r`, the
+ caller gets control of the memory and is responsible for freeing it.
+ For example, `icalcomponent_as_ical_string_r()` does the same thing as
+ `icalcomponent_as_ical_string()`, except you now have control of the
+ string buffer it returns.
### 5.6 Error Handling
@@ -1276,36 +1275,34 @@ of enum `icalerrorenum`.
Most routines will set the global error value `icalerrno` on errors.
This variable is an enumeration; permissible values can be found in
`libical/icalerror.h`. If the routine returns an enum icalerrorenum,
-then the return value will be the same as icalerrno. You can use
-`icalerror_strerror()` to get a string that describes the error.
+then the return value will be the same as icalerrno. You can use
+`icalerror_strerror()` to get a string that describes the error.
The enumerations are:
-- `ICAL_BADARG_ERROR`: One of the arguments to a routine was bad.
- Typically for a null pointer.
+- `ICAL_BADARG_ERROR`: One of the arguments to a routine was bad.
+ Typically for a null pointer.
-- `ICAL_NEWFAILED_ERROR`: A `new()` or `malloc()` failed.
+- `ICAL_NEWFAILED_ERROR`: A `new()` or `malloc()` failed.
-- `ICAL_MALFORMEDDATA_ERROR`: An input string was not in the correct
- format
+- `ICAL_MALFORMEDDATA_ERROR`: An input string was not in the correct format
-- `ICAL_PARSE_ERROR`: The parser failed to parse an incoming component
+- `ICAL_PARSE_ERROR`: The parser failed to parse an incoming component
-- `ICAL_INTERNAL_ERROR`: Largely equivalent to an assert
+- `ICAL_INTERNAL_ERROR`: Largely equivalent to an assert
-- `ICAL_FILE_ERROR`: A file operation failed. Check errno for more
- detail.
+- `ICAL_FILE_ERROR`: A file operation failed. Check errno for more detail.
-- `ICAL_ALLOCATION_ERROR`: ?
+- `ICAL_ALLOCATION_ERROR`: ?
-- `ICAL_USAGE_ERROR`: ?
+- `ICAL_USAGE_ERROR`: ?
-- `ICAL_NO_ERROR`: No error
+- `ICAL_NO_ERROR`: No error
-- `ICAL_MULTIPLEINCLUSION_ERROR`: ?
+- `ICAL_MULTIPLEINCLUSION_ERROR`: ?
-- `ICAL_TIMEDOUT_ERROR`: For CSTP and acquiring locks
+- `ICAL_TIMEDOUT_ERROR`: For CSTP and acquiring locks
-- `ICAL_UNKNOWN_ERROR`: ?
+- `ICAL_UNKNOWN_ERROR`: ?
#### 5.6.3 `X-LIC-ERROR` and `X-LIC-INVALID-COMPONENT`
@@ -1330,23 +1327,25 @@ RFC5545.
There are a few routines to manipulate error properties:
-| Routine | Purpose |
-|---------|---------|
-| `void icalrestriction_check()` | Check a component against RFC5546 and insert error properties to indicate non compliance |
-| `int icalcomponent_count_errors()` | Return the number of error properties in a component |
-| `void icalcomponent_strip_errors()` | Remove all error properties in a component |
-| `void icalcomponent_convert_errors()` | Convert some error properties into REQUESTS-STATUS proprties to indicate the inability to process the component as an iTIP request. |
-
+| Routine | Purpose |
+|---------------------------------------|------------------------------------------------------|
+| `void icalrestriction_check()` | Check a component against RFC5546 and insert error |
+| | properties to indicate non compliance |
+| `int icalcomponent_count_errors()` | Return the number of error properties in a component |
+| `void icalcomponent_strip_errors()` | Remove all error properties in a component |
+| `void icalcomponent_convert_errors()` | Convert some error properties into REQUESTS-STATUS |
+| | properties to indicate the inability to process the |
+| | component as an iTIP request. |
The types of errors are listed in icalerror.h. They are:
-- `ICAL_XLICERRORTYPE_COMPONENTPARSEERROR`
-- `ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR`
-- `ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR`
-- `ICAL_XLICERRORTYPE_PROPERTYPARSEERROR`
-- `ICAL_XLICERRORTYPE_VALUEPARSEERROR`
-- `ICAL_XLICERRORTYPE_UNKVCALPROP`
-- `ICAL_XLICERRORTYPE_INVALIDITIP`
+- `ICAL_XLICERRORTYPE_COMPONENTPARSEERROR`
+- `ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR`
+- `ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR`
+- `ICAL_XLICERRORTYPE_PROPERTYPARSEERROR`
+- `ICAL_XLICERRORTYPE_VALUEPARSEERROR`
+- `ICAL_XLICERRORTYPE_UNKVCALPROP`
+- `ICAL_XLICERRORTYPE_INVALIDITIP`
The libical parser will generate the error that end in `PARSEERROR` when
it encounters garbage in the input steam. `ICAL_XLICERRORTYPE_INVALIDITIP`
@@ -1394,7 +1393,7 @@ Enums that identify a component, property, value or parameter end with
`_COMPONENT`, `_PROPERTY`, `_VALUE`, or `_PARAMETER`"
Enums that identify a parameter value have the name of the parameter
-as the second word. For instance: `ICAL_ROLE_REQPARTICIPANT` or
+as the second word. For instance: `ICAL_ROLE_REQPARTICIPANT` or
`ICAL_PARTSTAT_ACCEPTED`.
The enums for the parts of a recurrence rule and request statuses
diff --git a/scripts/buildtests.sh b/scripts/buildtests.sh
index fd0504f0..6dc085f2 100755
--- a/scripts/buildtests.sh
+++ b/scripts/buildtests.sh
@@ -328,6 +328,7 @@ CPPCHECK() {
-D size_t="unsigned long" \
-D bswap32="" \
-D PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP=0 \
+ -D MIN="" \
-D _unused="(void)" \
-D _deprecated="(void)" \
-D ICALMEMORY_DEFAULT_FREE="free" \
diff --git a/scripts/readvaluesfile.pl b/scripts/readvaluesfile.pl
index 460cf7e7..255ceb05 100644
--- a/scripts/readvaluesfile.pl
+++ b/scripts/readvaluesfile.pl
@@ -18,10 +18,13 @@ sub read_values_file
my $path = shift;
my %h;
+ my @SEEN_ENUMS;
open(F, $path) || die "Can't open values file $path";
+ my $line = 0;
while (<F>) {
+ $line++;
chop;
@@ -34,8 +37,16 @@ sub read_values_file
@column = split(/,/, $_);
my $value_name = $column[0];
- my $enumConst = $column[1];
-
+ if (exists($h{$value_name})) {
+ die "Previously defined value=$value_name line $line in $path";
+ }
+ my $enumConst = $column[1];
+ if ($enumConst !~ /FIXME/) {
+ if (grep(/^$enumConst$/, @SEEN)) {
+ die "Reusing kindEnum=$enumConst line $line in $path";
+ }
+ push(@SEEN, $enumConst);
+ }
my $c_type_str = $column[2];
my $c_autogen = ($c_type_str =~ /\(a\)/);
@@ -79,11 +90,13 @@ sub read_properties_file
my $path = shift;
my %h;
+ my @SEEN;
open(F, $path) || die "Can't open properties file $path";
+ my $line = 0;
while (<F>) {
-
+ $line++;
chop;
s/#.*$//g;
@@ -95,8 +108,16 @@ sub read_properties_file
@column = split(/,/, $_);
my $property_name = $column[0];
-
- my $enumConst = $column[1];
+ if ($property_name && exists($h{$property_name})) {
+ die "Previously defined property=$property_name line $line in $path";
+ }
+ my $enumConst = $column[1];
+ if ($enumConst !~ /FIXME/) {
+ if (grep(/^$enumConst$/, @SEEN)) {
+ die "Reusing kindEnum=$enumConst line $line in $path";
+ }
+ push(@SEEN, $enumConst);
+ }
my $lic_value = $column[2];
my $default_value = $column[3];
my $flags = $column[4];
@@ -124,10 +145,13 @@ sub read_parameters_file
my $path = shift;
my %h;
+ my @SEEN;
open(F, $path) || die "Can't open parameters file $path";
+ my $line = 0;
while (<F>) {
+ $line++;
chop;
@@ -140,8 +164,16 @@ sub read_parameters_file
@column = split(/\,/, $_);
my $parameter_name = $column[0];
-
- my $enumConst = $column[1];
+ if (exists($h{$parameter_name})) {
+ die "Previously defined parameter=$parameter_name line $line in $path";
+ }
+ my $enumConst = $column[1];
+ if ($enumConst !~ /FIXME/) {
+ if (grep(/^$enumConst$/, @SEEN)) {
+ die "Reusing kindEnum=$enumConst line $line in $path";
+ }
+ push(@SEEN, $enumConst);
+ }
my $data_type = $column[2];
my $enum_string = $column[3];
diff --git a/src/libical-glib/api/i-cal-derived-parameter.xml b/src/libical-glib/api/i-cal-derived-parameter.xml
index 54122a0d..a0799a74 100644
--- a/src/libical-glib/api/i-cal-derived-parameter.xml
+++ b/src/libical-glib/api/i-cal-derived-parameter.xml
@@ -24,13 +24,17 @@
<element name="ICAL_DELEGATEDFROM_PARAMETER"/>
<element name="ICAL_DELEGATEDTO_PARAMETER"/>
<element name="ICAL_DIR_PARAMETER"/>
+ <element name="ICAL_DISPLAY_PARAMETER"/>
+ <element name="ICAL_EMAIL_PARAMETER"/>
<element name="ICAL_ENABLE_PARAMETER"/>
<element name="ICAL_ENCODING_PARAMETER"/>
<element name="ICAL_FBTYPE_PARAMETER"/>
+ <element name="ICAL_FEATURE_PARAMETER"/>
<element name="ICAL_FILENAME_PARAMETER"/>
<element name="ICAL_FMTTYPE_PARAMETER"/>
<element name="ICAL_IANA_PARAMETER"/>
<element name="ICAL_ID_PARAMETER"/>
+ <element name="ICAL_LABEL_PARAMETER"/>
<element name="ICAL_LANGUAGE_PARAMETER"/>
<element name="ICAL_LATENCY_PARAMETER"/>
<element name="ICAL_LOCAL_PARAMETER"/>
@@ -40,6 +44,7 @@
<element name="ICAL_MODIFIED_PARAMETER"/>
<element name="ICAL_OPTIONS_PARAMETER"/>
<element name="ICAL_PARTSTAT_PARAMETER"/>
+ <element name="ICAL_PATCHACTION_PARAMETER"/>
<element name="ICAL_PUBLICCOMMENT_PARAMETER"/>
<element name="ICAL_RANGE_PARAMETER"/>
<element name="ICAL_REASON_PARAMETER"/>
@@ -78,6 +83,14 @@
<element name="ICAL_CUTYPE_UNKNOWN"/>
<element name="ICAL_CUTYPE_NONE"/>
</enum>
+ <enum name="ICalParameterDisplay" native_name="icalparameter_display" default_native="I_CAL_DISPLAY_NONE">
+ <element name="ICAL_DISPLAY_X"/>
+ <element name="ICAL_DISPLAY_BADGE"/>
+ <element name="ICAL_DISPLAY_GRAPHIC"/>
+ <element name="ICAL_DISPLAY_FULLSIZE"/>
+ <element name="ICAL_DISPLAY_THUMBNAIL"/>
+ <element name="ICAL_DISPLAY_NONE"/>
+ </enum>
<enum name="ICalParameterEnable" native_name="icalparameter_enable" default_native="I_CAL_ENABLE_NONE">
<element name="ICAL_ENABLE_X"/>
<element name="ICAL_ENABLE_TRUE"/>
@@ -98,6 +111,17 @@
<element name="ICAL_FBTYPE_BUSYTENTATIVE"/>
<element name="ICAL_FBTYPE_NONE"/>
</enum>
+ <enum name="ICalParameterFeature" native_name="icalparameter_feature" default_native="I_CAL_FEATURE_NONE">
+ <element name="ICAL_FEATURE_X"/>
+ <element name="ICAL_FEATURE_AUDIO"/>
+ <element name="ICAL_FEATURE_CHAT"/>
+ <element name="ICAL_FEATURE_FEED"/>
+ <element name="ICAL_FEATURE_MODERATOR"/>
+ <element name="ICAL_FEATURE_PHONE"/>
+ <element name="ICAL_FEATURE_SCREEN"/>
+ <element name="ICAL_FEATURE_VIDEO"/>
+ <element name="ICAL_FEATURE_NONE"/>
+ </enum>
<enum name="ICalParameterLocal" native_name="icalparameter_local" default_native="I_CAL_LOCAL_NONE">
<element name="ICAL_LOCAL_X"/>
<element name="ICAL_LOCAL_TRUE"/>
@@ -116,6 +140,14 @@
<element name="ICAL_PARTSTAT_FAILED"/>
<element name="ICAL_PARTSTAT_NONE"/>
</enum>
+ <enum name="ICalParameterPatchaction" native_name="icalparameter_patchaction" default_native="I_CAL_PATCHACTION_NONE">
+ <element name="ICAL_PATCHACTION_X"/>
+ <element name="ICAL_PATCHACTION_CREATE"/>
+ <element name="ICAL_PATCHACTION_BYNAME"/>
+ <element name="ICAL_PATCHACTION_BYVALUE"/>
+ <element name="ICAL_PATCHACTION_BYPARAM"/>
+ <element name="ICAL_PATCHACTION_NONE"/>
+ </enum>
<enum name="ICalParameterRange" native_name="icalparameter_range" default_native="I_CAL_RANGE_NONE">
<element name="ICAL_RANGE_X"/>
<element name="ICAL_RANGE_THISANDPRIOR"/>
@@ -345,6 +377,36 @@
<parameter type="const gchar *" name="v" comment="The string used to set into the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_display" corresponds="icalparameter_new_display" kind="constructor" since="3.0.15">
+ <parameter type="ICalParameterDisplay" name="value" comment="The #ICalParameterDisplay value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_display" corresponds="icalparameter_get_display" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="ICalParameterDisplay" comment="The #ICalParameterDisplay value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_display" corresponds="icalparameter_set_display" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="ICalParameterDisplay" name="value" comment="The #ICalParameterDisplay to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_new_email" corresponds="icalparameter_new_email" kind="constructor" since="3.0.15">
+ <parameter type="const gchar *" name="value" comment="The string value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_email" corresponds="icalparameter_get_email" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="const gchar *" annotation="nullable" comment="The string value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_email" corresponds="icalparameter_set_email" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="const gchar *" name="value" comment="The string value to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_enable" corresponds="icalparameter_new_enable" kind="constructor" since="1.0">
<parameter type="ICalParameterEnable" name="v" comment="The type of #ICalParameter to be created"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
@@ -390,6 +452,21 @@
<parameter type="ICalParameterFbtype" name="v" comment="The type of #ICalParameter to be set in the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_feature" corresponds="icalparameter_new_feature" kind="constructor" since="3.0.15">
+ <parameter type="ICalParameterFeature" name="value" comment="The #ICalParameterFeature value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_feature" corresponds="icalparameter_get_feature" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="ICalParameterFeature" comment="The #ICalParameterFeature value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_feature" corresponds="icalparameter_set_feature" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="ICalParameterFeature" name="value" comment="The #ICalParameterFeature to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_filename" corresponds="icalparameter_new_filename" kind="constructor" since="2.0">
<parameter type="const gchar *" name="v" comment="The string used to create the new #ICalParameter"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
@@ -450,6 +527,21 @@
<parameter type="const gchar *" name="v" comment="The string used to set into the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_label" corresponds="icalparameter_new_label" kind="constructor" since="3.0.15">
+ <parameter type="const gchar *" name="value" comment="The string value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_label" corresponds="icalparameter_get_label" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="const gchar *" annotation="nullable" comment="The string value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_label" corresponds="icalparameter_set_label" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="const gchar *" name="value" comment="The string value to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_language" corresponds="icalparameter_new_language" kind="constructor" since="1.0">
<parameter type="const gchar *" name="v" comment="The string used to create the new #ICalParameter"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
@@ -585,6 +677,21 @@
<parameter type="ICalParameterPartstat" name="v" comment="The type of #ICalParameter to be set in the @value"/>
<comment xml:space="preserve"></comment>
</method>
+ <method name="i_cal_parameter_new_patchaction" corresponds="icalparameter_new_patchaction" kind="constructor" since="3.0.15">
+ <parameter type="ICalParameterPatchaction" name="value" comment="The #ICalParameterPatchaction value of the new #ICalParameter"/>
+ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter" />
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_get_patchaction" corresponds="icalparameter_get_patchaction" kind="get" since="3.0.15">
+ <parameter type="const ICalParameter *" name="param" comment="The #ICalParameter to be queried"/>
+ <returns type="ICalParameterPatchaction" comment="The #ICalParameterPatchaction value of the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
+ <method name="i_cal_parameter_set_patchaction" corresponds="icalparameter_set_patchaction" kind="set" since="3.0.15">
+ <parameter type="ICalParameter *" name="param" comment="The #ICalParameter to be set"/>
+ <parameter type="ICalParameterPatchaction" name="value" comment="The #ICalParameterPatchaction to set into the @param"/>
+ <comment xml:space="preserve"></comment>
+ </method>
<method name="i_cal_parameter_new_publiccomment" corresponds="icalparameter_new_publiccomment" kind="constructor" since="2.0">
<parameter type="const gchar *" name="v" comment="The string used to create the new #ICalParameter"/>
<returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." />
diff --git a/src/libical/icaltime.c b/src/libical/icaltime.c
index fd1bf3d8..33209508 100644
--- a/src/libical/icaltime.c
+++ b/src/libical/icaltime.c
@@ -434,7 +434,7 @@ static const int _days_in_month[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31,
int icaltime_days_in_month(const int month, const int year)
{
- int days = _days_in_month[month];
+ int days;
/* The old code aborting if it was passed a parameter like BYMONTH=0
* Unfortunately it's not practical right now to pass an error all
@@ -448,6 +448,8 @@ int icaltime_days_in_month(const int month, const int year)
return 30;
}
+ days = _days_in_month[month];
+
if (month == 2) {
days += icaltime_is_leap_year(year);
}
diff --git a/src/libical/icalvalue.c b/src/libical/icalvalue.c
index 1becb059..e3053177 100644
--- a/src/libical/icalvalue.c
+++ b/src/libical/icalvalue.c
@@ -905,10 +905,13 @@ static char *icalvalue_utcoffset_as_ical_string_r(const icalvalue *value)
m = (data - (h * 3600)) / 60;
s = (data - (h * 3600) - (m * 60));
+ h = MIN(abs(h), 23);
+ m = MIN(abs(m), 59);
+ s = MIN(abs(s), 59);
if (s != 0) {
- snprintf(str, 9, "%c%02d%02d%02d", sign, abs(h), abs(m), abs(s));
+ snprintf(str, 9, "%c%02d%02d%02d", sign, h, m, s);
} else {
- snprintf(str, 9, "%c%02d%02d", sign, abs(h), abs(m));
+ snprintf(str, 9, "%c%02d%02d", sign, h, m);
}
return str;
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
index 8bba8747..77b85a9a 100644
--- a/src/test/CMakeLists.txt
+++ b/src/test/CMakeLists.txt
@@ -20,6 +20,7 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
set(TEST_DATADIR "\"${CMAKE_SOURCE_DIR}/test-data\"")
add_definitions(-DTEST_DATADIR=${TEST_DATADIR} -DTEST_ZONEDIR="${CMAKE_SOURCE_DIR}/zoneinfo")
+# Set properties for the test
macro(setprops _name)
if(UNIX)
set_tests_properties(${_name} PROPERTIES
@@ -72,6 +73,7 @@ macro(buildme _name _srcs)
endif()
endmacro()
+# Build the test and add the test, making sure the test properties are set
macro(testme _name _srcs)
buildme(${_name} "${_srcs}")
add_test(NAME ${_name} COMMAND ${_name})
@@ -112,10 +114,10 @@ set(parser_SRCS icaltestparser.c)
buildme(parser "${parser_SRCS}")
file(GLOB TEST_FILES ${CMAKE_SOURCE_DIR}/test-data/*.ics)
-foreach(TEST_FILE ${TEST_FILES})
- get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE)
- add_test(NAME parser-${TEST_NAME} COMMAND parser ${TEST_FILE})
- setprops(parser-${TEST_NAME})
+foreach(test_file ${TEST_FILES})
+ get_filename_component(test_name ${test_file} NAME_WE)
+ add_test(NAME parser-${test_name} COMMAND parser ${test_file})
+ setprops(parser-${test_name})
endforeach()
########### next target ###############
@@ -181,7 +183,8 @@ if(NOT ${CMAKE_VERSION} VERSION_LESS 3.14)
set(CMAKE_COMPARE_FILES_IGNORE_EOL TRUE)
endif()
if(NOT WIN32 OR CMAKE_COMPARE_FILES_IGNORE_EOL)
- if(NOT CYGWIN AND NOT USE_32BIT_TIME_T) #ignore_eol doesn't work on Cygwin. tests for years greater than 2037 will fail
+ #ignore_eol doesn't work on Cygwin. testing years greater than 2037 will fail
+ if(NOT CYGWIN AND NOT USE_32BIT_TIME_T)
set(icalrecurtest_SRCS icalrecur_test.c)
add_executable(icalrecurtest ${icalrecurtest_SRCS})
target_link_libraries(icalrecurtest ical icalss icalvcal)