Commit c8c5951b authored by Florian Ernst's avatar Florian Ernst

Merge tag 'upstream/8.0.2'

Upstream version 8.0.2
parents cd702ddb 215d7b8e
......@@ -24,6 +24,7 @@ Abacus*highlightBeadColor: magenta
Abacus*primaryRailColor: gold
Abacus*secondaryRailColor: LightSteelBlue1
Abacus*highlightRailColor: Purple
Abacus*lineRailColor: Black
Abacus*bumpSound: @READPATH@/bump.au
Abacus*moveSound: @READPATH@/move.au
!Abacus*bumpSound: ./bump.au
......@@ -111,6 +112,7 @@ Abacus*format: Chinese
!Abacus*format: Roman
!Abacus*format: Russian
!Abacus*format: Danish
!Abacus*format: Medieval
!Abacus*format: Generic
Abacus*museum: --
!
......@@ -195,6 +197,15 @@ Abacusdk*rails: 10
Abacusdk*group: true
Abacusdk*decimalComma: true
Abacusdk*format: Danish
! Medieval Counter
Abacusme*vertical: true
Abacusme*colorScheme: 4
Abacusme*topNumber: 2
Abacusme*bottomNumber: 5
Abacusme*romanNumerals: true
Abacusme*decimalPosition: 0
Abacusdk*rails: 5
Abacusdk*format: Medieval
! Mesoamerican Nepohualtzintzin (similar to Japanese Soroban base 20)
Abacusma*diamond: 1
Abacusma*topNumber: 3
......
This diff is collapsed.
......@@ -44,9 +44,11 @@
#define XtNrightAuxBeadColor ((char *) "rightAuxBeadColor")
#define XtNsecondaryBeadColor ((char *) "secondaryBeadColor")
#define XtNhighlightBeadColor ((char *) "highlightBeadColor")
#define XtNcheckerBeadColor ((char *) "checkerBeadColor")
#define XtNprimaryRailColor ((char *) "primaryRailColor")
#define XtNsecondaryRailColor ((char *) "secondaryRailColor")
#define XtNhighlightRailColor ((char *) "highlightRailColor")
#define XtNlineRailColor ((char *) "lineRailColor")
#define XtNbumpSound ((char *) "bumpSound")
#define XtNmoveSound ((char *) "moveSound")
#define XtNdripSound ((char *) "dripSound")
......@@ -336,9 +338,10 @@ typedef struct {
#define ROMAN 3
#define RUSSIAN 4
#define DANISH 5
#define GENERIC 6
#define MAX_FORMATS 6
#define MAX_MODES 7
#define MEDIEVAL 6
#define GENERIC 7
#define MAX_FORMATS 7
#define MAX_MODES 8
#define TEACH_STRING0 "Enter calculation X+Y, X-Y, X*Y, X/Y, Xv, or Xu where X positive and result positive."
#define TEACH_STRING1 "Press enter to go through calculation steps."
#define ZERO_STRING "0.0"
......
/*
* @(#)AbacusD.c
*
* Copyright 1999 - 2012 David A. Bagley, bagleyd@tux.org
* Copyright 1999 - 2014 David A. Bagley, bagleyd@tux.org
*
* Abacus demo and neat pointers from
* Copyright 1991 - 1998 Luis Fernandes, elf@ee.ryerson.ca
......@@ -395,6 +395,8 @@ postfixType(int mode)
return (char *) "ru";
case DANISH:
return (char *) "ru"; /* dk */
case MEDIEVAL:
return (char *) ""; /* cn, me, ge, uk */
default:
return (char *) "";
}
......
......@@ -141,8 +141,7 @@ extern AbacusClassRec abacusClassRec;
#define DOWN 0
#define TOP 1
#define BOTTOM 0
#define CARRY 2 /* If you have a strange abacus you may have to increase this
also need a space to hold null (not included) */
#define CARRY 1
#define SPECIAL_PIECES 2 /* Pieces, PiecePercents */
#define MAX_FORMAT_LENGTH 9
......@@ -216,10 +215,9 @@ typedef struct _AbacusPart {
int delay, numSlices, mode, submode, colorScheme, railIndex;
int leftAuxRails, rightAuxRails;
int aux, deck, rail, number;
int pressOffsetX, pressOffsetY;
Position width, middleBarHeight, middleBarPositionY, railWidth;
Position middleBarHeight, middleBarPositionY, railWidth;
Point frameSize, beadSize;
Point pos, delta, offset;
Point pos, totalSize, delta, offset, pressOffset;
Boolean sign, minusSign, romanNumerals, group, decimalComma;
Boolean carryAnomaly, carryAnomalySq;
Boolean mono, reverse, focus, vertical;
......@@ -229,9 +227,9 @@ typedef struct _AbacusPart {
Boolean slot, diamond, sound;
char *digits, *mathBuffer;
FILE *fp;
GC frameGC, borderGC, symbolGC, railGC[3], inverseGC;
GC frameGC, borderGC, symbolGC, lineGC, railGC[4], inverseGC;
GC beadShadeGC[MAX_SHADES];
Pixmap bufferBead[3][2][2];
Pixmap bufferBead[4][2][2];
TimeVal oldTime;
Boolean rightToLeftAdd, rightToLeftMult;
int step, carry[2], lower, upper, carryStep;
......@@ -256,7 +254,7 @@ typedef struct _AbacusPart {
Colormap colormap;
Pixel foreground, background;
Pixel borderColor, frameColor;
Pixel beadColor[3], railColor[3];
Pixel beadColor[4], railColor[4];
Pixel leftAuxColor, rightAuxColor;
XtCallbackList select;
#endif
......
[Nov 28, 2014] V8.0.2:
Many bugs fixed for the new Counter including highlighting.
[Nov 18, 2014] V8.0.1: Not released
Medieval Counter added. Click left of X to add or right of X to
subtract. Middle of line is a counts as 5 (for base 10).
[Mar 18, 2014] V8.0.0:
Added drip sound for format change.
Moving the decimal point needs a select and a release to a different
......
......@@ -350,6 +350,10 @@ georgian :
danish :
./$(PROG) -nolee -danish -rails 10 -decimalPosition 0 -decimalComma -group
#Medieval Counter
medieval :
./$(PROG) -medieval -rails 5 -decimalPosition 0 -romanNumerals
#Mesoamerican Nepohualtzintzin (similar to Japanese Soroban base 20)
mesoamerican :
./$(PROG) -nolee -generic -diamond -topNumber 3 -bottomNumber 4 -topSpaces 1 -bottomSpaces 1 -decimalPosition 0 -base 20 -anomaly 2 -vertical
......
......@@ -7,33 +7,26 @@ other stuff to do
due Motif interface, seem hard to add more modern features to old API,
probably overtime to adopt Gnome or KDE. (Leaning towards Gnome... its
so cute.) QT? Seems like just another rewrite with no benefit over Java.
3. "xmabacus not all fields labeled": If talking about display, was
thinking that was self evident, as in a calculator display, but I guess
I am too close to it. Maybe something like this in each display, but
only if auxiliaries are present (and could have them disappear if its
being used):
Auxiliary Left> 0.0 Auxiliary Right> 0.0
Primary> 0.0
4. Ancient Roman Numerals in display and Modern Roman Numerals on
3. Ancient Roman Numerals in display and Modern Roman Numerals on
abacus only available from command-line. Can add to menu if anyone
wants it.
5. What graphics in menu would help?
6. The calculator portion does not work for big numbers, i.e. where
4. What graphics in menu would help?
5. The calculator portion does not work for big numbers, i.e. where
one can type in math operations and see the abacus perform, e.g.
5,000,000,000,000,000.0+1.
7. When displayBase != base calculate with strings instead of
6. When displayBase != base calculate with strings instead of
"long long". I.e. the number of rails can be large if displayBase =
base, but may error out when this is not true for a large number of
rails.
8. Allow for locale to use "," for "." and vice versa.
7. Allow for locale to use "," for "." and vice versa.
It might be confusing to change this if one actually wanted to try
different locales, e.g. Danish Abacus.
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.6.html
9. Handling of negatives would be nice (work started with complement
8. Handling of negatives would be nice (work started with complement
function).
10. "Teach" has beads and rail highlighted to make clear the current
9. "Teach" has beads and rail highlighted to make clear the current
position of calculation for digit; should this be extended to highlight
a printed digit?
11. Developing Custom Draw Controls i.e. NM_CUSTOMDRAW. Would this help
10. Developing Custom Draw Controls i.e. NM_CUSTOMDRAW. Would this help
make "widgets" in Window (so Lee's Abacus could run there)?
http://www.codeproject.com/KB/list/lvcustomdraw.aspx
pixmaps/16x16/abacus.png

134 Bytes | W: | H:

pixmaps/16x16/abacus.png

135 Bytes | W: | H:

pixmaps/16x16/abacus.png
pixmaps/16x16/abacus.png
pixmaps/16x16/abacus.png
pixmaps/16x16/abacus.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -9,8 +9,8 @@ static char *abacus_16x16[] = {
"o c #FFD700",
/* pixels */
"XXXXXXXXXXXXXXX ",
"X + + + X ",
"X +++ +++ +++ X ",
"X + + + X ",
"X o o o X ",
"X o o o X ",
"XXXXXXXXXXXXXXX ",
......
#define VERSION "8.0.0"
#define VERSION "8.0.2"
This diff is collapsed.
win32/abacus.ico

2.67 KB | W: | H:

win32/abacus.ico

2.67 KB | W: | H:

win32/abacus.ico
win32/abacus.ico
win32/abacus.ico
win32/abacus.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,9 +7,11 @@ background=174 178 195; #AEB2C3 (steel blue)
primaryBeadColor=139 0 0; DarkRed
secondaryBeadColor=139 115 85; burlywood4 (brown)
highlightBeadColor=255 0 255; magenta
checkerBeadColor=64 64 64; gray25
primaryRailColor=255 215 0; gold
secondaryRailColor=202 225 255; LightSteelBlue1 (silver)
highlightRailColor=160 32 240; Purple
lineRailColor=0 0 0; Black
borderColor=64 64 64; gray25
frameColor=139 126 102; wheat4 (tan)
bumpSound=.\bump.wav
......@@ -74,6 +76,7 @@ format=Chinese
;format=Roman
;format=Russian
;format=Danish
;format=Medieval
;format=Generic
;
; override the above with these to have different abaci
......@@ -164,6 +167,15 @@ rails=10
group=1
decimalComma=1
format=Danish
[setupme]
; Medieval Counter
vertical=1
topNumber=2
bottomNumber=5
romanNumerals=1
decimalPosition=0
rails=5
format=Medival
[setupma]
; Mesoamerican Nepohualtzintzin (similar to Japanese Soroban base 20)
diamond=1
......
This diff is collapsed.
This diff is collapsed.
......@@ -16,7 +16,7 @@
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.\"
.TH XABACUS 6 "18 Mar 2014" "V8.0.0"
.TH XABACUS 6 "18 Nov 2014" "V8.0.1"
.SH NAME
xabacus \- Abacus X widget
.SH SYNOPSIS
......@@ -27,8 +27,9 @@ xabacus \- Abacus X widget
[\-{border|bd} {color}] [\-frame {color}]
[\-primaryBeadColor {color}] [\-leftAuxBeadColor {color}]
[\-rightAuxBeadColor {color}] [\-secondaryBeadColor {color}]
[\-highlightBeadColor {color}] [\-primaryRailColor {color}]
[\-secondaryRailColor {color}] [\-highlightRailColor {color}]
[\-highlightBeadColor {color}]
[\-primaryRailColor {color}] [\-secondaryRailColor {color}]
[\-highlightRailColor {color}] [\-lineRailColor {color}]
[\-bumpSound {filename}] [\-moveSound {filename}]
[\-dripSound {filename}] [\-[no]sound]
[\-delay msecs] [\-[no]script] [\-[no]demo]
......@@ -50,21 +51,21 @@ xabacus \- Abacus X widget
[\-shiftAnomalySq {int}] [\-displayBase {int}]
[\-[no]pressOffset] [\-[no]romanNumerals]
[\-[no]latin] [\-[no]ancientRoman] [\-[no]modernRoman]
[\-{chinese|japanese|korean|roman|russian|danish|generic}]
[\-{chinese|japanese|korean|roman|russian|danish|medieval|generic}]
[\-{it|uk|fr}] [\-version]
.SH DESCRIPTION
This is an implementation of the classic Chinese abacus
This is an implementation of the classic Chinese Abacus
(Saun\-pan) which has its origins in the 12th century.
The device has two decks. Each deck, separated by a partition,
normally has 13 rails on which are mounted beads.
The device has two decks. Each deck, separated by a
partition, normally has 13 rails on which are mounted beads.
Each rail on the top deck contains 1 or 2 beads, and each
rod on the bottom deck contains 4 or 5 beads. Each bead on
the upper deck has a value of five, while each bead on the
lower deck has value of one. Beads are considered counted,
when moved \fItowards\fP the partition separating the decks, i.e.
to add a value of one, a bead in the bottom deck is moved up,
and to add a value of 5, a bead in the top deck is moved
to add a value of one, a bead in the bottom deck is moved
up, and to add a value of 5, a bead in the top deck is moved
down.
The basic operations of the abacus are addition and subtraction.
......@@ -77,16 +78,16 @@ Also with multiplication, one can carry out calculations on
different parts of the abacus for scratch work, here it is
nice to have a long abacus.
The pre\-WWII Japanese abacus (Soroban) (or Korean Supan)
is similar to the Chinese abacus but has only one bead
per rail on the top deck. The later Japanese abacus was
The pre\-WWII Japanese Abacus (Soroban) (or Korean Supan)
is similar to the Chinese Abacus but has only one bead
per rail on the top deck. The later Japanese Abacus was
further simplified to have only 4 beads per rail on the
bottom deck.
The Roman hand\-abacus predates the Chinese abacus and is
very similar to the later Japanese abacus, but seems to
The Roman Hand\-Abacus predates the Chinese Abacus and is
very similar to the later Japanese Abacus, but seems to
have fallen out of use with the Fall of the Roman Empire
(at least 3 are in existence). The Roman abaci are brass
(at least 3 are in existence). The Roman Abaci are brass
plates where the beads move in slots. In addition to the
normal 7 columns of beads, they generally have 2 special
columns on the right side. In two examples: the first
......@@ -94,26 +95,32 @@ special column was for 12ths (12 uncia (ounces) = 1 as) and
had one extra bead in the bottom deck. Also the last column
was a combination of halves, quarters, and twelfths of an
ounce and had no beads in the top deck and 4 beads at the
bottom (beads did not have to come to the top to be counted
but at one of 3 marked points where the top bead was for
halves, the next bead for quarters, and the last two beads
for twelfths). In another surviving example: the 2 special
columns were switched and the combination column was
broken into 3 separate slots. If available, decimal input
is ignored.
bottom (beads did not have to come to the top to be
counted but at one of 3 marked points where the top bead
was for halves, the next bead for quarters, and the last two
beads for twelfths). In another surviving example: the 2
special columns were switched and the combination column
was broken into 3 separate slots. If available, decimal
input is ignored.
The Russian abacus was invented in the 17th century, here
The Russian Abacus was invented in the 17th century, here
the beads are moved from right to left. It has colored
beads in the middle for ease of use. Quarters represent
1/4 Rubles and are only present historically on the Russian
abacus (Schoty). Some of the older Schoty have a extra place
Abacus (Schoty). Some of the older Schoty have a extra place
for the 1/4 Kopek (quarter percent) as well as the 1/4
Ruble (quarter).
The Danish abacus was used in the early 20th century in
The Danish Abacus was used in the early 20th century in
elementary schools as a teaching aid.
The Mesoamerican Nepohualtzintzin is a Japanese abacus
The Medieval Counter is a primitive form of the abacus and
was used in Europe as late as the 1600s. It was useful
considering they were using it with Roman Numerals. This
is similar to the Salamis Greek Tablet from 4th or 5th
Century BCE.
The Mesoamerican Nepohualtzintzin is a Japanese Abacus
base 20. The Mesoamericans had base 20 with the
exception of the 3rd decimal place where instead of
20*20=400 the third place marked 360 and the 4th place was
......@@ -122,22 +129,22 @@ exception of the 3rd decimal place where instead of
but the anomaly took away its true power.
An easy way of figuring out time in seconds given hours,
minutes, and seconds, can be done on the abacus with special
anomaly "watch" settings.
minutes, and seconds, can be done on the abacus with
special anomaly "watch" settings.
The Chinese Solid\-and\-Broken\-Bar System is a base 12
numbering system and not really an abacus. When the abacus
is setup in this way though (topFactor 3, topNumber 3,
bottomNumber 2, base 12, displayBase 12), it is easy to relate
the two.
numbering system and not really an abacus. When the
abacus is setup in this way though (topFactor 3, topNumber 3,
bottomNumber 2, base 12, displayBase 12), it is easy to
relate the two.
The signed bead is an invention of the author, and is not
present on any historical abacus (to his knowledge) and is used
to represent negatives. "New & Improved" abacus models
have two auxiliary decks stacked above the principal deck
that enable multiplication, division, square\-root, and
present on any historical abacus (to his knowledge) and is
used to represent negatives. "New & Improved" abacus
models have two auxiliary decks stacked above the principal
deck that enable multiplication, division, square\-root, and
cube\-root computations to be performed with equal ease as
addition and subtraction.
addition and subtraction (well, so I have read).
.SH FEATURES
Click "\fBmouse\-left\fP" button on a bead you want to move. The
beads will shift themselves to vacate the area of the
......@@ -159,7 +166,7 @@ Press "\fBI\fP" or "\fBi\fP" keys to increment the number of rails.
Press "\fBD\fP" or "\fBd\fP" keys to decrement the number of rails.
.LP
Press "\fBF\fP" or "\fBf\fP" keys to switch between Chinese,
Japanese, Korean, Roman, Russian, and Danish formats.
Japanese, Korean, Roman, Russian, Danish, and Medieval formats.
There is an extra "Generic" format, this allows one to
break some rules binding the other formats (for example,
if one wanted more beads on top deck than on bottom deck you
......@@ -295,6 +302,10 @@ This option specifies the secondary color of the rails (resource name
This option specifies the highlight color of the rails (resource name
"\fIhighlightRailColor\fP").
.TP 8
.B \-lineRailColor \fIcolor\fP
This option specifies the color of the lines when using checkers
(resource name "\fIlineRailColor\fP").
.TP 8
.B \-bumpSound \fIfilename\fP
This option specifies the file for the bump sound for the movement
of the beads (resource name "\fIbumpSound\fP").
......@@ -591,6 +602,11 @@ This option specifies the format of the abacus (resource name
"\fIformat\fP") to "Danish" for the Danish Elementary School
Abacus teaching aid.
.TP 8
.B \-medieval
This option specifies the format of the abacus (resource name
"\fIformat\fP") to "Medieval" for the Medieval Counter, with
counters instead of beads.
.TP 8
.B \-generic
This option specifies the format on the abacus (resource name
"\fIformat\fP") to "Generic". This option specifies a format that is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment