Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 227041
Collapse All | Expand All

(-)calcchecksum/calcchecksum.cpp (-3 / +4 lines)
Lines 9-14 Link Here
9
 *                                                                         *
9
 *                                                                         *
10
 ***************************************************************************/
10
 ***************************************************************************/
11
11
12
#include <cstdlib>
12
13
13
#include <qlineedit.h>
14
#include <qlineedit.h>
14
#include <qlabel.h>
15
#include <qlabel.h>
Lines 86-92 Link Here
86
			   "Quit some other programs.\n"
87
			   "Quit some other programs.\n"
87
			   "CalcChecksum will be terminated now!");
88
			   "CalcChecksum will be terminated now!");
88
		printError(err);
89
		printError(err);
89
		exit(1);
90
		std::exit(1);
90
	}
91
	}
91
	connect(comm, SIGNAL(lineAvailable_signal(const string*)), this, SLOT(handleProgressRequest(const string*)));
92
	connect(comm, SIGNAL(lineAvailable_signal(const string*)), this, SLOT(handleProgressRequest(const string*)));
92
93
Lines 624-634 Link Here
624
		}
625
		}
625
	} else if (unlikely(c == 'S')) {
626
	} else if (unlikely(c == 'S')) {
626
		// Progressbar top-value (total-steps value)
627
		// Progressbar top-value (total-steps value)
627
		progressBar->setTotalSteps(atoi(data->substr(1,
628
		progressBar->setTotalSteps(std::atoi(data->substr(1,
628
					   data->length()).c_str()));
629
					   data->length()).c_str()));
629
	} else {
630
	} else {
630
		// push progressBar
631
		// push progressBar
631
		progressBar->setProgress(atoi(data->c_str()));
632
		progressBar->setProgress(std::atoi(data->c_str()));
632
	}
633
	}
633
}
634
}
634
635
(-)./calcchecksum/globalstuff.cpp (-1 / +2 lines)
Lines 11-16 Link Here
11
11
12
#include "globalstuff.h"
12
#include "globalstuff.h"
13
13
14
#include <cstring>
14
#include <stdio.h>
15
#include <stdio.h>
15
#include <sys/stat.h>
16
#include <sys/stat.h>
16
17
Lines 29-35 Link Here
29
			ret += "00";
30
			ret += "00";
30
		} else {
31
		} else {
31
			sprintf(tmp, "%X", 0xFF & *(buf + i));
32
			sprintf(tmp, "%X", 0xFF & *(buf + i));
32
			if (strlen(tmp) == 1)
33
			if (std::strlen(tmp) == 1)
33
				ret += '0';
34
				ret += '0';
34
			ret += tmp;
35
			ret += tmp;
35
		}
36
		}

Return to bug 227041