English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 27 March 2016, 17:51   #1
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 46
Posts: 360
A small gui calculator - Acalc

Here is a small gui calculator I made cause I wanted to check out gadtools.
Needs OS >=2.0

Source is included in the attachment, but you can browse it https://github.com/alexalkis/acalc also.

The mode-switching (Simple/Scientific/Programmer's) is not working (yet), as I don't know how to change the UI :P
Attached Files
File Type: lha acalc.lha (15.3 KB, 62 views)
alkis is offline  
AdSense AdSense  
Old 27 March 2016, 21:06   #2
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,740
Started on A1200 3.1. Maybe it is VisualPrefs here but want to mention that the string gadget overlaped title bar when ACalc opens an active. If the window is not active the gadget moves behind title bar.
Attached Thumbnails
Click image for larger version

Name:	ACalc_256x96x4.png
Views:	157
Size:	1.1 KB
ID:	48025  
daxb is offline  
Old 28 March 2016, 01:36   #3
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 46
Posts: 360
Quote:
Originally Posted by daxb View Post
Started on A1200 3.1. Maybe it is VisualPrefs here but want to mention that the string gadget overlaped title bar when ACalc opens an active. If the window is not active the gadget moves behind title bar.
Hmm, had a hardcoded height on gadgets. This version (attached) should honor the screen's visuals. Thanks for the bug report
Attached Files
File Type: lha acalc.lha (15.5 KB, 73 views)
alkis is offline  
Old 28 March 2016, 15:54   #4
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,740
Ahh nice (works now), I thought already something like that. Also like the constants. If you like to add more constants then cycle-/drop-down gadget or keyboard input would be good. At least you can try/check gadtools.
daxb is offline  
Old 29 March 2016, 17:21   #5
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,740
Oldsyle icon made from ACalc window.
Attached Files
File Type: lha oldstyle_icons.lha (1.1 KB, 35 views)
daxb is offline  
Old 29 March 2016, 21:03   #6
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 46
Posts: 360
Quote:
Originally Posted by daxb View Post
Oldsyle icon made from ACalc window.
Cool, thanks!
alkis is offline  
Old 22 April 2016, 08:01   #7
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 46
Posts: 360
Adding some arbitrary precission I needed the gmp and the mpfr libraries.

I've downloaded the sources.
Gmp-6.1.0
Code:
./configure --host=x86_64-pc-linux-gnu CC=m68k-amigaos-gcc NM=m68k-amigaos-nm --prefix=/usr/local/amiga/m68k-amigaos/ --enable-assembly=no --enable-shared=no AR=m68k-amigaos-ar RANLIB=m68k-amigaos-ranlib

make

sudo ln -s /usr/local/amiga/bin/m68k-amigaos-ranlib /usr/bin/m68k-amigaos-ranlib
sudo make install
Mpfr-3.1.4
Code:
./configure --host=x86_64-pc-linux-gnu CC=m68k-amigaos-gcc NM=m68k-amigaos-nm --prefix=/usr/local/amiga/m68k-amigaos/ --enable-assembly=no --enable-shared=no AR=m68k-amigaos-ar RANLIB=m68k-amigaos-ranlib

Edit file mpfr-impl.h at line 1204
#  define MPFR_LCONV_DPTS 0 // alkis was 1

make
sudo make install
You can now compile with:

Code:
m68k-amigaos-gcc -s -noixemul -Os -o acalc acalc.c -lmpfr -lgmp
There is a define at: https://github.com/alexalkis/acalc/b...ter/acalc.c#L7 that switches on and off the extra accuracy. Because the libs are statically linked on the executable, note that the exe size grows from ~20k to ~340k, but hey your amiga's calc can be more precise than windows' calc ;-)
alkis is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga calculator cla Coders. Releases 32 20 April 2015 23:05
BPM calculator for Octamed? lordofchaos request.Apps 4 29 May 2013 20:46
small GUI bug: ghosting of "write protection" label df0/df1 rsn8887 support.WinUAE 1 23 August 2010 18:02
Kumiko GUI - Amiga Workbench 3.1 GUI for Windows milika Amiga scene 31 18 April 2007 20:16
Speccy on Ti-89 calculator Fred the Fop Retrogaming General Discussion 3 27 January 2007 03:30

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:08.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.22734 seconds with 15 queries