I am compiling the BSD 'calendar' in linux (OpenSUSE 11.1).
BTW, any idea why 'calendar' is not included in the base system ? Is
there an alternative ? I installed gcal (GNU cal), but despite it saying
in the man page "Gcal is a program similar the standard calendar programs
BSD-`cal' and `calendar'." it seems to me that it is only a replacement
for cal, not for calendar.
If you are not familiar with calendar, you can read its manpage here:
http://www.freebsd.org/cgi/man.cgi?query=calendar&apropos=0&sektion=0&manpath=FreeBSD+7.2-RELEASE&format=html
The only problem that I could not solve yet is this error:
io.c: In function 'cal':
io.c:137: error: 'D_MD_ORDER' undeclared (first use in this function)
Line 137 is this one:
d_first = (*nl_langinfo(D_MD_ORDER) == 'd');
I searched in the internet and I found out that D_MD_ORDER means
"month or day order", which I understand to mean: should the day
or the month appear first ? That is, in English that call would
return 'm' while, for instance, in Portuguese it would return 'd'.
I think D_MD_ORDER should be defined in /usr/include/langinfo.h
but it is not there in linux (I currently don't have a BSD system
to check if that is the right place).
Can somebody confirm that D_MD_ORDER is in fact not implemented
(yet ?) in linux ? Or is it defined somewhere else ? (Where ?)
I am thinking of 'solving' the compilation problem with an
#ifdef D_MD_ORDER
d_first = (*nl_langinfo(D_MD_ORDER) == 'd');
#else
d_first = 0;
#endif
What do you think ? Any suggestions ?
BTW, when I finish compiling it for linux is there somewhere I can
send it, so that it might get included in the usual distributions ?
.pt is Portugal| `Whom the gods love die young'-Menander (342-292 BC)
Europe | Villeneuve 50-82, Toivonen 56-86, Senna 60-94
What base system? Different distributions include different stuff.
Suse evidently decided that they didn't want that particular program.
> BTW, when I finish compiling [calendar] for linux is there somewhere I
> can send it, so that it might get included in the usual distributions?
Debian already includes it. So do many other distributions.
--
John Hasler
jha...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA
> The only problem that I could not solve yet is this error:
>
> io.c: In function 'cal':
> io.c:137: error: 'D_MD_ORDER' undeclared (first use in this function)
>
> Line 137 is this one:
> d_first = (*nl_langinfo(D_MD_ORDER) == 'd');
>
> I searched in the internet and I found out that D_MD_ORDER means
> "month or day order", which I understand to mean: should the day or
> the month appear first ? That is, in English that call would return
> 'm' while, for instance, in Portuguese it would return 'd'.
You can probably extract "d_first" from scanning the date format
string for the language you can get using "nl_langinfo(D_FMT)".
Greetings,
Jacob
--
A password should be like a toothbrush. Use it every day;
change it regularly; and DON'T share it with friends.