 |
|
| Linux Forum Index » Linux Development - Applications » nl_langinfo(D_MD_ORDER)... |
|
Page 1 of 1 |
|
| Author |
Message |
| Rui Pedro Mendes Salgueiro... |
Posted: Wed Nov 04, 2009 3:01 am |
|
|
|
Guest
|
Hello
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 ?
--
http://www.mat.uc.pt/~rps/
..pt is Portugal| `Whom the gods love die young'-Menander (342-292 BC)
Europe | Villeneuve 50-82, Toivonen 56-86, Senna 60-94 |
|
|
| Back to top |
|
|
|
| John Hasler... |
Posted: Wed Nov 04, 2009 8:38 am |
|
|
|
Guest
|
Rui Pedro Mendes Salgueiro writes:
Quote: BTW, any idea why 'calendar' is not included in the base system ?
What base system? Different distributions include different stuff.
Suse evidently decided that they didn't want that particular program.
Quote: 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
jhasler at (no spam) newsguy.com
Dancing Horse Hill
Elmwood, WI USA |
|
|
| Back to top |
|
|
|
| Jacob Sparre Andersen... |
Posted: Wed Nov 04, 2009 8:50 am |
|
|
|
Guest
|
Rui Pedro Mendes Salgueiro wrote:
Quote: 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. |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Tue Dec 01, 2009 6:52 am
|
|