mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2423
This commit is contained in:
parent
560f65736b
commit
154cc43982
|
@ -322,8 +322,8 @@ int boinc_child_done(double cpu) {
|
|||
int boinc_cpu_time(double &cpu_t, double &ws_t) {
|
||||
double cpu_secs;
|
||||
|
||||
// Start with the CPU time from previous runs, then
|
||||
// add the CPU time of the current run
|
||||
// Start with the CPU time from previous runs,
|
||||
// then add the CPU time of the current run
|
||||
cpu_secs = aid.wu_cpu_time;
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
|
|
11
api/gutil.C
11
api/gutil.C
|
@ -1059,20 +1059,23 @@ static int getFileType(char* file) {
|
|||
}
|
||||
|
||||
int create_texture(char* filename, TEXTURE_DESC& td) {
|
||||
int retval=-1;
|
||||
|
||||
switch (getFileType(filename)) {
|
||||
case IMAGE_TYPE_JPG:
|
||||
return CreateTextureJPG(filename, td);
|
||||
retval = CreateTextureJPG(filename, td);
|
||||
break;
|
||||
case IMAGE_TYPE_PPM:
|
||||
return CreateTexturePPM(filename, td);
|
||||
retval = CreateTexturePPM(filename, td);
|
||||
break;
|
||||
case IMAGE_TYPE_BMP:
|
||||
return CreateTextureBMP(filename, td);
|
||||
retval = CreateTextureBMP(filename, td);
|
||||
break;
|
||||
case IMAGE_TYPE_TGA:
|
||||
return CreateTextureTGA(filename, td);
|
||||
retval = CreateTextureTGA(filename, td);
|
||||
break;
|
||||
}
|
||||
if (!retval) td.present = true;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -149,6 +149,7 @@ extern void replaceStar(Star* tmpStar);
|
|||
#define IMAGE_TYPE_TGA 3
|
||||
|
||||
struct TEXTURE_DESC {
|
||||
bool present;
|
||||
unsigned int id;
|
||||
double xsize; // size of underlying image
|
||||
double ysize;
|
||||
|
|
|
@ -6591,3 +6591,19 @@ David Oct 6 2003
|
|||
|
||||
sched/
|
||||
wu_check.C
|
||||
|
||||
David Oct 8 2003
|
||||
- added "present" flag to TEXTURE_DESC
|
||||
- fixed function names:
|
||||
double_to_ydhms() -> ndays_to_string()
|
||||
get_byte_string -> nbytes_to_string()
|
||||
|
||||
api/
|
||||
boinc_api.C
|
||||
gutil.C,h
|
||||
client/
|
||||
win/
|
||||
wingui_mainwindow.cpp
|
||||
wingui_piecectrl.cpp
|
||||
lib/
|
||||
util.C,h
|
|
@ -494,7 +494,7 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs)
|
|||
|
||||
// size
|
||||
char size_buf[256];
|
||||
get_byte_string(xSent, pfx->fip->nbytes, size_buf, 256);
|
||||
nbytes_to_string(xSent, pfx->fip->nbytes, size_buf, 256);
|
||||
if (strcmp(m_XferListCtrl.GetItemText(i, 3).GetBuffer(0), size_buf))
|
||||
m_XferListCtrl.SetItemText(i, 3, size_buf);
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ void CPieChartCtrl::OnPaint()
|
|||
MemDC.LineTo(textrect.left, textrect.top);
|
||||
textrect.SetRect(PIE_BUFFER + 16, PIE_BUFFER + i * 20, wndrect.Width() - PIE_BUFFER, PIE_BUFFER + 20 + i * 20);
|
||||
char size_buf[256];
|
||||
get_byte_string(m_xValues.GetAt(i), 0, size_buf, 256);
|
||||
nbytes_to_string(m_xValues.GetAt(i), 0, size_buf, 256);
|
||||
CString strBuf;
|
||||
strBuf.Format("%s (%s)", m_strLabels.GetAt(i).GetBuffer(0), size_buf);
|
||||
MemDC.DrawText(strBuf, textrect, DT_SINGLELINE|DT_VCENTER|DT_LEFT|DT_END_ELLIPSIS);
|
||||
|
|
|
@ -52,7 +52,7 @@ using std::min;
|
|||
// unit of time division used
|
||||
// smallest_timescale: 0=seconds, 1=minutes, 2=hours, 3=days, 4=years
|
||||
//
|
||||
int double_to_ydhms (double x, int smallest_timescale, char *buf) {
|
||||
int ndays_to_string (double x, int smallest_timescale, char *buf) {
|
||||
double years, days, hours, minutes, seconds;
|
||||
char year_buf[64], day_buf[16], hour_buf[16], min_buf[16], sec_buf[16];
|
||||
|
||||
|
@ -114,7 +114,7 @@ int double_to_ydhms (double x, int smallest_timescale, char *buf) {
|
|||
// Convert nbytes into a string. If total_bytes is non-zero,
|
||||
// convert the two into a fractional display (i.e. 4/16 KB)
|
||||
//
|
||||
void get_byte_string(double nbytes, double total_bytes, char* str, int len) {
|
||||
void nbytes_to_string(double nbytes, double total_bytes, char* str, int len) {
|
||||
char buf[256];
|
||||
double xTera = (1024.0*1024.0*1024.0*1024.0);
|
||||
double xGiga = (1024.0*1024.0*1024.0);
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
using std::string;
|
||||
|
||||
extern int double_to_ydhms (double x, int smallest_timescale, char *buf);
|
||||
extern void get_byte_string(double nbytes, double total_bytes, char* str, int len);
|
||||
extern int ndays_to_string(double x, int smallest_timescale, char *buf);
|
||||
extern void nbytes_to_string(double nbytes, double total_bytes, char* str, int len);
|
||||
extern double dtime();
|
||||
extern void boinc_sleep(double);
|
||||
extern int parse_command_line( char *, char ** );
|
||||
|
|
Loading…
Reference in New Issue