Now loading libraries before -version, pacifier for -add

This commit is contained in:
2008-02-06 13:11:20 +00:00
parent c6d5158388
commit 9b525e9fff
7 changed files with 225 additions and 28 deletions

View File

@ -178,6 +178,14 @@ struct XorrisO { /* the global context of xorriso */
double insert_bytes;
double error_count; /* double will not roll over */
/* pacifiers */
double pacifier_interval;
double start_time;
double last_update_time;
/* optional global counters for brain reduced callback functions */
off_t pacifier_count;
off_t pacifier_total;
/* result (stdout, R: ) */
char result_line[5*SfileadrL];
int result_line_counter;
@ -271,6 +279,24 @@ int Xorriso__bourne_to_reg(char bourne_expr[], char reg_expr[], int flag);
int Xorriso_no_malloc_memory(struct XorrisO *xorriso, char **to_free,
int flag);
int Xorriso_pacifier_reset(struct XorrisO *xorriso, int flag);
/* This call is to be issued by long running workers in short intervals.
It will check whether enough time has elapsed since the last pacifier
message and eventually issue an update message.
@param what_done A sparse description of the action, preferrably in past
tense. E.g. "done" , "files added".
@param count The number of objects processed so far.
Is ignored if <=0.
@param todo The number of objects to be done in total.
Is ignored if <=0.
@param current_object A string telling the object currently processed.
Ignored if "".
@param flag Bitfield. Unused yet. Submit 0.
*/
int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done,
off_t count, off_t todo, char *current_object,
int flag);
int Sfile_str(char target[SfileadrL], char *source, int flag);