- fix ceil for amd64;
- fix (hidden) measuring bug on non-64bit; - fix crashes in save and copy operations; "go ahead" steven@
This commit is contained in:
parent
32fefba1ae
commit
2cbc1044f0
@ -1,10 +1,10 @@
|
|||||||
# $OpenBSD: Makefile,v 1.6 2007/03/24 14:14:50 martynas Exp $
|
# $OpenBSD: Makefile,v 1.7 2007/03/27 20:12:59 martynas Exp $
|
||||||
|
|
||||||
COMMENT= "environment for rapid engineering and scientific processing"
|
COMMENT= "environment for rapid engineering and scientific processing"
|
||||||
|
|
||||||
V= 3.0
|
V= 3.0
|
||||||
DISTNAME= FreeMat-${V}
|
DISTNAME= FreeMat-${V}
|
||||||
PKGNAME= freemat-${V}
|
PKGNAME= freemat-${V}p0
|
||||||
|
|
||||||
CATEGORIES= graphics math
|
CATEGORIES= graphics math
|
||||||
|
|
||||||
|
@ -1,7 +1,25 @@
|
|||||||
$OpenBSD: patch-libs_libFreeMat_Print_cpp,v 1.1 2007/03/24 14:14:50 martynas Exp $
|
$OpenBSD: patch-libs_libFreeMat_Print_cpp,v 1.2 2007/03/27 20:12:59 martynas Exp $
|
||||||
--- libs/libFreeMat/Print.cpp.orig Tue Jan 2 00:31:44 2007
|
--- libs/libFreeMat/Print.cpp.orig Tue Jan 2 00:31:44 2007
|
||||||
+++ libs/libFreeMat/Print.cpp Sat Mar 24 15:46:48 2007
|
+++ libs/libFreeMat/Print.cpp Tue Mar 27 18:03:27 2007
|
||||||
@@ -417,7 +417,7 @@ void PrintSheet(ArrayFormat format, Interpreter*io, in
|
@@ -27,7 +27,7 @@ int GetNominalWidthInteger(const T*array, int count) {
|
||||||
|
int maxdigit = 0;
|
||||||
|
for (int i=0;i<count;i++) {
|
||||||
|
memset(buffer,0,MSGBUFLEN);
|
||||||
|
- sprintf(buffer,"%lld",array[i]);
|
||||||
|
+ sprintf(buffer,"%lld",(int64)array[i]);
|
||||||
|
int j = maxdigit;
|
||||||
|
while (buffer[j] && j>=maxdigit)
|
||||||
|
j++;
|
||||||
|
@@ -39,7 +39,7 @@ int GetNominalWidthInteger(const T*array, int count) {
|
||||||
|
template <class T>
|
||||||
|
void PrintIntegers(const T*array, int count, int width) {
|
||||||
|
for (int i=0;i<count;i++)
|
||||||
|
- printf("%*lld\n",width,array[i]);
|
||||||
|
+ printf("%*lld\n",width,(int64)array[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
@@ -417,12 +417,12 @@ void PrintSheet(ArrayFormat format, Interpreter*io, in
|
||||||
// the terminal width
|
// the terminal width
|
||||||
int colsPerPage;
|
int colsPerPage;
|
||||||
if (aclass != FM_STRING)
|
if (aclass != FM_STRING)
|
||||||
@ -10,3 +28,9 @@ $OpenBSD: patch-libs_libFreeMat_Print_cpp,v 1.1 2007/03/24 14:14:50 martynas Exp
|
|||||||
else
|
else
|
||||||
colsPerPage = termWidth;
|
colsPerPage = termWidth;
|
||||||
colsPerPage = (colsPerPage < 1) ? 1 : colsPerPage;
|
colsPerPage = (colsPerPage < 1) ? 1 : colsPerPage;
|
||||||
|
int pageCount;
|
||||||
|
- pageCount = (int) ceil(columns/((float)colsPerPage));
|
||||||
|
+ pageCount = (int) ceil(columns/((double)colsPerPage));
|
||||||
|
for (int k=0;k<pageCount;k++) {
|
||||||
|
int colsInThisPage;
|
||||||
|
colsInThisPage = columns - colsPerPage*k;
|
||||||
|
25
math/freemat/patches/patch-libs_libGraphics_HandleWindow_cpp
Normal file
25
math/freemat/patches/patch-libs_libGraphics_HandleWindow_cpp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
$OpenBSD: patch-libs_libGraphics_HandleWindow_cpp,v 1.1 2007/03/27 20:12:59 martynas Exp $
|
||||||
|
--- libs/libGraphics/HandleWindow.cpp.orig Thu Dec 28 16:02:22 2006
|
||||||
|
+++ libs/libGraphics/HandleWindow.cpp Tue Mar 27 18:03:53 2007
|
||||||
|
@@ -233,11 +233,19 @@ void HandleWindow::camRotate(bool active) {
|
||||||
|
|
||||||
|
void HandleWindow::save() {
|
||||||
|
QString fn = QFileDialog::getSaveFileName();
|
||||||
|
- HPrintFunction(0,singleArrayVector(Array::stringConstructor(fn.toStdString())));
|
||||||
|
+ try {
|
||||||
|
+ HPrintFunction(0,singleArrayVector(Array::stringConstructor(fn.toStdString())));
|
||||||
|
+ } catch(Exception &e) {
|
||||||
|
+ QMessageBox::critical(0,"Critical Error in Save",QString::fromStdString(e.getMessageCopy()));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleWindow::copy() {
|
||||||
|
- HCopyFunction(0,ArrayVector());
|
||||||
|
+ try {
|
||||||
|
+ HCopyFunction(0,ArrayVector());
|
||||||
|
+ } catch(Exception &e) {
|
||||||
|
+ QMessageBox::critical(0,"Critical Error in Copy",QString::fromStdString(e.getMessageCopy()));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleWindow::createActions() {
|
Loading…
Reference in New Issue
Block a user