English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Releases (https://eab.abime.net/forumdisplay.php?f=115)
-   -   A small gui calculator - Acalc (https://eab.abime.net/showthread.php?t=82179)

alkis 27 March 2016 16:51

A small gui calculator - Acalc
 
1 Attachment(s)
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

daxb 27 March 2016 20:06

1 Attachment(s)
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.

alkis 28 March 2016 00:36

1 Attachment(s)
Quote:

Originally Posted by daxb (Post 1080450)
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 :)

daxb 28 March 2016 14:54

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 29 March 2016 16:21

1 Attachment(s)
Oldsyle icon made from ACalc window. ;)

alkis 29 March 2016 20:03

Quote:

Originally Posted by daxb (Post 1080829)
Oldsyle icon made from ACalc window. ;)

Cool, thanks! :)

alkis 22 April 2016 07:01

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 ;-)


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04711 seconds with 11 queries