Comments (16)
I designed FlMenu::userData only for integer data type.
(Because I prefer indexes to pointers.)
So I think it is safe to force the type casting.
would reinterpret_cast<int> work? I can't be sure because I don't have access
to any x64 os at the moment.
I would appreciate a feedback very much if you fix the compile error.
Original comment by [email protected]
on 5 Dec 2010 at 6:15
from papercrop.
on x86_64 (linux) platform,
sizeof(int) is 4
sizeof(void*) is 8
so the code is not portable
sizeof(unsigned long) is 8 also under x86_64, but is 4 under win64, so I
suggest use
unsigned long long instead
Now I don't have my laptop at hand, so I maybe provide a patch tonight.
Original comment by [email protected]
on 6 Dec 2010 at 1:08
from papercrop.
I meant that 8 bytes are enough for storing integer (4-bytes).
Userdata in FLTK is not used at all in FLTK, and it's there for users'
additional storage. Users can use the userdata for whatever purpose they want.
And as you mentioned, the size of the storage is 8bytes in x86_64 and 4bytes in
x86_32 (enough for holding a pointer). But I decided to use it to store 4-byte
integer instead of pointers.
In this assumption, unsigned long long is not portable in x86_32 because the
4-byte storage area cannot hold unsigned long long.
It would have to be either (void *) or (int) to be portable.
Do you understand what I mean?
Original comment by [email protected]
on 6 Dec 2010 at 2:36
from papercrop.
please take a look at the patch attached within this comment, it works on
x86_64.
Original comment by [email protected]
on 6 Dec 2010 at 3:50
Attachments:
from papercrop.
[deleted comment]
from papercrop.
I think the following should work too.
if (sizeof(void*)==8)
{
long long sig1 = reinterpret_cast<long long>
((m_aMenuItem[m_pMenu->value()].user_data())user_data());
return static_cast<int>(sig1);
}
else return ... // as it was before
If you don't like the integer truncation, (void*) would be a better choice.
it's good to know that it runs on x86_64 though.
Thanks.
Original comment by [email protected]
on 6 Dec 2010 at 4:07
from papercrop.
thanks for you good job.
this issue could be closed now.
Original comment by [email protected]
on 6 Dec 2010 at 4:11
from papercrop.
Hi, I have compiled papercrop with the patch above on Ubuntu 64. It runs and
show the main window but when I click on any button it doesn't show anything.
On terminal I have only this:
#./paperCrop
Xdbe not supported, faking double buffer with pixmaps.
pFileName=presets/default preset.lua
Nothing relevant I think. Any suggestion?
Thanks in advance.
Original comment by [email protected]
on 14 Dec 2010 at 3:32
from papercrop.
The terminal output is normal.
Did you try to click the load button?
Do you mean absolutely no reaction, no crash?
That's strange.
I would 1. debug build (-g), 2. set a break point on the onCallback function
and see what's going on.
Original comment by [email protected]
on 14 Dec 2010 at 7:25
from papercrop.
Exactly no reaction, no crash, no errors in console... I have tried to do it
all again but still the same. I don't know how to debug it, maybe you can give
me some instructions or is it too complicated?
Windows version runs ok through wine but I suppose a native 64 bit compilation
would be faster. Anyway, the app is great, now I can really read pdf in my
ebook. Thanks!
Original comment by [email protected]
on 14 Dec 2010 at 10:26
from papercrop.
Could you try the following modification (RightWin.cpp) and show me the console
output?
-------------------------------------------
...
#include <FL/Fl_Native_File_Chooser.H>
void RightPanel::onCallback(FlLayout::Widget const& w, Fl_Widget * pWidget, int
userData)
{
printf("Debug:%s\n", w.mId.ptr()); // I only added this line for debug
if(w.mId=="update")
...
Original comment by [email protected]
on 15 Dec 2010 at 4:04
from papercrop.
I have just do it, I think you meant file RightPanel.cpp instead of
RightWin.cpp. I have compiled it with that mod but the console output is still
the same, even pressing all buttons.
Original comment by [email protected]
on 15 Dec 2010 at 4:44
from papercrop.
I installed ubuntu 64 on one computer and built papercrop with a few
modifications.
It seems to run ok. Please try to update the svn folder and rebuild.
I used the dependencies listed in install_dependencies_ubunth.sh
Thanks,
Taesoo.
Original comment by [email protected]
on 17 Dec 2010 at 1:43
from papercrop.
[deleted comment]
from papercrop.
Nice, it works and is really much faster! Maybe twice or more than with
32 bit and wine. Again thank you very much!
Original comment by [email protected]
on 17 Dec 2010 at 3:05
from papercrop.
Original comment by [email protected]
on 3 Feb 2011 at 5:22
- Changed state: Fixed
from papercrop.
Related Issues (20)
- Produces bad PDFs? HOT 2
- Patch: make the install deps script more reliable, and actually perform the operation HOT 1
- words per line in reflow mode
- Opensuse rpm would be great :-) HOT 1
- Processing a book scanned with two book pages appearing on each pdf page
- Sudden exit of program upon selection of device HOT 2
- Vector pdf output for two column files not working HOT 1
- Font is too big when displayed on Kindle 4
- Can't turn pages on 64-bit machine HOT 1
- Cannot execute build.bat successfully under windows HOT 1
- Segmentation of figures
- Ubuntu installer fails to install on version 12.10 HOT 6
- Always crash when select Kindle 3 in Vector PDF HOT 2
- coordinates screwed up
- Wont create vector PDF in XP 32 bit or Win7 64 bit
- Could not compile on Debian-7.0 using HOT 1
- Wrong output format
- Saves only by portions of 100 pages pdfs, need unlimited pages HOT 1
- i dont know how to run/install papercrop
- ake
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from papercrop.