gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] --savesms --datetime


From: Adam Gołębiowski
Subject: Re: [PATCH] --savesms --datetime
Date: Sun, 31 Oct 2004 20:56:14 +0100
User-agent: Mutt/1.4.2.1i

On Sun, Oct 31, 2004 at 08:45:40PM +0100, Pawel Kot wrote:
> On Sun, 31 Oct 2004, Pawel Kot wrote:
> 
> > On Sun, 31 Oct 2004, Adam Gołębiowski wrote:
> >
> > > On Sun, Oct 31, 2004 at 04:03:55PM +0100, Pawel Kot wrote:
> > > > > Attached you can find small patch that adds --datetime option to
> > > > > --savesms command. Basically it allows user to set date and time of
> > > > > message delivery (in YYMMDDHHMMSS format).
> > > >
> > > > It's been a while, but the patch is in CVS now. It would be good to
> > > > validate the input datetime as well. :-)
> > >
> > > Good point. I think I managed to do it. Any comments are welcome - I am
> > > not a programmer and would like to know if what I did could be done
> > > simplier/beter.
> >
> > What about doing a generic function gn_datetime_isvalid in eg.
> > common/misc.c accepting gn_timestamp at input returning 0/1?
> >
> > We would avoid polluting gnokii.c with such solution. And you miss non
> > leap-year support :-)
> >
> > To make a code more readable you may want to define a macro:
> > #define BETWEEN(a, x, y) ((a >= x) && (a <= y))
> > or similiar. (yes I know, this is not type safe but I don't care ;-)).
> 
> There's a quick patch. Complies, not tested.

Great, and I was just about to try to implement it. I'll try to test it
soon.

-- 
http://www.mysza.eu.org/ | Everybody needs someone sure, someone true,
   PLD Linux developer   | Everybody needs some solid rock, I know I do.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]