meillo@0: /* meillo@15: bday -- Birthday/Anniversary reminder meillo@0: meillo@15: (c) 2007,2014 markus schnalke meillo@15: (c) 1994-1999 AS Mortimer meillo@0: meillo@15: This program is free software; you can redistribute it and/or meillo@15: modify it under the terms of the GNU General Public License as meillo@15: published by the Free Software Foundation; either version 2 of the meillo@15: License, or (at your option) any later version. You may also meillo@15: distribute it under the Artistic License, as comes with Perl. meillo@0: meillo@15: This program is distributed in the hope that it will be useful, meillo@15: but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@15: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. meillo@0: meillo@15: You should have received a copy of the GNU General Public License meillo@15: along with this program; if not, write to the Free Software meillo@15: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA meillo@0: meillo@15: You should also have recieved a copy of the Artistic license with meillo@15: this program. meillo@0: meillo@15: ===================================================================== meillo@9: meillo@15: Input is read through standard input. For example: bday < ~/.birthdays meillo@15: The input (file) has to have the following format: meillo@0: meillo@15: text=date flags meillo@7: meillo@15: where: meillo@15: date is yyyy-mm-dd meillo@15: flags is ONE or ZERO of meillo@15: bd for a birthday (default) meillo@15: ann for an anniversary meillo@15: ev for an event meillo@15: and zero or more of meillo@15: w to set the warn-in-advance time to n days meillo@15: (don't include the brackets! :) meillo@15: to meillo@15: for meillo@15: to specify the length of time taken by an meillo@15: event, for example a holiday. meillo@7: meillo@15: Lines preceeded by # are treated as comments. meillo@7: meillo@15: Note: If you deviate from this format, I cannot guarantee anything about meillo@15: it's behaviour. In most cases, it will just quietly ignore the meillo@15: error, which probably isn't ideal behaviour. Oh, well. meillo@7: meillo@15: ===================================================================== meillo@8: */ meillo@7: meillo@8: meillo@8: /* standard time to warn in advance, when no explicit w flag is given. */ meillo@8: #define DEF_WARN 14 meillo@0: meillo@7: meillo@7: #include meillo@0: #include meillo@0: #include meillo@7: #include meillo@7: #include meillo@7: #include meillo@7: #include meillo@0: meillo@7: meillo@7: meillo@7: /* ========== Global constants and data types */ meillo@7: meillo@7: meillo@7: /* month lengths etc */ meillo@7: #define isleapyear(y) ((y)%4==0 && ((y)%100 != 0 || (y)%400 == 0)) meillo@7: const unsigned MLENDAT[]; meillo@7: #define mlen(m,y) (MLENDAT[(m)-1] != -1 ? MLENDAT[(m)-1] : (isleapyear((y)) ? 29 : 28)) meillo@7: #define before(a,b) ((a).month < (b).month || ((a).month == (b).month && (a).day < (b).day)) meillo@7: #define ydelta(a,b) ((int) (b).year - (a).year + before((a),(b))) meillo@7: meillo@7: /* -------- modifier flags */ meillo@7: #define F_MTYPE 0x07 meillo@7: #define F_TBIRTHDAY 1 meillo@7: #define F_TANNIVERSARY 2 meillo@7: #define F_TEVENT 3 meillo@7: meillo@7: /* flags processed immediately on encountering */ meillo@7: #define F_MIMMEDIATE 0x24 meillo@7: #define F_WTIME_P 0x08 meillo@7: #define F_FORDAYS 0x16 meillo@7: #define F_TODATE 0x24 meillo@7: meillo@8: struct _ftable {char* txt; unsigned flag;}; meillo@7: meillo@7: const struct _ftable FTABLE[]; meillo@7: meillo@7: struct date { meillo@15: unsigned day; meillo@15: unsigned month; meillo@15: unsigned year; meillo@7: }; meillo@7: meillo@7: struct event { meillo@15: char* text; meillo@15: struct date date; meillo@15: struct date enddate; meillo@15: int warn; meillo@7: }; meillo@7: meillo@7: typedef int (*prnfunc)(const char *); meillo@7: meillo@7: /* ========== Global Variables */ meillo@7: meillo@15: struct event *readlist(void); meillo@7: void gettoday(void); meillo@15: unsigned delta(struct date *); meillo@15: unsigned ddiff(struct date *D1, struct date *D2); meillo@15: void liststrings(struct event *evl, prnfunc outf); meillo@15: char *tdelta(struct date *d); meillo@15: char *ttime(int yr, int mn, int wk, int dy); meillo@15: int skptok(int j, char *ptr); meillo@15: int evcmp(const void *e1, const void *e2); meillo@7: meillo@7: meillo@7: struct date today; meillo@15: int iDWarn = DEF_WARN; meillo@7: meillo@15: const unsigned MLENDAT[] = {31,-1,31,30,31,30,31,31,30,31,30,31}; meillo@7: meillo@7: const struct _ftable FTABLE[] = { meillo@7: {"bd", F_TBIRTHDAY}, meillo@7: {"ann",F_TANNIVERSARY}, meillo@7: {"ev", F_TEVENT}, meillo@7: {"w", F_WTIME_P}, meillo@7: {"to", F_TODATE}, meillo@7: {"for", F_FORDAYS}, meillo@7: {NULL, 0} meillo@7: }; meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: /* meillo@15: xmalloc/xrealloc functions meillo@15: Note: the x* functions are lifted straight from the GNU libc info docs meillo@15: $Id: xmalloc.c,v 1.2 1999/01/16 17:08:59 andy Exp $ meillo@7: */ meillo@7: meillo@15: void * meillo@15: xmalloc(size_t size) meillo@15: { meillo@15: register void *value = malloc (size); meillo@7: if (value == 0) { meillo@7: fprintf(stderr, "virtual memory exhausted\n"); meillo@7: exit(1); meillo@7: } meillo@7: return value; meillo@7: } meillo@7: meillo@15: void * meillo@15: xrealloc(void *ptr, size_t size) meillo@15: { meillo@15: register void *value = realloc (ptr, size); meillo@7: if (value == 0) { meillo@7: fprintf(stderr, "virtual memory exhausted\n"); meillo@7: exit(1); meillo@7: } meillo@7: return value; meillo@7: } meillo@7: meillo@8: meillo@7: /* ========== */ meillo@7: meillo@7: meillo@15: /* meillo@15: like strcat(), but lets the buffer automagically grow :-) meillo@15: (needs local variable "size" with the buffer size) meillo@15: */ meillo@7: #define append(where, what) do { \ meillo@7: if (strlen(what) > (size - strlen(where))) { \ meillo@7: xrealloc(where, size + 128 + strlen(what)); \ meillo@7: size += 128 + strlen(what); \ meillo@7: } \ meillo@7: strcat(where, what); \ meillo@7: } while(0) meillo@7: meillo@7: /* ========== */ meillo@7: meillo@15: /* meillo@15: returns delta(d) in days, weeks, months, etc meillo@15: the returned buffer is malloc()ed, do not forget to free() it meillo@15: */ meillo@15: char * meillo@15: tdelta(struct date *d) meillo@15: { meillo@7: int dy, wk, mn, yr; meillo@15: char *tmp; meillo@15: char *buf = xmalloc(128); meillo@7: int size = 128; meillo@15: meillo@7: *buf = 0; meillo@15: switch (delta(d)) { meillo@15: case 0: meillo@15: append(buf, "today"); meillo@15: return buf; meillo@15: case 1: meillo@15: append(buf, "tomorrow"); meillo@15: return buf; meillo@15: default: meillo@15: /* like delta(), we ignore the year */ meillo@15: yr = -before(*d, today); meillo@15: mn = d->month - today.month; meillo@15: dy = d->day - today.day; meillo@7: meillo@15: if (dy < 0) { meillo@15: dy += mlen(today.month, today.year); meillo@15: mn--; meillo@15: } meillo@15: if (mn < 0) { meillo@15: mn += 12; meillo@15: yr++; meillo@15: } meillo@7: meillo@15: wk = (dy / 7); meillo@15: dy %= 7; meillo@7: meillo@15: append(buf, "in "); meillo@15: tmp = ttime(yr, mn, wk, dy); meillo@15: append(buf, tmp); meillo@15: free(tmp); meillo@7: meillo@15: return buf; meillo@7: } meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: /* meillo@15: void meillo@15: donum(n,txt) meillo@15: { meillo@15: if (n > 0) { meillo@15: snprintf(tmp, sizeof(tmp), "%d", n); meillo@15: append(buf, tmp); meillo@15: append(buf, " " txt); meillo@15: if (n != 1) meillo@15: append(buf, "s"); meillo@15: terms--; meillo@15: if (orgterms > 1) { meillo@15: if (terms == 1) meillo@15: append(buf, " and "); meillo@15: else if (terms > 1) meillo@15: append(buf, ", "); meillo@7: } meillo@15: } meillo@7: } meillo@7: */ meillo@7: meillo@7: meillo@7: #define donum(n,txt) do { \ meillo@7: if (n > 0) { \ meillo@7: snprintf(tmp, sizeof(tmp), "%d", n); \ meillo@7: append(buf, tmp); \ meillo@7: append(buf, " " txt); \ meillo@7: if (n != 1) \ meillo@7: append(buf, "s"); \ meillo@7: terms--; \ meillo@7: if (orgterms > 1) { \ meillo@7: if (terms == 1) \ meillo@7: append(buf, " and "); \ meillo@7: else if (terms > 1) \ meillo@7: append(buf, ", "); \ meillo@7: } \ meillo@7: } \ meillo@7: } while(0) meillo@7: meillo@7: meillo@7: /* returns allocated buffer, don't forget to free() */ meillo@15: char * meillo@15: ttime(int yr, int mn, int wk, int dy) meillo@15: { meillo@15: char *buf = xmalloc(128); meillo@7: int size = 128; meillo@7: int terms, orgterms; meillo@7: char tmp[128]; meillo@7: meillo@7: *buf = 0; /* Initialize buffer */ meillo@7: terms = orgterms = (yr!=0) + (mn!=0) + (wk!=0) + (dy!=0); meillo@7: meillo@7: donum(yr, "year"); meillo@7: donum(mn, "month"); meillo@7: donum(wk, "week"); meillo@7: donum(dy, "day"); meillo@7: meillo@7: return buf; meillo@7: } meillo@7: #undef donum meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@15: /* meillo@15: lists the birthdays in their string format, one by one, and passes meillo@15: the string to a function. meillo@15: */ meillo@15: void meillo@15: liststrings(struct event *evl, prnfunc outf) meillo@15: { meillo@7: int i,j; meillo@7: char *buf, *tmp; meillo@7: int size; meillo@7: meillo@7: for (i = 0; evl[i].text != NULL; i++) { meillo@7: buf = xmalloc(128); meillo@7: *buf = '\0'; meillo@7: size = 128; meillo@7: meillo@7: if (evl[i].warn == -1 && delta(&(evl[i].date))==0) { meillo@7: append(buf, evl[i].text); meillo@7: } else if (evl[i].enddate.day == 0) { meillo@7: if (delta(&(evl[i].date)) <= evl[i].warn) { meillo@7: append(buf, evl[i].text); meillo@7: append(buf, " "); meillo@7: tmp = tdelta(&(evl[i].date)); meillo@7: append(buf, tmp); meillo@7: free(tmp); meillo@7: } meillo@7: } else { meillo@7: if (delta(&(evl[i].date)) <= evl[i].warn) { meillo@7: append(buf, evl[i].text); meillo@7: append(buf, " for "); meillo@14: /* +1 because, if the difference between two dates is one day, meillo@14: then the length of an event on those days is two days */ meillo@7: j = ddiff(&(evl[i].date),&(evl[i].enddate)) + 1; meillo@7: tmp = ttime(0, 0, j/7, j%7); meillo@7: append(buf, tmp); meillo@7: free(tmp); meillo@7: append(buf, " "); meillo@7: tmp = tdelta(&(evl[i].date)); meillo@7: append(buf, tmp); meillo@7: } else if (delta(&(evl[i].enddate)) <= evl[i].warn) { meillo@7: append(buf, evl[i].text); meillo@7: append(buf, " "); meillo@7: j = delta(&(evl[i].enddate)); meillo@7: if (j) { meillo@7: append(buf, "for "); meillo@7: tmp = ttime(0, 0, j/7, j%7); meillo@7: append(buf, tmp); meillo@7: free(tmp); meillo@7: append(buf, " longer"); meillo@7: } else { meillo@7: append(buf, "finishes today"); meillo@7: } meillo@7: } meillo@7: } meillo@7: if (*buf) { meillo@7: append(buf, "."); meillo@7: outf(buf); meillo@7: } meillo@7: free(buf); meillo@7: } meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@15: /* meillo@15: sort the events by the time before the next time they come up, meillo@15: putting those where the start has passed but we are still in the meillo@15: time-period first meillo@15: */ meillo@15: int meillo@15: evcmp(const void *p1, const void *p2) meillo@15: { meillo@15: struct event *e1=(struct event *) p1; meillo@15: struct event *e2=(struct event *) p2; meillo@8: unsigned d1, d2; meillo@7: meillo@15: /* meillo@15: if the delta for the enddate is less than that for the start meillo@15: date, then we have passed the start date but not yet the end meillo@15: date, and so we should display the enddate; otherwise, we meillo@15: should display the start date meillo@15: */ meillo@7: meillo@7: d1=delta(&(e1->date)); meillo@7: if (e1->enddate.day && delta(&(e1->enddate)) < d1) meillo@7: d1=delta(&(e1->enddate)); meillo@7: meillo@7: d2=delta(&(e2->date)); meillo@7: if (e2->enddate.day && delta(&(e2->enddate)) < d2) meillo@7: d2=delta(&(e2->enddate)); meillo@7: meillo@7: if (d1 < d2) return -1; meillo@8: if (d1 > d2) return 1; meillo@7: meillo@7: return strcmp(e1->text, e2->text); meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@15: /* meillo@15: difference in days between two dates meillo@15: it is assumed that D1 < D2, and so the result is always positive meillo@15: */ meillo@15: unsigned meillo@15: ddiff(struct date *D1, struct date *D2) meillo@15: { meillo@8: struct date d1, d2; meillo@8: int dd, m; meillo@7: meillo@7: /* make working copies */ meillo@8: d1 = *D1; meillo@8: d2 = *D2; meillo@7: meillo@7: /* sort out zero years */ meillo@7: if (d1.year == 0 || d2.year==0) { meillo@7: if (d1.year != d2.year) { meillo@7: if (d1.year == 0) { meillo@8: if (before(d1,d2)) meillo@8: d1.year = d2.year; meillo@8: else meillo@8: d1.year = d2.year - 1; meillo@8: } else { meillo@8: if (before(d1, d2)) meillo@8: d2.year = d1.year; meillo@8: else meillo@8: d2.year = d1.year + 1; meillo@7: } meillo@7: } else { /* both years zero */ meillo@8: if (before(d1, d2)) meillo@8: d1.year = d2.year = today.year; meillo@7: else { meillo@8: d1.year = today.year; meillo@8: d2.year = d1.year + 1; meillo@7: } meillo@7: } meillo@7: } meillo@7: meillo@7: /* now we can actually do the comparison ... */ meillo@8: dd = 0; meillo@7: meillo@7: /* to start with, we work in months */ meillo@7: for (m=d1.month; m < d2.month + (d2.year-d1.year)*12; m++) meillo@7: dd += mlen(((m-1)%12)+1, d1.year + m/12); meillo@7: meillo@15: /* meillo@15: and then we renormalise for the days within the months meillo@15: the first month was included in our calculations meillo@15: */ meillo@7: dd -= d1.day; meillo@7: /* but the last one wasn't */ meillo@7: dd += d2.day; meillo@7: meillo@7: return dd; meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@15: /* meillo@15: actually until the next anniversary of ... meillo@15: */ meillo@15: unsigned meillo@15: delta(struct date *date) meillo@15: { meillo@7: struct date d; meillo@7: unsigned dt, mn; meillo@7: meillo@7: memcpy(&d, date, sizeof(struct date)); meillo@7: meillo@7: /* past the end of the year */ meillo@7: if (before(d, today)) { meillo@7: d.year = 1; meillo@7: } else { meillo@7: d.year = 0; meillo@7: } meillo@7: meillo@8: for (mn = today.month, dt=0; mn < d.month + 12*d.year; mn++) { meillo@7: dt += mlen(((mn-1)%12) + 1,today.year + mn/12); meillo@8: } meillo@7: meillo@7: dt -= today.day; meillo@7: dt += d.day; meillo@7: meillo@7: return dt; meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@15: void meillo@15: gettoday(void) meillo@15: { meillo@7: struct tm *tm; meillo@7: time_t t; meillo@7: meillo@7: time(&t); meillo@7: tm = localtime(&t); meillo@7: today.day = tm->tm_mday; meillo@7: today.month = tm->tm_mon + 1; /* 1-12 instead of 0-11 */ meillo@7: today.year = tm->tm_year + 1900; meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@15: struct event * meillo@15: readlist() meillo@15: { meillo@7: int i, j, k, l, d; meillo@7: struct event *evl; meillo@7: char buf[1024], buf2[1024]; meillo@7: char *ptr; meillo@7: unsigned flags; meillo@7: meillo@7: /* initialise */ meillo@7: gettoday(); meillo@7: meillo@7: for (i = 0, evl = NULL; fgets(buf, sizeof(buf), stdin) != NULL; i++) { meillo@7: evl = (struct event *) xrealloc(evl, sizeof(struct event) * (i + 1)); meillo@7: meillo@7: /* ignore comments and empty lines */ meillo@7: if (*buf == '#' || *buf == '\n') { meillo@7: i--; meillo@7: continue; meillo@7: } meillo@7: meillo@7: /* parse string in buf */ meillo@7: ptr = strrchr(buf, '='); /* allow '=' in text */ meillo@7: meillo@7: /* not a valid line, so ignore it! Cool, huh? */ meillo@7: /* Attention: only recognizes lines without '=' */ meillo@7: if (ptr == NULL) { meillo@7: fprintf(stderr, "WARNING: Invalid line in input:\n%s", buf); meillo@7: i--; meillo@7: continue; meillo@7: } meillo@7: meillo@7: *(ptr++) = 0; meillo@7: meillo@15: j = sscanf(ptr, "%u-%u-%u", &(evl[i].date.year), meillo@15: &(evl[i].date.month), &(evl[i].date.day)); meillo@7: /* ... unless it wasn't read, in which case set it to zero */ meillo@7: if (j==2) { meillo@7: evl[i].date.year = 0; meillo@7: } meillo@7: meillo@7: meillo@7: /* parse flags */ meillo@7: meillo@7: evl[i].warn = iDWarn; meillo@7: evl[i].enddate.day = 0; meillo@7: evl[i].enddate.month = 0; meillo@7: evl[i].enddate.year = 0; meillo@7: meillo@7: flags = 0; meillo@7: j = 0; meillo@7: meillo@7: while(j = skptok(j, ptr), ptr[j] != 0) { meillo@7: for (k = 0; FTABLE[k].txt != NULL && strncmp(FTABLE[k].txt, ptr + j, strlen(FTABLE[k].txt)); k++) { meillo@7: } meillo@7: meillo@7: switch (FTABLE[k].flag) { meillo@15: case F_WTIME_P: /* w -- sets warning time */ meillo@15: sscanf(ptr + j, "w %u", &(evl[i].warn)); meillo@15: break; meillo@15: case F_FORDAYS: /* for -- sets the duration of the event */ meillo@15: sscanf(ptr + j, "for %u", &d); meillo@15: evl[i].enddate=evl[i].date; meillo@15: for (l = 1; l < d; l++) { meillo@15: evl[i].enddate.day++; meillo@15: if (evl[i].enddate.day > mlen(evl[i].enddate.month, evl[i].enddate.year)) { meillo@15: evl[i].enddate.month++; meillo@15: evl[i].enddate.day = 1; meillo@7: } meillo@15: if (evl[i].enddate.month > 12) { meillo@15: evl[i].enddate.year++; meillo@15: evl[i].enddate.month = 1; meillo@7: } meillo@15: } meillo@15: break; meillo@15: case F_TODATE: /* to -- sets the end date of the event */ meillo@15: l = sscanf(ptr + j, "to %u-%u-%u", &(evl[i].enddate.year), &(evl[i].enddate.month), &(evl[i].enddate.day)); meillo@15: if (l == 2) { meillo@15: evl[i].enddate.year = 0; meillo@15: } meillo@15: break; meillo@15: case 0: meillo@15: break; meillo@15: default: meillo@15: flags |= FTABLE[k].flag; meillo@15: break; meillo@7: } meillo@7: } meillo@7: meillo@7: meillo@7: /* construct event text */ meillo@7: meillo@7: switch(flags & F_MTYPE) { meillo@7: case F_TBIRTHDAY: meillo@7: default: /* assume it's a birthday */ meillo@7: if (evl[i].date.year != 0) { meillo@7: int tmp_age = ydelta(evl[i].date, today); meillo@7: if (tmp_age != 1) { meillo@7: sprintf(buf2, "%s is %d years old", buf, tmp_age); meillo@7: } else { meillo@7: sprintf(buf2, "%s is %d year old", buf, tmp_age); meillo@7: } meillo@7: } else { meillo@7: sprintf(buf2, "%s has a birthday", buf); meillo@7: } meillo@7: break; meillo@7: case F_TANNIVERSARY: meillo@7: if (evl[i].date.year != 0) { meillo@7: sprintf(buf2, "%s %d years ago", buf, ydelta(evl[i].date, today)); meillo@7: } else { meillo@7: strcpy(buf2, buf); meillo@7: } meillo@7: break; meillo@7: case F_TEVENT: meillo@7: /* if a year was specified, and this warning isn't for it, ignore! */ meillo@14: if ((evl[i].date.year != 0 && ydelta(evl[i].date, today) != 0) meillo@14: && (evl[i].enddate.year == 0 || ydelta(evl[i].enddate, today) != 0)) { meillo@7: i--; meillo@7: continue; meillo@7: } meillo@7: strcpy(buf2, buf); meillo@7: break; meillo@7: } meillo@7: evl[i].text = strdup(buf2); meillo@7: } meillo@7: meillo@7: evl = (struct event *) xrealloc(evl, sizeof(struct event) * (i + 1)); meillo@7: evl[i].date.day = 0; meillo@7: evl[i].date.month = 0; meillo@7: evl[i].date.year = 0; meillo@7: evl[i].text = (char *) NULL; meillo@7: meillo@7: fclose(stdin); meillo@7: meillo@7: /* NB uses i from above */ meillo@7: qsort(evl, i, sizeof(struct event), evcmp); meillo@7: return evl; meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@7: meillo@15: int meillo@15: skptok(int j, char *ptr) meillo@15: { meillo@7: for (; ptr[j] != 0 && ptr[j] != ' ' && ptr[j] != '\t' ; j++); meillo@7: for (; ptr[j] != 0 && (ptr[j] == ' ' || ptr[j] == '\t'); j++); meillo@7: meillo@7: return j; meillo@7: } meillo@7: meillo@7: meillo@7: meillo@7: meillo@0: meillo@0: meillo@15: int meillo@15: main(int argc, char *argv[]) meillo@15: { meillo@15: while (--argc > 0 && (*++argv)[0] == '-') { meillo@5: if (strcmp(argv[0], "-W") == 0) { meillo@6: /* TODO: catch if no value given */ meillo@0: iDWarn = atoi((++argv)[0]); meillo@0: argc--; meillo@0: } else { meillo@3: fprintf(stderr, "unknown option %s\n", argv[0]); meillo@0: exit(1); meillo@0: } meillo@0: } meillo@0: meillo@6: liststrings(readlist(), puts); meillo@0: meillo@15: return 0; meillo@0: }