2 This file is part of systemd.
4 Copyright 2012 Lennart Poettering
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
31 #include "alloc-util.h"
32 #include "calendarspec.h"
35 #include "parse-util.h"
36 #include "string-util.h"
37 #include "time-util.h"
39 #define BITS_WEEKDAYS 127
43 static void free_chain(CalendarComponent
*c
) {
53 void calendar_spec_free(CalendarSpec
*c
) {
62 free_chain(c
->minute
);
63 free_chain(c
->microsecond
);
69 static int component_compare(const void *_a
, const void *_b
) {
70 CalendarComponent
* const *a
= _a
, * const *b
= _b
;
72 if ((*a
)->start
< (*b
)->start
)
74 if ((*a
)->start
> (*b
)->start
)
77 if ((*a
)->stop
< (*b
)->stop
)
79 if ((*a
)->stop
> (*b
)->stop
)
82 if ((*a
)->repeat
< (*b
)->repeat
)
84 if ((*a
)->repeat
> (*b
)->repeat
)
90 static void normalize_chain(CalendarComponent
**c
) {
92 CalendarComponent
**b
, *i
, **j
, *next
;
96 for (i
= *c
; i
; i
= i
->next
) {
100 * While we're counting the chain, also normalize `stop`
101 * so the length of the range is a multiple of `repeat`
103 if (i
->stop
> i
->start
&& i
->repeat
> 0)
104 i
->stop
-= (i
->stop
- i
->start
) % i
->repeat
;
111 j
= b
= alloca(sizeof(CalendarComponent
*) * n
);
112 for (i
= *c
; i
; i
= i
->next
)
115 qsort(b
, n
, sizeof(CalendarComponent
*), component_compare
);
120 /* Drop non-unique entries */
121 for (k
= n
-1; k
> 0; k
--) {
122 if (component_compare(&b
[k
-1], &next
) == 0) {
134 static void fix_year(CalendarComponent
*c
) {
135 /* Turns 12 → 2012, 89 → 1989 */
138 if (c
->start
>= 0 && c
->start
< 70)
141 if (c
->stop
>= 0 && c
->stop
< 70)
144 if (c
->start
>= 70 && c
->start
< 100)
147 if (c
->stop
>= 70 && c
->stop
< 100)
154 int calendar_spec_normalize(CalendarSpec
*c
) {
157 if (c
->weekdays_bits
<= 0 || c
->weekdays_bits
>= BITS_WEEKDAYS
)
158 c
->weekdays_bits
= -1;
160 if (c
->end_of_month
&& !c
->day
)
161 c
->end_of_month
= false;
165 normalize_chain(&c
->year
);
166 normalize_chain(&c
->month
);
167 normalize_chain(&c
->day
);
168 normalize_chain(&c
->hour
);
169 normalize_chain(&c
->minute
);
170 normalize_chain(&c
->microsecond
);
175 _pure_
static bool chain_valid(CalendarComponent
*c
, int from
, int to
, bool end_of_month
) {
179 /* Forbid dates more than 28 days from the end of the month */
183 if (c
->start
< from
|| c
->start
> to
)
187 * c->repeat must be short enough so at least one repetition may
188 * occur before the end of the interval. For dates scheduled
189 * relative to the end of the month, c->start and c->stop
190 * correspond to the Nth last day of the month.
193 if (c
->stop
< from
|| c
->stop
> to
)
196 if (c
->start
+ c
->repeat
> c
->stop
)
199 if (end_of_month
&& c
->start
- c
->repeat
< from
)
202 if (!end_of_month
&& c
->start
+ c
->repeat
> to
)
207 return chain_valid(c
->next
, from
, to
, end_of_month
);
212 _pure_
bool calendar_spec_valid(CalendarSpec
*c
) {
215 if (c
->weekdays_bits
> BITS_WEEKDAYS
)
218 if (!chain_valid(c
->year
, MIN_YEAR
, MAX_YEAR
, false))
221 if (!chain_valid(c
->month
, 1, 12, false))
224 if (!chain_valid(c
->day
, 1, 31, c
->end_of_month
))
227 if (!chain_valid(c
->hour
, 0, 23, false))
230 if (!chain_valid(c
->minute
, 0, 59, false))
233 if (!chain_valid(c
->microsecond
, 0, 60*USEC_PER_SEC
-1, false))
239 static void format_weekdays(FILE *f
, const CalendarSpec
*c
) {
240 static const char *const days
[] = {
251 bool need_comma
= false;
255 assert(c
->weekdays_bits
> 0 && c
->weekdays_bits
<= BITS_WEEKDAYS
);
257 for (x
= 0, l
= -1; x
< (int) ELEMENTSOF(days
); x
++) {
259 if (c
->weekdays_bits
& (1 << x
)) {
263 fputc_unlocked(',', f
);
267 fputs_unlocked(days
[x
], f
);
274 fputs_unlocked(x
> l
+ 2 ? ".." : ",", f
);
275 fputs_unlocked(days
[x
-1], f
);
282 if (l
>= 0 && x
> l
+ 1) {
283 fputs_unlocked(x
> l
+ 2 ? ".." : ",", f
);
284 fputs_unlocked(days
[x
-1], f
);
288 static void format_chain(FILE *f
, int space
, const CalendarComponent
*c
, bool usec
) {
289 int d
= usec
? (int) USEC_PER_SEC
: 1;
294 fputc_unlocked('*', f
);
298 if (usec
&& c
->start
== 0 && c
->repeat
== USEC_PER_SEC
&& !c
->next
) {
299 fputc_unlocked('*', f
);
303 assert(c
->start
>= 0);
305 fprintf(f
, "%0*i", space
, c
->start
/ d
);
306 if (c
->start
% d
> 0)
307 fprintf(f
, ".%06i", c
->start
% d
);
310 fprintf(f
, "..%0*i", space
, c
->stop
/ d
);
312 fprintf(f
, ".%06i", c
->stop
% d
);
314 if (c
->repeat
> 0 && !(c
->stop
> 0 && c
->repeat
== d
))
315 fprintf(f
, "/%i", c
->repeat
/ d
);
316 if (c
->repeat
% d
> 0)
317 fprintf(f
, ".%06i", c
->repeat
% d
);
320 fputc_unlocked(',', f
);
321 format_chain(f
, space
, c
->next
, usec
);
325 int calendar_spec_to_string(const CalendarSpec
*c
, char **p
) {
334 f
= open_memstream(&buf
, &sz
);
338 if (c
->weekdays_bits
> 0 && c
->weekdays_bits
<= BITS_WEEKDAYS
) {
339 format_weekdays(f
, c
);
340 fputc_unlocked(' ', f
);
343 format_chain(f
, 4, c
->year
, false);
344 fputc_unlocked('-', f
);
345 format_chain(f
, 2, c
->month
, false);
346 fputc_unlocked(c
->end_of_month
? '~' : '-', f
);
347 format_chain(f
, 2, c
->day
, false);
348 fputc_unlocked(' ', f
);
349 format_chain(f
, 2, c
->hour
, false);
350 fputc_unlocked(':', f
);
351 format_chain(f
, 2, c
->minute
, false);
352 fputc_unlocked(':', f
);
353 format_chain(f
, 2, c
->microsecond
, true);
356 fputs_unlocked(" UTC", f
);
357 else if (c
->timezone
!= NULL
) {
358 fputc_unlocked(' ', f
);
359 fputs_unlocked(c
->timezone
, f
);
360 } else if (IN_SET(c
->dst
, 0, 1)) {
362 /* If daylight saving is explicitly on or off, let's show the used timezone. */
366 if (!isempty(tzname
[c
->dst
])) {
367 fputc_unlocked(' ', f
);
368 fputs_unlocked(tzname
[c
->dst
], f
);
372 r
= fflush_and_check(f
);
385 static int parse_weekdays(const char **p
, CalendarSpec
*c
) {
386 static const struct {
416 for (i
= 0; i
< ELEMENTSOF(day_nr
); i
++) {
419 if (!startswith_no_case(*p
, day_nr
[i
].name
))
422 skip
= strlen(day_nr
[i
].name
);
424 if ((*p
)[skip
] != '-' &&
431 c
->weekdays_bits
|= 1 << day_nr
[i
].nr
;
436 if (l
> day_nr
[i
].nr
)
439 for (j
= l
+ 1; j
< day_nr
[i
].nr
; j
++)
440 c
->weekdays_bits
|= 1 << j
;
447 /* Couldn't find this prefix, so let's assume the
448 weekday was not specified and let's continue with
450 if (i
>= ELEMENTSOF(day_nr
))
451 return first
? 0 : -EINVAL
;
453 /* We reached the end of the string */
457 /* We reached the end of the weekday spec part */
459 *p
+= strspn(*p
, " ");
473 /* Support ranges with "-" for backwards compatibility */
474 } else if (**p
== '-') {
481 } else if (**p
== ',') {
486 /* Allow a trailing comma but not an open range */
487 if (**p
== 0 || **p
== ' ') {
488 *p
+= strspn(*p
, " ");
489 return l
< 0 ? 0 : -EINVAL
;
496 static int parse_one_number(const char *p
, const char **e
, unsigned long *ret
) {
501 value
= strtoul(p
, &ee
, 10);
512 static int parse_component_decimal(const char **p
, bool usec
, int *res
) {
514 const char *e
= NULL
;
520 r
= parse_one_number(*p
, &e
, &value
);
525 if (value
* USEC_PER_SEC
/ USEC_PER_SEC
!= value
)
528 value
*= USEC_PER_SEC
;
530 /* One "." is a decimal point, but ".." is a range separator */
531 if (e
[0] == '.' && e
[1] != '.') {
535 r
= parse_fractional_part_u(&e
, 6, &add
);
539 if (add
+ value
< value
)
554 static int const_chain(int value
, CalendarComponent
**c
) {
555 CalendarComponent
*cc
= NULL
;
559 cc
= new0(CalendarComponent
, 1);
573 static int calendarspec_from_time_t(CalendarSpec
*c
, time_t time
) {
575 CalendarComponent
*year
= NULL
, *month
= NULL
, *day
= NULL
, *hour
= NULL
, *minute
= NULL
, *us
= NULL
;
578 assert_se(gmtime_r(&time
, &tm
));
580 r
= const_chain(tm
.tm_year
+ 1900, &year
);
584 r
= const_chain(tm
.tm_mon
+ 1, &month
);
588 r
= const_chain(tm
.tm_mday
, &day
);
592 r
= const_chain(tm
.tm_hour
, &hour
);
596 r
= const_chain(tm
.tm_min
, &minute
);
600 r
= const_chain(tm
.tm_sec
* USEC_PER_SEC
, &us
);
614 static int prepend_component(const char **p
, bool usec
, CalendarComponent
**c
) {
615 int r
, start
, stop
= -1, repeat
= 0;
616 CalendarComponent
*cc
;
624 r
= parse_component_decimal(&e
, usec
, &start
);
628 if (e
[0] == '.' && e
[1] == '.') {
630 r
= parse_component_decimal(&e
, usec
, &stop
);
634 repeat
= usec
? USEC_PER_SEC
: 1;
639 r
= parse_component_decimal(&e
, usec
, &repeat
);
647 if (*e
!= 0 && *e
!= ' ' && *e
!= ',' && *e
!= '-' && *e
!= '~' && *e
!= ':')
650 cc
= new0(CalendarComponent
, 1);
664 return prepend_component(p
, usec
, c
);
670 static int parse_chain(const char **p
, bool usec
, CalendarComponent
**c
) {
672 CalendarComponent
*cc
= NULL
;
682 r
= const_chain(0, c
);
685 (*c
)->repeat
= USEC_PER_SEC
;
693 r
= prepend_component(&t
, usec
, &cc
);
704 static int parse_date(const char **p
, CalendarSpec
*c
) {
707 CalendarComponent
*first
, *second
, *third
;
718 /* @TIMESTAMP — UNIX time in seconds since the epoch */
723 r
= parse_one_number(t
+ 1, &t
, &value
);
728 if ((unsigned long) time
!= value
)
731 r
= calendarspec_from_time_t(c
, time
);
736 return 1; /* finito, don't parse H:M:S after that */
739 r
= parse_chain(&t
, false, &first
);
743 /* Already the end? A ':' as separator? In that case this was a time, not a date */
744 if (*t
== 0 || *t
== ':') {
750 c
->end_of_month
= true;
751 else if (*t
!= '-') {
757 r
= parse_chain(&t
, false, &second
);
763 /* Got two parts, hence it's month and day */
764 if (*t
== ' ' || *t
== 0) {
765 *p
= t
+ strspn(t
, " ");
769 } else if (c
->end_of_month
) {
776 c
->end_of_month
= true;
777 else if (*t
!= '-') {
784 r
= parse_chain(&t
, false, &third
);
791 /* Got three parts, hence it is year, month and day */
792 if (*t
== ' ' || *t
== 0) {
793 *p
= t
+ strspn(t
, " ");
806 static int parse_calendar_time(const char **p
, CalendarSpec
*c
) {
807 CalendarComponent
*h
= NULL
, *m
= NULL
, *s
= NULL
;
817 /* If no time is specified at all, then this means 00:00:00 */
821 r
= parse_chain(&t
, false, &h
);
831 r
= parse_chain(&t
, false, &m
);
835 /* Already at the end? Then it's hours and minutes, and seconds are 0 */
845 r
= parse_chain(&t
, true, &s
);
849 /* At the end? Then it's hours, minutes and seconds */
857 r
= const_chain(0, &h
);
861 r
= const_chain(0, &m
);
866 r
= const_chain(0, &s
);
885 int calendar_spec_from_string(const char *p
, CalendarSpec
**spec
) {
893 c
= new0(CalendarSpec
, 1);
899 utc
= endswith_no_case(p
, " UTC");
902 p
= strndupa(p
, utc
- p
);
904 const char *e
= NULL
;
909 /* Check if the local timezone was specified? */
910 for (j
= 0; j
<= 1; j
++) {
911 if (isempty(tzname
[j
]))
914 e
= endswith_no_case(p
, tzname
[j
]);
925 /* Found one of the two timezones specified? */
926 if (IN_SET(j
, 0, 1)) {
927 p
= strndupa(p
, e
- p
- 1);
930 const char *last_space
;
931 last_space
= strrchr(p
, ' ');
933 if (last_space
!= NULL
) {
934 const char *timezone
= last_space
+ 1;
936 if (timezone_is_valid(timezone
)) {
937 c
->timezone
= strdup(timezone
);
942 p
= strndupa(p
, last_space
- p
);
953 if (strcaseeq(p
, "minutely")) {
954 r
= const_chain(0, &c
->microsecond
);
958 } else if (strcaseeq(p
, "hourly")) {
959 r
= const_chain(0, &c
->minute
);
962 r
= const_chain(0, &c
->microsecond
);
966 } else if (strcaseeq(p
, "daily")) {
967 r
= const_chain(0, &c
->hour
);
970 r
= const_chain(0, &c
->minute
);
973 r
= const_chain(0, &c
->microsecond
);
977 } else if (strcaseeq(p
, "monthly")) {
978 r
= const_chain(1, &c
->day
);
981 r
= const_chain(0, &c
->hour
);
984 r
= const_chain(0, &c
->minute
);
987 r
= const_chain(0, &c
->microsecond
);
991 } else if (strcaseeq(p
, "annually") ||
992 strcaseeq(p
, "yearly") ||
993 strcaseeq(p
, "anually") /* backwards compatibility */ ) {
995 r
= const_chain(1, &c
->month
);
998 r
= const_chain(1, &c
->day
);
1001 r
= const_chain(0, &c
->hour
);
1004 r
= const_chain(0, &c
->minute
);
1007 r
= const_chain(0, &c
->microsecond
);
1011 } else if (strcaseeq(p
, "weekly")) {
1013 c
->weekdays_bits
= 1;
1015 r
= const_chain(0, &c
->hour
);
1018 r
= const_chain(0, &c
->minute
);
1021 r
= const_chain(0, &c
->microsecond
);
1025 } else if (strcaseeq(p
, "quarterly")) {
1027 r
= const_chain(1, &c
->month
);
1030 r
= const_chain(4, &c
->month
);
1033 r
= const_chain(7, &c
->month
);
1036 r
= const_chain(10, &c
->month
);
1039 r
= const_chain(1, &c
->day
);
1042 r
= const_chain(0, &c
->hour
);
1045 r
= const_chain(0, &c
->minute
);
1048 r
= const_chain(0, &c
->microsecond
);
1052 } else if (strcaseeq(p
, "biannually") ||
1053 strcaseeq(p
, "bi-annually") ||
1054 strcaseeq(p
, "semiannually") ||
1055 strcaseeq(p
, "semi-annually")) {
1057 r
= const_chain(1, &c
->month
);
1060 r
= const_chain(7, &c
->month
);
1063 r
= const_chain(1, &c
->day
);
1066 r
= const_chain(0, &c
->hour
);
1069 r
= const_chain(0, &c
->minute
);
1072 r
= const_chain(0, &c
->microsecond
);
1077 r
= parse_weekdays(&p
, c
);
1081 r
= parse_date(&p
, c
);
1086 r
= parse_calendar_time(&p
, c
);
1097 r
= calendar_spec_normalize(c
);
1101 if (!calendar_spec_valid(c
)) {
1110 calendar_spec_free(c
);
1114 static int find_end_of_month(struct tm
*tm
, bool utc
, int day
) {
1118 t
.tm_mday
= 1 - day
;
1120 if (mktime_or_timegm(&t
, utc
) < 0 ||
1121 t
.tm_mon
!= tm
->tm_mon
)
1127 static int find_matching_component(const CalendarSpec
*spec
, const CalendarComponent
*c
,
1128 struct tm
*tm
, int *val
) {
1129 const CalendarComponent
*p
= c
;
1130 int start
, stop
, d
= -1;
1143 if (spec
->end_of_month
&& p
== spec
->day
) {
1144 start
= find_end_of_month(tm
, spec
->utc
, start
);
1145 stop
= find_end_of_month(tm
, spec
->utc
, stop
);
1148 SWAP_TWO(start
, stop
);
1151 if (start
>= *val
) {
1153 if (!d_set
|| start
< d
) {
1158 } else if (c
->repeat
> 0) {
1161 k
= start
+ c
->repeat
* ((*val
- start
+ c
->repeat
- 1) / c
->repeat
);
1163 if ((!d_set
|| k
< d
) && (stop
< 0 || k
<= stop
)) {
1180 static bool tm_out_of_bounds(const struct tm
*tm
, bool utc
) {
1186 if (mktime_or_timegm(&t
, utc
) < 0)
1190 * Set an upper bound on the year so impossible dates like "*-02-31"
1191 * don't cause find_next() to loop forever. tm_year contains years
1192 * since 1900, so adjust it accordingly.
1194 if (tm
->tm_year
+ 1900 > MAX_YEAR
)
1197 /* Did any normalization take place? If so, it was out of bounds before */
1199 t
.tm_year
!= tm
->tm_year
||
1200 t
.tm_mon
!= tm
->tm_mon
||
1201 t
.tm_mday
!= tm
->tm_mday
||
1202 t
.tm_hour
!= tm
->tm_hour
||
1203 t
.tm_min
!= tm
->tm_min
||
1204 t
.tm_sec
!= tm
->tm_sec
;
1207 static bool matches_weekday(int weekdays_bits
, const struct tm
*tm
, bool utc
) {
1211 if (weekdays_bits
< 0 || weekdays_bits
>= BITS_WEEKDAYS
)
1215 if (mktime_or_timegm(&t
, utc
) < 0)
1218 k
= t
.tm_wday
== 0 ? 6 : t
.tm_wday
- 1;
1219 return (weekdays_bits
& (1 << k
));
1222 static int find_next(const CalendarSpec
*spec
, struct tm
*tm
, usec_t
*usec
) {
1234 /* Normalize the current date */
1235 (void) mktime_or_timegm(&c
, spec
->utc
);
1236 c
.tm_isdst
= spec
->dst
;
1239 r
= find_matching_component(spec
, spec
->year
, &c
, &c
.tm_year
);
1245 c
.tm_hour
= c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1249 if (tm_out_of_bounds(&c
, spec
->utc
))
1253 r
= find_matching_component(spec
, spec
->month
, &c
, &c
.tm_mon
);
1258 c
.tm_hour
= c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1260 if (r
< 0 || tm_out_of_bounds(&c
, spec
->utc
)) {
1264 c
.tm_hour
= c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1268 r
= find_matching_component(spec
, spec
->day
, &c
, &c
.tm_mday
);
1270 c
.tm_hour
= c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1271 if (r
< 0 || tm_out_of_bounds(&c
, spec
->utc
)) {
1274 c
.tm_hour
= c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1278 if (!matches_weekday(spec
->weekdays_bits
, &c
, spec
->utc
)) {
1280 c
.tm_hour
= c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1284 r
= find_matching_component(spec
, spec
->hour
, &c
, &c
.tm_hour
);
1286 c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1287 if (r
< 0 || tm_out_of_bounds(&c
, spec
->utc
)) {
1289 c
.tm_hour
= c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1293 r
= find_matching_component(spec
, spec
->minute
, &c
, &c
.tm_min
);
1295 c
.tm_sec
= tm_usec
= 0;
1296 if (r
< 0 || tm_out_of_bounds(&c
, spec
->utc
)) {
1298 c
.tm_min
= c
.tm_sec
= tm_usec
= 0;
1302 c
.tm_sec
= c
.tm_sec
* USEC_PER_SEC
+ tm_usec
;
1303 r
= find_matching_component(spec
, spec
->microsecond
, &c
, &c
.tm_sec
);
1304 tm_usec
= c
.tm_sec
% USEC_PER_SEC
;
1305 c
.tm_sec
/= USEC_PER_SEC
;
1307 if (r
< 0 || tm_out_of_bounds(&c
, spec
->utc
)) {
1309 c
.tm_sec
= tm_usec
= 0;
1319 static int calendar_spec_next_usec_impl(const CalendarSpec
*spec
, usec_t usec
, usec_t
*next
) {
1328 if (usec
> USEC_TIMESTAMP_FORMATTABLE_MAX
)
1332 t
= (time_t) (usec
/ USEC_PER_SEC
);
1333 assert_se(localtime_or_gmtime_r(&t
, &tm
, spec
->utc
));
1334 tm_usec
= usec
% USEC_PER_SEC
;
1336 r
= find_next(spec
, &tm
, &tm_usec
);
1340 t
= mktime_or_timegm(&tm
, spec
->utc
);
1344 *next
= (usec_t
) t
* USEC_PER_SEC
+ tm_usec
;
1348 typedef struct SpecNextResult
{
1353 int calendar_spec_next_usec(const CalendarSpec
*spec
, usec_t usec
, usec_t
*next
) {
1355 SpecNextResult
*shared
;
1359 if (isempty(spec
->timezone
))
1360 return calendar_spec_next_usec_impl(spec
, usec
, next
);
1362 shared
= mmap(NULL
, sizeof *shared
, PROT_READ
|PROT_WRITE
, MAP_SHARED
|MAP_ANONYMOUS
, -1, 0);
1363 if (shared
== MAP_FAILED
)
1364 return negative_errno();
1369 int fork_errno
= errno
;
1370 (void) munmap(shared
, sizeof *shared
);
1375 if (setenv("TZ", spec
->timezone
, 1) != 0) {
1376 shared
->return_value
= negative_errno();
1377 _exit(EXIT_FAILURE
);
1382 shared
->return_value
= calendar_spec_next_usec_impl(spec
, usec
, &shared
->next
);
1384 _exit(EXIT_SUCCESS
);
1387 r
= wait_for_terminate(pid
, NULL
);
1389 (void) munmap(shared
, sizeof *shared
);
1394 if (munmap(shared
, sizeof *shared
) != 0)
1395 return negative_errno();
1397 if (tmp
.return_value
== 0)
1400 return tmp
.return_value
;