Commit c1fd2744 authored by Innocent De Marchi's avatar Innocent De Marchi

Updated version 8.1.3+dfsg1 from 'upstream/8.1.3+dfsg1'

with Debian dir b6144c2c946a8950012abe8cbcb7b4d5460b338b
parents 5a90f067 58e9cfe1
This diff is collapsed.
/*
* @(#)Abacus.h
*
* Copyright 1994 - 2016 David A. Bagley, bagleyd AT verizon.net
* Copyright 1994 - 2017 David A. Bagley, bagleyd AT verizon.net
*
* Abacus demo and neat pointers from
* Copyright 1991 - 1998 Luis Fernandes, elf AT ee.ryerson.ca
......@@ -227,31 +227,38 @@ typedef struct {
#define ACTION_SCRIPT 106
#define ACTION_MOVE 107
#define ACTION_PLACE 108
#define ACTION_HIGHLIGHT_RAIL 109
#define ACTION_UNHIGHLIGHT_RAIL 110
#define ACTION_HIGHLIGHT_RAILS 111
#define ACTION_CLEAR 200
#define ACTION_COMPLEMENT 201
#define ACTION_INCREMENT 202
#define ACTION_DECREMENT 203
#define ACTION_FORMAT 204
#define ACTION_ROMAN_NUMERALS 206
#define ACTION_GROUP 207
#define ACTION_SIGN 208
#define ACTION_QUARTER 209
#define ACTION_TWELFTH 210
#define ACTION_QUARTER_PERCENT 211
#define ACTION_SUBDECK 212
#define ACTION_EIGHTH 213
#define ACTION_MUSEUM 214
#define ACTION_ANOMALY 216
#define ACTION_WATCH 217
#define ACTION_VERTICAL 218
#define ACTION_TEACH 219
#define ACTION_RIGHT_TO_LEFT_ADD 220
#define ACTION_RIGHT_TO_LEFT_MULT 221
#define ACTION_SOUND 222
#define ACTION_SPEED_UP 223
#define ACTION_SLOW_DOWN 224
#define ACTION_CLEAR_NODEMO 225
#define ACTION_TEACH_LINE 226
#define ACTION_DECIMAL_CLEAR 201
#define ACTION_COMPLEMENT 202
#define ACTION_INCREMENT 210
#define ACTION_DECREMENT 211
#define ACTION_FORMAT 220
#define ACTION_ROMAN_NUMERALS 230
#define ACTION_ANCIENT_ROMAN 231
#define ACTION_LATIN 232
#define ACTION_GROUP 233
#define ACTION_SIGN 240
#define ACTION_QUARTER 241
#define ACTION_QUARTER_PERCENT 242
#define ACTION_TWELFTH 243
#define ACTION_SUBDECK 250
#define ACTION_EIGHTH 251
#define ACTION_MUSEUM 252
#define ACTION_MODERN_ROMAN 260
#define ACTION_ANOMALY 261
#define ACTION_WATCH 262
#define ACTION_VERTICAL 263
#define ACTION_TEACH 264
#define ACTION_RIGHT_TO_LEFT_ADD 270
#define ACTION_RIGHT_TO_LEFT_MULT 271
#define ACTION_SOUND 272
#define ACTION_SPEED_UP 273
#define ACTION_SLOW_DOWN 274
#define ACTION_CLEAR_NODEMO 275
#define ACTION_TEACH_LINE 276
#define ACTION_DEMO 300
#define ACTION_NEXT 301
#define ACTION_REPEAT 302
......@@ -286,13 +293,17 @@ typedef struct {
#define ACTION_ABOUT 903
#define ACTION_IGNORE 999
#define HIGHLIGHTS_DECK (-12)
#define UNHIGHLIGHT_DECK (-11)
#define HIGHLIGHT_DECK (-10)
#define TEACH_DECK (-9)
#define CALC_DECK (-8)
#define MORE_DECK (-7)
#define JUMP_DECK (-6)
#define REPEAT_DECK (-5)
#define NEXT_DECK (-4)
#define CLEAR_DECK (-3)
#define CLEAR_DECIMAL_DECK (-3)
#define CLEAR_DECK (-2)
#define IGNORE_DECK (-1)
#define MIN_RAILS 1
#define MIN_DEMO_RAILS 3
......
......@@ -27,9 +27,9 @@
#include "AbacusP.h"
#ifndef WINVER
static int displayedError = 0;
static void initializeAbacusDemo(Widget request, Widget renew);
static void exposeAbacusDemo(Widget renew, XEvent *event, Region region);
#if 0
static void resizeAbacusDemo(AbacusWidget w);
......@@ -400,6 +400,8 @@ static unsigned int getNumberBooks(void) {
static unsigned int getNumberEditions(AbacusWidget w) {
if (fallback)
return getFallbackEditions();
if (abacusLibrary.book == NULL)
return 0;
return abacusLibrary.book[w->abacusDemo.bookCount].editions;
}
......@@ -422,6 +424,8 @@ static unsigned int getEdition(AbacusWidget w) {
static unsigned int getNumberChapters(AbacusWidget w) {
if (fallback)
return getFallbackChapters();
if (abacusLibrary.book[w->abacusDemo.bookCount].edition == NULL)
return 0;
return abacusLibrary.book[w->abacusDemo.bookCount].edition[getEdition(w)].chapters;
}
......@@ -430,6 +434,8 @@ static unsigned int getNumberLessons(AbacusWidget w) {
if (fallback) {
return getFallbackLessons(w->abacusDemo.chapterCount);
} else {
if (abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter == NULL)
return 0;
return abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter[w->abacusDemo.chapterCount].lessons;
}
}
......@@ -439,6 +445,8 @@ static unsigned int getNumberMoves(AbacusWidget w) {
if (fallback) {
return getFallbackMoves(edition, w->abacusDemo.chapterCount, w->abacusDemo.lessonCount);
} else {
if (abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter[w->abacusDemo.chapterCount].lesson == NULL)
return 0;
return abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter[w->abacusDemo.chapterCount].lesson[w->abacusDemo.lessonCount].moves;
}
}
......@@ -594,57 +602,83 @@ doLesson(AbacusWidget w)
/* load first instance */
unsigned int edition = getEdition(w);
const char *tmp;
if (w->abacusDemo.lessonCount >= getNumberLessons(w)) {
#ifdef DEBUG
(void) fprintf(stderr, "returning doLesson:\n");
#endif
w->abacusDemo.chapter = True;
return;
}
if (fallback) {
tmp = lessonTextFallback[w->abacusDemo.bookCount][edition][w->abacusDemo.chapterCount][w->abacusDemo.lessonCount][w->abacusDemo.moveCount][0];
} else {
tmp = abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter[w->abacusDemo.chapterCount].lesson[w->abacusDemo.lessonCount].move[w->abacusDemo.moveCount].code;
}
(void) sscanf(tmp, "%d %d %d %d %d",
&(w->abacusDemo.aux),
&(w->abacusDemo.deck), &(w->abacusDemo.rail),
&(w->abacusDemo.number), &(w->abacusDemo.lines));
unsigned int numberMoves = getNumberMoves(w);
if (w->abacusDemo.moveCount < numberMoves) {
if (w->abacusDemo.lessonCount >= getNumberLessons(w)) {
#ifdef DEBUG
(void) fprintf(stderr,
"aux = %d, deck = %d, rail = %d, number = %d, lines = %d\n",
w->abacusDemo.aux,
w->abacusDemo.deck, w->abacusDemo.rail,
w->abacusDemo.number, w->abacusDemo.lines);
(void) fprintf(stderr, "returning doLesson:\n");
#endif
if (w->abacusDemo.lines > LINES)
w->abacusDemo.lines = LINES;
for (line = 0; line < w->abacusDemo.lines; line++) {
w->abacusDemo.chapter = True;
return;
}
if (fallback) {
tmp = lessonTextFallback[w->abacusDemo.bookCount][edition][w->abacusDemo.chapterCount][w->abacusDemo.lessonCount][w->abacusDemo.moveCount][line + 1];
tmp = lessonTextFallback[w->abacusDemo.bookCount][edition][w->abacusDemo.chapterCount][w->abacusDemo.lessonCount][w->abacusDemo.moveCount][0];
} else {
tmp = abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter[w->abacusDemo.chapterCount].lesson[w->abacusDemo.lessonCount].move[w->abacusDemo.moveCount].lineText[line]; // 64 char
tmp = abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter[w->abacusDemo.chapterCount].lesson[w->abacusDemo.lessonCount].move[w->abacusDemo.moveCount].code;
}
(void) sscanf(tmp, "%d %d %d %d %d",
&(w->abacusDemo.aux),
&(w->abacusDemo.deck), &(w->abacusDemo.rail),
&(w->abacusDemo.number), &(w->abacusDemo.lines));
#ifdef DEBUG
(void) fprintf(stderr,
"aux = %d, deck = %d, rail = %d, number = %d, lines = %d\n",
w->abacusDemo.aux,
w->abacusDemo.deck, w->abacusDemo.rail,
w->abacusDemo.number, w->abacusDemo.lines);
#endif
if (w->abacusDemo.lines > LINES)
w->abacusDemo.lines = LINES;
for (line = 0; line < w->abacusDemo.lines; line++) {
if (fallback) {
tmp = lessonTextFallback[w->abacusDemo.bookCount][edition][w->abacusDemo.chapterCount][w->abacusDemo.lessonCount][w->abacusDemo.moveCount][line + 1];
} else {
tmp = abacusLibrary.book[w->abacusDemo.bookCount].edition[edition].chapter[w->abacusDemo.chapterCount].lesson[w->abacusDemo.lessonCount].move[w->abacusDemo.moveCount].lineText[line]; // 64 char
}
(void) strcpy(displayText[line], tmp);
displayText[line][strlen(displayText[line])] = '\0';
}
(void) sprintf(displayText[line], tmp);
displayText[line][strlen(displayText[line])] = '\0';
}
/* A '0' in demo number signifies that only the text is to be
* displayed (i.e. nothing is to be added or subtracted).
*/
unsigned int numberMoves = getNumberMoves(w);
if (w->abacusDemo.moveCount < numberMoves) {
if (w->abacusDemo.moveCount <= numberMoves) {
setAbacusMove(w, ACTION_MOVE, w->abacusDemo.aux,
w->abacusDemo.deck, w->abacusDemo.rail,
w->abacusDemo.number);
if (w->abacusDemo.highlightAux >= 0 &&
w->abacusDemo.highlightRail >= 0) {
setAbacusHighlightRail(w, ACTION_UNHIGHLIGHT_RAIL,
w->abacusDemo.highlightAux,
w->abacusDemo.highlightRail);
w->abacusDemo.highlightAux = -1;
w->abacusDemo.highlightRail = -1;
}
if (w->abacusDemo.aux >= 0 &&
w->abacusDemo.rail >= 0) {
if (w->abacusDemo.number == 0) {
w->abacusDemo.highlightAux = -1;
w->abacusDemo.highlightRail = -1;
} else {
w->abacusDemo.highlightAux = w->abacusDemo.aux;
w->abacusDemo.highlightRail = w->abacusDemo.rail;
setAbacusHighlightRail(w, ACTION_HIGHLIGHT_RAIL,
w->abacusDemo.aux, w->abacusDemo.rail);
}
}
}
#ifdef DEBUG
(void) fprintf(stderr, " doLesson:\n");
#endif
if (++w->abacusDemo.moveCount >= numberMoves) {
if (++w->abacusDemo.moveCount > numberMoves) {
//(void) fclose(w->abacusDemo.fp);
drawText(w, CONCL);
Sleep(2000);
if (w->abacusDemo.aux >= 0) {
setAbacusHighlightRails(w, w->abacusDemo.aux);
w->abacusDemo.highlightAux = -1;
}
drawText(w, QUERY);
setAbacusDemo(w, ACTION_CLEAR_NODEMO);
} else if (w->abacusDemo.started) {
......@@ -817,13 +851,18 @@ initializeAbacusDemo(
w->abacusDemo.lessonCount = 0;
w->abacusDemo.moveCount = 0;
w->abacusDemo.lines = LINES;
w->abacusDemo.highlightAux = -1;
w->abacusDemo.highlightRail = -1;
readParseFile(XML_FILE);
if (abacusLibrary.book != NULL) {
fallback = False;
#ifndef WINVER
/* always true in Windows version, some runtime issue with libraries */
} else {
(void) fprintf(stderr, "Trouble using xml, using fallback demo.\n");
if (displayedError == 0) {
(void) fprintf(stderr, "Trouble using XML, using the static fallback single book demo.\n");
displayedError = 1;
}
#endif
}
}
......@@ -893,6 +932,11 @@ destroyAbacusDemo(Widget old)
{
AbacusWidget w = (AbacusWidget) old;
if (abacusLibrary.book != NULL) {
freeAbacus(abacusLibrary.book, abacusLibrary.books);
abacusLibrary.book = NULL;
abacusLibrary.books = 0;
}
XtReleaseGC(old, w->abacusDemo.foregroundGC);
XtReleaseGC(old, w->abacusDemo.inverseGC);
XtRemoveCallbacks(old, XtNselectCallback, w->abacus.select);
......@@ -971,6 +1015,11 @@ hideAbacusDemo(AbacusWidget w
)
{
setAbacusDemo(w, ACTION_HIDE);
if (abacusLibrary.book != NULL) {
freeAbacus(abacusLibrary.book, abacusLibrary.books);
abacusLibrary.book = NULL;
abacusLibrary.books = 0;
}
}
static
......@@ -995,6 +1044,14 @@ clearAbacusDemo(AbacusWidget w)
w->abacusDemo.started = True;
/*w->abacusDemo.query = True;*/
w->abacusDemo.moveCount = 0;
if (w->abacusDemo.highlightAux >= 0 &&
w->abacusDemo.highlightRail >= 0) {
setAbacusHighlightRail(w, ACTION_UNHIGHLIGHT_RAIL,
w->abacusDemo.highlightAux,
w->abacusDemo.highlightRail);
w->abacusDemo.highlightAux = -1;
w->abacusDemo.highlightRail = -1;
}
}
#ifndef WINVER
......
This diff is collapsed.
/*
* @(#)AbacusM.c
*
* Copyright 1994 - 2016 David A. Bagley, bagleyd AT verizon.net
* Copyright 1994 - 2017 David A. Bagley, bagleyd AT verizon.net
*
* All rights reserved.
*
......@@ -589,7 +589,12 @@ romanFraction(char *buf, int base, int number, int subnumber,
int halfBase = subbase / 2;
int fraction = number, subfraction = subnumber;
fraction %= base;
if (base < ROMANFRACTIONBASE) {
fraction *= ROMANFRACTIONBASE / base;
subfraction *= ROMANFRACTIONBASE / base;
fraction += (subfraction / subbase);
subfraction = subfraction % subbase;
}
if (fraction == 1 && subfraction >= halfBase) {
subfraction -= halfBase;
if (latin) {
......@@ -600,12 +605,10 @@ romanFraction(char *buf, int base, int number, int subnumber,
}
} else if (fraction > 0) {
if (latin) {
(void) strcat(buf, twelfthStrings[fraction *
ROMANFRACTIONBASE / base]);
(void) strcat(buf, twelfthStrings[fraction]);
gotFraction = True;
} else {
(void) strcat(buf, twelfthGlyphs[fraction *
ROMANFRACTIONBASE / base]);
(void) strcat(buf, twelfthGlyphs[fraction]);
}
}
if (subfraction >= halfBase) {
......@@ -650,7 +653,7 @@ append(char *buf, int position, int place, Boolean ancient)
}
int
string2Roman(char *buf, char *inbuf, int base,
string2Roman(char *buf, char *inbuf, int base, Boolean decimalFraction,
int pieces, int number, int subnumber, int subbase,
char decimalPoint, Boolean ancientRoman, Boolean latin)
{
......@@ -660,6 +663,8 @@ string2Roman(char *buf, char *inbuf, int base,
buf[position] = '[';
position++;
if (inbuf[i] == '-') {
buf[position] = '?';
position++;
buf[position] = ']';
position++;
buf[position] = '\0';
......@@ -668,14 +673,15 @@ string2Roman(char *buf, char *inbuf, int base,
last = (int) strlen(inbuf);
for (i = 0; i < last; i++) {
if (inbuf[i] == decimalPoint) {
last = i;
break;
}
}
last = i;
i = 0;
digit = char2Int(inbuf[i]);
if (last > loga || (last == loga &&
digit >= ((base >= 8) ? base / 2 - 1 : base))) {
digit >= ((base >= 8) ? base / 2 - 1 : base))
|| decimalFraction) {
buf[position] = '?';
position++;
buf[position] = ']';
......@@ -729,8 +735,6 @@ string2Roman(char *buf, char *inbuf, int base,
char fractbuf[MAX_ROMANFRACT] = "";
int subfraction = subnumber;
if (pieces != ROMANFRACTIONBASE)
subfraction = 0; /* words not scalable */
if (latin && position > 1 && (number != 0 || subfraction != 0))
(void) strcat(buf, " ");
romanFraction(fractbuf, pieces, number, subfraction,
......
......@@ -60,18 +60,22 @@ extern void hideAbacus(AbacusWidget w);
extern void selectAbacus(AbacusWidget w, const int x, const int y);
extern void releaseAbacus(AbacusWidget w, const int x, const int y);
extern void clearAbacus(AbacusWidget w);
extern void clearDecimalAbacus(AbacusWidget w);
extern void complementAbacus(AbacusWidget w);
extern void incrementAbacus(AbacusWidget w);
extern void decrementAbacus(AbacusWidget w);
extern void changeFormatAbacus(AbacusWidget w);
extern void changeMuseumAbacus(AbacusWidget w);
extern void toggleRomanNumeralsAbacus(AbacusWidget w);
extern void toggleAncientRomanAbacus(AbacusWidget w);
extern void toggleLatinAbacus(AbacusWidget w);
extern void toggleGroupingAbacus(AbacusWidget w);
extern void toggleNegativeSignAbacus(AbacusWidget w);
extern void toggleQuartersAbacus(AbacusWidget w);
extern void toggleQuarterPercentsAbacus(AbacusWidget w);
extern void toggleTwelfthsAbacus(AbacusWidget w);
extern void toggleSubdecksAbacus(AbacusWidget w);
extern void toggleModernRomanAbacus(AbacusWidget w);
extern void toggleEighthsAbacus(AbacusWidget w);
extern void toggleAnomalyAbacus(AbacusWidget w);
extern void toggleWatchAbacus(AbacusWidget w);
......@@ -267,6 +271,7 @@ typedef struct _AbacusPart {
typedef struct _AbacusDemoPart {
unsigned int bookCount, chapterCount, lessonCount, moveCount;
int aux, deck, rail, number, lines;
int highlightAux, highlightRail;
int fontHeight;
FILE *fp;
Boolean book, chapter, query, started, framed;
......@@ -335,11 +340,14 @@ extern unsigned int getFallbackMoves(unsigned int edition, unsigned int chapter,
extern const char *bookTextFallback[1][LINES];
extern const char *chapterTextFallback[1][5][LINES];
extern const char *lessonTextFallback[1][4][5][2][41][LINES + 1];
extern void freeAbacus(struct bookType *bookAbacus, int books);
extern void setAbacus(AbacusWidget w, int reason);
extern void setAbacusDemo(AbacusWidget w, int reason);
extern void setAbacusMove(AbacusWidget w, int reason, int aux,
int deck, int rail, int number);
extern void setAbacusHighlightRail(AbacusWidget w, int reason, int aux, int rail);
extern void setAbacusHighlightRails(AbacusWidget w, int aux);
extern void setAbacusText(AbacusWidget w, int reason, char * text, int line);
extern int char2Int(char character);
extern char int2Char(int digit);
......@@ -361,7 +369,7 @@ extern void convertString(char * buf, char * inbuf,
char decimalPoint);
extern int sizeofRoman(int base, Boolean romanNumerals, Boolean ancientRoman);
extern int string2Roman(char *buf, char *inbuf, int base,
extern int string2Roman(char *buf, char *inbuf, int base, Boolean decimalFraction,
int pieces, int number, int subnumber, int subbase,
char decimalPoint, Boolean ancientRoman, Boolean latin);
extern void string2Group(char *buf, char *inbuf, int groupSize,
......@@ -377,6 +385,7 @@ extern int convertBaseToBottom(int base);
extern int rootInt(int i, int n);
extern void clearRails(AbacusWidget w);
extern void clearDecimalRails(AbacusWidget w);
extern void addBackAnomaly(char * buf, int anomaly, int shift, int base);
extern void zeroFractionalPart(char * buf);
extern void convertStringToAbacus(AbacusWidget w, const char *string, int aux);
......@@ -390,6 +399,9 @@ extern void drawTeachText(const char* line, int i);
extern void clearAuxRails(AbacusWidget w, int aux);
#endif
extern void highlightRail(AbacusWidget w, int aux, int rail,
Boolean highlight);
extern void highlightRails(AbacusWidget w, int aux);
extern void readParseFile(const char * fileName);
#endif /* _AbacusP_h */
This diff is collapsed.
[Oct 01, 2017] V8.1.3:
Updates for 64 bit compilation in Windows.
Quarter percent now independent of piece rail for quarter and
twelfths.
Fixing when subdeck and changing format. Also a could crash
when changing format on some machines.
Fix a long standing bug when adding under teach and piece rail
is set.
Windows now grays out options where appropriate.
[Aug 21, 2017] V8.1.2:
When showing demo moves it now highlights the rail being moved.
Added GUI interface for Ancient Roman in display and Modern Roman
on rails (not historical), also will show fractions in Latin.
Turn off Roman Numeral display when using decimal fractions.
Subrails and quarters now mapped in Roman Numerals (by factor of
3, not historical). (Symbols on right are not correct but not
correct for subdeck eighths either.)
Adding/removing sign no longer clears subrail.
Removing subdeck or format left extra values and beads.
Fixed eighth sensitivity issue in Motif menu.
[Aug 01, 2017] V8.1.1:
Valgrind helped find some definite memory leaks.
Show last move in lesson.
[Jul 17, 2017] V8.1.0:
Removed the lesson files and now use same abacusDemo.xml in Java port.
Added fallback code to use a static demo if can not read XML demo file.
Windows version always uses fallback, some issue with libxml2-2.dll
at runtime.
at runtime. The X version if compiled without libxml2 will also use
fallback to use static demo.
Added another book from Abacus Guide. Only first few chapters and
examples so far. (Not available in fallback mode.)
Updated sound configuration for X version. Uses a simple included
......
......@@ -375,12 +375,19 @@ bar :
base16 :
./$(PROG) -nolee -japanese -base 16 -displayBase 10
percent :
./$(PROG) -bottomPiecePercent 4
gdb :
gdb ./$(PROG)
dbx :
dbx ./$(PROG)
valgrind :
valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all \
./$(PROG)
clean :
$(RM) *.o *.exe* core *~ *% *.bak make.log MakeOut Makefile.dep \
$(PROG) $(PROG).errs $(PROG).1.html $(PROG)._man
......@@ -450,11 +457,22 @@ dist.man : $(PROG).html vms/$(PROG).hlp
# man2html 3.0.1, changed psgz 1666 and txsz 1552
$(PROG).html : $(PROG).man
nroff -c -man -Tascii < $(PROG).man | man2html -title $(PROG) > $(PROG).html
if nroff -c -man -Tascii < $< | man2html -title $(PROG) > $(PROG).tmp; then\
mv $(PROG).tmp $@;\
else\
rm -f $(PROG).tmp;\
fi
# found man2hlp.sh in lynx source
vms/$(PROG).hlp : $(PROG).man
man2hlp.sh $(PROG).man > vms/$(PROG).hlp
man2hlp.sh $< > $(PROG).tmp 2> $(PROG)2.tmp
if grep error $(PROG)2.tmp > /dev/null; then\
cat $(PROG)2.tmp;\
rm -f $(PROG).tmp $(PROG)2.tmp;\
else\
rm -f $(PROG)2.tmp;\
mv $(PROG).tmp $@;\
fi
html : $(PROG).html
......@@ -469,6 +487,14 @@ print:
read :
$(MORE) README
AUTOMAKE=/usr/share/automake-1.15
automake :
cp -p ${AUTOMAKE}/config.guess .;\
cp -p ${AUTOMAKE}/config.sub .;\
cp -p ${AUTOMAKE}/install-sh .;\
cp -p ${AUTOMAKE}/mkinstalldirs .
antic :
antic *.h *.c */*/*.xpm */*/*.xbm */*.xbm */*.c */*.h
......
......@@ -32,18 +32,21 @@ Maintainer: David A. Bagley <bagleyd AT verizon.net>
sudo apt-get install lesstif2-dev (defunct)
You need to install XPM if you want color icons:
sudo apt-get install libxpm-dev (strongly recommended)
You need to install XMU if you want editres:
To install XMU if you want editres:
sudo apt-get install libxmu-dev (probably not useful)
You need to install sound libraries:
To install sound libraries (defunct):
sudo apt-get install librplay3-dev
sudo apt-get install libesd0-dev
sudo apt-get install libaudiofile-dev
sudo apt-get install nas-dev
sudo apt-get install pulse-dev
(well I think they worked at one time, what is problem now?)
I gave up and just configure now with --enable-def-play=play.sh
In place of these it is just configured by default with
--enable-def-play=play.sh
You need to install XML reader for demo:
sudo apt-get install libxml2-dev (recommended)
Without this compiled in it falls back to a brief static demo.
With this compiled in it parses the abacusDemo.xml file to read in
all the demos.
Then should be a simple
configure; make
......
......@@ -9,29 +9,26 @@ other stuff to do
adopt Gnome or KDE but do not yet see the value added over available
Java version. Also a big problem I see is that these other libraries
keep changing.
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.
4. What graphics in menu would help?
5. The calculator portion does not work for big numbers, i.e. where
3. What graphics in menu would help?
4. 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.
6. When displayBase != base calculate with strings instead of
5. 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.
7. Allow for locale to use "," for "." and vice versa.
6. 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
8. Handling of negatives would be nice (work started with complement
7. Handling of negatives would be nice (work started with complement
function).
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?
10. Developing Custom Draw Controls i.e. NM_CUSTOMDRAW. Would this help
8. "Demo" and "Teach" have beads and rail highlighted to make clear the
current position of calculation for digit; should this be extended to
highlight a printed digit?
9. 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
11. Code is there for Windows version to use abacusDemo.xml. Commented
10. Code is there for Windows version to use abacusDemo.xml. Commented
out in win32/Makefile, as there is some issue with libxml2-2.dll at
runtime.
runtime. Currently this just uses static fallback demo.
......@@ -14,6 +14,7 @@
<!ATTLIST chapter name CDATA #REQUIRED>
<!ATTLIST lesson name CDATA #REQUIRED>
]>
<!-- code: aux deck rail position textLines -->
<abacus>
<book name="Abacus Demo" author="Luis Fernandes and David Bagley">
<edition version="Chinese">
......@@ -865,7 +866,7 @@
<move>
<code>0 1 0 -1 4</code>
<text>
jesson 2.1: Counting Down
Lesson 2.1: Counting Down
4 but wait now...
(pending opertation)
Press Space-bar to Continue
......@@ -877,7 +878,6 @@
Lesson 2.1: Counting Down
Add four to get
4
Press Space-bar to Continue
</text>
</move>
......
This diff is collapsed.
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2014 Free Software Foundation, Inc.
# Copyright 1992-2017 Free Software Foundation, Inc.
timestamp='2014-05-01'
timestamp='2017-02-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -25,7 +25,7 @@ timestamp='2014-05-01'
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
......@@ -33,7 +33,7 @@ timestamp='2014-05-01'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
......@@ -53,8 +53,7 @@ timestamp='2014-05-01'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
......@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2014 Free Software Foundation, Inc.
Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -117,8 +116,8 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
......@@ -255,12 +254,13 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
......@@ -301,10 +301,12 @@ case $basic_machine in
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
......@@ -312,6 +314,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
......@@ -326,6 +329,9 @@ case $basic_machine in
c6x)
<