[systemd-devel] [PATCH 1/5] calendar: semesterly alias for semi-annually
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Sun Nov 2 09:07:33 PST 2014
On Sun, Nov 02, 2014 at 02:35:53PM +0100, Daniele Medri wrote:
> yes, it's needed because all other terms are <youNameIt>-ly friendly.
> With this one, the patch 2/5 could be useful for "semesterly" alias and
> the man page revision.
Sorry, but I don't understand what you mean. Sorting the code and man page
by unit length is OK, but I don't see how that implies adding another alias
to existing name. "Semi-anually" is nice and clear.
Zbyszek
[adding cc:systemd-devel which I dropped by mistake previously.]
> Take a look at 3/5-patch and 5/5-patch too. Are easy/needed changes.
>
> 2014-11-01 20:27 GMT+01:00 Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>:
>
> > On Thu, Oct 30, 2014 at 12:19:11PM +0100, Daniele Medri wrote:
> > > ---
> > > man/systemd.time.xml | 4 ++--
> > > src/shared/calendarspec.c | 3 ++-
> > > src/test/test-calendarspec.c | 1 +
> > > 3 files changed, 5 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/man/systemd.time.xml b/man/systemd.time.xml
> > > index f35ccd7..2342684 100644
> > > --- a/man/systemd.time.xml
> > > +++ b/man/systemd.time.xml
> > > @@ -247,8 +247,8 @@
> > > <literal>monthly</literal>, <literal>weekly</literal>,
> > > <literal>yearly</literal>,
> > > <literal>quarterly</literal>,
> > > - <literal>semiannually</literal> may be used as
> > > - calendar events which refer to
> > > + <literal>semesterly</literal> or
> > <literal>semiannually</literal>
> > > + may be used as calendar events which refer to
> > Pluralitas non est ponenda sine necessitate. Is there a good reason, like
> > compatiblity with existing usage for this adition?
> >
> > Zbyszek
> >
> > > <literal>*-*-* *:*:00</literal>,
> > > <literal>*-*-* *:00:00</literal>,
> > > <literal>*-*-* 00:00:00</literal>,
> > > diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c
> > > index 7efcf7b..3115bba 100644
> > > --- a/src/shared/calendarspec.c
> > > +++ b/src/shared/calendarspec.c
> > > @@ -757,7 +757,8 @@ int calendar_spec_from_string(const char *p,
> > CalendarSpec **spec) {
> > > } else if (strcaseeq(p, "biannually") ||
> > > strcaseeq(p, "bi-annually") ||
> > > strcaseeq(p, "semiannually") ||
> > > - strcaseeq(p, "semi-annually")) {
> > > + strcaseeq(p, "semi-annually") ||
> > > + strcaseeq(p, "semesterly")) {
> > >
> > > r = const_chain(1, &c->month);
> > > if (r < 0)
> > > diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c
> > > index 87e1da1..7610cff 100644
> > > --- a/src/test/test-calendarspec.c
> > > +++ b/src/test/test-calendarspec.c
> > > @@ -80,6 +80,7 @@ int main(int argc, char* argv[]) {
> > > test_one("minutely", "*-*-* *:*:00");
> > > test_one("quarterly", "*-01,04,07,10-01 00:00:00");
> > > test_one("semi-annually", "*-01,07-01 00:00:00");
> > > + test_one("semesterly", "*-01,07-01 00:00:00");
> > > test_one("annually", "*-01-01 00:00:00");
> > > test_one("*:2/3", "*-*-* *:02/3:00");
> > >
> > > --
> > > 1.9.3
> > >
> > > _______________________________________________
> > > systemd-devel mailing list
> > > systemd-devel at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> >
>
>
>
> --
> Daniele Medri
More information about the systemd-devel
mailing list