summaryrefslogtreecommitdiff
path: root/src/minicron.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
commitf5aca1a1b402bd7ebc944dc6e6fe65828d863365 (patch)
tree4a0fdd8e166d5c4b03543279d332b9a858ef62df /src/minicron.cpp
parent10c557562e1d67c55314c212371ea9cb7f802863 (diff)
downloadlibbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.gz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.bz2
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.xz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.zip
Bu::FString is now String, and there's a shell script to fix any other programs
that were using fstring, I hope.
Diffstat (limited to 'src/minicron.cpp')
-rw-r--r--src/minicron.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/minicron.cpp b/src/minicron.cpp
index 491d143..307880e 100644
--- a/src/minicron.cpp
+++ b/src/minicron.cpp
@@ -73,7 +73,7 @@ void Bu::MiniCron::poll()
73 } 73 }
74} 74}
75 75
76Bu::MiniCron::JobId Bu::MiniCron::addJob( const Bu::FString &sName, 76Bu::MiniCron::JobId Bu::MiniCron::addJob( const Bu::String &sName,
77 Bu::MiniCron::CronSignal sigJob, const Bu::MiniCron::Timer &t ) 77 Bu::MiniCron::CronSignal sigJob, const Bu::MiniCron::Timer &t )
78{ 78{
79 JobId jid = jidNext++; 79 JobId jid = jidNext++;
@@ -86,7 +86,7 @@ Bu::MiniCron::JobId Bu::MiniCron::addJob( const Bu::FString &sName,
86 return jid; 86 return jid;
87} 87}
88 88
89Bu::MiniCron::JobId Bu::MiniCron::addJobOnce( const Bu::FString &sName, 89Bu::MiniCron::JobId Bu::MiniCron::addJobOnce( const Bu::String &sName,
90 Bu::MiniCron::CronSignal sigJob, const Bu::MiniCron::Timer &t ) 90 Bu::MiniCron::CronSignal sigJob, const Bu::MiniCron::Timer &t )
91{ 91{
92 JobId jid = jidNext++; 92 JobId jid = jidNext++;
@@ -132,7 +132,7 @@ Bu::MiniCron::JobInfoList Bu::MiniCron::getJobInfo()
132 return lRet; 132 return lRet;
133} 133}
134 134
135Bu::MiniCron::Job::Job( const Bu::FString &sName, JobId jid, bool bRepeat ) : 135Bu::MiniCron::Job::Job( const Bu::String &sName, JobId jid, bool bRepeat ) :
136 sName( sName ), 136 sName( sName ),
137 pTimer( NULL ), 137 pTimer( NULL ),
138 bContinue( bRepeat ), 138 bContinue( bRepeat ),
@@ -202,12 +202,12 @@ time_t Bu::MiniCron::Job::getNextRunTime() const
202 return tNextRun; 202 return tNextRun;
203} 203}
204 204
205Bu::FString Bu::MiniCron::Job::getName() const 205Bu::String Bu::MiniCron::Job::getName() const
206{ 206{
207 return sName; 207 return sName;
208} 208}
209 209
210Bu::MiniCron::JobInfo::JobInfo( const Bu::FString &sName, JobId jid, 210Bu::MiniCron::JobInfo::JobInfo( const Bu::String &sName, JobId jid,
211 time_t tNext ) : 211 time_t tNext ) :
212 sName( sName ), 212 sName( sName ),
213 jid( jid ), 213 jid( jid ),
@@ -249,7 +249,7 @@ time_t Bu::MiniCron::TimerInterval::nextTime()
249 return tRet; 249 return tRet;
250} 250}
251 251
252Bu::MiniCron::TimerBasic::TimerBasic( const Bu::FString &s ) : 252Bu::MiniCron::TimerBasic::TimerBasic( const Bu::String &s ) :
253 tLast( -1 ), 253 tLast( -1 ),
254 sSpec( s ) 254 sSpec( s )
255{ 255{
@@ -264,7 +264,7 @@ time_t Bu::MiniCron::TimerBasic::nextTime()
264 if( tLast == -1 ) 264 if( tLast == -1 )
265 tLast = time( NULL ); 265 tLast = time( NULL );
266 266
267 Bu::FString::const_iterator i = sSpec.begin(); 267 Bu::String::const_iterator i = sSpec.begin();
268 switch( lex( i ) ) 268 switch( lex( i ) )
269 { 269 {
270 case tokDaily: 270 case tokDaily:
@@ -343,19 +343,19 @@ time_t Bu::MiniCron::TimerBasic::nextTime()
343} 343}
344 344
345Bu::MiniCron::TimerBasic::Token Bu::MiniCron::TimerBasic::lex( 345Bu::MiniCron::TimerBasic::Token Bu::MiniCron::TimerBasic::lex(
346 Bu::FString::const_iterator &i ) 346 Bu::String::const_iterator &i )
347{ 347{
348 if( !i ) 348 if( !i )
349 { 349 {
350 return tokEos; 350 return tokEos;
351 } 351 }
352 352
353 Bu::FString::const_iterator b = i; 353 Bu::String::const_iterator b = i;
354 354
355 for(; b && (*b == ' ' || *b == '\t'); b++ ) { i = b+1; } 355 for(; b && (*b == ' ' || *b == '\t'); b++ ) { i = b+1; }
356 for(; b && *b != ' ' && *b != '\t'; b++ ) { } 356 for(; b && *b != ' ' && *b != '\t'; b++ ) { }
357 357
358 Bu::FString sTok( i, b ); 358 Bu::String sTok( i, b );
359 i = b; 359 i = b;
360 360
361 if( sTok == "daily" ) 361 if( sTok == "daily" )
@@ -412,7 +412,7 @@ Bu::MiniCron::TimerBasic::Token Bu::MiniCron::TimerBasic::lex(
412 return tokErr; 412 return tokErr;
413} 413}
414 414
415int Bu::MiniCron::TimerBasic::lexInt( Bu::FString::const_iterator &i ) 415int Bu::MiniCron::TimerBasic::lexInt( Bu::String::const_iterator &i )
416{ 416{
417 Token t = lex( i ); 417 Token t = lex( i );
418 if( t == tokEos ) 418 if( t == tokEos )