Skip to content

Commit

Permalink
add git revision by attribute
Browse files Browse the repository at this point in the history
	update process inf error
	new file:   .gitattributes
	modified:   src/progress.c
	modified:   src/version.h
  • Loading branch information
thomas authored and thomas committed Mar 10, 2010
1 parent b1a227a commit 7533dae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/version.h ident
4 changes: 4 additions & 0 deletions src/progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ extern void Ncurses_progress_update(struct progress_bar *prog, unsigned long lon
} else {
percent=100;
total = (time(0) - prog->initial_time);
if (total <= 0)
total = 1;
Ttm = gmtime(&total);
speedps = (float)prog->block_size * (float)current / (float)(total);
speed = (float)(speedps / 1000000.0 * 60.0);
Expand Down Expand Up @@ -328,6 +330,8 @@ extern void Dialog_progress_update(struct progress_bar *prog, unsigned long long
fprintf(stderr, "XXX\n%i\n%s\n%s\nXXX\n", m_dialog.percent, m_dialog.data, tmp_str);
} else {
total = (time(0) - prog->initial_time);
if (total <= 0)
total = 1;
Ttm = gmtime(&total);
speedps = (float)prog->block_size * (float)current / (float)(total);
speed = (float)(speedps / 1000000.0 * 60.0);
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* WHETHER THEY ARE BUILT BY OTHERS OR DURING DEVELOPMENT OR FOR THE
* OFFICIAL PARTCLONE RELEASES.
*/
#define git_version "a6e1e39a2f6ecbb18239315a1ec92f7df8b0beb0"
#define git_version "$Id$"

0 comments on commit 7533dae

Please sign in to comment.