(mm) mbasecalc - A Programmers' Calculator
Home | Software | Count
Software:
GWT
  GWTOAuthLogin
X/Motif
  ansi xterm
  grabc
  mdgclock
  miv
  mplaymidi
  mppp
  mxascii
  mcmap
  mxcmap
  mxconsole
  mxkill
  mxshowfont
  qtip
  xmastm
  yrolo
Web
  mhttpd
  web counter
  upload.pl
  TimeTrack.pl
  mod_auth_ldap
Games
  fltkmm
  iphonemm
Java
   cdcl
   cdclgwt
   jdgclock
Libraries
  libcalen
  libmcfg
  libsll
  libmsock
Misc
  bangla font
  dpr
  genmake
  hod
  smtp.pl
  vhtml
  phones_ldap
  showpic_ldap
  mbasecalc
  fluid_hack
  kdialppp
  strip2csv
  googlecode-upload
MS Windows
  mwinclip.pl
  mbasecalc
  mailsend
  wiv
mbasecalc
A Programmers' Calculator
(For Linux/Unix, Mac OS X and Windows)
by
Muhammad A Muquit

[mbasecalc Release 1.2]

Last Updated: Jan-07-2007

Table of Contents

Introduction
mbasecalc is a clone of basecalc that comes with Xlib Programming Manual from O'Reilly as an example of X library programming. I work on Windows and Macs as well where X is not always available. So I wrote this one. I hope you'll find it useful too.

How it is written
A free cross platform toolkit (written in C++) called FLTK (Fast Light ToolKit) is used in order to make mbasecalc run in Linux/Unix, Mac OS X and Windows. You can get it from http://fltk.org/. I play with almost all freely available cross platform toolkits, I find fltk is the cleanest (and very fast) of all. And most of all, lots of fun to code with. I'm not a fan of GUI builders but FLTK has a gui builder called FLUID (Fast Light User Interface Design) which I actually can use. Please visit my fluid_hack page.

Download
You need to download source if you you are on Linux/Unix (as well as the fltk). You can download and use the compiled binary for Mac OS X (on Intel) and Windows.

  • Download compiled binary for Windows:
    Binary for MS Windows
    File: mbasecalc.exe
    Size: 180224 bytes
    MD5 Checksum: 8ce6f17c4b5b65dd9f41f7c297ae83f6
    Last updated: Jan-07-2007

  • Download compiled binary for Mac OS X 10.4.8 Intel:
    Binary for Mac OS X Intel
    File: mbasecalc_osx_intel
    Size: 300088 bytes
    MD5 Checksum: b27a579e017deb03986360b406c7c3d9
    Last updated: Jan-07-2007

  • Download compiled binary for Mac OS X 10.4.8 PowerPC:
    Binary for Mac OS X PowerPC
    File: mbasecalc_osx_ppc
    Size: 338908 bytes
    MD5 Checksum: 88709148bbb5e8a6f7df540161857db5
    Last updated: Jan-08-2007

  • Download source (gzip'd tar'd):
    Source
    File: mbasecalc1.2.tar.gz
    Size: 42275 bytes
    MD5 Checksum: 20c89802fb860072aeb1f5a2947ae700
    Last updated: Jan-07-2007

Compile
In Linux/Unix, Mac OS X:

  • Download and install fltk first.
  • Download mbasecalc source.
  • At the shell prompt type:

$ gunzip < mbasecalc1.2.tar.gz | tar xvf -
$ cd mbasecalc1.2
$ sh ./configure
$ make clean
$ make

In Windows:
You can use the supplied binary mbasecalc.exe without compiling. But if you need to compile for some reason, download and compile the fltk library first. Download the gzip'd, tar'd mbasecalc source, extract the source, open a command shell and type:


cd mbasecalc
nmake -f Makefile.wnt

Note: you must have MS Visual C++ installed. It can be compiled without MS Visual C++ too, but you've to do it yourself (read fltk docs on that).

Screenshots

Running on Linux

Running on Windows

Running on Mac OS X (10.4.8 Intel)


Original basecalc running on Linux

Keyboard Shortcuts
You can use mouse to do everything, but I like to use the keyboard shortcuts. Click right mouse button and select Keyboard Shortcuts for help. The keyboard shortcuts are shown below:

Keyboard Shortcuts Key in mbasecalc Description
Shift+h HEX Hexadecimal mode
Shift+d DEC Decimal mode (default)
Shift+o OCT Octal mode
Shift+b BIN Binary mode
Shift+u U Unsigned mode (default)
Shift+s S Signed mode
Ctrl+d CD Delete (same as Backspace)
Ctrl+e CE Erase All (from screen)
Ctrl+A CA Clear All
+-*/ +-*Add, substract and divide respectively
% % Modulus
|| Bitwise OR
&& Bitwise AND
^^ Bitwise XOR
~~ Bitwise NOT (One's complement)
>>> Right Shift
<<< Left Shift
=EnterCommit the operation

If you find the program useful, please let me know. Bug reports, suggestions are always welcome.

Copyright
GNU General Public License

Acknowledgments
Thanks to Adrian Nye for writing basecalc in Xlib Programming Manual. I borrowed lots of code from basecalc.

ChangeLog

    v1.2
  • Added configure script to Generate Makefile.
  • Compiled with fltk 1.1.7.
  • Colors on 2 buttons were not correct.
  • Compiled on my Intel MacBook running Mac OS X 10.4.8.
    (Jan-07-2007)

  • Thanks to Frank Jennings for providing binary for Mac OS X PowerPC.
    (Jan-08-2007)

  • version 1.1 released.
    (Jun-04-2001)

See Also
xmastm, mbasecalc fluid_hack

URL of this page: http://www.muquit.com/muquit/software/mbasecalc/mbasecalc.html

back Page updated: Sun Mar 31 01:59:56 2013 GMT   Copyright © 2013 muquit@muquit.com.