Commit 94c6f67c authored by Florian Ernst's avatar Florian Ernst

Imported Upstream version 7.1.7

parent 72382fa1
!!!!
! Abacus: Class resource for xabacus
!!!!
! Chinese Saun-pan (Suan Pan)
Abacus*topFactor: 5
Abacus*bottomFactor: 1
Abacus*topOrient: true
Abacus*bottomOrient: false
Abacus*topNumber: 2
Abacus*bottomNumber: 5
Abacus*topSpaces: 2
Abacus*bottomSpaces: 2
Abacus*rails: 13
Abacus*slot: false
Abacus*diamond: false
!Abacus*format: Chinese
!Abacus*format: Japanese
!Abacus*format: Korean
!Abacus*format: Roman
!Abacus*format: Russian
Abacus*format: Other
Abacus*base: 10
Abacus*displayBase: 10
Abacus*vertical: false
Abacus*romanNumerals: false
Abacus*quarter: false
!!Abacus*quarterPercent: false
Abacus*mono: false
Abacus*reverse: false
Abacus*beadColor: DarkRed
Abacus*beadBorder: gray25
Abacus*frameColor: cyan
Abacus*railColor: gold
Abacus*foreground: black
Abacus*background: #AEB2C3
Abacus*frameColor: cyan
Abacus*railColor: gold
Abacus*beadColor: DarkRed
Abacus*beadBorder: gray25
Abacus*delay: 50
Abacus*sound: false
Abacus*bumpSound: @READPATH@/bump.au
......@@ -59,25 +35,46 @@ Abacus*demoPath: @READPATH@
!Abacus*demoPath: /usr/local/share/games/xabacus
!Abacus*demoPath: /usr/share/games/xabacus
!
! Chinese Saun-pan (Suan Pan)
Abacus*vertical: false
Abacus*slot: false
Abacus*diamond: false
Abacus*topOrient: true
Abacus*bottomOrient: false
Abacus*topFactor: 5
Abacus*bottomFactor: 1
Abacus*topNumber: 2
Abacus*bottomNumber: 5
Abacus*topSpaces: 2
Abacus*bottomSpaces: 2
Abacus*topPiece: 0
Abacus*bottomPiece: 0
Abacus*topPiecePercent: 0
Abacus*bottomPiecePercent: 0
Abacus*shiftPercent: 2
Abacus*sign: false
Abacus*decimalPosition: 2
Abacus*groupSize: 3
Abacus*rails: 13
Abacus*base: 10
Abacus*anomaly: 0
Abacus*shiftAnomaly: 2
Abacus*anomalySq: 0
Abacus*shiftAnomalySq: 2
Abacus*displayBase: 10
Abacus*romanNumerals: false
! format of Other allows you to fine tune options (or else may be clobbered)
!Abacus*format: Chinese
!Abacus*format: Japanese
!Abacus*format: Korean
!Abacus*format: Roman
!Abacus*format: Russian
Abacus*format: Other
!
! override the above with these to have different abacii
! Chinese base 16 Saun-pan
Abacus16*topFactor: 8
Abacus16*topNumber: 2
Abacus16*bottomNumber: 8
Abacus16*rails: 15
Abacus16*base: 16
Abacus20*displayBase: 16
! Japanese base 20 Soroban or Mesoamerican (Aztec) Nepohualtzitzin
Abacus20*topNumber: 3
Abacus20*bottomNumber: 4
Abacus20*base: 20
Abacus20*displayBase: 20
! The Aztecs 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
! 20*360, etc.. They independently created their own zero (only Babylon
! (base 60) and India (base 10) have done this) but the anomaly took away
! its true power. This abacus here is without the anomaly.
! Chinese Saun-pan (Suan Pan)
Abacuscn*format: Chinese
! Japanese post-WWII Soroban
Abacusjp*topNumber: 1
Abacusjp*bottomNumber: 4
Abacusjp*topSpaces: 1
......@@ -97,18 +94,46 @@ Abacusro*topNumber: 1
Abacusro*bottomNumber: 4
Abacusro*topSpaces: 1
Abacusro*bottomSpaces: 1
Abacusro*rails: 15
Abacusro*topPiece: 2
Abacusro*bottomPiece: 6
Abacusro*rails: 9
Abacusro*slot: true
Abacusro*format: Roman
Abacusro*romanNumerals: true
! Way of easily figuring out seconds, given hours, minutes, seconds
!Abacusro*anomaly: 4
!Abacusro*shiftAnomaly: 2
!Abacusro*anomalySq: 4
!Abacusro*shiftAnomalySq: 2
! Russian Schoty
Abacusru*bottomFactor: 1
Abacusru*bottomOrient: true
Abacusru*topNumber: 0
Abacusru*bottomNumber: 10
Abacusru*topSpaces: 0
Abacusru*bottomPiece: 4
Abacusru*bottomPiecePercent: 4
Abacusru*shiftPercent: 2
Abacusru*rails: 11
Abacusru*format: Russian
Abacusru*vertical: true
Abacusru*quarter: true
!Abacusru*quarterPercent: true
! Chinese base 16 Saun-pan
Abacus16*topFactor: 8
Abacus16*topNumber: 2
Abacus16*bottomNumber: 8
Abacus16*rails: 15
Abacus16*base: 16
Abacus16*displayBase: 16
! Japanese base 20 Soroban or Mesoamerican Nepohualtzintzin
Abacusma*topNumber: 3
Abacusma*bottomNumber: 4
Abacusma*base: 20
Abacusma*displayBase: 20
Abacusma*anomaly: 2
Abacusma*shiftAnomaly: 2
! Chinese solid-and-broken-bar system
Abacuscn12*topFactor: 3
Abacuscn12*topNumber: 3
Abacuscn12*bottomNumber: 2
Abacuscn12*base: 12
Abacuscn12*displayBase: 12
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -38,36 +38,17 @@
***********************************************************************/
#if 0
/* This is not ready for prime-time. */
#define QUARTER_PERCENT 1
#define DEBUG 1
#endif
#ifndef WINVER
#define XtNselectCallback ((char *) "selectCallback")
#define XtNrails ((char *) "rails")
#define XtNbase ((char *) "base")
#define XtNdisplayBase ((char *) "displayBase")
#define XtNvertical ((char *) "vertical")
#define XtNsign ((char *) "sign")
#define XtNquarter ((char *) "quarter")
#define XtNquarterPercent ((char *) "quarterPercent")
#define XtNmode ((char *) "mode")
#define XtNformat ((char *) "format")
#define XtNromanNumerals ((char *) "romanNumerals")
#define XtNtopNumber ((char *) "topNumber")
#define XtNtopOrient ((char *) "topOrient")
#define XtNtopFactor ((char *) "topFactor")
#define XtNtopSpaces ((char *) "topSpaces")
#define XtNbottomNumber ((char *) "bottomNumber")
#define XtNbottomOrient ((char *) "bottomOrient")
#define XtNbottomFactor ((char *) "bottomFactor")
#define XtNbottomSpaces ((char *) "bottomSpaces")
#define XtNmono ((char *) "mono")
#define XtNreverse ((char *) "reverse")
#define XtNframeColor ((char *) "frameColor")
#define XtNrailColor ((char *) "railColor")
#define XtNbeadColor ((char *) "beadColor")
#define XtNbeadBorder ((char *) "beadBorder")
#define XtNmono ((char *) "mono")
#define XtNreverse ((char *) "reverse")
#define XtNdelay ((char *) "delay")
#define XtNsound ((char *) "sound")
#define XtNbumpSound ((char *) "bumpSound")
......@@ -75,46 +56,53 @@
#define XtNbuffer ((char *) "buffer")
#define XtNscript ((char *) "script")
#define XtNdemo ((char *) "demo")
#define XtNdecimalPosition ((char *) "decimalPosition")
#define XtNmenu ((char *) "menu")
#define XtNdemoPath ((char *) "demoPath")
#define XtNdemoFont ((char *) "demoFont")
#define XtNdemoForeground ((char *) "demoForeground")
#define XtNdemoBackground ((char *) "demoBackground")
#define XtNvertical ((char *) "vertical")
#define XtNslot ((char *) "slot")
#define XtNdiamond ((char *) "diamond")
#define XtNtopOrient ((char *) "topOrient")
#define XtNbottomOrient ((char *) "bottomOrient")
#define XtNtopNumber ((char *) "topNumber")
#define XtNbottomNumber ((char *) "bottomNumber")
#define XtNtopFactor ((char *) "topFactor")
#define XtNbottomFactor ((char *) "bottomFactor")
#define XtNtopSpaces ((char *) "topSpaces")
#define XtNbottomSpaces ((char *) "bottomSpaces")
#define XtNtopPiece ((char *) "topPiece")
#define XtNbottomPiece ((char *) "bottomPiece")
#define XtNtopPiecePercent ((char *) "topPiecePercent")
#define XtNbottomPiecePercent ((char *) "bottomPiecePercent")
#define XtNshiftPercent ((char *) "shiftPercent")
#define XtNsign ((char *) "sign")
#define XtNdecimalPosition ((char *) "decimalPosition")
#define XtNgroupSize ((char *) "groupSize")
#define XtNrails ((char *) "rails")
#define XtNbase ((char *) "base")
#define XtNanomaly ((char *) "anomaly")
#define XtNshiftAnomaly ((char *) "shiftAnomaly")
#define XtNanomalySq ((char *) "anomalySq")
#define XtNshiftAnomalySq ((char *) "shiftAnomalySq")
#define XtNdisplayBase ((char *) "displayBase")
#define XtNromanNumerals ((char *) "romanNumerals")
#define XtNmode ((char *) "mode")
#define XtNformat ((char *) "format")
#define XtNmenu ((char *) "menu")
#define XtNdeck ((char *) "deck")
#define XtNrail ((char *) "rail")
#define XtNnumber ((char *) "number")
#define XtNframed ((char *) "framed")
#define XtNslot ((char *) "slot")
#define XtNdiamond ((char *) "diamond")
#define XtNaux ((char *) "aux")
#define XtNmathBuffer ((char *) "mathBuffer")
#define XtNversionOnly ((char *) "versionOnly")
#define XtCRails ((char *) "Rails")
#define XtCSpaces ((char *) "Spaces")
#define XtCBase ((char *) "Base")
#define XtCDisplayBase ((char *) "DisplayBase")
#define XtCVertical ((char *) "Vertical")
#define XtCSign ((char *) "Sign")
#define XtCQuarter ((char *) "Quarter")
#define XtCQuarterPercent ((char *) "QuarterPercent")
#define XtCMode ((char *) "Mode")
#define XtCFormat ((char *) "Format")
#define XtCRomanNumerals ((char *) "RomanNumerals")
#define XtCTopNumber ((char *) "TopNumber")
#define XtCTopFactor ((char *) "TopFactor")
#define XtCTopOrient ((char *) "TopOrient")
#define XtCTopSpaces ((char *) "TopSpaces")
#define XtCBottomNumber ((char *) "BottomNumber")
#define XtCBottomFactor ((char *) "BottomFactor")
#define XtCBottomOrient ((char *) "BottomOrient")
#define XtCBottomSpaces ((char *) "BottomSpaces")
#define XtCMono ((char *) "Mono")
#define XtCReverse ((char *) "Reverse")
#define XtCFrameColor ((char *) "FrameColor")
#define XtCRailColor ((char *) "RailColor")
#define XtCBeadColor ((char *) "BeadColor")
#define XtCBeadBorder ((char *) "BeadBorder")
#define XtCMono ((char *) "Mono")
#define XtCReverse ((char *) "Reverse")
#define XtCDelay ((char *) "Delay")
#define XtCSound ((char *) "Sound")
#define XtCBumpSound ((char *) "BumpSound")
......@@ -122,18 +110,44 @@
#define XtCBuffer ((char *) "Buffer")
#define XtCScript ((char *) "Script")
#define XtCDemo ((char *) "Demo")
#define XtCDecimalPosition ((char *) "DecimalPosition")
#define XtCMenu ((char *) "Menu")
#define XtCDemoPath ((char *) "DemoPath")
#define XtCDemoFont ((char *) "DemoFont")
#define XtCDemoForeground ((char *) "DemoForeground")
#define XtCDemoBackground ((char *) "DemoBackground")
#define XtCVertical ((char *) "Vertical")
#define XtCSlot ((char *) "Slot")
#define XtCDiamond ((char *) "Diamond")
#define XtCTopOrient ((char *) "TopOrient")
#define XtCBottomOrient ((char *) "BottomOrient")
#define XtCTopNumber ((char *) "TopNumber")
#define XtCBottomNumber ((char *) "BottomNumber")
#define XtCTopFactor ((char *) "TopFactor")
#define XtCBottomFactor ((char *) "BottomFactor")
#define XtCTopSpaces ((char *) "TopSpaces")
#define XtCBottomSpaces ((char *) "BottomSpaces")
#define XtCTopPiece ((char *) "TopPiece")
#define XtCBottomPiece ((char *) "BottomPiece")
#define XtCTopPiecePercent ((char *) "TopPiecePercent")
#define XtCBottomPiecePercent ((char *) "BottomPiecePercent")
#define XtCShiftPercent ((char *) "ShiftPercent")
#define XtCSign ((char *) "Sign")
#define XtCDecimalPosition ((char *) "DecimalPosition")
#define XtCGroupSize ((char *) "GroupSize")
#define XtCRails ((char *) "Rails")
#define XtCBase ((char *) "Base")
#define XtCAnomaly ((char *) "Anomaly")
#define XtCShiftAnomaly ((char *) "ShiftAnomaly")
#define XtCAnomalySq ((char *) "AnomalySq")
#define XtCShiftAnomalySq ((char *) "ShiftAnomalySq")
#define XtCDisplayBase ((char *) "DisplayBase")
#define XtCRomanNumerals ((char *) "RomanNumerals")
#define XtCMode ((char *) "Mode")
#define XtCFormat ((char *) "Format")
#define XtCMenu ((char *) "Menu")
#define XtCDeck ((char *) "Deck")
#define XtCRail ((char *) "Rail")
#define XtCNumber ((char *) "Number")
#define XtCFramed ((char *) "Framed")
#define XtCSlot ((char *) "Slot")
#define XtCDiamond ((char *) "Diamond")
#define XtCAux ((char *) "Aux")
#define XtCMathBuffer ((char *) "MathBuffer")
typedef struct _AbacusClassRec *AbacusWidgetClass;
......@@ -170,7 +184,10 @@ typedef struct {
#define ABACUS_SIGN 5
#define ABACUS_QUARTER 6
#define ABACUS_QUARTERPERCENT 7
#define ABACUS_FORMAT 8
#define ABACUS_TWELFTH 8
#define ABACUS_ANOMALY 9
#define ABACUS_WATCH 10
#define ABACUS_FORMAT 11
#define PRIMARY 0
#define LEFTAUX 1
......@@ -205,9 +222,7 @@ typedef struct {
#define DEFAULTBASE 10
#define QUARTERS 4
#define QUARTERPERCENTS 4
/* Migrate to Locale */
#define MAX_FRACTION_DIGITS 2
#define TWELFTH 12
typedef struct _AbacusRec *AbacusWidget;
typedef struct _AbacusRec *AbacusDemoWidget;
......
......@@ -793,7 +793,7 @@ static void evaluateExpression(double *myLeft, char *binaryOperation)
while (!emptyExpression()) {
myRight = *myLeft;
getPreviousExpressionPart(myLeft, binaryOperation);
if (binaryOperation != '\0')
if (binaryOperation != NULL)
*myLeft = evaluateDouble(*myLeft, *binaryOperation,
myRight);
else
......@@ -835,6 +835,7 @@ parse(double input, Boolean numeral, char newOperation)
if (negateNext) {
negateNext = False;
right = -input;
pendingOperation = '\0';
} else {
right = input;
}
......
......@@ -228,7 +228,7 @@ SetAllColors(AbacusWidget w, Boolean init)
XtReleaseGC((Widget) w, w->abacusDemo.inverseGC);
w->abacusDemo.inverseGC = XtGetGC((Widget) w, valueMask, &values);
if (w->abacusDemo.fontInfo)
XSetFont(XtDisplay(w), w->abacusDemo.foregroundGC,
(void) XSetFont(XtDisplay(w), w->abacusDemo.foregroundGC,
w->abacusDemo.fontInfo->fid);
}
......@@ -670,7 +670,7 @@ DestroyAbacusDemo(Widget old)
XtReleaseGC(old, w->abacusDemo.foregroundGC);
XtReleaseGC(old, w->abacusDemo.inverseGC);
XtRemoveCallbacks(old, XtNselectCallback, w->abacus.select);
XFreeFont(XtDisplay(w), w->abacusDemo.fontInfo);
(void) XFreeFont(XtDisplay(w), w->abacusDemo.fontInfo);
}
#else
......
......@@ -51,7 +51,13 @@ is no recorded usage of a larger Roman numeral in Roman times.
An older notation for Roman numerals was represented thus:
( = C, I) = D, (I) = M, I)) = v, ((I)) = x, I))) = l, (((I))) = c,
_
|X| = m */
|X| = m
Fractions
12 ounces (uncia) in a as
S = 1/2 ounce
) = 1/4 ounce
Z = 1/3 ounce
*/
};
#ifdef HAVE_LONG_LONG
......@@ -133,7 +139,8 @@ int2String(char *buf, LONG number, int base, Boolean negative)
}
static int
flt2String(char *buf, LONG number, int abacusBase, int base, int places, int decimalPosition)
flt2String(char *buf, LONG number, int abacusBase, int base, int places,
int decimalPosition)
{
int position = 0, digit;
double mult = 1.0 / base;
......@@ -209,13 +216,12 @@ squareroot(int i)
}
void
dividePieces(char * buf, int base, int pieces, int mult, int places)
dividePieces(char *buf, int base, int pieces, int mult, int places)
{
int position, digit, inter;
digit = mult / pieces;
inter = mult % pieces;
/* This works because digit should never be greater than base here */
(void) sprintf(buf, "%1d.", digit);
for (position = 2; position < places;) {
digit = (inter * base) / pieces;
......@@ -228,6 +234,40 @@ dividePieces(char * buf, int base, int pieces, int mult, int places)
buf[position] = '\0';
}
void
shiftDecimal(char *buf, char *aBuf, int shift, int place)
{
int size = strlen(aBuf);
int loc = 0, i = 0;
while (aBuf[loc] != '.' && loc < size) {
buf[i] = aBuf[loc];
loc++;
i++;
}
buf[i] = aBuf[loc];
i++;
while (loc < place + 1) {
loc++;
buf[i] = aBuf[loc];
i++;
}
if (shift > 0) {
/* shift right */
for (i = place + 2; i < shift + place + 2; i++)
buf[i] = '0';
} else {
/* shift left */
loc -= shift;
}
while (loc < size - 1) {
loc++;
buf[i] = aBuf[loc];
i++;
}
buf[i] = '\0';
}
/* 2nd grade math is hard */
/* May disregard sign if different */
void
......@@ -307,10 +347,18 @@ addStrings(char *finalBuf, char *aBuf, char *bBuf, int base)
} else
(void) strcpy(finalBuf, bBuf);
}
i = strlen(finalBuf) - 1;
while (finalBuf[i] == '0' && finalBuf[i - 1] != '.')
i--;
finalBuf[i + 1] = '\0';
}
void
convertString(char * buf, char * inbuf, int base, int displayBase, int decimalPosition)
convertString(char * buf, char * inbuf, int base, int displayBase,
int decimalPosition,
int anomaly, int shiftAnomaly,
int anomalySq, int shiftAnomalySq)
{
char fltbuf[256];
int i, last, place = -1, decimalPlace, decimalPointPlace;
......@@ -340,8 +388,17 @@ convertString(char * buf, char * inbuf, int base, int displayBase, int decimalPo
char2Int(inbuf[i]));
place--;
} else {
intPart += (((LONG) power(base, place)) *
char2Int(inbuf[i]));
if (place >= shiftAnomaly && anomaly != 0) {
if (place >= shiftAnomalySq + shiftAnomaly && anomalySq != 0)
intPart += (((LONG) power(base, place - 2))) *
char2Int(inbuf[i]) * (base - anomaly) *
(base - anomalySq);
else
intPart += (((LONG) power(base, place - 1))) *
char2Int(inbuf[i]) * (base - anomaly);
} else
intPart += (((LONG) power(base, place)) *
char2Int(inbuf[i]));
place--;
}
}
......
......@@ -5,7 +5,7 @@
#
###
#
# Copyright (c) 1994 - 2005 David Albert Bagley, bagleyd@tux.org
# Copyright (c) 1994 - 2006 David Albert Bagley, bagleyd@tux.org
#
# Abacus demo and neat pointers from
# Copyright (c) 1991 - 1998 Luis Fernandes, elf@ee.ryerson.ca
......@@ -62,7 +62,9 @@ extern void RomanNumeralsAbacus(AbacusWidget w);
extern void SignAbacus(AbacusWidget w);
extern void QuarterAbacus(AbacusWidget w);
extern void QuarterPercentAbacus(AbacusWidget w);
extern void VerticalAbacus(AbacusWidget w);
extern void TwelfthAbacus(AbacusWidget w);
extern void AnomalyAbacus(AbacusWidget w);
extern void WatchAbacus(AbacusWidget w);
extern void EnterAbacus(AbacusWidget w);
extern void LeaveAbacus(AbacusWidget w);
......@@ -119,12 +121,11 @@ extern AbacusClassRec abacusClassRec;
#define BOTTOM 0
#define CARRY 2 /* I guess it could be even more if you have a weird config
also need a space to hold null (not included) */
#define SPECIAL_QUARTERS 2 /* Quarters, QuarterPercents */
#define SPECIAL_PIECES 2 /* Pieces, PiecePercents */
/* Migrate to Locale */
#define DECIMAL_SEPARATOR '.'
#define GROUP_SEPARATOR ','
#define GROUPING_SIZE 3
#define MAXLENFORMAT 9
......@@ -147,6 +148,7 @@ typedef struct _DeckPart {
int spaces; /* spaces between beads */
int room; /* spaces + number */
Position height;
int piece, piecePercent;
} DeckPart;
typedef struct _AbacusPart {
......@@ -155,14 +157,16 @@ typedef struct _AbacusPart {
int rails; /* number of columns of beads */
int decimalPosition, numDigits;
int base, displayBase; /* 10 usually */
int shiftPercent, shiftAnomaly, shiftAnomalySq;
int groupSize, anomaly, anomalySq;
int delay, numSlices, mode;
int deck, rail, number;
Position width, midHeight, midBarY, railWidth;
Point frameSize, beadSize;
Point pos, delta, offset;
Boolean sign, romanNumerals;
Boolean mono, reverse, script, demo, focus, vertical, aux;
Boolean versionOnly;
Boolean sign, quarter, quarterPercent, romanNumerals;
Boolean slot, diamond, sound;
char *digits, *mathBuffer;
FILE *fp;
......@@ -216,12 +220,15 @@ extern char int2Char(int digit);
extern void dividePieces(char * buf, int base, int pieces,
int mult, int places);
extern void shiftDecimal(char *buf, char *aBuf, int shift, int place);
extern void addStrings(char *finalBuf, char *buf, char *pieceBuf,
int base);
extern void subStrings(char *finalBuf, char *buf, char *pieceBuf,
int base);
extern void convertString(char * buf, char * inbuf,
int base, int displayBase, int decimalPosition);
int base, int displayBase, int decimalPosition,
int anomaly, int shiftAnomaly,
int anomalySq, int shiftAnomalySq);
extern int sizeofRoman(int base, Boolean romanNumerals);
extern int string2Roman(char *buf, char *inbuf, int base);
......
############################################################
#
# $Id : Makefile.in 7.1.5 2005/10/05 $
# $Id : Makefile.in 7.1.7 2006/01/01 $
#
# xabacus Makefile.in for configure (UNIX X11 support)
############################################################
......@@ -9,7 +9,7 @@
wIDGET = abacus
WIDGET = Abacus
VERNUM = 7.1.5
VERNUM = 7.1.7
GROUP = xabacus
P=x
R=$(P)
......@@ -400,23 +400,13 @@ $(RM) $(VER).tar
dist.man : $(PROG).html vms/$(PROG).hlp
# found man2hlp.sh in lynx source
vms/$(PROG).hlp : $(PROG).man
man2hlp.sh $(PROG).man > vms/$(PROG).hlp
$(PROG).html : $(PROG).man
nroff -man < $(PROG).man | man2html > $(PROG).html
vms/$(PROG).hlp : $(PROG).man
(echo "$(MANNUM) $(PROG)" | tr [:lower:] [:upper:] ; \
nroff -man < $(PROG).man \
| sed -e 's/.//g' -e '/^ *Page [0-9]/D' \
-e '/^User Commands/D' \
-e '/^Games and Demos/D' \
-e '/V[0-9]\.[0-9]\.[0-9] *Last change: /D' \
-e 's/^ //' \
-e '/^NAME/D;/^SYNOPSIS/D;/^DESCRIPTION/D' \
-e 's/\(Copyright\) .*c.*\(19\)/\1 (C) \2/' \
-e 's/^\([A-Z][A-Z]*\) \([A-Z][A-Z]*\)/\1_\2/' \
-e 's/^\([A-Z]\)/2 \1/' \
| more -flsu | /usr/xpg4/bin/more -s) > vms/$(PROG).hlp
html : $(PROG).html
hlp : vms/$(PROG).hlp
......
X-BASED ABACUS
============== Abacus X widget, V7.1.6
============== Abacus X widget, V7.1.7
Primary site: ftp://ftp.tux.org/pub/tux/bagleyd/xabacus
Secondary site: ftp://ibiblio.org/pub/Linux/apps/math
......@@ -143,40 +143,54 @@ FOUND A BUG?
be able to duplicate them.
TODO:
1. Seen it core dump when stressed but can not reproduce it.
2. There are some cases where resizing the number of rails causes
1. There are some cases where resizing the number of rails causes
the calculation to change unnecessarily.
3. Quarter percents for 1/4 Kopeks, code there but needs much fixing.
Adding quarters was like throwing a monkey wrench in the code.
Quarter percents would be more of the same. Also additional problem
where decimal display would need 2 extra spaces. Exploratory work
using:
#define QUARTER_PERCENT
4. The calculator portion does not work for big numbers, i.e. where
2. The calculator portion does not work for big numbers, i.e. where
one can type in math operations and see the abacus perform.
Works better in Java version but new approach allowing parentheses.
Works better in Java version new approach allowing parentheses.
Fix to handle decimals better. Fix to handle negatives.
5. When displayBase != base calculate with strings instead of
3. 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 if this is not true for large number of rails.
6. Also get 1/12ths column (Roman ounces) and a 1/2,1/4,1/3 column to
work for a Roman Abacus.
12ths may be a bit easier even though you have to allow for an
extra bead (5). It would be cool if this could be variable, say
expanding the "quarters" option to include halves to sixteenths...
for English ounce measurements, old stock market pricing, pieces of
eight, etc. Exploratory work using:
#define NTHS
The latter comes in two flavors, where possibly the simpler one,
needs a 3rd deck and is weird because the 3 decks should be below
the main top deck (in the other flavor, the beads could stop midway
on the slot in a IMHO not a well defined way).
7. Signed overflow fixes needed e.g. 50000000000*2=-5000
4. Get 1/2,1/4,1/3 ounces column to work for a Roman Abacus. This
comes in two flavors, where possibly the simpler one, needs 3 decks
(where a single bottom column would be). In the other flavor, the
beads could stop midway on a single slot (in IMHO not a well defined
way).
5. Signed overflow fixes needed e.g. 50000000000*2=-5000
or -100000000000 Chinese converted to Japanese.
8. Option to format output to use commas so numbers can be read easier.
6. Option to format output to use commas so numbers can be read easier.
Also allow for locale to allow "," for ".".
7. Anomaly mode does not work if carries are possible. The way it is
implemented currently, carries throw the calculation off. So the
anomaly option is disabled if this is true, such as Chinese, Korean,
Russian or if Quarters or Twelfths are allowed. Although there is no
historical abacus like this, it would be nice if this was not a
requirement.
HISTORY
[Jan 01, 2006] V7.1.7:
Sign, quarter, and quarterPercent code all rewritten to be less buggy.
Quarter percents option for 1/4 Kopeks.
Use of "piece" instead of "quarter" for more variablility. This now
allows a "twelvths" capability (Roman ounces) for Roman Hand Abacus.
Its pretty configurable (with the configuration file) so you can have
a range from halves to sixteenths (stock market pricing, pieces of
eight, etc), and possibly beyond if you want to get crazy.
New symbols on the bar for "-" for sign, "O" for pieces. If the base and
piece and format in Russian style set weird it could otherwise be hard
hard to read. O used because it was used on the Roman Hand Abacus.
Anomaly option for Mesoamerican Nepohualtzintzin Abacus. Basically a
JP Abacus in base 20 (3/4) where the columns left of the 2nd digit are
multiples of 360 (instead of 400). 4th column of unit beads would be
20x360. Bar marked with an "X" where the anomaly is. Note: this
is turned off if there are extra beads as in the Chinese mode or
Korean mode or this leads to even more unexpected anomalies.
AnomalySq option to make more Anomaly more configurable, now can have a
represention of time using hours, minutes, seconds. Babylonians are
responsible for that mess. Though they probably did not use an
abacus.
[Nov 19, 2005] V7.1.6:
Vertical for proper Russian schoty (rotate xabacus clockwise 90 degrees).
Use "v" or from the command line -vertical.
......
x(m)abacus for Debian
---------------------
You can copy /etc/X11/app-defaults/Abacus to $(HOME)/Abacus and modify the
local copy for adjusting the way x(m)abacus looks and feels.
-- Florian Ernst <florian@debian.org>, Sun, 23 Jan 2005 15:48:48 +0100
xabacus (7.1.7-1) unstable; urgency=low
* New Mantainer. (closes: #344449)
* Updated debian/copyright file with new mantainer.
* Updated menu files.
* Added suport to desktop menu (added xabacus.desktop and xmabacus.desktop
files).
* Updated debian/watch file.
* New upstream release.
-- Jose Carlos Medeiros <debian@psabs.com.br> Mon, 16 Jan 2006 19:04:33 -0200
xabacus (7.1.6-1) unstable; urgency=low
* New upstream release
* Packaging upgrades
-- Florian Ernst <florian@debian.org> Wed, 30 Nov 2005 17:20:06 +0100
xabacus (7.1.5-1) unstable; urgency=low
* New upstream release
* debian/rules: minor improvements in style
* debian/*doc-base: fix path / name of Abacus.ps
-- Florian Ernst <florian@debian.org> Mon, 24 Oct 2005 18:16:19 +0200
xabacus (7.1.4-1) unstable; urgency=low
* New upstream release
* debian/control: Standards-Version 3.6.2, no changes required
-- Florian Ernst <florian@debian.org> Tue, 9 Aug 2005 14:42:11 +0200
xabacus (7.1.3-1) unstable; urgency=low
* New upstream release
+ includes better fix for esound problem, dropping my patch again
* New maintainer address, many thanks to Eric Van Buggenhaut for previous
sponsoring
* debian/control: start Description: with lowercase letter instead
-- Florian Ernst <florian@debian.org> Sun, 23 Jan 2005 15:25:18 +0100
xabacus (7.1.2-1) unstable; urgency=low
* Didn't get uploaded!
* New upstream release
+ xabacus demo patch included, so droppping it from diff.gz
+ patch for esound applied
* debian/control: added libesd0-dev to Build-Depends, removed
autotools-dev (upstream takes care himself)
* debian/copyright: update, elaborate a little bit further
* debian/rules: adjusted to new release
-- Florian Ernst <florian_ernst@gmx.net> Wed, 22 Dec 2004 23:25:59 +0100