summaryrefslogtreecommitdiff
path: root/app/bin
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-28 20:24:50 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-28 20:24:50 +0100
commit09795a01ef859f072920de9df974d1b03b9ab9a4 (patch)
tree4d05907fc37f1bd781e506f5e196f7435aeec0ab /app/bin
parent5b4163d8c76b03f0d31b09866aa4bd06b4d8d804 (diff)
New upstream version 4.2.4aupstream/4.2.4a
Diffstat (limited to 'app/bin')
-rw-r--r--app/bin/CMakeLists.txt10
-rw-r--r--app/bin/acclkeys.h13
-rw-r--r--app/bin/bdf2xtp.c56
-rw-r--r--app/bin/bitmaps/l1.xbm10
-rw-r--r--app/bin/bitmaps/l10.xbm10
-rw-r--r--app/bin/bitmaps/l11.xbm10
-rw-r--r--app/bin/bitmaps/l12.xbm10
-rw-r--r--app/bin/bitmaps/l13.xbm10
-rw-r--r--app/bin/bitmaps/l14.xbm10
-rw-r--r--app/bin/bitmaps/l15.xbm10
-rw-r--r--app/bin/bitmaps/l16.xbm10
-rw-r--r--app/bin/bitmaps/l17.xbm10
-rw-r--r--app/bin/bitmaps/l18.xbm10
-rw-r--r--app/bin/bitmaps/l19.xbm10
-rw-r--r--app/bin/bitmaps/l2.xbm10
-rw-r--r--app/bin/bitmaps/l20.xbm10
-rw-r--r--app/bin/bitmaps/l21.xbm6
-rw-r--r--app/bin/bitmaps/l22.xbm6
-rw-r--r--app/bin/bitmaps/l23.xbm6
-rw-r--r--app/bin/bitmaps/l24.xbm6
-rw-r--r--app/bin/bitmaps/l25.xbm6
-rw-r--r--app/bin/bitmaps/l26.xbm6
-rw-r--r--app/bin/bitmaps/l27.xbm6
-rw-r--r--app/bin/bitmaps/l28.xbm6
-rw-r--r--app/bin/bitmaps/l29.xbm6
-rw-r--r--app/bin/bitmaps/l3.xbm10
-rw-r--r--app/bin/bitmaps/l30.xbm6
-rw-r--r--app/bin/bitmaps/l31.xbm6
-rw-r--r--app/bin/bitmaps/l32.xbm6
-rw-r--r--app/bin/bitmaps/l33.xbm6
-rw-r--r--app/bin/bitmaps/l34.xbm6
-rw-r--r--app/bin/bitmaps/l35.xbm6
-rw-r--r--app/bin/bitmaps/l36.xbm6
-rw-r--r--app/bin/bitmaps/l37.xbm6
-rw-r--r--app/bin/bitmaps/l38.xbm6
-rw-r--r--app/bin/bitmaps/l39.xbm6
-rw-r--r--app/bin/bitmaps/l4.xbm10
-rw-r--r--app/bin/bitmaps/l40.xbm6
-rw-r--r--app/bin/bitmaps/l41.xbm6
-rw-r--r--app/bin/bitmaps/l42.xbm6
-rw-r--r--app/bin/bitmaps/l43.xbm6
-rw-r--r--app/bin/bitmaps/l44.xbm6
-rw-r--r--app/bin/bitmaps/l45.xbm6
-rw-r--r--app/bin/bitmaps/l46.xbm6
-rw-r--r--app/bin/bitmaps/l47.xbm6
-rw-r--r--app/bin/bitmaps/l48.xbm6
-rw-r--r--app/bin/bitmaps/l49.xbm6
-rw-r--r--app/bin/bitmaps/l5.xbm10
-rw-r--r--app/bin/bitmaps/l50.xbm6
-rw-r--r--app/bin/bitmaps/l51.xbm6
-rw-r--r--app/bin/bitmaps/l52.xbm6
-rw-r--r--app/bin/bitmaps/l53.xbm6
-rw-r--r--app/bin/bitmaps/l54.xbm6
-rw-r--r--app/bin/bitmaps/l55.xbm6
-rw-r--r--app/bin/bitmaps/l56.xbm6
-rw-r--r--app/bin/bitmaps/l57.xbm6
-rw-r--r--app/bin/bitmaps/l58.xbm6
-rw-r--r--app/bin/bitmaps/l59.xbm6
-rw-r--r--app/bin/bitmaps/l6.xbm10
-rw-r--r--app/bin/bitmaps/l60.xbm6
-rw-r--r--app/bin/bitmaps/l61.xbm6
-rw-r--r--app/bin/bitmaps/l62.xbm6
-rw-r--r--app/bin/bitmaps/l63.xbm6
-rw-r--r--app/bin/bitmaps/l64.xbm6
-rw-r--r--app/bin/bitmaps/l65.xbm6
-rw-r--r--app/bin/bitmaps/l66.xbm6
-rw-r--r--app/bin/bitmaps/l67.xbm6
-rw-r--r--app/bin/bitmaps/l68.xbm6
-rw-r--r--app/bin/bitmaps/l69.xbm6
-rw-r--r--app/bin/bitmaps/l7.xbm10
-rw-r--r--app/bin/bitmaps/l70.xbm6
-rw-r--r--app/bin/bitmaps/l71.xbm6
-rw-r--r--app/bin/bitmaps/l72.xbm6
-rw-r--r--app/bin/bitmaps/l73.xbm6
-rw-r--r--app/bin/bitmaps/l74.xbm6
-rw-r--r--app/bin/bitmaps/l75.xbm6
-rw-r--r--app/bin/bitmaps/l76.xbm6
-rw-r--r--app/bin/bitmaps/l77.xbm6
-rw-r--r--app/bin/bitmaps/l78.xbm6
-rw-r--r--app/bin/bitmaps/l79.xbm6
-rw-r--r--app/bin/bitmaps/l8.xbm10
-rw-r--r--app/bin/bitmaps/l80.xbm6
-rw-r--r--app/bin/bitmaps/l81.xbm6
-rw-r--r--app/bin/bitmaps/l82.xbm6
-rw-r--r--app/bin/bitmaps/l83.xbm6
-rw-r--r--app/bin/bitmaps/l84.xbm6
-rw-r--r--app/bin/bitmaps/l85.xbm6
-rw-r--r--app/bin/bitmaps/l86.xbm6
-rw-r--r--app/bin/bitmaps/l87.xbm6
-rw-r--r--app/bin/bitmaps/l88.xbm6
-rw-r--r--app/bin/bitmaps/l89.xbm6
-rw-r--r--app/bin/bitmaps/l9.xbm10
-rw-r--r--app/bin/bitmaps/l90.xbm6
-rw-r--r--app/bin/bitmaps/l91.xbm6
-rw-r--r--app/bin/bitmaps/l92.xbm6
-rw-r--r--app/bin/bitmaps/l93.xbm6
-rw-r--r--app/bin/bitmaps/l94.xbm6
-rw-r--r--app/bin/bitmaps/l95.xbm6
-rw-r--r--app/bin/bitmaps/l96.xbm6
-rw-r--r--app/bin/bitmaps/l97.xbm6
-rw-r--r--app/bin/bitmaps/l98.xbm6
-rw-r--r--app/bin/bitmaps/l99.xbm6
-rw-r--r--app/bin/cblock.c49
-rw-r--r--app/bin/celev.c1
-rw-r--r--app/bin/chotbar.c13
-rw-r--r--app/bin/cmisc.c8
-rw-r--r--app/bin/compound.c32
-rw-r--r--app/bin/cprofile.c45
-rw-r--r--app/bin/cswitchmotor.c47
-rw-r--r--app/bin/ctodesgn.c22
-rw-r--r--app/bin/ctrain.c36
-rw-r--r--app/bin/custom.c3
-rw-r--r--app/bin/dbitmap.c14
-rw-r--r--app/bin/dcar.c101
-rw-r--r--app/bin/dcustmgm.c23
-rw-r--r--app/bin/denum.c14
-rw-r--r--app/bin/dlayer.c105
-rw-r--r--app/bin/doption.c23
-rw-r--r--app/bin/dprmfile.c239
-rw-r--r--app/bin/draw.c14
-rw-r--r--app/bin/draw.h4
-rw-r--r--app/bin/fileio.c278
-rw-r--r--app/bin/fileio.h15
-rw-r--r--app/bin/i18n.c38
-rw-r--r--app/bin/macro.c38
-rw-r--r--app/bin/misc.c194
-rw-r--r--app/bin/misc.h23
-rw-r--r--app/bin/misc2.c98
-rw-r--r--app/bin/misc2.h3
-rw-r--r--app/bin/param.c66
-rw-r--r--app/bin/trkseg.c52
131 files changed, 1576 insertions, 775 deletions
diff --git a/app/bin/CMakeLists.txt b/app/bin/CMakeLists.txt
index 59aa496..4bc9fdc 100644
--- a/app/bin/CMakeLists.txt
+++ b/app/bin/CMakeLists.txt
@@ -63,6 +63,7 @@ ADD_CUSTOM_COMMAND(
SET(SOURCES
${LIN_SOURCES}
bllnhlp.c
+ cblock.c
ccurve.c
cdraw.c
celev.c
@@ -84,6 +85,7 @@ SET(SOURCES
csplit.c
cstraigh.c
cstruct.c
+ cswitchmotor.c
ctext.c
ctodesgn.c
ctrain.c
@@ -121,14 +123,6 @@ SET(SOURCES
utility.c
)
-IF(XTRKCAD_USE_LAYOUTCONTROL)
- SET(SOURCES
- ${SOURCES}
- cblock.c
- cswitchmotor.c
- )
-ENDIF(XTRKCAD_USE_LAYOUTCONTROL)
-
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${XTrkCAD_BINARY_DIR})
INCLUDE_DIRECTORIES(${help_BINARY_DIR})
diff --git a/app/bin/acclkeys.h b/app/bin/acclkeys.h
index 7770f1a..2d60510 100644
--- a/app/bin/acclkeys.h
+++ b/app/bin/acclkeys.h
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/acclkeys.h,v 1.6 2009-07-08 18:40:27 m_fischer Exp $
+/** \file acclkeys.h
+ * Definition of accelerator keys
*/
/* XTrkCad - Model Railroad CAD
@@ -127,6 +127,7 @@
#define ACCL_ZOOMOUT (WCTL+'-')
#define ACCL_SNAPSHOW (WCTL+']')
#define ACCL_SNAPENABLE (WCTL+'[')
+#define ACCL_MAPSHOW (WCTL+' ')
/* optionsM */
#define ACCL_LAYOUTW (WALT+WCTL+'a')
@@ -146,12 +147,12 @@
#define ACCL_BRIDGE (0)
/* Blocks */
-#define ACCL_BLOCK1 (WALT+WSHIFT+'b')
-#define ACCL_BLOCK2 (WALT+WCTL+WSHIFT+'b')
+#define ACCL_BLOCK1 (0)
+#define ACCL_BLOCK2 (0)
#define ACCL_BLOCK3 (0)
/* Switch Motors */
-#define ACCL_SWITCHMOTOR1 (WSHIFT+'s')
-#define ACCL_SWITCHMOTOR2 (WALT+WSHIFT+'s')
+#define ACCL_SWITCHMOTOR1 (0)
+#define ACCL_SWITCHMOTOR2 (0)
#define ACCL_SWITCHMOTOR3 (0)
#endif
diff --git a/app/bin/bdf2xtp.c b/app/bin/bdf2xtp.c
index 0efeff9..adc2b04 100644
--- a/app/bin/bdf2xtp.c
+++ b/app/bin/bdf2xtp.c
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/bdf2xtp.c,v 1.1 2005-12-07 15:46:58 rc-flyer Exp $
+/** \file bdf2xtp
+ * Bdf2xtp translates .bdf files (which are source files for Winrail track libraries) to .xtp files
*/
@@ -154,7 +154,7 @@ double findAngle( coOrd p0, coOrd p1 )
/* Where do we expect each input line? */
-typedef enum {
+typedef enum {
CLS_NULL,
CLS_START,
CLS_END,
@@ -215,22 +215,22 @@ tokenDesc_t tokens[] = {
{ "EndStraight", CLS_END, ACT_DONE, NULL },
{ "Curve", CLS_START, ACT_CURVE, "SSNNN" },
{ "EndCurve", CLS_END, ACT_DONE, NULL },
- { "Turnout_Left", CLS_START, ACT_TURNOUT_LEFT, "SSN" },
- { "Turnout_Right", CLS_START, ACT_TURNOUT_RIGHT, "SSN" },
+ { "Turnout_Left", CLS_START, ACT_TURNOUT_LEFT, "SSN" },
+ { "Turnout_Right", CLS_START, ACT_TURNOUT_RIGHT, "SSN" },
{ "EndTurnout", CLS_END, ACT_DONE, NULL },
{ "CurvedTurnout_Left", CLS_START, ACT_CURVEDTURNOUT_LEFT, "SSN" },
{ "CurvedTurnout_Right", CLS_START, ACT_CURVEDTURNOUT_RIGHT, "SSN" },
- { "ThreeWayTurnout", CLS_START, ACT_THREEWAYTURNOUT, "SSN" },
- { "Crossing_Left", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" },
- { "Crossing_Right", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" },
- { "DoubleSlip_Left", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" },
- { "DoubleSlip_Right", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" },
- { "Crossing_Symetric", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" },
- { "DoubleSlip_Symetric", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" },
+ { "ThreeWayTurnout", CLS_START, ACT_THREEWAYTURNOUT, "SSN" },
+ { "Crossing_Left", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" },
+ { "Crossing_Right", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" },
+ { "DoubleSlip_Left", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" },
+ { "DoubleSlip_Right", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" },
+ { "Crossing_Symetric", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" },
+ { "DoubleSlip_Symetric", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" },
{ "EndCrossing", CLS_END, ACT_DONE, NULL },
- { "Turntable", CLS_START, ACT_TURNTABLE, "SSNNNN" },
+ { "Turntable", CLS_START, ACT_TURNTABLE, "SSNNNN" },
{ "EndTurntable", CLS_END, ACT_ENDTURNTABLE, NULL },
- { "TravellingPlatform", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" },
+ { "TravellingPlatform", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" },
{ "EndTravellingPlatform", CLS_END, ACT_ENDTRANSFERTABLE, NULL },
{ "Track", CLS_START, ACT_TRACK, "SSN" },
{ "EndTrack", CLS_END, ACT_DONE, NULL },
@@ -255,22 +255,22 @@ tokenDesc_t tokens[] = {
{ "EndGerade", CLS_END, ACT_DONE, NULL },
{ "Bogen", CLS_START, ACT_CURVE, "SSNNN" },
{ "EndBogen", CLS_END, ACT_DONE, NULL },
- { "Weiche_links", CLS_START, ACT_TURNOUT_LEFT, "SSN" },
- { "Weiche_Rechts", CLS_START, ACT_TURNOUT_RIGHT, "SSN" },
+ { "Weiche_links", CLS_START, ACT_TURNOUT_LEFT, "SSN" },
+ { "Weiche_Rechts", CLS_START, ACT_TURNOUT_RIGHT, "SSN" },
{ "EndWeiche", CLS_END, ACT_DONE, NULL },
{ "Bogenweiche_Links", CLS_START, ACT_CURVEDTURNOUT_LEFT, "SSN" },
{ "Bogenweiche_Rechts", CLS_START, ACT_CURVEDTURNOUT_RIGHT, "SSN" },
- { "Dreiwegweiche", CLS_START, ACT_THREEWAYTURNOUT, "SSN" },
- { "Kreuzung_Links", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" },
- { "Kreuzung_Rechts", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" },
- { "DKW_Links", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" },
- { "DKW_Rechts", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" },
- { "Kreuzung_Symmetrisch", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" },
- { "DKW_Symmetrisch", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" },
+ { "Dreiwegweiche", CLS_START, ACT_THREEWAYTURNOUT, "SSN" },
+ { "Kreuzung_Links", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" },
+ { "Kreuzung_Rechts", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" },
+ { "DKW_Links", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" },
+ { "DKW_Rechts", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" },
+ { "Kreuzung_Symmetrisch", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" },
+ { "DKW_Symmetrisch", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" },
{ "EndKreuzung", CLS_END, ACT_DONE, NULL },
- { "Drehscheibe", CLS_START, ACT_TURNTABLE, "SSNNNN" },
+ { "Drehscheibe", CLS_START, ACT_TURNTABLE, "SSNNNN" },
{ "EndDrehscheibe", CLS_END, ACT_ENDTURNTABLE, NULL },
- { "Schiebebuehne", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" },
+ { "Schiebebuehne", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" },
{ "EndSchiebebuehne", CLS_END, ACT_ENDTRANSFERTABLE, NULL },
{ "Schiene", CLS_START, ACT_TRACK, "SSN" },
{ "EndSchiene", CLS_END, ACT_DONE, NULL },
@@ -362,7 +362,7 @@ int isclose( coOrd a, coOrd b )
void searchSegs( segs_t * sp, int ep )
-/* Recursively search the segs looking for the next segement that begins
+/* Recursively search the segs looking for the next segement that begins
where this (sp->pos[ep]) one ends. We mark the ones we have already
used (sp->mark).
Returns when we can't continue.
@@ -618,7 +618,7 @@ char * getLine( void )
lineLen = cp-line;
}
cp = line;
- while ( isspace(*cp) ) {
+ while ( isspace((unsigned char)*cp) ) {
cp++;
lineLen--;
}
@@ -1118,7 +1118,7 @@ void parse( void )
switch( tp->args[inx] ) {
case 'S':
args[inx].string = sp;
- while (isspace(*cp)) cp++;
+ while (isspace((unsigned char)*cp)) cp++;
if (*cp != '"') {
fprintf( stderr, "%d: expected a \": %s\n", lineCount, cp );
goto nextLine;
diff --git a/app/bin/bitmaps/l1.xbm b/app/bin/bitmaps/l1.xbm
index 9cadd73..e332794 100644
--- a/app/bin/bitmaps/l1.xbm
+++ b/app/bin/bitmaps/l1.xbm
@@ -1,6 +1,6 @@
-#define l1_width 10
+#define l1_width 14
#define l1_height 16
-static char l1_bits[] = { 0x00, 0x00,
- 0x30, 0x00, 0x38, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x30, 0x00, 0x30, 0x00,
- 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,
- 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00};
+static char l1_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x50, 0x00,
+ 0x48, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l10.xbm b/app/bin/bitmaps/l10.xbm
index 349f3cf..0cf7dc8 100644
--- a/app/bin/bitmaps/l10.xbm
+++ b/app/bin/bitmaps/l10.xbm
@@ -1,6 +1,6 @@
-#define l10_width 10
+#define l10_width 14
#define l10_height 16
-static char l10_bits[] = { 0x00, 0x00,
- 0xe6, 0x01, 0xe7, 0x01, 0x37, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03,
- 0x36, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03,
- 0xe6, 0x01, 0xef, 0x01, 0x00, 0x00};
+static char l10_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x18,
+ 0x89, 0x14, 0x88, 0x12, 0x88, 0x11, 0x88, 0x10, 0x88, 0x10, 0x08, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l11.xbm b/app/bin/bitmaps/l11.xbm
index fa3ca0e..c38f98b 100644
--- a/app/bin/bitmaps/l11.xbm
+++ b/app/bin/bitmaps/l11.xbm
@@ -1,6 +1,6 @@
-#define l11_width 10
+#define l11_width 14
#define l11_height 16
-static char l11_bits[] = { 0x00, 0x00,
- 0xc6, 0x00, 0xe7, 0x00, 0xe7, 0x00, 0xc6, 0x00, 0xc6, 0x00, 0xc6, 0x00,
- 0xc6, 0x00, 0xc6, 0x00, 0xc6, 0x00, 0xc6, 0x00, 0xc6, 0x00, 0xc6, 0x00,
- 0xc6, 0x00, 0xef, 0x01, 0x00, 0x00};
+static char l11_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x0C, 0x06, 0x0A, 0x05,
+ 0x89, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l12.xbm b/app/bin/bitmaps/l12.xbm
index c1a5274..19b8726 100644
--- a/app/bin/bitmaps/l12.xbm
+++ b/app/bin/bitmaps/l12.xbm
@@ -1,6 +1,6 @@
-#define l12_width 10
+#define l12_width 14
#define l12_height 16
-static char l12_bits[] = { 0x00, 0x00,
- 0xe6, 0x00, 0xf7, 0x01, 0x17, 0x03, 0x06, 0x03, 0x06, 0x03, 0x86, 0x01,
- 0x86, 0x01, 0xc6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x66, 0x00, 0x36, 0x00,
- 0xf6, 0x03, 0xf7, 0x03, 0x00, 0x00};
+static char l12_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x10,
+ 0x09, 0x08, 0x08, 0x04, 0x08, 0x02, 0x08, 0x01, 0x88, 0x00, 0x88, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l13.xbm b/app/bin/bitmaps/l13.xbm
index 1414eb0..812bbe3 100644
--- a/app/bin/bitmaps/l13.xbm
+++ b/app/bin/bitmaps/l13.xbm
@@ -1,6 +1,6 @@
-#define l13_width 10
+#define l13_width 14
#define l13_height 16
-static char l13_bits[] = { 0x00, 0x00,
- 0xe6, 0x00, 0xf7, 0x01, 0x17, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,
- 0xc6, 0x01, 0xc6, 0x01, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x16, 0x03,
- 0xf6, 0x01, 0xe7, 0x00, 0x00, 0x00};
+static char l13_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x0A, 0x10,
+ 0x09, 0x10, 0x08, 0x0E, 0x08, 0x10, 0x08, 0x10, 0x88, 0x10, 0x08, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l14.xbm b/app/bin/bitmaps/l14.xbm
index 05e820f..63f2e44 100644
--- a/app/bin/bitmaps/l14.xbm
+++ b/app/bin/bitmaps/l14.xbm
@@ -1,6 +1,6 @@
-#define l14_width 10
+#define l14_width 14
#define l14_height 16
-static char l14_bits[] = { 0x00, 0x00,
- 0x06, 0x01, 0x87, 0x01, 0x87, 0x01, 0xc6, 0x01, 0xe6, 0x01, 0xa6, 0x01,
- 0xb6, 0x01, 0x96, 0x01, 0xf6, 0x03, 0xf6, 0x03, 0x86, 0x01, 0x86, 0x01,
- 0x86, 0x01, 0x8f, 0x01, 0x00, 0x00};
+static char l14_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0C, 0x0C, 0x0A, 0x0A,
+ 0x09, 0x09, 0x88, 0x08, 0x88, 0x1F, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l15.xbm b/app/bin/bitmaps/l15.xbm
index 22daac2..4d66f1b 100644
--- a/app/bin/bitmaps/l15.xbm
+++ b/app/bin/bitmaps/l15.xbm
@@ -1,6 +1,6 @@
-#define l15_width 10
+#define l15_width 14
#define l15_height 16
-static char l15_bits[] = { 0x00, 0x00,
- 0xf6, 0x03, 0xf7, 0x03, 0x37, 0x00, 0x36, 0x00, 0x36, 0x00, 0xf6, 0x00,
- 0xf6, 0x01, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,
- 0xf6, 0x01, 0xf7, 0x00, 0x00, 0x00};
+static char l15_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x1F, 0x8C, 0x00, 0x8A, 0x00,
+ 0x89, 0x0F, 0x08, 0x10, 0x08, 0x10, 0x08, 0x10, 0x88, 0x10, 0x08, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l16.xbm b/app/bin/bitmaps/l16.xbm
index 9f86249..84366d3 100644
--- a/app/bin/bitmaps/l16.xbm
+++ b/app/bin/bitmaps/l16.xbm
@@ -1,6 +1,6 @@
-#define l16_width 10
+#define l16_width 14
#define l16_height 16
-static char l16_bits[] = { 0x00, 0x00,
- 0xc6, 0x01, 0xe7, 0x03, 0x37, 0x00, 0x36, 0x00, 0x36, 0x00, 0xf6, 0x01,
- 0xf6, 0x01, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03,
- 0xe6, 0x01, 0xcf, 0x00, 0x00, 0x00};
+static char l16_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x00, 0x8A, 0x00,
+ 0x89, 0x0F, 0x88, 0x10, 0x88, 0x10, 0x88, 0x10, 0x88, 0x10, 0x08, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l17.xbm b/app/bin/bitmaps/l17.xbm
index 8169be6..0881871 100644
--- a/app/bin/bitmaps/l17.xbm
+++ b/app/bin/bitmaps/l17.xbm
@@ -1,6 +1,6 @@
-#define l17_width 10
+#define l17_width 14
#define l17_height 16
-static char l17_bits[] = { 0x00, 0x00,
- 0xf6, 0x03, 0xf7, 0x03, 0x07, 0x03, 0x06, 0x03, 0x06, 0x03, 0x86, 0x01,
- 0x86, 0x01, 0x86, 0x00, 0xc6, 0x00, 0x46, 0x00, 0x66, 0x00, 0x26, 0x00,
- 0x36, 0x00, 0x17, 0x00, 0x00, 0x00};
+static char l17_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x1F, 0x0C, 0x10, 0x0A, 0x08,
+ 0x09, 0x08, 0x08, 0x04, 0x08, 0x04, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l18.xbm b/app/bin/bitmaps/l18.xbm
index 68742a1..3e9074c 100644
--- a/app/bin/bitmaps/l18.xbm
+++ b/app/bin/bitmaps/l18.xbm
@@ -1,6 +1,6 @@
-#define l18_width 10
+#define l18_width 14
#define l18_height 16
-static char l18_bits[] = { 0x00, 0x00,
- 0xc6, 0x00, 0xe7, 0x01, 0x37, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03,
- 0xe6, 0x01, 0xe6, 0x01, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03,
- 0xe6, 0x01, 0xcf, 0x00, 0x00, 0x00};
+static char l18_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x10,
+ 0x89, 0x10, 0x08, 0x0F, 0x88, 0x10, 0x88, 0x10, 0x88, 0x10, 0x08, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l19.xbm b/app/bin/bitmaps/l19.xbm
index 0dc6ea6..71beff5 100644
--- a/app/bin/bitmaps/l19.xbm
+++ b/app/bin/bitmaps/l19.xbm
@@ -1,6 +1,6 @@
-#define l19_width 10
+#define l19_width 14
#define l19_height 16
-static char l19_bits[] = { 0x00, 0x00,
- 0xc6, 0x00, 0xe7, 0x01, 0x37, 0x03, 0x36, 0x03, 0x36, 0x03, 0x36, 0x03,
- 0x36, 0x03, 0xe6, 0x03, 0xc6, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,
- 0xf6, 0x01, 0xf7, 0x00, 0x00, 0x00};
+static char l19_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x10,
+ 0x89, 0x10, 0x08, 0x1F, 0x08, 0x10, 0x08, 0x10, 0x08, 0x08, 0x08, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l2.xbm b/app/bin/bitmaps/l2.xbm
index 6e09c68..5efcb45 100644
--- a/app/bin/bitmaps/l2.xbm
+++ b/app/bin/bitmaps/l2.xbm
@@ -1,6 +1,6 @@
-#define l2_width 10
+#define l2_width 14
#define l2_height 16
-static char l2_bits[] = { 0x00, 0x00,
- 0xfc, 0x00, 0xfe, 0x01, 0x03, 0x03, 0x03, 0x03, 0x00, 0x03, 0x80, 0x01,
- 0xc0, 0x00, 0x60, 0x00, 0x30, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x06, 0x00,
- 0xff, 0x03, 0xff, 0x03, 0x00, 0x00};
+static char l2_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01,
+ 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0xF8, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l20.xbm b/app/bin/bitmaps/l20.xbm
index 473553b..3b89521 100644
--- a/app/bin/bitmaps/l20.xbm
+++ b/app/bin/bitmaps/l20.xbm
@@ -1,6 +1,6 @@
-#define l20_width 10
+#define l20_width 14
#define l20_height 16
-static char l20_bits[] = { 0x00, 0x00,
- 0x8e, 0x01, 0xcf, 0x03, 0xdb, 0x02, 0x59, 0x03, 0xd8, 0x02, 0x58, 0x03,
- 0xc8, 0x02, 0x4c, 0x03, 0xcc, 0x02, 0x46, 0x03, 0xc6, 0x02, 0x43, 0x03,
- 0xdf, 0x03, 0x9f, 0x01, 0x00, 0x00};
+static char l20_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x18,
+ 0x90, 0x14, 0x88, 0x12, 0x84, 0x11, 0x82, 0x10, 0x81, 0x10, 0x3F, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l21.xbm b/app/bin/bitmaps/l21.xbm
new file mode 100644
index 0000000..4c21534
--- /dev/null
+++ b/app/bin/bitmaps/l21.xbm
@@ -0,0 +1,6 @@
+#define l21_width 14
+#define l21_height 16
+static char l21_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x21, 0x05,
+ 0x90, 0x04, 0x08, 0x04, 0x04, 0x04, 0x02, 0x04, 0x01, 0x04, 0x3F, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l22.xbm b/app/bin/bitmaps/l22.xbm
new file mode 100644
index 0000000..1d3d0b8
--- /dev/null
+++ b/app/bin/bitmaps/l22.xbm
@@ -0,0 +1,6 @@
+#define l22_width 14
+#define l22_height 16
+static char l22_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x81, 0x00, 0xBF, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l23.xbm b/app/bin/bitmaps/l23.xbm
new file mode 100644
index 0000000..27bb4ad
--- /dev/null
+++ b/app/bin/bitmaps/l23.xbm
@@ -0,0 +1,6 @@
+#define l23_width 14
+#define l23_height 16
+static char l23_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x21, 0x10,
+ 0x10, 0x10, 0x08, 0x0E, 0x04, 0x10, 0x02, 0x10, 0x81, 0x10, 0x3F, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l24.xbm b/app/bin/bitmaps/l24.xbm
new file mode 100644
index 0000000..8b2efc5
--- /dev/null
+++ b/app/bin/bitmaps/l24.xbm
@@ -0,0 +1,6 @@
+#define l24_width 14
+#define l24_height 16
+static char l24_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x21, 0x0A,
+ 0x10, 0x09, 0x88, 0x08, 0x84, 0x1F, 0x02, 0x08, 0x01, 0x08, 0x3F, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l25.xbm b/app/bin/bitmaps/l25.xbm
new file mode 100644
index 0000000..f4751dc
--- /dev/null
+++ b/app/bin/bitmaps/l25.xbm
@@ -0,0 +1,6 @@
+#define l25_width 14
+#define l25_height 16
+static char l25_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA1, 0x00,
+ 0x90, 0x0F, 0x08, 0x10, 0x04, 0x10, 0x02, 0x10, 0x81, 0x10, 0x3F, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l26.xbm b/app/bin/bitmaps/l26.xbm
new file mode 100644
index 0000000..9e67365
--- /dev/null
+++ b/app/bin/bitmaps/l26.xbm
@@ -0,0 +1,6 @@
+#define l26_width 14
+#define l26_height 16
+static char l26_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA1, 0x00,
+ 0x90, 0x0F, 0x88, 0x10, 0x84, 0x10, 0x82, 0x10, 0x81, 0x10, 0x3F, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l27.xbm b/app/bin/bitmaps/l27.xbm
new file mode 100644
index 0000000..abdbb55
--- /dev/null
+++ b/app/bin/bitmaps/l27.xbm
@@ -0,0 +1,6 @@
+#define l27_width 14
+#define l27_height 16
+static char l27_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x21, 0x08,
+ 0x10, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x02, 0x3F, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l28.xbm b/app/bin/bitmaps/l28.xbm
new file mode 100644
index 0000000..ceb8a68
--- /dev/null
+++ b/app/bin/bitmaps/l28.xbm
@@ -0,0 +1,6 @@
+#define l28_width 14
+#define l28_height 16
+static char l28_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0x90, 0x10, 0x08, 0x0F, 0x84, 0x10, 0x82, 0x10, 0x81, 0x10, 0x3F, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l29.xbm b/app/bin/bitmaps/l29.xbm
new file mode 100644
index 0000000..84c6512
--- /dev/null
+++ b/app/bin/bitmaps/l29.xbm
@@ -0,0 +1,6 @@
+#define l29_width 14
+#define l29_height 16
+static char l29_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0x90, 0x10, 0x08, 0x1F, 0x04, 0x10, 0x02, 0x10, 0x01, 0x08, 0x3F, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l3.xbm b/app/bin/bitmaps/l3.xbm
index 66ac3ab..be5c0d1 100644
--- a/app/bin/bitmaps/l3.xbm
+++ b/app/bin/bitmaps/l3.xbm
@@ -1,6 +1,6 @@
-#define l3_width 10
+#define l3_width 14
#define l3_height 16
-static char l3_bits[] = { 0x00, 0x00,
- 0xfc, 0x00, 0xfe, 0x01, 0x03, 0x03, 0x03, 0x03, 0x00, 0x03, 0x00, 0x03,
- 0xe0, 0x01, 0xe0, 0x01, 0x00, 0x03, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0xfe, 0x01, 0xfc, 0x00, 0x00, 0x00};
+static char l3_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x00, 0x01,
+ 0x00, 0x01, 0xE0, 0x00, 0x00, 0x01, 0x00, 0x01, 0x08, 0x01, 0xF0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l30.xbm b/app/bin/bitmaps/l30.xbm
new file mode 100644
index 0000000..f7ab137
--- /dev/null
+++ b/app/bin/bitmaps/l30.xbm
@@ -0,0 +1,6 @@
+#define l30_width 14
+#define l30_height 16
+static char l30_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x18,
+ 0xA0, 0x14, 0x9C, 0x12, 0xA0, 0x11, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l31.xbm b/app/bin/bitmaps/l31.xbm
new file mode 100644
index 0000000..5ca3354
--- /dev/null
+++ b/app/bin/bitmaps/l31.xbm
@@ -0,0 +1,6 @@
+#define l31_width 14
+#define l31_height 16
+static char l31_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x20, 0x05,
+ 0xA0, 0x04, 0x1C, 0x04, 0x20, 0x04, 0x20, 0x04, 0x21, 0x04, 0x1E, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l32.xbm b/app/bin/bitmaps/l32.xbm
new file mode 100644
index 0000000..c083094
--- /dev/null
+++ b/app/bin/bitmaps/l32.xbm
@@ -0,0 +1,6 @@
+#define l32_width 14
+#define l32_height 16
+static char l32_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x10,
+ 0x20, 0x08, 0x1C, 0x04, 0x20, 0x02, 0x20, 0x01, 0xA1, 0x00, 0x9E, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l33.xbm b/app/bin/bitmaps/l33.xbm
new file mode 100644
index 0000000..241eac5
--- /dev/null
+++ b/app/bin/bitmaps/l33.xbm
@@ -0,0 +1,6 @@
+#define l33_width 14
+#define l33_height 16
+static char l33_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x20, 0x10,
+ 0x20, 0x10, 0x1C, 0x0E, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l34.xbm b/app/bin/bitmaps/l34.xbm
new file mode 100644
index 0000000..552eafd
--- /dev/null
+++ b/app/bin/bitmaps/l34.xbm
@@ -0,0 +1,6 @@
+#define l34_width 14
+#define l34_height 16
+static char l34_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x20, 0x0A,
+ 0x20, 0x09, 0x9C, 0x08, 0xA0, 0x1F, 0x20, 0x08, 0x21, 0x08, 0x1E, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l35.xbm b/app/bin/bitmaps/l35.xbm
new file mode 100644
index 0000000..4bf7b2f
--- /dev/null
+++ b/app/bin/bitmaps/l35.xbm
@@ -0,0 +1,6 @@
+#define l35_width 14
+#define l35_height 16
+static char l35_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA0, 0x00,
+ 0xA0, 0x0F, 0x1C, 0x10, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l36.xbm b/app/bin/bitmaps/l36.xbm
new file mode 100644
index 0000000..a048e6d
--- /dev/null
+++ b/app/bin/bitmaps/l36.xbm
@@ -0,0 +1,6 @@
+#define l36_width 14
+#define l36_height 16
+static char l36_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA0, 0x00,
+ 0xA0, 0x0F, 0x9C, 0x10, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l37.xbm b/app/bin/bitmaps/l37.xbm
new file mode 100644
index 0000000..cd58fcd
--- /dev/null
+++ b/app/bin/bitmaps/l37.xbm
@@ -0,0 +1,6 @@
+#define l37_width 14
+#define l37_height 16
+static char l37_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x20, 0x08,
+ 0x20, 0x08, 0x1C, 0x04, 0x20, 0x04, 0x20, 0x02, 0x21, 0x02, 0x1E, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l38.xbm b/app/bin/bitmaps/l38.xbm
new file mode 100644
index 0000000..d47e1ea
--- /dev/null
+++ b/app/bin/bitmaps/l38.xbm
@@ -0,0 +1,6 @@
+#define l38_width 14
+#define l38_height 16
+static char l38_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x10,
+ 0xA0, 0x10, 0x1C, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l39.xbm b/app/bin/bitmaps/l39.xbm
new file mode 100644
index 0000000..459ad96
--- /dev/null
+++ b/app/bin/bitmaps/l39.xbm
@@ -0,0 +1,6 @@
+#define l39_width 14
+#define l39_height 16
+static char l39_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x10,
+ 0xA0, 0x10, 0x1C, 0x1F, 0x20, 0x10, 0x20, 0x10, 0x21, 0x08, 0x1E, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l4.xbm b/app/bin/bitmaps/l4.xbm
index d818f48..ea52f95 100644
--- a/app/bin/bitmaps/l4.xbm
+++ b/app/bin/bitmaps/l4.xbm
@@ -1,6 +1,6 @@
-#define l4_width 10
+#define l4_width 14
#define l4_height 16
-static char l4_bits[] = { 0x00, 0x00,
- 0x80, 0x01, 0xc0, 0x01, 0xe0, 0x01, 0xb0, 0x01, 0x98, 0x01, 0x8c, 0x01,
- 0x86, 0x01, 0x83, 0x01, 0xff, 0x03, 0xff, 0x03, 0x80, 0x01, 0x80, 0x01,
- 0x80, 0x01, 0x80, 0x01, 0x00, 0x00};
+static char l4_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xC0, 0x00, 0xA0, 0x00,
+ 0x90, 0x00, 0x88, 0x00, 0xF8, 0x01, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l40.xbm b/app/bin/bitmaps/l40.xbm
new file mode 100644
index 0000000..f8d17da
--- /dev/null
+++ b/app/bin/bitmaps/l40.xbm
@@ -0,0 +1,6 @@
+#define l40_width 14
+#define l40_height 16
+static char l40_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x18,
+ 0x92, 0x14, 0x91, 0x12, 0xBF, 0x11, 0x90, 0x10, 0x90, 0x10, 0x10, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l41.xbm b/app/bin/bitmaps/l41.xbm
new file mode 100644
index 0000000..2029d0a
--- /dev/null
+++ b/app/bin/bitmaps/l41.xbm
@@ -0,0 +1,6 @@
+#define l41_width 14
+#define l41_height 16
+static char l41_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x18, 0x06, 0x14, 0x05,
+ 0x92, 0x04, 0x11, 0x04, 0x3F, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l42.xbm b/app/bin/bitmaps/l42.xbm
new file mode 100644
index 0000000..b5be599
--- /dev/null
+++ b/app/bin/bitmaps/l42.xbm
@@ -0,0 +1,6 @@
+#define l42_width 14
+#define l42_height 16
+static char l42_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x10,
+ 0x12, 0x08, 0x11, 0x04, 0x3F, 0x02, 0x10, 0x01, 0x90, 0x00, 0x90, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l43.xbm b/app/bin/bitmaps/l43.xbm
new file mode 100644
index 0000000..23ea804
--- /dev/null
+++ b/app/bin/bitmaps/l43.xbm
@@ -0,0 +1,6 @@
+#define l43_width 14
+#define l43_height 16
+static char l43_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x14, 0x10,
+ 0x12, 0x10, 0x11, 0x0E, 0x3F, 0x10, 0x10, 0x10, 0x90, 0x10, 0x10, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l44.xbm b/app/bin/bitmaps/l44.xbm
new file mode 100644
index 0000000..f55e45c
--- /dev/null
+++ b/app/bin/bitmaps/l44.xbm
@@ -0,0 +1,6 @@
+#define l44_width 14
+#define l44_height 16
+static char l44_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x18, 0x0C, 0x14, 0x0A,
+ 0x12, 0x09, 0x91, 0x08, 0xBF, 0x1F, 0x10, 0x08, 0x10, 0x08, 0x10, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l45.xbm b/app/bin/bitmaps/l45.xbm
new file mode 100644
index 0000000..8509e7c
--- /dev/null
+++ b/app/bin/bitmaps/l45.xbm
@@ -0,0 +1,6 @@
+#define l45_width 14
+#define l45_height 16
+static char l45_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1F, 0x98, 0x00, 0x94, 0x00,
+ 0x92, 0x0F, 0x11, 0x10, 0x3F, 0x10, 0x10, 0x10, 0x90, 0x10, 0x10, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l46.xbm b/app/bin/bitmaps/l46.xbm
new file mode 100644
index 0000000..873164e
--- /dev/null
+++ b/app/bin/bitmaps/l46.xbm
@@ -0,0 +1,6 @@
+#define l46_width 14
+#define l46_height 16
+static char l46_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x00, 0x94, 0x00,
+ 0x92, 0x0F, 0x91, 0x10, 0xBF, 0x10, 0x90, 0x10, 0x90, 0x10, 0x10, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l47.xbm b/app/bin/bitmaps/l47.xbm
new file mode 100644
index 0000000..61043f1
--- /dev/null
+++ b/app/bin/bitmaps/l47.xbm
@@ -0,0 +1,6 @@
+#define l47_width 14
+#define l47_height 16
+static char l47_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1F, 0x18, 0x10, 0x14, 0x08,
+ 0x12, 0x08, 0x11, 0x04, 0x3F, 0x04, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l48.xbm b/app/bin/bitmaps/l48.xbm
new file mode 100644
index 0000000..0a04953
--- /dev/null
+++ b/app/bin/bitmaps/l48.xbm
@@ -0,0 +1,6 @@
+#define l48_width 14
+#define l48_height 16
+static char l48_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x10,
+ 0x92, 0x10, 0x11, 0x0F, 0xBF, 0x10, 0x90, 0x10, 0x90, 0x10, 0x10, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l49.xbm b/app/bin/bitmaps/l49.xbm
new file mode 100644
index 0000000..14b9914
--- /dev/null
+++ b/app/bin/bitmaps/l49.xbm
@@ -0,0 +1,6 @@
+#define l49_width 14
+#define l49_height 16
+static char l49_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x10,
+ 0x92, 0x10, 0x11, 0x1F, 0x3F, 0x10, 0x10, 0x10, 0x10, 0x08, 0x10, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l5.xbm b/app/bin/bitmaps/l5.xbm
index c350ac3..da409be 100644
--- a/app/bin/bitmaps/l5.xbm
+++ b/app/bin/bitmaps/l5.xbm
@@ -1,6 +1,6 @@
-#define l5_width 10
+#define l5_width 14
#define l5_height 16
-static char l5_bits[] = { 0x00, 0x00,
- 0xff, 0x03, 0xff, 0x03, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x7f, 0x00,
- 0xff, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x80, 0x01,
- 0xff, 0x00, 0x7f, 0x00, 0x00, 0x00};
+static char l5_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x08, 0x00, 0x08, 0x00,
+ 0xF8, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x08, 0x01, 0xF0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l50.xbm b/app/bin/bitmaps/l50.xbm
new file mode 100644
index 0000000..981e2c8
--- /dev/null
+++ b/app/bin/bitmaps/l50.xbm
@@ -0,0 +1,6 @@
+#define l50_width 14
+#define l50_height 16
+static char l50_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x18,
+ 0x9F, 0x14, 0xA0, 0x12, 0xA0, 0x11, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l51.xbm b/app/bin/bitmaps/l51.xbm
new file mode 100644
index 0000000..ac2e9a2
--- /dev/null
+++ b/app/bin/bitmaps/l51.xbm
@@ -0,0 +1,6 @@
+#define l51_width 14
+#define l51_height 16
+static char l51_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x04, 0x01, 0x06, 0x01, 0x05,
+ 0x9F, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x21, 0x04, 0x1E, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l52.xbm b/app/bin/bitmaps/l52.xbm
new file mode 100644
index 0000000..266c9a4
--- /dev/null
+++ b/app/bin/bitmaps/l52.xbm
@@ -0,0 +1,6 @@
+#define l52_width 14
+#define l52_height 16
+static char l52_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x10,
+ 0x1F, 0x08, 0x20, 0x04, 0x20, 0x02, 0x20, 0x01, 0xA1, 0x00, 0x9E, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l53.xbm b/app/bin/bitmaps/l53.xbm
new file mode 100644
index 0000000..232b96c
--- /dev/null
+++ b/app/bin/bitmaps/l53.xbm
@@ -0,0 +1,6 @@
+#define l53_width 14
+#define l53_height 16
+static char l53_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x01, 0x10,
+ 0x1F, 0x10, 0x20, 0x0E, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l54.xbm b/app/bin/bitmaps/l54.xbm
new file mode 100644
index 0000000..e68e643
--- /dev/null
+++ b/app/bin/bitmaps/l54.xbm
@@ -0,0 +1,6 @@
+#define l54_width 14
+#define l54_height 16
+static char l54_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x08, 0x01, 0x0C, 0x01, 0x0A,
+ 0x1F, 0x09, 0xA0, 0x08, 0xA0, 0x1F, 0x20, 0x08, 0x21, 0x08, 0x1E, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l55.xbm b/app/bin/bitmaps/l55.xbm
new file mode 100644
index 0000000..6b29ef2
--- /dev/null
+++ b/app/bin/bitmaps/l55.xbm
@@ -0,0 +1,6 @@
+#define l55_width 14
+#define l55_height 16
+static char l55_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0x81, 0x00, 0x81, 0x00,
+ 0x9F, 0x0F, 0x20, 0x10, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l56.xbm b/app/bin/bitmaps/l56.xbm
new file mode 100644
index 0000000..20eedef
--- /dev/null
+++ b/app/bin/bitmaps/l56.xbm
@@ -0,0 +1,6 @@
+#define l56_width 14
+#define l56_height 16
+static char l56_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x00, 0x81, 0x00,
+ 0x9F, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l57.xbm b/app/bin/bitmaps/l57.xbm
new file mode 100644
index 0000000..a9b7d42
--- /dev/null
+++ b/app/bin/bitmaps/l57.xbm
@@ -0,0 +1,6 @@
+#define l57_width 14
+#define l57_height 16
+static char l57_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0x01, 0x10, 0x01, 0x08,
+ 0x1F, 0x08, 0x20, 0x04, 0x20, 0x04, 0x20, 0x02, 0x21, 0x02, 0x1E, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l58.xbm b/app/bin/bitmaps/l58.xbm
new file mode 100644
index 0000000..01fb1bd
--- /dev/null
+++ b/app/bin/bitmaps/l58.xbm
@@ -0,0 +1,6 @@
+#define l58_width 14
+#define l58_height 16
+static char l58_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x10,
+ 0x9F, 0x10, 0x20, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l59.xbm b/app/bin/bitmaps/l59.xbm
new file mode 100644
index 0000000..8f5b367
--- /dev/null
+++ b/app/bin/bitmaps/l59.xbm
@@ -0,0 +1,6 @@
+#define l59_width 14
+#define l59_height 16
+static char l59_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x10,
+ 0x9F, 0x10, 0x20, 0x1F, 0x20, 0x10, 0x20, 0x10, 0x21, 0x08, 0x1E, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l6.xbm b/app/bin/bitmaps/l6.xbm
index 71351c2..89efd19 100644
--- a/app/bin/bitmaps/l6.xbm
+++ b/app/bin/bitmaps/l6.xbm
@@ -1,6 +1,6 @@
-#define l6_width 10
+#define l6_width 14
#define l6_height 16
-static char l6_bits[] = { 0x00, 0x00,
- 0xfc, 0x01, 0xfe, 0x03, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0x01,
- 0xff, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0xfe, 0x01, 0xfc, 0x00, 0x00, 0x00};
+static char l6_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x00, 0x08, 0x00,
+ 0xF8, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l60.xbm b/app/bin/bitmaps/l60.xbm
new file mode 100644
index 0000000..29692e4
--- /dev/null
+++ b/app/bin/bitmaps/l60.xbm
@@ -0,0 +1,6 @@
+#define l60_width 14
+#define l60_height 16
+static char l60_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x18,
+ 0x9F, 0x14, 0xA1, 0x12, 0xA1, 0x11, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l61.xbm b/app/bin/bitmaps/l61.xbm
new file mode 100644
index 0000000..22973a9
--- /dev/null
+++ b/app/bin/bitmaps/l61.xbm
@@ -0,0 +1,6 @@
+#define l61_width 14
+#define l61_height 16
+static char l61_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x01, 0x06, 0x01, 0x05,
+ 0x9F, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x1E, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l62.xbm b/app/bin/bitmaps/l62.xbm
new file mode 100644
index 0000000..0447b20
--- /dev/null
+++ b/app/bin/bitmaps/l62.xbm
@@ -0,0 +1,6 @@
+#define l62_width 14
+#define l62_height 16
+static char l62_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x10,
+ 0x1F, 0x08, 0x21, 0x04, 0x21, 0x02, 0x21, 0x01, 0xA1, 0x00, 0x9E, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l63.xbm b/app/bin/bitmaps/l63.xbm
new file mode 100644
index 0000000..8fb46f9
--- /dev/null
+++ b/app/bin/bitmaps/l63.xbm
@@ -0,0 +1,6 @@
+#define l63_width 14
+#define l63_height 16
+static char l63_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x01, 0x10,
+ 0x1F, 0x10, 0x21, 0x0E, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l64.xbm b/app/bin/bitmaps/l64.xbm
new file mode 100644
index 0000000..8fec658
--- /dev/null
+++ b/app/bin/bitmaps/l64.xbm
@@ -0,0 +1,6 @@
+#define l64_width 14
+#define l64_height 16
+static char l64_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x01, 0x0C, 0x01, 0x0A,
+ 0x1F, 0x09, 0xA1, 0x08, 0xA1, 0x1F, 0x21, 0x08, 0x21, 0x08, 0x1E, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l65.xbm b/app/bin/bitmaps/l65.xbm
new file mode 100644
index 0000000..34b6f4a
--- /dev/null
+++ b/app/bin/bitmaps/l65.xbm
@@ -0,0 +1,6 @@
+#define l65_width 14
+#define l65_height 16
+static char l65_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x81, 0x00, 0x81, 0x00,
+ 0x9F, 0x0F, 0x21, 0x10, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l66.xbm b/app/bin/bitmaps/l66.xbm
new file mode 100644
index 0000000..1e28cf3
--- /dev/null
+++ b/app/bin/bitmaps/l66.xbm
@@ -0,0 +1,6 @@
+#define l66_width 14
+#define l66_height 16
+static char l66_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x00, 0x81, 0x00,
+ 0x9F, 0x0F, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l67.xbm b/app/bin/bitmaps/l67.xbm
new file mode 100644
index 0000000..bbc56bf
--- /dev/null
+++ b/app/bin/bitmaps/l67.xbm
@@ -0,0 +1,6 @@
+#define l67_width 14
+#define l67_height 16
+static char l67_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x01, 0x10, 0x01, 0x08,
+ 0x1F, 0x08, 0x21, 0x04, 0x21, 0x04, 0x21, 0x02, 0x21, 0x02, 0x1E, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l68.xbm b/app/bin/bitmaps/l68.xbm
new file mode 100644
index 0000000..db31fa9
--- /dev/null
+++ b/app/bin/bitmaps/l68.xbm
@@ -0,0 +1,6 @@
+#define l68_width 14
+#define l68_height 16
+static char l68_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x10,
+ 0x9F, 0x10, 0x21, 0x0F, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l69.xbm b/app/bin/bitmaps/l69.xbm
new file mode 100644
index 0000000..2d79bc7
--- /dev/null
+++ b/app/bin/bitmaps/l69.xbm
@@ -0,0 +1,6 @@
+#define l69_width 14
+#define l69_height 16
+static char l69_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x10,
+ 0x9F, 0x10, 0x21, 0x1F, 0x21, 0x10, 0x21, 0x10, 0x21, 0x08, 0x1E, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l7.xbm b/app/bin/bitmaps/l7.xbm
index 220e3d9..28b2698 100644
--- a/app/bin/bitmaps/l7.xbm
+++ b/app/bin/bitmaps/l7.xbm
@@ -1,6 +1,6 @@
-#define l7_width 10
+#define l7_width 14
#define l7_height 16
-static char l7_bits[] = { 0x00, 0x00,
- 0xff, 0x03, 0xff, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x80, 0x01,
- 0xc0, 0x00, 0x60, 0x00, 0x30, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x06, 0x00,
- 0x03, 0x00, 0x01, 0x00, 0x00, 0x00};
+static char l7_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x01, 0x80, 0x00,
+ 0x80, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l70.xbm b/app/bin/bitmaps/l70.xbm
new file mode 100644
index 0000000..16b4c70
--- /dev/null
+++ b/app/bin/bitmaps/l70.xbm
@@ -0,0 +1,6 @@
+#define l70_width 14
+#define l70_height 16
+static char l70_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x18,
+ 0x90, 0x14, 0x88, 0x12, 0x88, 0x11, 0x84, 0x10, 0x84, 0x10, 0x04, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l71.xbm b/app/bin/bitmaps/l71.xbm
new file mode 100644
index 0000000..12223f5
--- /dev/null
+++ b/app/bin/bitmaps/l71.xbm
@@ -0,0 +1,6 @@
+#define l71_width 14
+#define l71_height 16
+static char l71_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x04, 0x20, 0x06, 0x10, 0x05,
+ 0x90, 0x04, 0x08, 0x04, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l72.xbm b/app/bin/bitmaps/l72.xbm
new file mode 100644
index 0000000..164f621
--- /dev/null
+++ b/app/bin/bitmaps/l72.xbm
@@ -0,0 +1,6 @@
+#define l72_width 14
+#define l72_height 16
+static char l72_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x10,
+ 0x10, 0x08, 0x08, 0x04, 0x08, 0x02, 0x04, 0x01, 0x84, 0x00, 0x84, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l73.xbm b/app/bin/bitmaps/l73.xbm
new file mode 100644
index 0000000..0031594
--- /dev/null
+++ b/app/bin/bitmaps/l73.xbm
@@ -0,0 +1,6 @@
+#define l73_width 14
+#define l73_height 16
+static char l73_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x10, 0x10,
+ 0x10, 0x10, 0x08, 0x0E, 0x08, 0x10, 0x04, 0x10, 0x84, 0x10, 0x04, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l74.xbm b/app/bin/bitmaps/l74.xbm
new file mode 100644
index 0000000..be95f2c
--- /dev/null
+++ b/app/bin/bitmaps/l74.xbm
@@ -0,0 +1,6 @@
+#define l74_width 14
+#define l74_height 16
+static char l74_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x08, 0x20, 0x0C, 0x10, 0x0A,
+ 0x10, 0x09, 0x88, 0x08, 0x88, 0x1F, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l75.xbm b/app/bin/bitmaps/l75.xbm
new file mode 100644
index 0000000..3524c94
--- /dev/null
+++ b/app/bin/bitmaps/l75.xbm
@@ -0,0 +1,6 @@
+#define l75_width 14
+#define l75_height 16
+static char l75_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0xA0, 0x00, 0x90, 0x00,
+ 0x90, 0x0F, 0x08, 0x10, 0x08, 0x10, 0x04, 0x10, 0x84, 0x10, 0x04, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l76.xbm b/app/bin/bitmaps/l76.xbm
new file mode 100644
index 0000000..83e8f59
--- /dev/null
+++ b/app/bin/bitmaps/l76.xbm
@@ -0,0 +1,6 @@
+#define l76_width 14
+#define l76_height 16
+static char l76_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x00, 0x90, 0x00,
+ 0x90, 0x0F, 0x88, 0x10, 0x88, 0x10, 0x84, 0x10, 0x84, 0x10, 0x04, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l77.xbm b/app/bin/bitmaps/l77.xbm
new file mode 100644
index 0000000..4e48354
--- /dev/null
+++ b/app/bin/bitmaps/l77.xbm
@@ -0,0 +1,6 @@
+#define l77_width 14
+#define l77_height 16
+static char l77_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0x20, 0x10, 0x10, 0x08,
+ 0x10, 0x08, 0x08, 0x04, 0x08, 0x04, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l78.xbm b/app/bin/bitmaps/l78.xbm
new file mode 100644
index 0000000..731d05d
--- /dev/null
+++ b/app/bin/bitmaps/l78.xbm
@@ -0,0 +1,6 @@
+#define l78_width 14
+#define l78_height 16
+static char l78_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x10,
+ 0x90, 0x10, 0x08, 0x0F, 0x88, 0x10, 0x84, 0x10, 0x84, 0x10, 0x04, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l79.xbm b/app/bin/bitmaps/l79.xbm
new file mode 100644
index 0000000..4e5259a
--- /dev/null
+++ b/app/bin/bitmaps/l79.xbm
@@ -0,0 +1,6 @@
+#define l79_width 14
+#define l79_height 16
+static char l79_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x10,
+ 0x90, 0x10, 0x08, 0x1F, 0x08, 0x10, 0x04, 0x10, 0x04, 0x08, 0x04, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l8.xbm b/app/bin/bitmaps/l8.xbm
index bb0e2bc..cf07c8f 100644
--- a/app/bin/bitmaps/l8.xbm
+++ b/app/bin/bitmaps/l8.xbm
@@ -1,6 +1,6 @@
-#define l8_width 10
+#define l8_width 14
#define l8_height 16
-static char l8_bits[] = { 0x00, 0x00,
- 0xfc, 0x00, 0xfe, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0xfe, 0x01, 0xfe, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0xfe, 0x01, 0xfc, 0x00, 0x00, 0x00};
+static char l8_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01,
+ 0x08, 0x01, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l80.xbm b/app/bin/bitmaps/l80.xbm
new file mode 100644
index 0000000..116c68f
--- /dev/null
+++ b/app/bin/bitmaps/l80.xbm
@@ -0,0 +1,6 @@
+#define l80_width 14
+#define l80_height 16
+static char l80_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x18,
+ 0xA1, 0x14, 0x9E, 0x12, 0xA1, 0x11, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l81.xbm b/app/bin/bitmaps/l81.xbm
new file mode 100644
index 0000000..747787e
--- /dev/null
+++ b/app/bin/bitmaps/l81.xbm
@@ -0,0 +1,6 @@
+#define l81_width 14
+#define l81_height 16
+static char l81_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x21, 0x05,
+ 0xA1, 0x04, 0x1E, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x1E, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l82.xbm b/app/bin/bitmaps/l82.xbm
new file mode 100644
index 0000000..e8758f9
--- /dev/null
+++ b/app/bin/bitmaps/l82.xbm
@@ -0,0 +1,6 @@
+#define l82_width 14
+#define l82_height 16
+static char l82_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0x21, 0x08, 0x1E, 0x04, 0x21, 0x02, 0x21, 0x01, 0xA1, 0x00, 0x9E, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l83.xbm b/app/bin/bitmaps/l83.xbm
new file mode 100644
index 0000000..8ccbf89
--- /dev/null
+++ b/app/bin/bitmaps/l83.xbm
@@ -0,0 +1,6 @@
+#define l83_width 14
+#define l83_height 16
+static char l83_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x21, 0x10,
+ 0x21, 0x10, 0x1E, 0x0E, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l84.xbm b/app/bin/bitmaps/l84.xbm
new file mode 100644
index 0000000..5e0e1ba
--- /dev/null
+++ b/app/bin/bitmaps/l84.xbm
@@ -0,0 +1,6 @@
+#define l84_width 14
+#define l84_height 16
+static char l84_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x21, 0x0A,
+ 0x21, 0x09, 0x9E, 0x08, 0xA1, 0x1F, 0x21, 0x08, 0x21, 0x08, 0x1E, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l85.xbm b/app/bin/bitmaps/l85.xbm
new file mode 100644
index 0000000..ee8ed02
--- /dev/null
+++ b/app/bin/bitmaps/l85.xbm
@@ -0,0 +1,6 @@
+#define l85_width 14
+#define l85_height 16
+static char l85_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA1, 0x00,
+ 0xA1, 0x0F, 0x1E, 0x10, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l86.xbm b/app/bin/bitmaps/l86.xbm
new file mode 100644
index 0000000..49e4a8d
--- /dev/null
+++ b/app/bin/bitmaps/l86.xbm
@@ -0,0 +1,6 @@
+#define l86_width 14
+#define l86_height 16
+static char l86_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA1, 0x00,
+ 0xA1, 0x0F, 0x9E, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l87.xbm b/app/bin/bitmaps/l87.xbm
new file mode 100644
index 0000000..bbba679
--- /dev/null
+++ b/app/bin/bitmaps/l87.xbm
@@ -0,0 +1,6 @@
+#define l87_width 14
+#define l87_height 16
+static char l87_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x21, 0x08,
+ 0x21, 0x08, 0x1E, 0x04, 0x21, 0x04, 0x21, 0x02, 0x21, 0x02, 0x1E, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l88.xbm b/app/bin/bitmaps/l88.xbm
new file mode 100644
index 0000000..17a4121
--- /dev/null
+++ b/app/bin/bitmaps/l88.xbm
@@ -0,0 +1,6 @@
+#define l88_width 14
+#define l88_height 16
+static char l88_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0xA1, 0x10, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l89.xbm b/app/bin/bitmaps/l89.xbm
new file mode 100644
index 0000000..625081d
--- /dev/null
+++ b/app/bin/bitmaps/l89.xbm
@@ -0,0 +1,6 @@
+#define l89_width 14
+#define l89_height 16
+static char l89_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0xA1, 0x10, 0x1E, 0x1F, 0x21, 0x10, 0x21, 0x10, 0x21, 0x08, 0x1E, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l9.xbm b/app/bin/bitmaps/l9.xbm
index 1589fda..14a43a4 100644
--- a/app/bin/bitmaps/l9.xbm
+++ b/app/bin/bitmaps/l9.xbm
@@ -1,6 +1,6 @@
-#define l9_width 10
+#define l9_width 14
#define l9_height 16
-static char l9_bits[] = { 0x00, 0x00,
- 0xfc, 0x00, 0xfe, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0xfe, 0x03, 0xfe, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03,
- 0xff, 0x01, 0xfe, 0x00, 0x00, 0x00};
+static char l9_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01,
+ 0x08, 0x01, 0xF0, 0x01, 0x00, 0x01, 0x00, 0x01, 0x80, 0x00, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l90.xbm b/app/bin/bitmaps/l90.xbm
new file mode 100644
index 0000000..f251dbe
--- /dev/null
+++ b/app/bin/bitmaps/l90.xbm
@@ -0,0 +1,6 @@
+#define l90_width 14
+#define l90_height 16
+static char l90_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x18,
+ 0xA1, 0x14, 0xBE, 0x12, 0xA0, 0x11, 0xA0, 0x10, 0x90, 0x10, 0x0E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l91.xbm b/app/bin/bitmaps/l91.xbm
new file mode 100644
index 0000000..4df09a2
--- /dev/null
+++ b/app/bin/bitmaps/l91.xbm
@@ -0,0 +1,6 @@
+#define l91_width 14
+#define l91_height 16
+static char l91_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x21, 0x05,
+ 0xA1, 0x04, 0x3E, 0x04, 0x20, 0x04, 0x20, 0x04, 0x10, 0x04, 0x0E, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l92.xbm b/app/bin/bitmaps/l92.xbm
new file mode 100644
index 0000000..16a5631
--- /dev/null
+++ b/app/bin/bitmaps/l92.xbm
@@ -0,0 +1,6 @@
+#define l92_width 14
+#define l92_height 16
+static char l92_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0x21, 0x08, 0x3E, 0x04, 0x20, 0x02, 0x20, 0x01, 0x90, 0x00, 0x8E, 0x1F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l93.xbm b/app/bin/bitmaps/l93.xbm
new file mode 100644
index 0000000..72515dd
--- /dev/null
+++ b/app/bin/bitmaps/l93.xbm
@@ -0,0 +1,6 @@
+#define l93_width 14
+#define l93_height 16
+static char l93_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x21, 0x10,
+ 0x21, 0x10, 0x3E, 0x0E, 0x20, 0x10, 0x20, 0x10, 0x90, 0x10, 0x0E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l94.xbm b/app/bin/bitmaps/l94.xbm
new file mode 100644
index 0000000..5732695
--- /dev/null
+++ b/app/bin/bitmaps/l94.xbm
@@ -0,0 +1,6 @@
+#define l94_width 14
+#define l94_height 16
+static char l94_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x21, 0x0A,
+ 0x21, 0x09, 0xBE, 0x08, 0xA0, 0x1F, 0x20, 0x08, 0x10, 0x08, 0x0E, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l95.xbm b/app/bin/bitmaps/l95.xbm
new file mode 100644
index 0000000..33560b1
--- /dev/null
+++ b/app/bin/bitmaps/l95.xbm
@@ -0,0 +1,6 @@
+#define l95_width 14
+#define l95_height 16
+static char l95_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA1, 0x00,
+ 0xA1, 0x0F, 0x3E, 0x10, 0x20, 0x10, 0x20, 0x10, 0x90, 0x10, 0x0E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l96.xbm b/app/bin/bitmaps/l96.xbm
new file mode 100644
index 0000000..a959a68
--- /dev/null
+++ b/app/bin/bitmaps/l96.xbm
@@ -0,0 +1,6 @@
+#define l96_width 14
+#define l96_height 16
+static char l96_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA1, 0x00,
+ 0xA1, 0x0F, 0xBE, 0x10, 0xA0, 0x10, 0xA0, 0x10, 0x90, 0x10, 0x0E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l97.xbm b/app/bin/bitmaps/l97.xbm
new file mode 100644
index 0000000..1cd2c1e
--- /dev/null
+++ b/app/bin/bitmaps/l97.xbm
@@ -0,0 +1,6 @@
+#define l97_width 14
+#define l97_height 16
+static char l97_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x21, 0x08,
+ 0x21, 0x08, 0x3E, 0x04, 0x20, 0x04, 0x20, 0x02, 0x10, 0x02, 0x0E, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l98.xbm b/app/bin/bitmaps/l98.xbm
new file mode 100644
index 0000000..bad329d
--- /dev/null
+++ b/app/bin/bitmaps/l98.xbm
@@ -0,0 +1,6 @@
+#define l98_width 14
+#define l98_height 16
+static char l98_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0xA1, 0x10, 0x3E, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0x90, 0x10, 0x0E, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/bitmaps/l99.xbm b/app/bin/bitmaps/l99.xbm
new file mode 100644
index 0000000..53b1b0e
--- /dev/null
+++ b/app/bin/bitmaps/l99.xbm
@@ -0,0 +1,6 @@
+#define l99_width 14
+#define l99_height 16
+static char l99_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10,
+ 0xA1, 0x10, 0x3E, 0x1F, 0x20, 0x10, 0x20, 0x10, 0x10, 0x08, 0x0E, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
diff --git a/app/bin/cblock.c b/app/bin/cblock.c
index 06fd75a..5b728d0 100644
--- a/app/bin/cblock.c
+++ b/app/bin/cblock.c
@@ -1,6 +1,5 @@
-/*
- * ------------------------------------------------------------------
- * cblock.c - Implement blocks: a group of trackwork with a single occ. detector
+/** \file cblock.c
+ * Implement blocks: a group of trackwork with a single occ. detector
* Created by Robert Heller on Thu Mar 12 09:43:02 2009
* ------------------------------------------------------------------
* Modification History: $Log: not supported by cvs2svn $
@@ -22,26 +21,26 @@
* ------------------------------------------------------------------
* Contents:
* ------------------------------------------------------------------
- *
+ *
* Generic Project
* Copyright (C) 2005 Robert Heller D/B/A Deepwoods Software
* 51 Locke Hill Road
* Wendell, MA 01379-9728
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* T_BLOCK
* $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cblock.c,v 1.5 2009-11-23 19:46:16 rheller Exp $
*/
@@ -62,7 +61,7 @@ static int log_block = 0;
static void NoDrawLine(drawCmd_p d, coOrd p0, coOrd p1, wDrawWidth width,
wDrawColor color ) {}
static void NoDrawArc(drawCmd_p d, coOrd p, DIST_T r, ANGLE_T angle0,
- ANGLE_T angle1, BOOL_T drawCenter, wDrawWidth width,
+ ANGLE_T angle1, BOOL_T drawCenter, wDrawWidth width,
wDrawColor color ) {}
static void NoDrawString( drawCmd_p d, coOrd p, ANGLE_T a, char * s,
wFont_p fp, FONTSIZE_T fontSize, wDrawColor color ) {}
@@ -160,7 +159,7 @@ static void UpdateBlock (track_p trk, int inx, descData_p descUpd, BOOL_T needUn
}
if ( ! changed ) return;
if ( needUndoStart )
- UndoStart( _("Change Block"), "Change Block" );
+ UndoStart( _("Change block"), "Change block" );
UndoModify( trk );
if (nChanged) {
MyFree(xx->name);
@@ -202,7 +201,7 @@ static void DescribeBlock (track_p trk, char * str, CSIZE_T len )
strcpy( str, _(GetTrkTypeName( trk )) );
str++;
while (*str) {
- *str = tolower(*str);
+ *str = tolower((unsigned char)*str);
str++;
}
sprintf( str, _("(%d): Layer=%d %s"),
@@ -226,7 +225,7 @@ static void DescribeBlock (track_p trk, char * str, CSIZE_T len )
blockDesc[NM].mode =
blockDesc[SC].mode = DESC_NOREDRAW;
DoDescribe(_("Block"), trk, blockDesc, UpdateBlock );
-
+
}
static blockDebug (track_p trk)
@@ -242,7 +241,7 @@ static blockDebug (track_p trk)
LOG( log_block, 1, ("*** blockDebug(): trackList[%d] = T%d, ",iTrack,GetTrkIndex((&(xx->trackList))[iTrack])))
LOG( log_block, 1, ("%s\n",GetTrkTypeName((&(xx->trackList))[iTrack])))
}
-
+
}
static BOOL_T blockCheckContigiousPath()
@@ -293,7 +292,7 @@ static BOOL_T blockCheckContigiousPath()
}
if (!IsConnectedP && blockTrk_da.cnt > 1) return FALSE;
}
- return TRUE;
+ return TRUE;
}
static void DeleteBlock ( track_p t )
@@ -337,7 +336,7 @@ static void ReadBlock ( char * line )
}
DYNARR_RESET( track_p , blockTrk_da );
while ( (cp = GetNextLine()) != NULL ) {
- while (isspace(*cp)) cp++;
+ while (isspace((unsigned char)*cp)) cp++;
if ( strncmp( cp, "END", 3 ) == 0 ) {
break;
}
@@ -365,7 +364,7 @@ static void ReadBlock ( char * line )
LOG( log_block, 1, ("*** ReadBlock(): copying track T%d\n",GetTrkIndex(blockTrk(iTrack))))
(&(xx->trackList))[iTrack] = blockTrk(iTrack);
}
- blockDebug(trk);
+ blockDebug(trk);
}
@@ -407,7 +406,7 @@ static trackCmd_t blockCmds = {
};
-
+
#ifdef BLOCKCMD
static BOOL_T TrackInBlock (track_p trk, track_p blk) {
wIndex_t iTrack;
@@ -472,7 +471,7 @@ static void BlockOk ( void * junk )
wHide( blockW );
return;
}
- UndoStart( _("Create Block"), "Create Block" );
+ UndoStart( _("Create block"), "Create block" );
/* Create a block object */
LOG( log_block, 1, ("*** BlockOk(): %d tracks in block\n",blockTrk_da.cnt))
trk = NewTrack(0, T_BLOCK, tempEndPts_da.cnt, sizeof(blockData_t)+(sizeof(track_p)*(blockTrk_da.cnt-1))+1);
@@ -492,7 +491,7 @@ static void BlockOk ( void * junk )
UndoEnd();
}
wHide( blockW );
-
+
}
static void NewBlockDialog()
@@ -509,7 +508,7 @@ static void NewBlockDialog()
continue;
}
if ( FindBlock( trk ) != NULL ) {
- ErrorMessage( _("Selected Track is already in a block, skipped!") );
+ ErrorMessage( _("Selected track is already in a block, skipped!") );
continue;
}
blockElementCount++;
@@ -535,7 +534,7 @@ static STATUS_T CmdBlockCreate( wAction_t action, coOrd pos )
LOG( log_block, 1, ("*** CmdBlockAction(%08x,{%f,%f})\n",action,pos.x,pos.y))
switch (action & 0xFF) {
case C_START:
- fprintf(stderr,"*** CmdBlockCreate(): C_START\n");
+ fprintf(stderr,"*** CmdBlockCreate(): C_START\n");
NewBlockDialog();
return C_TERMINATE;
default:
@@ -549,7 +548,7 @@ static STATUS_T CmdBlockEdit( wAction_t action, coOrd pos )
{
track_p trk,btrk;
char msg[STR_SIZE];
-
+
switch (action) {
case C_START:
InfoMessage( _("Select a track") );
@@ -581,7 +580,7 @@ static STATUS_T CmdBlockDelete( wAction_t action, coOrd pos )
{
track_p trk,btrk;
blockData_p xx;
-
+
switch (action) {
case C_START:
InfoMessage( _("Select a track") );
@@ -598,7 +597,7 @@ static STATUS_T CmdBlockDelete( wAction_t action, coOrd pos )
/* Confirm Delete Block */
xx = GetblockData(btrk);
if ( NoticeMessage( _("Really delete block %s?"), _("Yes"), _("No"), xx->name) ) {
- UndoStart( _("Delete Block"), "delete" );
+ UndoStart( _("Delete Block"), "delete" );
DeleteTrack (btrk, FALSE);
UndoEnd();
return C_TERMINATE;
@@ -630,7 +629,7 @@ static STATUS_T CmdBlock (wAction_t action, coOrd pos )
default: return C_TERMINATE;
}
}
-
+
#include "bitmaps/blocknew.xpm"
#include "bitmaps/blockedit.xpm"
#include "bitmaps/blockdel.xpm"
diff --git a/app/bin/celev.c b/app/bin/celev.c
index b4691d1..164ea43 100644
--- a/app/bin/celev.c
+++ b/app/bin/celev.c
@@ -225,7 +225,6 @@ static void DoElevDone( void * arg )
DoElevUpdate( NULL, 1, NULL );
HilightElevations( FALSE );
HilightSelectedEndPt( FALSE, elevTrk, elevEp );
- wHide( elevW );
elevTrk = NULL;
Reset();
}
diff --git a/app/bin/chotbar.c b/app/bin/chotbar.c
index b430f61..f138cbb 100644
--- a/app/bin/chotbar.c
+++ b/app/bin/chotbar.c
@@ -1,8 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/chotbar.c,v 1.4 2009-10-15 03:54:32 dspagnol Exp $
- *
+/** \file chotbar.c
* HOT BAR
- *
*/
/* XTrkCad - Model Railroad CAD
@@ -296,13 +293,13 @@ EXPORT void HotBarCancel( void )
HotBarHighlight( hotBarCurrSelect );
hotBarCurrSelect = -1;
}
-
+
static BOOL_T HotBarSelectPlayback( char * line )
{
int inx;
hotBarMap_t * tbm;
- while (*line && isspace(*line) ) line++;
+ while (*line && isspace((unsigned char)*line) ) line++;
for ( inx=0; inx<hotBarMap_da.cnt; inx++ ) {
tbm = &hotBarMap(inx);
if ( strcmp( tbm->proc( HB_FULLTITLE, tbm->context, NULL, NULL ), line) == 0) {
@@ -355,7 +352,7 @@ EXPORT void AddHotBarElement(
wMenuListAdd( hotBarML, hotBarMLcnt++, contentsLabel, (void*)(intptr_t)hotBarMap_da.cnt );
strncpy( curContentsLabel, contentsLabel, sizeof curContentsLabel );
}
-
+
if (barScale <= 0) {
if (isTrack)
barScale = (trackGauge>0.1)?trackGauge*24:10;
@@ -381,7 +378,7 @@ EXPORT void AddHotBarElement(
tbm->labelW = textsize.x+5/hotBarD.dpi;
if ( tbm->labelW > tbm->w ) {
tbm->w = tbm->labelW;
- }
+ }
}
hotBarWidth += tbm->w;
}
diff --git a/app/bin/cmisc.c b/app/bin/cmisc.c
index fe8beea..bb6e700 100644
--- a/app/bin/cmisc.c
+++ b/app/bin/cmisc.c
@@ -1,7 +1,5 @@
/** \file cmisc.c
- * Handlimg of the 'Describe' dialog
- *
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cmisc.c,v 1.7 2009-07-08 18:40:27 m_fischer Exp $
+ * Handling of the 'Describe' dialog
*/
/* XTrkCad - Model Railroad CAD
@@ -337,12 +335,12 @@ void DoDescribe( char * title, track_p trk, descData_p data, descUpdate_t update
wControlActive( ddp->control1, ((ddp->mode|ro_mode)&DESC_RO)==0 );
break;
case DESC_LAYER:
- wListClear(ddp->control0); // Rebuild list on each invovation
+ wListClear((wList_p)ddp->control0); // Rebuild list on each invovation
for ( inx = 0; inx<NUM_LAYERS; inx++ ) {
if (!GetLayerFrozen(inx)) // Avoid Frozen layers.
{
sprintf( message, "%2d : %s", inx+1, GetLayerName(inx) );
- wListAddValue( ddp->control0, message, NULL, (void*)inx );
+ wListAddValue( (wList_p)ddp->control0, message, NULL, (void*)(intptr_t)inx );
}
}
break;
diff --git a/app/bin/compound.c b/app/bin/compound.c
index cbc650b..ed585f7 100644
--- a/app/bin/compound.c
+++ b/app/bin/compound.c
@@ -1,6 +1,4 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/compound.c,v 1.4 2008-01-20 23:29:15 mni77 Exp $
- *
+/** \file compound.c
* Compound tracks: Turnouts and Structures
*
*/
@@ -188,7 +186,7 @@ void ComputeCompoundBoundingBox(
coOrd hi, lo;
xx = GetTrkExtraData(trk);
-
+
GetSegBounds( xx->orig, xx->angle, xx->segCnt, xx->segs, &lo, &hi );
hi.x += lo.x;
hi.y += lo.y;
@@ -283,7 +281,7 @@ void SetDescriptionOrig(
Translate( &p0, p0,
xx->segs[j].u.c.a0 + xx->segs[j].u.c.a1/2.0 + xx->angle,
fabs(xx->segs[j].u.c.radius) );
-
+
} else {
GetBoundingBox( trk, (&p0), (&p1) );
p0.x = (p0.x+p1.x)/2.0;
@@ -396,7 +394,7 @@ STATUS_T CompoundDescriptionMove(
switch (action) {
case C_DOWN:
REORIGIN( p0, xx->descriptionOrig, xx->angle, xx->orig )
-
+
case C_MOVE:
case C_UP:
if (action != C_DOWN)
@@ -432,7 +430,7 @@ EXPORT void GetSegInxEP(
int * segInx,
EPINX_T * segEP )
{
- int inx;
+ int inx;
inx = segChar;
if (inx > 0 ) {
*segInx = (inx)-1;
@@ -672,7 +670,7 @@ void DescribeCompound(
int mL, nL, pL;
long mode;
long listLabelsOption = listLabels;
-
+
if ( xx->flipped )
listLabelsOption |= LABEL_FLIPPED;
if ( xx->ungrouped )
@@ -685,7 +683,7 @@ void DescribeCompound(
strcpy( str, _(GetTrkTypeName( trk )) );
str++;
while (*str) {
- *str = tolower(*str);
+ *str = tolower((unsigned char)*str);
str++;
}
sprintf( str, _("(%d): Layer=%d %s"),
@@ -836,7 +834,7 @@ BOOL_T WriteCompound(
switch ( xx->special ) {
case TOadjustable:
rc &= fprintf( f, "\tX %s %0.3f %0.3f\n", ADJUSTABLE,
- xx->u.adjustable.minD, xx->u.adjustable.maxD )>0;
+ xx->u.adjustable.minD, xx->u.adjustable.maxD )>0;
break;
case TOpier:
rc &= fprintf( f, "\tX %s %0.6f \"%s\"\n", PIER, xx->u.pier.height, xx->u.pier.name )>0;
@@ -1009,7 +1007,7 @@ void ReadCompound(
}
xx->segCnt = tempSegs_da.cnt;
memcpy( xx->segs, tempSegs_da.ptr, tempSegs_da.cnt * sizeof *xx->segs );
-
+
ComputeCompoundBoundingBox( trk );
SetDescriptionOrig( trk );
xx->descriptionOff = descriptionOff;
@@ -1020,12 +1018,12 @@ void ReadCompound(
xx->special = TOadjustable;
GetArgs( tempSpecial+strlen(ADJUSTABLE), "ff",
&xx->u.adjustable.minD, &xx->u.adjustable.maxD );
-
+
} else if (strncmp( tempSpecial, PIER, strlen(PIER) ) == 0) {
xx->special = TOpier;
GetArgs( tempSpecial+strlen(PIER), "fq",
&xx->u.pier.height, &xx->u.pier.name );
-
+
} else {
InputError("Unknown special case", TRUE);
}
@@ -1101,7 +1099,7 @@ void FlipCompound(
DIST_T d2, d1, d0;
ANGLE_T a2, a1;
#define SMALLVALUE (0.001)
-
+
FlipPoint( &xx->orig, orig, angle );
xx->angle = NormalizeAngle( 2*angle - xx->angle + 180.0 );
xx->segs = memdup( xx->segs, xx->segCnt * sizeof xx->segs[0] );
@@ -1252,14 +1250,14 @@ BOOL_T EnumerateCompound( track_p trk )
for ( type="TS"; *type; type++ ) {
for (inx = 0; inx < enumCompound_da.cnt; inx++ ) {
if (EnumCompound(inx).type[0] == *type) {
- EnumerateList( EnumCompound(inx).count,
+ EnumerateList( EnumCompound(inx).count,
EnumCompound(inx).price,
- EnumCompound(inx).name );
+ EnumCompound(inx).name );
}
}
}
DYNARR_RESET( enumCompound_t, enumCompound_da );
}
- return TRUE;
+ return TRUE;
}
diff --git a/app/bin/cprofile.c b/app/bin/cprofile.c
index 245bb58..99a3a6d 100644
--- a/app/bin/cprofile.c
+++ b/app/bin/cprofile.c
@@ -33,49 +33,49 @@
(use 0testprof.xtc - 6 tracks connected 0:0:1 1:0:1 2:0:1 3:0:1 4:0:1 5:0:1 6:0:1)
PreCond Action PostCond
-
+
/ empty -> creating single pt
A1 - - 10 10 -
A2 - - 20 20 11
A3 - - 11 11 20
-
+
/ single pt -> delete
B1 10 - 10 - -
B2 20 11 20 - -
B3 20 11 11 - -
-
+
/ single pt at EOT - extend
C1 10 - 11 10 11 {1}
C2 10 - 20 10 11 {1}
C3 10 - 41 10 41 {1234}
C4 10 - 50 10 41 {1234}
-
+
/ single pt at mid track - extend
D1 31 40 11 31 20 {32}
D2 31 40 20 31 20 {32}
D3 31 40 51 40 51 {45}
D4 31 40 61 40 61 {456}
D5 31 40 10 31 10 {321}
-
+
/ length=2, delete end
E1 30 41 30 40 41 {4}
E2 30 41 21 40 41 {4}
E3 30 41 41 30 31 {3}
E4 30 41 50 30 31 {3}
-
+
/ length=1, delete end
F1 30 31 30 31 -
F2 30 31 21 31 -
F3 30 31 31 30 -
F4 30 31 40 30 -
-
+
/ length=1, extend
G1 30 31 11 20 31 {23}
G2 30 31 10 10 31 {123}
G3 30 31 51 30 51 {345}
G4 30 31 60 30 51 {345}
G5 30 31 61 30 61 {3456}
-
+
/ length=2, extend
H1 30 41 11 20 41 {234}
H2 30 41 10 10 41 {1234}
@@ -117,7 +117,7 @@ track_p pathEndTrk;
EPINX_T pathEndEp;
#define PASSERT( F, X, R ) if ( ! (X) ) { ErrorMessage( MSG_PASSERT, F, __LINE__, #X ); return R; }
-#define NOP
+#define NOP
typedef struct {
track_p trk;
@@ -426,7 +426,7 @@ static void RedrawProfileW( void )
D->size.y += prof.minE;
#endif
- DrawProfile( &screenProfileD, screenProfileFontSize,
+ DrawProfile( &screenProfileD, screenProfileFontSize,
#ifdef WINDOWS
printVert
#else
@@ -444,6 +444,21 @@ static drawCmd_t printProfileD = {
0.0,
{0.0,0.0}, {1.0,1.0},
ProfilePix2CoOrd, ProfileCoOrd2Pix };
+
+/**
+ * This is the print function for the track height profile. The paper
+ * orientation is based in on the orientation of the display windows.
+ * Eg. is the windows is wider than high, the printout will be in
+ * landscape.
+ * \todo Rework the layout of the printout
+ * This function is (at least for me) hard to comprehend with all the
+ * fiddling around with the ccordinates. Also the filled area is a
+ * waste of toner or ink.
+ *
+ * \param junk IN
+ * \return
+ */
+
static void DoProfilePrint( void * junk )
{
coOrd size, p[4];
@@ -740,7 +755,7 @@ static BOOL_T PathListEmpty( void )
static BOOL_T PathListSingle( void )
{
return pathStartTrk != NULL &&
- ( pathEndTrk == NULL ||
+ ( pathEndTrk == NULL ||
( GetTrkEndTrk(pathEndTrk,pathEndEp) == pathStartTrk &&
GetTrkEndTrk(pathStartTrk,pathStartEp) == pathEndTrk ) );
}
@@ -1112,7 +1127,7 @@ if (log_profile>=1) {
pathEndEp = epP;
LOG( log_profile, 2, ("Adding first element\n") )
- } else if ( PathListSingle() &&
+ } else if ( PathListSingle() &&
( ( trkN == pathStartTrk && epN == pathStartEp ) ||
( trkP && trkP == pathStartTrk && epP == pathStartEp ) ) ) {
pathStartTrk = pathEndTrk = NULL;
@@ -1210,13 +1225,13 @@ static void ProfileSubCommand( wBool_t set, void* pcmd )
DrawFillCircle( &tempD, pos, radius,
((mode&ELEV_MASK)==ELEV_DEF?elevColorDefined:elevColorIgnore));
if ( (mode&ELEV_MASK)==ELEV_DEF )
-
+
DrawEndPt2( &mainD, profilePopupTrk, profilePopupEp, drawColorWhite );
elev = 0.0;
switch (cmd) {
case 0:
/* define */
- ComputeElev( profilePopupTrk, profilePopupEp, TRUE, &elev, NULL );
+ ComputeElev( profilePopupTrk, profilePopupEp, TRUE, &elev, NULL );
mode = ELEV_DEF|ELEV_VISIBLE;
break;
case 1:
@@ -1299,7 +1314,7 @@ static STATUS_T CmdProfile( wAction_t action, coOrd pos )
}
#ifdef LATER
InfoMessage( "" );
- if ((trk0 = OnTrack( &pos, TRUE, TRUE )) == NULL)
+ if ((trk0 = OnTrack( &pos, TRUE, TRUE )) == NULL)
return C_CONTINUE;
ep0 = PickEndPoint( pos, trk0 );
if (ep0 < 0)
diff --git a/app/bin/cswitchmotor.c b/app/bin/cswitchmotor.c
index aae5608..7b948a8 100644
--- a/app/bin/cswitchmotor.c
+++ b/app/bin/cswitchmotor.c
@@ -1,6 +1,5 @@
-/*
- * ------------------------------------------------------------------
- * cswitchmotor.c - Switch Motors
+/** \file cswitchmotor.c
+ * Switch Motors
* Created by Robert Heller on Sat Mar 14 10:39:56 2009
* ------------------------------------------------------------------
* Modification History: $Log: not supported by cvs2svn $
@@ -25,27 +24,27 @@
* ------------------------------------------------------------------
* Contents:
* ------------------------------------------------------------------
- *
+ *
* Generic Project
* Copyright (C) 2005 Robert Heller D/B/A Deepwoods Software
* 51 Locke Hill Road
* Wendell, MA 01379-9728
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
+ *
+ *
*/
#include <ctype.h>
@@ -117,8 +116,8 @@ static void DrawSwitchMotor (track_p t, drawCmd_p d, wDrawColor color )
if (switchmotormark_bm == NULL) {
switchmotormark_bm =
wDrawBitMapCreate( mainD.d,
- switchmotormark_width,
- switchmotormark_height, 16, 16,
+ switchmotormark_width,
+ switchmotormark_height, 16, 16,
switchmotormark_bits);
}
Translate (&p, orig, -angle , 2 );
@@ -137,8 +136,8 @@ static struct {
typedef enum { NM, NOR, REV, PS, TO } switchmotorDesc_e;
static descData_t switchmotorDesc[] = {
/*NM */ { DESC_STRING, N_("Name"), &switchmotorData.name },
-/*NOR*/ { DESC_STRING, N_("Normal"), &switchmotorData.normal },
-/*REV*/ { DESC_STRING, N_("Reverse"), &switchmotorData.reverse },
+/*NOR*/ { DESC_STRING, N_("Normal"), &switchmotorData.normal },
+/*REV*/ { DESC_STRING, N_("Reverse"), &switchmotorData.reverse },
/*PS */ { DESC_STRING, N_("Point Sense"), &switchmotorData.pointsense },
/*TO */ { DESC_LONG, N_("Turnout"), &switchmotorData.turnout },
{ DESC_NULL } };
@@ -215,7 +214,7 @@ static void DescribeSwitchMotor (track_p trk, char * str, CSIZE_T len )
strcpy( str, _(GetTrkTypeName( trk )) );
str++;
while (*str) {
- *str = tolower(*str);
+ *str = tolower((unsigned char)*str);
str++;
}
sprintf( str, _("(%d): Layer=%d %s"),
@@ -230,14 +229,14 @@ static void DescribeSwitchMotor (track_p trk, char * str, CSIZE_T len )
switchmotorData.pointsense[STR_LONG_SIZE-1] = '\0';
switchmotorData.turnout = GetTrkIndex(xx->turnout);
switchmotorDesc[TO].mode = DESC_RO;
- switchmotorDesc[NM].mode =
+ switchmotorDesc[NM].mode =
switchmotorDesc[NOR].mode =
switchmotorDesc[REV].mode =
switchmotorDesc[PS].mode = DESC_NOREDRAW;
DoDescribe(_("Switch motor"), trk, switchmotorDesc, UpdateSwitchMotor );
}
-static switchmotorDebug (track_p trk)
+static void switchmotorDebug (track_p trk)
{
switchmotorData_p xx = GetswitchmotorData(trk);
LOG( log_switchmotor, 1, ("*** switchmotorDebug(): trk = %08x\n",trk))
@@ -334,7 +333,7 @@ static trackCmd_t switchmotorCmds = {
static track_p FindSwitchMotor (track_p trk)
{
track_p a_trk;
- switchmotorData_p xx;
+ switchmotorData_p xx;
for (a_trk = NULL; TrackIterate( &a_trk ) ;) {
if (GetTrkType(a_trk) == T_SWITCHMOTOR) {
@@ -349,7 +348,7 @@ static void SwitchMotorOk ( void * junk )
{
switchmotorData_p xx;
track_p trk;
-
+
LOG( log_switchmotor, 1, ("*** SwitchMotorOk()\n"))
ParamUpdate (&switchmotorPG );
if ( switchmotorName[0]==0 ) {
@@ -389,7 +388,7 @@ static void NewSwitchMotorDialog(track_p trk)
static STATUS_T CmdSwitchMotorCreate( wAction_t action, coOrd pos )
{
track_p trk;
-
+
LOG( log_switchmotor, 1, ("*** CmdSwitchMotorCreate(%08x,{%f,%f})\n",action,pos.x,pos.y))
switch (action & 0xFF) {
case C_START:
@@ -412,7 +411,7 @@ static STATUS_T CmdSwitchMotorCreate( wAction_t action, coOrd pos )
default:
return C_CONTINUE;
}
-}
+}
extern BOOL_T inDescribeCmd;
@@ -420,7 +419,7 @@ static STATUS_T CmdSwitchMotorEdit( wAction_t action, coOrd pos )
{
track_p trk,btrk;
char msg[STR_SIZE];
-
+
switch (action) {
case C_START:
InfoMessage( _("Select a turnout") );
@@ -452,7 +451,7 @@ static STATUS_T CmdSwitchMotorDelete( wAction_t action, coOrd pos )
{
track_p trk,btrk;
switchmotorData_p xx;
-
+
switch (action) {
case C_START:
InfoMessage( _("Select a turnout") );
@@ -469,7 +468,7 @@ static STATUS_T CmdSwitchMotorDelete( wAction_t action, coOrd pos )
/* Confirm Delete SwitchMotor */
xx = GetswitchmotorData(btrk);
if ( NoticeMessage( _("Really delete switch motor %s?"), _("Yes"), _("No"), xx->name) ) {
- UndoStart( _("Delete Switch Motor"), "delete" );
+ UndoStart( _("Delete Switch Motor"), "delete" );
DeleteTrack (btrk, FALSE);
UndoEnd();
return C_TERMINATE;
@@ -502,7 +501,7 @@ static STATUS_T CmdSwitchMotor (wAction_t action, coOrd pos )
default: return C_TERMINATE;
}
}
-
+
//#include "bitmaps/switchmotor.xpm"
#include "bitmaps/switchmnew.xpm"
diff --git a/app/bin/ctodesgn.c b/app/bin/ctodesgn.c
index e3c1b8e..b5ba768 100644
--- a/app/bin/ctodesgn.c
+++ b/app/bin/ctodesgn.c
@@ -40,7 +40,7 @@
/*****************************************
*
- * TURNOUT DESIGNER
+ * TURNOUT DESIGNER
*
*/
@@ -187,7 +187,7 @@ static signed char RegPaths[] = {
'R', 'e', 'v', 'e', 'r', 's', 'e', 0, 1, 3, 4, 0, 0, 0 };
static toDesignSchema_t RegSchema = {
RegPaths,
- "030" "310" "341" "420" };
+ "030" "310" "341" "420" };
static toDesignDesc_t RegDesc = {
NTO_REGULAR,
N_("Regular Turnout"),
@@ -248,7 +248,7 @@ static toDesignFloat_t WyeFloats[] = {
static signed char Wye1Paths[] = {
'L', 'e', 'f', 't', 0, 1, 2, 3, 0, 0,
'R', 'i', 'g', 'h', 't', 0, 1, 4, 5, 0, 0, 0 };
-static toDesignSchema_t Wye1Schema = {
+static toDesignSchema_t Wye1Schema = {
Wye1Paths,
"030" "341" "410" "362" "620" };
static signed char Wye2Paths[] = {
@@ -287,7 +287,7 @@ static signed char Tri1Paths[] = {
'L', 'e', 'f', 't', 0, 1, 2, 3, 0, 0,
'N', 'o', 'r', 'm', 'a', 'l', 0, 1, 6, 0, 0,
'R', 'i', 'g', 'h', 't', 0, 1, 4, 5, 0, 0, 0 };
-static toDesignSchema_t Tri1Schema = {
+static toDesignSchema_t Tri1Schema = {
Tri1Paths,
"030" "341" "410" "362" "620" "370" };
static signed char Tri2Paths[] = {
@@ -1099,7 +1099,7 @@ static toDesignSchema_t * LoadSegs(
return NULL;
radii[0] = - radii[0];
points[0].x = points[0].y = points[1].y = 0.0;
- points[1].x = (newTurnLen0);
+ points[1].x = (newTurnLen0);
points[2].y = (newTurnOff1);
points[2].x = (newTurnLen1);
tempEndPts(0).pos = points[0]; tempEndPts(0).angle = 270.0;
@@ -1146,7 +1146,7 @@ static toDesignSchema_t * LoadSegs(
radii[0] = - radii[0];
points[0].x = points[0].y = 0.0;
points[1].y = (newTurnOff1);
- points[1].x = (newTurnLen1);
+ points[1].x = (newTurnLen1);
points[2].y = -(newTurnOff2);
points[2].x = (newTurnLen2);
points[7].y = 0;
@@ -1343,7 +1343,7 @@ static void NewTurnPrint(
{ 0.0, 0.0 },
{ 0.0, 0.0 },
Pix2CoOrd, CoOrd2Pix };
-
+
if ((pp=LoadSegs( curDesign, TRUE, NULL )) == NULL)
return;
if (includeNontrackSegments && customTurnout1)
@@ -2104,11 +2104,11 @@ EXPORT void ComputeCurvedSeg(
EXPORT char * Strcpytrimed( char * dst, char * src, BOOL_T double_quotes )
{
char * cp;
- while (*src && isspace(*src) ) src++;
+ while (*src && isspace((unsigned char)*src) ) src++;
if (!*src)
return dst;
cp = src+strlen(src)-1;
- while ( cp>src && isspace(*cp) ) cp--;
+ while ( cp>src && isspace((unsigned char)*cp) ) cp--;
while ( src<=cp ) {
if (*src == '"' && double_quotes)
*dst++ = '"';
@@ -2331,7 +2331,7 @@ int main ( int argc, char * argv[] )
}
strcpy( newTurnManufacturer, *argv++ );
specialLine[0] = '\0';
- switch (tolower((*argv++)[0])) {
+ switch (tolower((unsigned char)(*argv++)[0])) {
case 'b':
if (argc != 7) Usage(argc0,argv0);
strcpy( newTurnLeftDesc, *argv++ );
@@ -2364,7 +2364,7 @@ int main ( int argc, char * argv[] )
strcpy( newTurnLeftPartno, *argv++ );
newTurnLen1 = GetDim(atof( *argv++ ));
newTurnAngle1 = atof( *argv++ );
- curDesign = &CrvSectionDesc;
+ curDesign = &CrvSectionDesc;
NewTurnOk( &CrvSectionDesc );
break;
case 'r':
diff --git a/app/bin/ctrain.c b/app/bin/ctrain.c
index b78dc9e..d3eb00a 100644
--- a/app/bin/ctrain.c
+++ b/app/bin/ctrain.c
@@ -374,7 +374,7 @@ static void SetCarBoundingBox(
hi.y = p[inx].y;
}
SetBoundingBox( car, hi, lo );
-
+
}
@@ -593,8 +593,8 @@ static wIndex_t FindLoco(
}
/**
- * Update the speed display when running trains. Draw the slider in the
- * correct position and update the odometer.
+ * Update the speed display when running trains. Draw the slider in the
+ * correct position and update the odometer.
*
* \param d IN drawing area for slider
* \param d IN the dialog
@@ -611,7 +611,7 @@ static void SpeedRedraw(
wPos_t y, pts[4][2];
trainControlDlg_p dlg = (trainControlDlg_p)context;
struct extraData * xx;
- wDrawColor drawColor;
+ wDrawColor drawColor;
wDrawClear( d );
if ( dlg == NULL || dlg->train == NULL ) return;
@@ -635,18 +635,18 @@ static void SpeedRedraw(
pts[0][0] = pts[3][0] = 0;
pts[1][0] = pts[2][0] = SLIDER_WIDTH;
wDrawFilledPolygon( d, pts, 4, drawColor, 0 );
-
+
wDrawLine( d, 0, y, SLIDER_WIDTH, y, 1, wDrawLineSolid, drawColorRed, 0 );
wDrawLine( d, 0, y+SLIDER_THICKNESS/2, SLIDER_WIDTH, y+SLIDER_THICKNESS/2, 1, wDrawLineSolid, drawColorBlack, 0 );
wDrawLine( d, 0, y-SLIDER_THICKNESS/2, SLIDER_WIDTH, y-SLIDER_THICKNESS/2, 1, wDrawLineSolid, drawColorBlack, 0 );
-
+
sprintf( dlg->speedS, "%3d %s", (int)(units==UNITS_ENGLISH?xx->speed:xx->speed*1.6), (units==UNITS_ENGLISH?"mph":"km/h") );
ParamLoadMessage( dlg->trainPGp, I_SPEED, dlg->speedS );
LOG( log_trainPlayback, 3, ( "Speed = %d\n", (int)xx->speed ) );
}
-static void SpeedAction(
+static void SpeedAction(
wAction_t action,
coOrd pos )
{
@@ -717,7 +717,7 @@ static void ControllerDialogSync(
} else {
wListSetIndex( (wList_p)dlg->trainPGp->paramPtr[I_LIST].control, -1 );
}
-
+
if ( dlg->train ) {
xx = GetTrkExtraData(dlg->train);
dir = xx->direction==0?0:1;
@@ -954,7 +954,7 @@ static void SetTrainDirection(
struct extraData *xx, *xx0=GetTrkExtraData(train);
int dir, dir0;
track_p car;
-
+
car = train;
for ( dir0 = 0; dir0 < 2; dir0++ ) {
dir = dir0;
@@ -1140,7 +1140,7 @@ if ( top1 != top2 ) {
hi.y = lo.y + size.x;
if ( !OFF_MAIND( lo, hi ) )
DrawCar( car, &mainD, wDrawColorBlack );
- }
+ }
}
wDrawDelayUpdate( mainD.d, FALSE );
drawCarEnable = drawCarEnable1;
@@ -1208,7 +1208,7 @@ static track_p FindCar(
track_p trk, trk1;
DIST_T dist1 = 100000, dist;
struct extraData * xx;
-
+
trk1 = NULL;
for ( trk=NULL; TrackIterate(&trk); ) {
if ( GetTrkType(trk) == T_CAR ) {
@@ -1458,7 +1458,7 @@ static void CrashTrain(
FlipTraverseTrack( &xx->trvTrk );
PlaceCars( car, 1-dir, speed, flip );
if ( flip )
- speed = - speed;
+ speed = - speed;
xx->trvTrk.angle = NormalizeAngle( xx->trvTrk.angle - speed );
xx->trvTrk.trk = NULL;
PlaceCar( car );
@@ -1712,7 +1712,7 @@ static BOOL_T MoveTrain(
measured = TRUE;
}
WALK_CARS_END( car1, xx1, dir1 );
-
+
if ( train == followTrain ) {
if ( followCenter.x != mainCenter.x ||
followCenter.y != mainCenter.y ) {
@@ -2057,7 +2057,7 @@ static STATUS_T CmdTrain( wAction_t action, coOrd pos )
DoCarDlg();
DoChangeNotification( CHANGE_PARAMS );
}
- }
+ }
EnableCommands();
if ( curTrainDlg == NULL )
curTrainDlg = CreateTrainControlDlg();
@@ -2090,7 +2090,7 @@ static STATUS_T CmdTrain( wAction_t action, coOrd pos )
wControlShow( (wControl_p)newcarB, (toolbarSet&(1<<BG_HOTBAR)) == 0 );
currCarItemPtr = NULL;
return C_CONTINUE;
-
+
case C_TEXT:
if ( Dtrain.state == 0 )
return C_CONTINUE;
@@ -2288,7 +2288,7 @@ static STATUS_T CmdTrain( wAction_t action, coOrd pos )
if ( !inPlayback )
wMenuPopupShow( trainPopupM );
return C_CONTINUE;
-
+
case C_REDRAW:
#ifdef LATER
if (Dtrain.state == 1 && !suppressTrainRedraw) {
@@ -2381,8 +2381,8 @@ static void CmdTrainStopGo( void * junk )
static BOOL_T TrainStopGoPlayback( char * line )
{
- while (*line && isspace(*line) ) line++;
- if ( (strcasecmp( line, "STOP" ) == 0) != (trainsState == TRAINS_STOP) )
+ while (*line && isspace((unsigned char)*line) ) line++;
+ if ( (strcasecmp( line, "STOP" ) == 0) != (trainsState == TRAINS_STOP) )
CmdTrainStopGo(NULL);
return TRUE;
}
diff --git a/app/bin/custom.c b/app/bin/custom.c
index 61338d6..cbde60b 100644
--- a/app/bin/custom.c
+++ b/app/bin/custom.c
@@ -134,11 +134,8 @@ BOOL_T Initialize( void )
InitTrkText();
InitTrkDraw();
InitTrkNote();
-
-#ifdef XTRKCAD_USE_LAYOUTCONTROL
InitTrkBlock();
InitTrkSwitchMotor();
-#endif
InitCarDlg();
memset( message, 0, sizeof message );
diff --git a/app/bin/dbitmap.c b/app/bin/dbitmap.c
index a1986c0..1c9c304 100644
--- a/app/bin/dbitmap.c
+++ b/app/bin/dbitmap.c
@@ -45,8 +45,8 @@ static drawCmd_t bitmap_d = {
static int SaveBitmapFile(
- const char * pathName,
- const char * fileName,
+ int files,
+ char **fileName,
void * data )
{
coOrd p[4];
@@ -55,10 +55,10 @@ static int SaveBitmapFile(
wFontSize_t fs;
coOrd textsize, textsize1;
- if (pathName == NULL)
- return TRUE;
- memcpy( curDirName, pathName, fileName-pathName );
- curDirName[fileName-pathName-1] = '\0';
+ assert( fileName != NULL );
+ assert( files == 1 );
+
+ SetCurrentPath( BITMAPPATHKEY, fileName[ 0 ] );
bitmap_d.d = wBitMapCreate( (wPos_t)bitmap_w, (wPos_t)bitmap_h, 8 );
if (bitmap_d.d == (wDraw_p)0) {
@@ -118,7 +118,7 @@ static int SaveBitmapFile(
bitmap_d.options &= ~DC_CENTERLINE;
DrawTracks( &bitmap_d, bitmap_d.scale, bitmap_d.orig, bitmap_d.size );
InfoMessage( _("Writing BitMap to file") );
- if ( wBitMapWriteFile( bitmap_d.d, pathName ) == FALSE ) {
+ if ( wBitMapWriteFile( bitmap_d.d, fileName[0] ) == FALSE ) {
NoticeMessage( MSG_WBITMAP_FAILED, _("Ok"), NULL );
return FALSE;
}
diff --git a/app/bin/dcar.c b/app/bin/dcar.c
index 2bbf728..c64582f 100644
--- a/app/bin/dcar.c
+++ b/app/bin/dcar.c
@@ -1,6 +1,4 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/dcar.c,v 1.6 2008-03-06 19:35:07 m_fischer Exp $
- *
+/** \file dcar.c
* TRAIN
*
*/
@@ -90,7 +88,7 @@ typedef struct {
long serviceDate;
char * notes;
} carData_t;
-
+
struct carItem_t {
long index;
SCALEINX_T scaleInx;
@@ -149,7 +147,7 @@ static void TabStringExtract(
}
}
-
+
static char * TabStringDup(
tabString_t * tab )
{
@@ -656,10 +654,10 @@ static BOOL_T CarProtoRead(
long type;
carDim_t dim;
- if ( !GetArgs( line+9, "qllff00ff",
+ if ( !GetArgs( line+9, "qllff00ff",
&desc, &options, &type, &dim.carLength, &dim.carWidth, &dim.truckCenter, &dim.coupledLength ) )
return FALSE;
- if ( !ReadSegs() )
+ if ( !ReadSegs() )
return FALSE;
CarProtoNew( NULL, curParamFileIndex, desc, options, type, &dim, tempSegs_da.cnt, &tempSegs(0) );
return TRUE;
@@ -837,7 +835,7 @@ static roadnameMap_p LoadRoadnameList(
return NULL;
if ( TabStringCmp( "undecorated", roadnameTab ) == 0 )
return NULL;
-
+
cmp_key.name = roadnameTab->ptr;
cmp_key.len = roadnameTab->len;
roadnameMapP = LookupListElem( &roadnameMap_da, &cmp_key, Cmp_roadnameMap, sizeof *(roadnameMap_p)0 );
@@ -845,7 +843,7 @@ static roadnameMap_p LoadRoadnameList(
roadnameMapP->roadname = TabStringDup(roadnameTab);
roadnameMapP->repmark = TabStringDup(repmarkTab);
roadnameMapChanged = TRUE;
- } else if ( repmarkTab->len > 0 &&
+ } else if ( repmarkTab->len > 0 &&
( roadnameMapP->repmark == NULL || roadnameMapP->repmark[0] == '\0' ) ) {
roadnameMapP->repmark = TabStringDup(repmarkTab);
roadnameMapChanged = TRUE;
@@ -1013,7 +1011,7 @@ static BOOL_T CarPartRead(
carDim_t dim;
long rgb;
- if ( !GetArgs( line+8, "sqllff00ffl",
+ if ( !GetArgs( line+8, "sqllff00ffl",
scale, &title, &options, &type, &dim.carLength, &dim.carWidth, &dim.truckCenter, &dim.coupledLength, &rgb ) )
return FALSE;
CarPartNew( NULL, curParamFileIndex, LookupScale(scale), title, options, type, &dim, wDrawFindColor(rgb) );
@@ -1036,10 +1034,10 @@ static BOOL_T CarPartWrite(
TabStringExtract( partP->title, 7, tabs );
sprintf( message, "%s\t%s\t%.*s\t%.*s\t%.*s\t%.*s\t%.*s",
parentP->manuf, parentP->proto,
- tabs[T_DESC].len, tabs[T_DESC].ptr,
- tabs[T_PART].len, tabs[T_PART].ptr,
- tabs[T_ROADNAME].len, tabs[T_ROADNAME].ptr,
- tabs[T_REPMARK].len, tabs[T_REPMARK].ptr,
+ tabs[T_DESC].len, tabs[T_DESC].ptr,
+ tabs[T_PART].len, tabs[T_PART].ptr,
+ tabs[T_ROADNAME].len, tabs[T_ROADNAME].ptr,
+ tabs[T_REPMARK].len, tabs[T_REPMARK].ptr,
tabs[T_NUMBER].len, tabs[T_NUMBER].ptr );
rc &= fprintf( f, "CARPART %s \"%s\"", GetScaleName(partP->parent->scale), PutTitle(message) )>0;
rc &= fprintf( f, " %ld %ld %0.3f %0.3f 0 0 %0.3f %0.3f %ld\n",
@@ -1060,7 +1058,7 @@ static BOOL_T CarDescCustomSave(
int partX;
carPart_p partP;
BOOL_T rc = TRUE;
-
+
for ( parentX=0; parentX<carPartParent_da.cnt; parentX++ ) {
parentP = carPartParent(parentX);
for ( partX=0; partX<parentP->parts_da.cnt; partX++ ) {
@@ -1196,7 +1194,7 @@ EXPORT BOOL_T CarItemRead(
ANGLE_T angle;
wIndex_t index;
- if ( !GetArgs( line+4, "lsqll" "ff00ffl" "fflll000000c",
+ if ( !GetArgs( line+4, "lsqll" "ff00ffl" "fflll000000c",
&itemIndex, scale, &title, &options, &type,
&dim.carLength, &dim.carWidth, &dim.truckCenter, &dim.coupledLength, &rgb,
&purchPrice, &currPrice, &condition, &purchDate, &serviceDate, &cp ) )
@@ -1308,10 +1306,10 @@ EXPORT void CarItemGetSegs(
tabString_t tabs[7];
trkSeg_t * segPtr;
DIST_T ratio = GetScaleRatio(item->scaleInx);
-
+
TabStringExtract( item->title, 7, tabs );
TabStringCpy( message, &tabs[T_PROTO] );
- protoP = CarProtoLookup( message, FALSE, FALSE, 0.0, 0.0 );
+ protoP = CarProtoLookup( message, FALSE, FALSE, 0.0, 0.0 );
if ( protoP != NULL ) {
item->segCnt = protoP->segCnt;
segPtr = protoP->segPtr;
@@ -1582,7 +1580,7 @@ static char * CarItemHotbarProc(
strncpy( newCarLabel1, cp, sizeof newCarLabel1 );
ParamLoadControls( &newCarPG );
ParamGroupRecord( &newCarPG );
-
+
InfoSubstituteControls( newCarControls, newCarLabels );
wWinGetSize( mainW, &w, &h );
w -= wControlGetPosX( newCarControls[0] ) + 4;
@@ -2179,7 +2177,7 @@ static carDlgAction_e item2partActions[] = {
A_ClrManuf,
A_SPartnoSel,
A_ShowControls, A_Return };
-static carDlgAction_e part2itemActions[] = {
+static carDlgAction_e part2itemActions[] = {
A_IsNewPart, 2+0,
A_Else, 1,
A_PopTitleAndTypeinx,
@@ -2468,7 +2466,7 @@ static BOOL_T CarDlgLoadProtoList(
char * firstName;
int typeCount[N_TYPELISTMAP];
int listTypeInx, currTypeInx;
-
+
listTypeInx = -1;
carDlgProtoInx = -1;
firstName = NULL;
@@ -2481,7 +2479,7 @@ LOG( log_carDlgList, 3, ( "CarDlgLoadProtoList( %s, %d, %s )\n carDlgProtoStr
if ( listTypeInx < 0 && carDlgProtoStr[0] && (protoP=CarProtoFind(carDlgProtoStr)) )
listTypeInx = CarProtoFindTypeCode(protoP->type);
if ( listTypeInx < 0 )
- listTypeInx = CarProtoFindTypeCode(carProto(0)->type);
+ listTypeInx = CarProtoFindTypeCode(carProto(0)->type);
for ( inx=0; inx<carProto_da.cnt; inx++ ) {
protoP = carProto(inx);
currTypeInx = CarProtoFindTypeCode(protoP->type);
@@ -2638,7 +2636,7 @@ static BOOL_T CarDlgLoadPartList( carPartParent_p parentP )
TabStringExtract( partP->title, 7, tabs );
ConstructPartDesc( tabs );
lastPart.paramFileIndex = partP->paramFileIndex;
- if ( message[0] && IsParamValid(partP->paramFileIndex) &&
+ if ( message[0] && IsParamValid(partP->paramFileIndex) &&
( lastPart.title == NULL || Cmp_part( &lastPart, partP ) != 0 ) ) {
listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PARTNO_LIST].control, message, NULL, (void*)partP );
if ( carDlgPartnoInx<0 &&
@@ -3193,7 +3191,7 @@ static BOOL_T CheckCarDlgItemIndex( long * index )
{
BOOL_T found = TRUE;
BOOL_T updated = FALSE;
-
+
int inx;
carItem_p item;
while ( found ) {
@@ -4207,8 +4205,8 @@ static void CarInvDlgDelete( void )
static int CarInvSaveText(
- const char * pathName,
- const char * fileName,
+ int files,
+ char ** fileName,
void * data )
{
FILE * f;
@@ -4219,12 +4217,13 @@ static int CarInvSaveText(
char * cp0, * cp1;
int len;
- if ( pathName == NULL )
- return TRUE;
- SetCurDir( pathName, fileName );
- f = fopen( pathName, "w" );
+ assert( fileName != NULL );
+ assert( files == 1 );
+
+ SetCurrentPath( CARSPATHKEY, fileName[0] );
+ f = fopen( fileName[0], "w" );
if ( f == NULL ) {
- NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Car Inventory"), fileName, strerror(errno) );
+ NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Car Inventory"), fileName[0], strerror(errno) );
return FALSE;
}
@@ -4293,7 +4292,7 @@ static int CarInvSaveText(
fprintf( f, " %*s", widths[5], " " );
}
}
- if ( widths[6] > 0 ) {
+ if ( widths[6] > 0 ) {
if ( item->data.condition != 0 ) {
fprintf( f, " %-*.*s", widths[6], widths[6], condListMap[MapCondition(item->data.condition)].name );
} else {
@@ -4390,7 +4389,7 @@ static int ParseCsvLine(
int rc, len;
cp = line;
- for ( cq=cp+strlen(cp)-1; cq>cp&&isspace(*cq); cq-- );
+ for ( cq=cp+strlen(cp)-1; cq>cp&&isspace((unsigned char)*cq); cq-- );
cq[1] = '\0';
for ( elem=0; elem<max_elem; elem++ ) {
tabs[elem].ptr = "";
@@ -4439,8 +4438,8 @@ static int ParseCsvLine(
static int CarInvImportCsv(
- const char * pathName,
- const char * fileName,
+ int files,
+ char **fileName,
void * data )
{
FILE * f;
@@ -4460,12 +4459,13 @@ static int CarInvImportCsv(
int requiredCols;
char *oldLocale = NULL;
- if ( pathName == NULL )
- return TRUE;
- SetCurDir( pathName, fileName );
- f = fopen( pathName, "r" );
+ assert( fileName != NULL );
+ assert( files == 1 );
+
+ SetCurrentPath( CARSPATHKEY, fileName[0] );
+ f = fopen( fileName[0], "r" );
if ( f == NULL ) {
- NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Import Cars"), fileName, strerror(errno) );
+ NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Import Cars"), fileName[0], strerror(errno) );
return FALSE;
}
@@ -4553,7 +4553,7 @@ static int CarInvImportCsv(
dim.truckCenter = TabGetFloat( &tabs[M_TRKCENTER] );
partP = NULL;
if ( tabs[M_MANUF].len > 0 && tabs[M_PARTNO].len > 0 )
- partP = CarPartFind( tabs[M_MANUF].ptr, tabs[M_MANUF].len, tabs[M_PARTNO].ptr, tabs[M_PARTNO].len, scale );
+ partP = CarPartFind( tabs[M_MANUF].ptr, tabs[M_MANUF].len, tabs[M_PARTNO].ptr, tabs[M_PARTNO].len, scale );
if ( partP ) {
TabStringExtract( partP->title, 7, partTabs );
if ( tabs[M_PROTO].len == 0 && partTabs[T_PROTO].len > 0 ) { tabs[M_PROTO].ptr = partTabs[T_PROTO].ptr; tabs[M_PROTO].len = partTabs[T_PROTO].len; }
@@ -4644,11 +4644,11 @@ static void CsvFormatString(
if ( *str && len ) {
fputc( '"', f );
for ( ; *str && len; str++,len-- ) {
- if ( !iscntrl( *str ) ) {
+ if ( !iscntrl((unsigned char) *str ) ) {
if ( *str == '"' )
fputc( '"', f );
fputc( *str, f );
- } else if ( *str == '\n' && str[1] && len > 1 ) {
+ } else if ( *str == '\n' && str[1] && len > 1 ) {
fprintf( f, "<NL>" );
}
}
@@ -4682,8 +4682,8 @@ static void CsvFormatFloat(
static int CarInvExportCsv(
- const char * pathName,
- const char * fileName,
+ int files,
+ char ** fileName,
void * data )
{
FILE * f;
@@ -4693,12 +4693,13 @@ static int CarInvExportCsv(
char * sp;
char *oldLocale = NULL;
- if ( pathName == NULL )
- return TRUE;
- SetCurDir( pathName, fileName );
- f = fopen( pathName, "w" );
+ assert( fileName != NULL );
+ assert( files == 1 );
+ SetCurrentPath( CARSPATHKEY, fileName[0] );
+
+ f = fopen( fileName[0], "w" );
if ( f == NULL ) {
- NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Export Cars"), fileName, strerror(errno) );
+ NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Export Cars"), fileName[0], strerror(errno) );
return FALSE;
}
diff --git a/app/bin/dcustmgm.c b/app/bin/dcustmgm.c
index 53d1f96..86f86b1 100644
--- a/app/bin/dcustmgm.c
+++ b/app/bin/dcustmgm.c
@@ -165,8 +165,8 @@ static void CustMgmContentsOk( void * junk )
static int CustomDoExport(
- const char * pathName,
- const char * fileName,
+ int files,
+ char ** fileName,
void * data )
{
int rc;
@@ -175,15 +175,18 @@ static int CustomDoExport(
custMgmContext_p context = NULL;
char *oldLocale = NULL;
+ assert( fileName != NULL );
+ assert( files == 1 );
+
if ( selcnt <= 0 )
return FALSE;
- SetCurDir( pathName, fileName );
- rc = access( pathName, F_OK );
+ SetCurrentPath( PARAMETERPATHKEY, fileName[ 0 ] );
+ rc = access( fileName[ 0 ], F_OK );
if ( rc != -1 ) {
- rc = access( pathName, W_OK );
+ rc = access( fileName[ 0 ], W_OK );
if ( rc == -1 ) {
- NoticeMessage( MSG_CUSTMGM_CANT_WRITE, _("Ok"), NULL, pathName );
+ NoticeMessage( MSG_CUSTMGM_CANT_WRITE, _("Ok"), NULL, fileName[ 0 ] );
return FALSE;
}
custMgmProceed = TRUE;
@@ -196,9 +199,9 @@ static int CustomDoExport(
}
if ( !custMgmProceed )
return FALSE;
- customMgmF = fopen( pathName, "a" );
+ customMgmF = fopen( fileName[ 0 ], "a" );
if ( customMgmF == NULL ) {
- NoticeMessage( MSG_CUSTMGM_CANT_WRITE, _("Ok"), NULL, pathName );
+ NoticeMessage( MSG_CUSTMGM_CANT_WRITE, _("Ok"), NULL, fileName[ 0 ] );
return FALSE;
}
@@ -214,7 +217,7 @@ static int CustomDoExport(
context = (custMgmContext_p)wListGetItemContext( customSelL, inx );
if ( context == NULL ) continue;
if (!context->proc( CUSTMGM_DO_COPYTO, context->data )) {
- NoticeMessage( MSG_WRITE_FAILURE, _("Ok"), NULL, strerror(errno), pathName );
+ NoticeMessage( MSG_WRITE_FAILURE, _("Ok"), NULL, strerror(errno), fileName[ 0 ] );
fclose( customMgmF );
RestoreLocale(oldLocale);
return FALSE;
@@ -227,7 +230,7 @@ static int CustomDoExport(
}
fclose( customMgmF );
RestoreLocale(oldLocale);
- LoadParamFile( pathName, fileName, NULL );
+ LoadParamFile( 1, fileName, NULL );
DoChangeNotification( CHANGE_PARAMS );
return TRUE;
}
diff --git a/app/bin/denum.c b/app/bin/denum.c
index de5200b..d27a135 100644
--- a/app/bin/denum.c
+++ b/app/bin/denum.c
@@ -66,15 +66,15 @@ static int count_utf8_chars(char *s) {
}
static int DoEnumSave(
- const char * pathName,
- const char * fileName,
+ int files,
+ char **fileName,
void * data )
{
- if (pathName == NULL)
- return TRUE;
- memcpy( curDirName, pathName, fileName-pathName );
- curDirName[fileName-pathName-1] = '\0';
- return wTextSave( enumT, pathName );
+ assert( fileName != NULL );
+ assert( files == 1 );
+
+ SetCurrentPath( PARTLISTPATHKEY, fileName[0] );
+ return wTextSave( enumT, fileName[ 0 ] );
}
diff --git a/app/bin/dlayer.c b/app/bin/dlayer.c
index 17d787c..c79d783 100644
--- a/app/bin/dlayer.c
+++ b/app/bin/dlayer.c
@@ -36,7 +36,7 @@
*
*/
-#define NUM_BUTTONS (20)
+#define NUM_BUTTONS (99)
#define LAYERPREF_FROZEN (1)
#define LAYERPREF_ONMAP (2)
#define LAYERPREF_VISIBLE (4)
@@ -256,6 +256,7 @@ static void SetLayerColor( int inx, wDrawColor color )
}
+
#include "bitmaps/l1.xbm"
#include "bitmaps/l2.xbm"
#include "bitmaps/l3.xbm"
@@ -276,10 +277,101 @@ static void SetLayerColor( int inx, wDrawColor color )
#include "bitmaps/l18.xbm"
#include "bitmaps/l19.xbm"
#include "bitmaps/l20.xbm"
+#include "bitmaps/l21.xbm"
+#include "bitmaps/l22.xbm"
+#include "bitmaps/l23.xbm"
+#include "bitmaps/l24.xbm"
+#include "bitmaps/l25.xbm"
+#include "bitmaps/l26.xbm"
+#include "bitmaps/l27.xbm"
+#include "bitmaps/l28.xbm"
+#include "bitmaps/l29.xbm"
+#include "bitmaps/l30.xbm"
+#include "bitmaps/l31.xbm"
+#include "bitmaps/l32.xbm"
+#include "bitmaps/l33.xbm"
+#include "bitmaps/l34.xbm"
+#include "bitmaps/l35.xbm"
+#include "bitmaps/l36.xbm"
+#include "bitmaps/l37.xbm"
+#include "bitmaps/l38.xbm"
+#include "bitmaps/l39.xbm"
+#include "bitmaps/l40.xbm"
+#include "bitmaps/l41.xbm"
+#include "bitmaps/l42.xbm"
+#include "bitmaps/l43.xbm"
+#include "bitmaps/l44.xbm"
+#include "bitmaps/l45.xbm"
+#include "bitmaps/l46.xbm"
+#include "bitmaps/l47.xbm"
+#include "bitmaps/l48.xbm"
+#include "bitmaps/l49.xbm"
+#include "bitmaps/l50.xbm"
+#include "bitmaps/l51.xbm"
+#include "bitmaps/l52.xbm"
+#include "bitmaps/l53.xbm"
+#include "bitmaps/l54.xbm"
+#include "bitmaps/l55.xbm"
+#include "bitmaps/l56.xbm"
+#include "bitmaps/l57.xbm"
+#include "bitmaps/l58.xbm"
+#include "bitmaps/l59.xbm"
+#include "bitmaps/l60.xbm"
+#include "bitmaps/l61.xbm"
+#include "bitmaps/l62.xbm"
+#include "bitmaps/l63.xbm"
+#include "bitmaps/l64.xbm"
+#include "bitmaps/l65.xbm"
+#include "bitmaps/l66.xbm"
+#include "bitmaps/l67.xbm"
+#include "bitmaps/l68.xbm"
+#include "bitmaps/l69.xbm"
+#include "bitmaps/l70.xbm"
+#include "bitmaps/l71.xbm"
+#include "bitmaps/l72.xbm"
+#include "bitmaps/l73.xbm"
+#include "bitmaps/l74.xbm"
+#include "bitmaps/l75.xbm"
+#include "bitmaps/l76.xbm"
+#include "bitmaps/l77.xbm"
+#include "bitmaps/l78.xbm"
+#include "bitmaps/l79.xbm"
+#include "bitmaps/l80.xbm"
+#include "bitmaps/l81.xbm"
+#include "bitmaps/l82.xbm"
+#include "bitmaps/l83.xbm"
+#include "bitmaps/l84.xbm"
+#include "bitmaps/l85.xbm"
+#include "bitmaps/l86.xbm"
+#include "bitmaps/l87.xbm"
+#include "bitmaps/l88.xbm"
+#include "bitmaps/l89.xbm"
+#include "bitmaps/l90.xbm"
+#include "bitmaps/l91.xbm"
+#include "bitmaps/l92.xbm"
+#include "bitmaps/l93.xbm"
+#include "bitmaps/l94.xbm"
+#include "bitmaps/l95.xbm"
+#include "bitmaps/l96.xbm"
+#include "bitmaps/l97.xbm"
+#include "bitmaps/l98.xbm"
+#include "bitmaps/l99.xbm"
+
+
+static char * show_layer_bits[NUM_BUTTONS] = {
+ l1_bits, l2_bits, l3_bits, l4_bits, l5_bits, l6_bits, l7_bits, l8_bits, l9_bits, l10_bits,
+ l11_bits, l12_bits, l13_bits, l14_bits, l15_bits, l16_bits, l17_bits, l18_bits, l19_bits, l20_bits,
+ l21_bits, l22_bits, l23_bits, l24_bits, l25_bits, l26_bits, l27_bits, l28_bits, l29_bits, l30_bits,
+ l31_bits, l32_bits, l33_bits, l34_bits, l35_bits, l36_bits, l37_bits, l38_bits, l39_bits, l40_bits,
+ l41_bits, l42_bits, l43_bits, l44_bits, l45_bits, l46_bits, l47_bits, l48_bits, l49_bits, l50_bits,
+ l51_bits, l52_bits, l53_bits, l54_bits, l55_bits, l56_bits, l57_bits, l58_bits, l59_bits, l60_bits,
+ l61_bits, l62_bits, l63_bits, l64_bits, l65_bits, l66_bits, l67_bits, l68_bits, l69_bits, l70_bits,
+ l71_bits, l72_bits, l73_bits, l74_bits, l75_bits, l76_bits, l77_bits, l78_bits, l79_bits, l80_bits,
+ l81_bits, l82_bits, l83_bits, l84_bits, l85_bits, l86_bits, l87_bits, l88_bits, l89_bits, l90_bits,
+ l91_bits, l92_bits, l93_bits, l94_bits, l95_bits, l96_bits, l97_bits, l98_bits, l99_bits,
+};
+
-static char * show_layer_bits[NUM_BUTTONS] = { l1_bits, l2_bits, l3_bits, l4_bits, l5_bits, l6_bits, l7_bits, l8_bits, l9_bits, l10_bits,
- l11_bits, l12_bits, l13_bits, l14_bits, l15_bits, l16_bits, l17_bits, l18_bits, l19_bits, l20_bits };
-
static EXPORT long layerRawColorTab[] = {
wRGB( 0, 0,255), /* blue */
wRGB( 0, 0,128), /* dk blue */
@@ -863,7 +955,7 @@ EXPORT BOOL_T ReadLayers( char * line )
{
char * name;
int inx, visible, frozen, color, onMap;
- long rgb;
+ unsigned long rgb;
/* older files didn't support layers */
@@ -887,7 +979,7 @@ EXPORT BOOL_T ReadLayers( char * line )
/* get the properties for a layer from the file and update the layer accordingly */
- if (!GetArgs( line, "ddddl0000q", &inx, &visible, &frozen, &onMap, &rgb, &name ))
+ if (!GetArgs( line, "ddddu0000q", &inx, &visible, &frozen, &onMap, &rgb, &name ))
return FALSE;
if (paramVersion < 9) {
if ( rgb >= 0 && (int)rgb < sizeof oldColorMap/sizeof oldColorMap[0] )
@@ -937,6 +1029,7 @@ EXPORT void InitLayers( void )
layerColorTab[i] = wDrawFindColor( layerRawColorTab[i] );
/* create the bitmaps for the layer buttons */
+ /* all bitmaps have to have the same dimensions */
for ( i = 0; i<NUM_BUTTONS; i++ ) {
show_layer_bmps[i] = wIconCreateBitMap( l1_width, l1_height, show_layer_bits[i], layerColorTab[i%(COUNT(layerColorTab))] );
layers[i].color = layerColorTab[i%(COUNT(layerColorTab))];
diff --git a/app/bin/doption.c b/app/bin/doption.c
index 9413b5e..b1533c9 100644
--- a/app/bin/doption.c
+++ b/app/bin/doption.c
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/doption.c,v 1.8 2009-10-15 04:21:15 dspagnol Exp $
+/** \file doption.c
+ * Option dialogs
*/
/* XTrkCad - Model Railroad CAD
@@ -405,6 +405,9 @@ typedef struct {
long fmt;
} dstFmts_t;
static dstFmts_t englishDstFmts[] = {
+ { N_("999.999999"), DISTFMT_FMT_NONE|DISTFMT_FRACT_NUM|6 },
+ { N_("999.99999"), DISTFMT_FMT_NONE|DISTFMT_FRACT_NUM|5 },
+ { N_("999.9999"), DISTFMT_FMT_NONE|DISTFMT_FRACT_NUM|4 },
{ N_("999.999"), DISTFMT_FMT_NONE|DISTFMT_FRACT_NUM|3 },
{ N_("999.99"), DISTFMT_FMT_NONE|DISTFMT_FRACT_NUM|2 },
{ N_("999.9"), DISTFMT_FMT_NONE|DISTFMT_FRACT_NUM|1 },
@@ -437,10 +440,15 @@ static dstFmts_t metricDstFmts[] = {
{ NULL, 0 },
{ NULL, 0 },
{ NULL, 0 },
+ { NULL, 0 },
+ { NULL, 0 },
+ { NULL, 0 },
{ NULL, 0 } };
static dstFmts_t *dstFmts[] = { englishDstFmts, metricDstFmts };
-
+/**
+ * Load the selection list for number formats with the appropriate list of variants.
+ */
static void LoadDstFmtList( void )
{
@@ -466,14 +474,6 @@ static void UpdatePrefD( void )
for ( inx = 0; inx<sizeof prefPLs/sizeof prefPLs[0]; inx++ ) {
if ( (prefPLs[inx].option&PDO_DIM) ) {
ParamLoadControl( &prefPG, inx );
-#ifdef LATER
- val = wFloatGetValue( (wFloat_p)prefPLs[inx].control );
- if ( newUnits == UNITS_METRIC )
- val *= 2.54;
- else
- val /= 2.54;
- wFloatSetValue( (wFloat_p)prefPLs[inx].control, val );
-#endif
}
}
LoadDstFmtList();
@@ -502,6 +502,7 @@ static void PrefOk( void * junk )
if ( resetValues ) {
NoticeMessage2( 0, MSG_CONN_PARAMS_TOO_SMALL, _("Ok"), NULL ) ;
}
+
wHide( prefW );
DoChangeNotification(changes);
}
diff --git a/app/bin/dprmfile.c b/app/bin/dprmfile.c
index 5b22a01..18b0cbe 100644
--- a/app/bin/dprmfile.c
+++ b/app/bin/dprmfile.c
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/dprmfile.c,v 1.3 2008-03-10 18:59:53 m_fischer Exp $
+/** \file dprmfile.c
+ * Param File Management
*/
/* XTrkCad - Model Railroad CAD
@@ -26,6 +26,8 @@
#include <stdint.h>
+#define PARAM_SUBDIR ("\\params")
+
/****************************************************************************
*
* Param File Management
@@ -208,24 +210,26 @@ EXPORT void RememberParamFiles( void )
static wWin_p paramFileW;
-static long paramFileSel = 1;
+static long paramFileSel = 0;
static wIcon_p mtbox_bm;
static wIcon_p chkbox_bm;
static void ParamFileAction( void * );
static void ParamFileBrowse( void * );
+static void ParamFileSelectAll( void * );
static paramListData_t paramFileListData = { 10, 370 };
static char * paramFileLabels[] = { N_("Show File Names"), NULL };
static paramData_t paramFilePLs[] = {
#define I_PRMFILLIST (0)
#define paramFileL ((wList_p)paramFilePLs[I_PRMFILLIST].control)
- { PD_LIST, NULL, "inx", 0, &paramFileListData, NULL, BL_DUP|BL_SETSTAY },
+ { PD_LIST, NULL, "inx", 0, &paramFileListData, NULL, BL_DUP|BL_SETSTAY|BL_MANY },
#define I_PRMFILTOGGLE (1)
{ PD_TOGGLE, &paramFileSel, "mode", 0, paramFileLabels, NULL, BC_HORZ|BC_NOBORDER },
-#define I_PRMFILACTION (2)
+ { PD_BUTTON, (void *)ParamFileSelectAll, "selectall", PDO_DLGCMDBUTTON, NULL, N_("Select all") },
+#define I_PRMFILACTION (3)
#define paramFileActionB ((wButton_p)paramFilePLs[I_PRMFILACTION].control)
- { PD_BUTTON, (void*)ParamFileAction, "action", PDO_DLGCMDBUTTON, NULL, N_("Unload") },
+ { PD_BUTTON, (void*)ParamFileAction, "action", PDO_DLGCMDBUTTON, NULL, N_("Unload"), 0L, FALSE },
{ PD_BUTTON, (void*)ParamFileBrowse, "browse", 0, NULL, N_("Browse ...") } };
static paramGroup_t paramFilePG = { "prmfile", 0, paramFilePLs, sizeof paramFilePLs/sizeof paramFilePLs[0] };
@@ -250,66 +254,80 @@ static void ParamFileLoadList( void )
wControlShow( (wControl_p)paramFileL, TRUE );
}
+/**
+ * Load the selected parameter files. This is a callback executed when the file selection dialog
+ * is closed.
+ * Steps:
+ * - the parameters are read from file
+ * - check is performed to see whether the content is already present, if yes the previously
+ * loaded content is invalidated
+ * - loaded parameter file is added to list of parameter files
+ * - if a parameter file dialog exists the list is updated. It is either rewritten in
+ * in case of an invalidated file or the new file is appended
+ * - the settings are updated
+ * These steps are repeated for every file in list
+ *
+ * \param files IN the number of filenames in the fileName array
+ * \param fileName IN an array of fully qualified filenames
+ * \param data IN ignored
+ * \return TRUE on success, FALSE on error
+ */
EXPORT int LoadParamFile(
- const char * pathName,
- const char * fileName,
+ int files,
+ char ** fileName,
void * data )
{
char * cp;
+ char *name;
wIndex_t inx;
- wBool_t redrawList;
+ int i = 0;
- if (pathName == NULL)
- return TRUE;
- memcpy( curParamDir, pathName, fileName-pathName );
- curParamDir[fileName-pathName] = '\0';
- wPrefSetString( "file", "paramdir", curParamDir );
-
- redrawList = FALSE;
- curContents = curSubContents = NULL;
- curParamFileIndex = paramFileInfo_da.cnt;
- if ( !ReadParams( 0, NULL, pathName ) )
- return FALSE;
- if (curContents == NULL) {
- curContents = curSubContents = MyStrdup( fileName );
- for ( cp=curContents; *cp; cp++ ) {
- if ( *cp == '=' || *cp == '\'' || *cp == '"' || *cp == ':' || *cp == '.' )
- *cp = ' ';
- }
- }
+ wBool_t redrawList = FALSE;
- for ( inx=0; inx<paramFileInfo_da.cnt; inx++ ) {
- if ( paramFileInfo(inx).valid &&
- strcmp( paramFileInfo(inx).contents, curContents ) == 0 ) {
- paramFileInfo(inx).valid = FALSE;
- redrawList = TRUE;
- break;
- }
- }
+ assert( fileName != NULL );
+ assert( files > 0);
- DYNARR_APPEND( paramFileInfo_t, paramFileInfo_da, 10 );
- paramFileInfo(curParamFileIndex).name = MyStrdup( pathName );
- paramFileInfo(curParamFileIndex).valid = TRUE;
- paramFileInfo(curParamFileIndex).deleted = FALSE;
- paramFileInfo(curParamFileIndex).deletedShadow =
- paramFileInfo(curParamFileIndex).deleted = FALSE;
- paramFileInfo(curParamFileIndex).contents = curContents;
-
- if ( paramFilePG.win ) {
- if ( redrawList ) {
- ParamFileLoadList();
- } else {
- strcpy( message, ((!paramFileSel) && paramFileInfo(curParamFileIndex).contents)?
- paramFileInfo(curParamFileIndex).contents:
- paramFileInfo(curParamFileIndex).name );
- wListAddValue( paramFileL, message, chkbox_bm, (void*)(intptr_t)curParamFileIndex );
- wListSetIndex( paramFileL, wListGetCount(paramFileL)-1 );
+ for( i=0; i < files; i++ )
+ {
+ curContents = curSubContents = NULL;
+ curParamFileIndex = paramFileInfo_da.cnt;
+ if ( !ReadParams( 0, NULL, fileName[ i ] ) )
+ return FALSE;
+
+ assert( curContents != NULL );
+ // in case the contents is already presented, make invalid
+ for ( inx=0; inx<paramFileInfo_da.cnt; inx++ ) {
+ if ( paramFileInfo(inx).valid &&
+ strcmp( paramFileInfo(inx).contents, curContents ) == 0 ) {
+ paramFileInfo(inx).valid = FALSE;
+ redrawList = TRUE;
+ break;
+ }
}
- }
- wPrefSetString( "Parameter File Map", curContents,
+ DYNARR_APPEND( paramFileInfo_t, paramFileInfo_da, 10 );
+ paramFileInfo(curParamFileIndex).name = MyStrdup( fileName[ i ] );
+ paramFileInfo(curParamFileIndex).valid = TRUE;
+ paramFileInfo(curParamFileIndex).deletedShadow =
+ paramFileInfo(curParamFileIndex).deleted = FALSE;
+ paramFileInfo(curParamFileIndex).contents = curContents;
+
+ if ( paramFilePG.win ) {
+ if ( redrawList ) {
+ ParamFileLoadList();
+ } else {
+ strcpy( message, ((!paramFileSel) && paramFileInfo(curParamFileIndex).contents)?
+ paramFileInfo(curParamFileIndex).contents:
paramFileInfo(curParamFileIndex).name );
+ wListAddValue( paramFileL, message, chkbox_bm, (void*)(intptr_t)curParamFileIndex );
+ wListSetIndex( paramFileL, wListGetCount(paramFileL)-1 );
+ }
+ }
+
+ wPrefSetString( "Parameter File Map", curContents,
+ paramFileInfo(curParamFileIndex).name );
+ }
curParamFileIndex = PARAM_CUSTOM;
DoChangeNotification( CHANGE_PARAMS );
return TRUE;
@@ -322,37 +340,113 @@ static void ParamFileBrowse( void * junk )
return;
}
+/**
+ * Update the action button. If at least one selected file is unloaded, the action button
+ * is set to 'Reload'. If all selected files are loaded, the button will be set to 'Unload'.
+ *
+ * \param varname1 IN this is a variable
+ * \return
+ */
static void UpdateParamFileButton(
wIndex_t fileInx )
{
- if (fileInx < 0 || fileInx >= paramFileInfo_da.cnt)
+ wIndex_t selcnt = wListGetSelectedCount( paramFileL );
+ wIndex_t inx, cnt;
+
+ void * data;
+
+ // set the default
+ wButtonSetLabel( paramFileActionB, _("Unload"));
+ paramFilePLs[ I_PRMFILACTION ].context = FALSE;
+
+ //nothing selected -> leave
+ if( selcnt <= 0 )
return;
- wButtonSetLabel( paramFileActionB,
- paramFileInfo(fileInx).deleted?_("Reload"):_("Unload") );
+
+ // get the number of items in list
+ cnt = wListGetCount( paramFileL );
+
+ // walk through the whole list box
+ for ( inx=0; inx<cnt; inx++ )
+ {
+ if ( wListGetItemSelected( (wList_p)paramFileL, inx ))
+ {
+ // if item is selected, get status
+ fileInx = (intptr_t)wListGetItemContext( paramFileL, inx );
+
+ if (fileInx < 0 || fileInx >= paramFileInfo_da.cnt)
+ return;
+ if( paramFileInfo(fileInx).deleted ) {
+ // if selected file was unloaded, set button to reload and finish loop
+ wButtonSetLabel( paramFileActionB, _("Reload"));
+ paramFilePLs[ I_PRMFILACTION ].context = (void *)TRUE;
+ break;
+ }
+ }
+ }
}
-static void ParamFileAction( void * junk )
+/**
+ * Unload selected files.
+ *
+ * \param action IN FALSE = unload, TRUE = reload parameter files
+ * \return
+ */
+
+static void ParamFileAction( void * action )
{
- wIndex_t listInx;
+ wIndex_t selcnt = wListGetSelectedCount( paramFileL );
+ wIndex_t inx, cnt;
wIndex_t fileInx;
void * data;
- listInx = wListGetValues( paramFileL, NULL, 0, NULL, &data );
- if (listInx<0)
+ unsigned newDeletedState;
+
+ if( action )
+ newDeletedState = FALSE;
+ else
+ newDeletedState = TRUE;
+
+ //nothing selected -> leave
+ if( selcnt <= 0 )
return;
- fileInx = (wIndex_t)(long)data;
- paramFileInfo(fileInx).deleted = ! paramFileInfo(fileInx).deleted;
-#ifndef LATER
- strcpy( message, ((!paramFileSel) && paramFileInfo(fileInx).contents)?
- paramFileInfo(fileInx).contents:
- paramFileInfo(fileInx).name );
- wListSetValues( paramFileL, listInx, message, (paramFileInfo(fileInx).deleted)?mtbox_bm:chkbox_bm, (void*)(intptr_t)fileInx );
-#endif
+
+ // get the number of items in list
+ cnt = wListGetCount( paramFileL );
+
+ // walk through the whole list box
+ for ( inx=0; inx<cnt; inx++ )
+ {
+ if ( wListGetItemSelected( (wList_p)paramFileL, inx ) )
+ {
+ fileInx = (intptr_t)wListGetItemContext( paramFileL, inx );
+
+ // set the desired state
+ paramFileInfo(fileInx).deleted = newDeletedState;
+
+ strcpy( message, ((!paramFileSel) && paramFileInfo(fileInx).contents)?
+ paramFileInfo(fileInx).contents:
+ paramFileInfo(fileInx).name );
+ wListSetValues( paramFileL, inx, message, (paramFileInfo(fileInx).deleted)?mtbox_bm:chkbox_bm, (void*)(intptr_t)fileInx );
+ }
+ }
DoChangeNotification( CHANGE_PARAMS );
UpdateParamFileButton( fileInx );
}
+/**
+ * Select all files in the list and set action button
+ *
+ * \param junk IN ignored
+ * \return
+ */
+
+static void ParamFileSelectAll( void *junk )
+{
+ wListSelectAll( paramFileL );
+ UpdateParamFileButton( 0 );
+}
static void ParamFileOk( void * junk )
{
@@ -426,12 +520,15 @@ static void DoParamFiles( void * junk )
dir = wPrefGetString( "file", "paramdir" );
if (dir != NULL)
strcpy( curParamDir, dir );
- else
+ else {
+ // in case there is no preference setting, use the installation's param directory as default
strcpy( curParamDir, libDir );
+ strcat( curParamDir, PARAM_SUBDIR );
+ }
mtbox_bm = wIconCreateBitMap( mtbox_width, mtbox_height, mtbox_bits, drawColorBlack );
chkbox_bm = wIconCreateBitMap( chkbox_width, chkbox_height, chkbox_bits, drawColorBlack );
paramFileW = ParamCreateDialog( &paramFilePG, MakeWindowTitle(_("Parameter Files")), _("Ok"), ParamFileOk, ParamFileCancel, TRUE, NULL, 0, ParamFileDlgUpdate );
- paramFile_fs = wFilSelCreate( mainW, FS_LOAD, 0, _("Load Parameters"), _("Parameter files|*.xtp"), LoadParamFile, NULL );
+ paramFile_fs = wFilSelCreate( mainW, FS_LOAD, FS_MULTIPLEFILES, _("Load Parameters"), _("Parameter files|*.xtp"), LoadParamFile, NULL );
ParamFileLoadList();
}
ParamLoadControls( &paramFilePG );
diff --git a/app/bin/draw.c b/app/bin/draw.c
index 1987113..c04373c 100644
--- a/app/bin/draw.c
+++ b/app/bin/draw.c
@@ -151,17 +151,28 @@ static struct {
wMenuRadio_p btRadio;
} zoomList[] = {
{ "1:10", 1.0 / 10.0 },
+ { "1:9", 1.0 / 9.0 },
+ { "1:8", 1.0 / 8.0 },
+ { "1:7", 1.0 / 7.0 },
+ { "1:6", 1.0 / 6.0 },
{ "1:5", 1.0 / 5.0 },
+ { "1:4", 1.0 / 4.0 },
+ { "1:3", 1.0 / 3.0 },
{ "1:2", 1.0 / 2.0 },
{ "1:1", 1.0 },
{ "2:1", 2.0 },
{ "3:1", 3.0 },
{ "4:1", 4.0 },
+ { "5:1", 5.0 },
{ "6:1", 6.0 },
+ { "7:1", 7.0 },
{ "8:1", 8.0 },
+ { "9:1", 9.0 },
{ "10:1", 10.0 },
{ "12:1", 12.0 },
+ { "14:1", 14.0 },
{ "16:1", 16.0 },
+ { "18:1", 18.0 },
{ "20:1", 20.0 },
{ "24:1", 24.0 },
{ "28:1", 28.0 },
@@ -1171,7 +1182,6 @@ static void MapResize( void )
MapRedraw();
}
-
#ifdef LATER
static void MapProc( wWin_p win, winProcEvent e, void * data )
{
@@ -2367,7 +2377,7 @@ static void MapDlgUpdate(
void * valueP )
{
if ( inx == -1 ) {
- mapVisible = FALSE;
+ MapWindowShow( FALSE );
}
}
diff --git a/app/bin/draw.h b/app/bin/draw.h
index 6f9f1ea..aedc2b6 100644
--- a/app/bin/draw.h
+++ b/app/bin/draw.h
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/draw.h,v 1.4 2008-10-11 06:03:06 m_fischer Exp $
+/** \file draw.h
+ *
*/
/* XTrkCad - Model Railroad CAD
diff --git a/app/bin/fileio.c b/app/bin/fileio.c
index dcd8b5c..23216b8 100644
--- a/app/bin/fileio.c
+++ b/app/bin/fileio.c
@@ -1,7 +1,5 @@
/** \file fileio.c
- * Loading and saving files. Handles trackplans as well as DXF export.
- *
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/fileio.c,v 1.18 2009-05-08 15:28:54 m_fischer Exp $
+ * Loading and saving files. Handles trackplans as well as DXF export.
*/
/* XTrkCad - Model Railroad CAD
@@ -48,6 +46,8 @@
#include <stdint.h>
+#include <assert.h>
+
#include "track.h"
#include "version.h"
#include "common.h"
@@ -75,13 +75,55 @@ EXPORT wBool_t executableOk = FALSE;
static int log_paramFile;
-EXPORT void SetCurDir(
- const char * pathName,
- const char * fileName )
+/**
+ * Get the directory from the current file and store it as current directory
+ * in a global variable and the preferences
+ *
+ * \param pathType IN possible enhancement for file type specific directorys
+ * \param fileName IN fully qualified filename
+ * \return
+ *
+ * \todo split directory and keep directory part
+ */
+
+void SetCurrentPath(
+ const char * pathType,
+ const char * fileName )
{
- memcpy( curDirName, pathName, fileName-pathName );
- curDirName[fileName-pathName-1] = '\0';
- wPrefSetString( "file", "directory", curDirName );
+ char *path;
+ char *copy;
+
+ assert( fileName != NULL );
+ assert( pathType != NULL );
+
+ copy = strdup( fileName );
+ path = strrchr(copy, FILE_SEP_CHAR[ 0 ] );
+ if ( path )
+ {
+ *path = '\0';
+ strcpy( curDirName, copy );
+ wPrefSetString( "file", "directory", curDirName );
+ }
+ free( copy );
+}
+
+/**
+ * Find the filename/extension piece in a fully qualified path
+ *
+ * \param path IN the full path
+ * \return pointer to the filename part
+ */
+
+char *FindName( char *path )
+{
+ char *name;
+ name = strrchr( path, FILE_SEP_CHAR[0] );
+ if (name) {
+ name++;
+ } else {
+ name = path;
+ }
+ return(name );
}
#ifdef WINDOWS
@@ -108,7 +150,7 @@ static int Copyfile( char * fn1, char * fn2 )
#endif
/**
- * Save the old locale and set to new.
+ * Save the old locale and set to new.
*
* \param newlocale IN the new locale to set
* \return pointer to the old locale
@@ -119,14 +161,14 @@ SaveLocale( char *newLocale )
{
char *oldLocale;
char *saveLocale = NULL;
-
+
/* get old locale setting */
oldLocale = setlocale(LC_ALL, NULL);
/* allocate memory to save */
if (oldLocale)
saveLocale = strdup( oldLocale );
-
+
setlocale(LC_ALL, newLocale );
return( saveLocale );
@@ -144,7 +186,7 @@ RestoreLocale( char * locale )
if( locale ) {
setlocale( LC_ALL, locale );
free( locale );
- }
+ }
}
@@ -209,7 +251,7 @@ EXPORT char * GetNextLine( void )
/**
- * Show an error message if problems occur during loading of a param or layout file.
+ * Show an error message if problems occur during loading of a param or layout file.
* The user has the choice to cancel the operation or to continue. If operation is
* canceled the open file is closed.
*
@@ -219,7 +261,7 @@ EXPORT char * GetNextLine( void )
* \return TRUE to continue, FALSE to abort operation
*
*/
-
+
EXPORT int InputError(
char * msg,
BOOL_T showLine,
@@ -228,7 +270,7 @@ EXPORT int InputError(
va_list ap;
char * mp = message;
int ret;
-
+
mp += sprintf( message, "INPUT ERROR: %s:%d\n",
paramFileName, paramLineNum );
va_start( ap, showLine );
@@ -262,7 +304,7 @@ EXPORT void SyntaxError(
*
* \param line IN line to parse
* \param format IN ???
- *
+ *
* \return FALSE in case of parsing error, TRUE on success
*/
@@ -271,9 +313,10 @@ EXPORT BOOL_T GetArgs(
char * format,
... )
{
- unsigned char * cp, * cq;
+ char * cp, * cq;
int argNo;
long * pl;
+ unsigned long *pul;
int * pi;
FLOAT_T *pf;
coOrd p, *pp;
@@ -287,7 +330,7 @@ EXPORT BOOL_T GetArgs(
cp = line;
va_start( ap, format );
for (argNo=1;*format;argNo++,format++) {
- while (isspace(*cp)) cp++;
+ while (isspace((unsigned char)*cp)) cp++;
if (!*cp && strchr( "XZYzc", *format ) == NULL ) {
RestoreLocale(oldLocale);
InputError( "Arg %d: EOL unexpected", TRUE, argNo );
@@ -349,6 +392,16 @@ EXPORT BOOL_T GetArgs(
*pf /= mainD.dpi;
cp = cq;
break;
+ case 'u':
+ pul = va_arg( ap, unsigned long * );
+ *pul = strtoul( cp, &cq, 10 );
+ if (cp == cq) {
+ RestoreLocale(oldLocale);
+ InputError( "Arg %d: expected integer", TRUE, argNo );
+ return FALSE;
+ }
+ cp = cq;
+ break;
case 'l':
pl = va_arg( ap, long * );
*pl = strtol( cp, &cq, 10 );
@@ -406,8 +459,8 @@ EXPORT BOOL_T GetArgs(
break;
case 's':
ps = va_arg( ap, char * );
- while (isspace(*cp)) cp++;
- while (*cp && !isspace(*cp)) *ps++ = *cp++;
+ while (isspace((unsigned char)*cp)) cp++;
+ while (*cp && !isspace((unsigned char)*cp)) *ps++ = *cp++;
*ps++ = '\0';
break;
case 'q':
@@ -445,7 +498,7 @@ EXPORT BOOL_T GetArgs(
break;
case 'c':
qp = va_arg( ap, char * * );
- while (isspace(*cp)) cp++;
+ while (isspace((unsigned char)*cp)) cp++;
if (*cp)
*qp = cp;
else
@@ -470,7 +523,7 @@ EXPORT wBool_t ParseRoomSize(
size.x = strtod( s, &cp );
if (cp != s) {
s = cp;
- while (isspace(*s)) s++;
+ while (isspace((unsigned char)*s)) s++;
if (*s == 'x' || *s == 'X') {
size.y = strtod( ++s, &cp );
if (cp != s) {
@@ -557,7 +610,7 @@ LOG1( log_paramFile, ("ReadParam( %s )\n", fileName ) )
/* empty paramLine */
} else if (strncmp( paramLine, "INCLUDE ", 8 ) == 0) {
cp = &paramLine[8];
- while (*cp && isspace(*cp)) cp++;
+ while (*cp && isspace((unsigned char)*cp)) cp++;
if (!*cp) {
InputError( "INCLUDE - no file name", TRUE );
@@ -605,16 +658,16 @@ LOG1( log_paramFile, ("ReadParam( %s )\n", fileName ) )
/* Close file and reset the locale settings */
if (paramFile) fclose(paramFile);
RestoreLocale( oldLocale );
-
+
NoticeMessage( MSG_PROG_CORRUPTED, _("Ok"), NULL, paramFileName );
return FALSE;
}
}
if (paramFile)fclose( paramFile );
-
+
RestoreLocale( oldLocale );
-
+
return TRUE;
}
@@ -765,7 +818,7 @@ static BOOL_T ReadTrackFile(
paramLineNum++;
if (strlen(paramLine) == (sizeof paramLine) -1 &&
paramLine[(sizeof paramLine)-1] != '\n') {
- if( !(ret = InputError( "Line too long", TRUE )))
+ if( !(ret = InputError( "Line too long", TRUE )))
break;
}
Stripcr( paramLine );
@@ -783,7 +836,7 @@ static BOOL_T ReadTrackFile(
} else if (strncmp( paramLine, "VERSION ", 8 ) == 0) {
paramVersion = strtol( paramLine+8, &cp, 10 );
if (cp)
- while (*cp && isspace(*cp)) cp++;
+ while (*cp && isspace((unsigned char)*cp)) cp++;
if ( paramVersion > iParamVersion ) {
if (cp && *cp) {
NoticeMessage( MSG_UPGRADE_VERSION1, _("Ok"), NULL, paramVersion, iParamVersion, sProdName, cp );
@@ -833,23 +886,23 @@ static BOOL_T ReadTrackFile(
break;
}
}
-
+
if (paramFile)
fclose(paramFile);
if( ret ) {
if (!noSetCurDir)
- SetCurDir( pathName, fileName );
+ SetCurrentPath( LAYOUTPATHKEY, fileName );
if (full) {
strcpy( curPathName, pathName );
curFileName = &curPathName[fileName-pathName];
SetWindowTitle();
}
- }
+ }
RestoreLocale( oldLocale );
-
+
paramFile = NULL;
InfoMessage( "%d", count );
return ret;
@@ -857,20 +910,24 @@ static BOOL_T ReadTrackFile(
EXPORT int LoadTracks(
- const char * pathName,
- const char * fileName,
+ int cnt,
+ char **fileName,
void * data)
{
#ifdef TIME_READTRACKFILE
long time0, time1;
#endif
- if (pathName == NULL)
- return TRUE;
+ char *nameOfFile;
+
+ assert( fileName != NULL );
+ assert( cnt == 1 );
+ //if (fileName == NULL || cnt == 0 )
+ // return TRUE;
+
paramVersion = -1;
wSetCursor( wCursorWait );
Reset();
ClearTracks();
-/* DefaultLayerProperties(); */
ResetLayers();
checkPtMark = changed = 0;
UndoSuspend();
@@ -878,8 +935,10 @@ EXPORT int LoadTracks(
#ifdef TIME_READTRACKFILE
time0 = wGetTimer();
#endif
- if (ReadTrackFile( pathName, fileName, TRUE, FALSE, TRUE )) {
- wMenuListAdd( fileList_ml, 0, fileName, MyStrdup(pathName) );
+ nameOfFile = FindName( fileName[ 0 ] );
+
+ if (ReadTrackFile( fileName[ 0 ], nameOfFile, TRUE, FALSE, TRUE )) {
+ wMenuListAdd( fileList_ml, 0, nameOfFile, MyStrdup(fileName[0]) );
ResolveIndex();
#ifdef TIME_READTRACKFILE
time1 = wGetTimer();
@@ -892,7 +951,6 @@ EXPORT int LoadTracks(
LoadLayerLists();
}
UndoResume();
- /*DoRedraw();*/
Reset();
wSetCursor( wCursorNormal );
return TRUE;
@@ -903,7 +961,7 @@ EXPORT int LoadTracks(
* path.
* \param index IN ignored
* \param label IN ignored
- * \param data IN filename
+ * \param data IN path and filename
*/
EXPORT void DoFileList(
@@ -911,13 +969,9 @@ EXPORT void DoFileList(
char * label,
void * data )
{
- char * fileName, * pathName = (char*)data;
- fileName = strrchr( pathName, FILE_SEP_CHAR[0] );
- if (fileName == NULL)
- fileName = pathName;
- else
- fileName++;
- LoadTracks( pathName, fileName, NULL );
+ char *pathName = (char*)data;
+
+ LoadTracks( 1, &pathName, NULL );
}
@@ -936,7 +990,7 @@ static BOOL_T DoSaveTracks(
RestoreLocale( oldLocale );
NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Track"), fileName, strerror(errno) );
-
+
return FALSE;
}
wSetCursor( wCursorWait );
@@ -969,19 +1023,26 @@ static BOOL_T DoSaveTracks(
static doSaveCallBack_p doAfterSave;
static int SaveTracks(
- const char * pathName,
- const char * fileName,
+ int cnt,
+ char **fileName,
void * data )
{
- if (pathName == NULL)
- return TRUE;
- SetCurDir( pathName, fileName );
- DoSaveTracks( pathName );
- wMenuListAdd( fileList_ml, 0, fileName, MyStrdup(pathName) );
+ char *nameOfFile;
+
+ assert( fileName != NULL );
+ assert( cnt == 1 );
+
+ SetCurrentPath( LAYOUTPATHKEY, fileName[ 0 ] );
+ DoSaveTracks( fileName[ 0 ] );
+
+ nameOfFile = FindName( fileName[ 0 ] );
+ wMenuListAdd( fileList_ml, 0, nameOfFile, MyStrdup(fileName[ 0 ]) );
checkPtMark = changed = 0;
- if (curPathName != pathName)
- strcpy( curPathName, pathName );
- curFileName = &curPathName[fileName-pathName];
+
+ if (curPathName != fileName[ 0 ])
+ strcpy( curPathName, fileName[ 0 ] );
+ curFileName = FindName( curPathName );
+
if (doAfterSave)
doAfterSave();
doAfterSave = NULL;
@@ -998,7 +1059,7 @@ EXPORT void DoSave( doSaveCallBack_p after )
sSourceFilePattern, SaveTracks, NULL );
wFilSelect( saveFile_fs, curDirName );
} else {
- SaveTracks( curPathName, curFileName, NULL );
+ SaveTracks( 1, &curFileName, NULL );
}
SetWindowTitle();
}
@@ -1007,7 +1068,7 @@ EXPORT void DoSaveAs( doSaveCallBack_p after )
{
doAfterSave = after;
if (saveFile_fs == NULL)
- saveFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Save Tracks"),
+ saveFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Save Tracks As"),
sSourceFilePattern, SaveTracks, NULL );
wFilSelect( saveFile_fs, curDirName );
SetWindowTitle();
@@ -1023,8 +1084,8 @@ EXPORT void DoLoad( void )
EXPORT void DoCheckPoint( void )
{
- int rc;
-
+ int rc;
+
if (checkPointingW == NULL) {
ParamRegister( &checkPointingPG );
checkPointingW = ParamCreateDialog( &checkPointingPG, MakeWindowTitle(_("Check Pointing")), NULL, NULL, NULL, FALSE, NULL, F_TOP|F_CENTER, NULL );
@@ -1032,41 +1093,41 @@ EXPORT void DoCheckPoint( void )
rename( checkPtFileName1, checkPtFileName2 );
wShow( checkPointingW );
rc = DoSaveTracks( checkPtFileName1 );
-
+
/* could the check point file be written ok? */
if( rc ) {
/* yes, delete the backup copy of the checkpoint file */
remove( checkPtFileName2 );
} else {
/* no, rename the backup copy back to the checkpoint file name */
- rename( checkPtFileName2, checkPtFileName1 );
- }
+ rename( checkPtFileName2, checkPtFileName1 );
+ }
wHide( checkPointingW );
}
/**
- * Remove all temporary files before exiting.When the program terminates
- * normally through the exit choice, files that are created temporarily are removed:
+ * Remove all temporary files before exiting.When the program terminates
+ * normally through the exit choice, files that are created temporarily are removed:
* xtrkcad.ckp
*
* \param none
* \return none
*
*/
-
+
EXPORT void CleanupFiles( void )
{
if( checkPtFileName1 )
remove( checkPtFileName1 );
-}
+}
/**
- * Check for existance of checkpoint file. Existance of a checkpoint file means that XTrkCAD was not properly
+ * Check for existance of checkpoint file. Existance of a checkpoint file means that XTrkCAD was not properly
* terminated.
*
* \param none
* \return TRUE if exists, FALSE otherwise
- *
+ *
*/
EXPORT int ExistsCheckpoint( void )
@@ -1074,14 +1135,14 @@ EXPORT int ExistsCheckpoint( void )
int len;
char *pattern = sCheckPointF;
char *search;
-
+
struct stat fileStat;
len = strlen( workingDir ) + 1 + strlen( sCheckPointF ) + 1;
checkPtFileName1 = (char*)MyMalloc(len);
sprintf( checkPtFileName1, "%s%s%s", workingDir, FILE_SEP_CHAR, sCheckPointF );
checkPtFileName2 = (char*)MyMalloc(len);
- sprintf( checkPtFileName2, "%s%s%s", workingDir, FILE_SEP_CHAR, sCheckPoint1F );
+ sprintf( checkPtFileName2, "%s%s%s", workingDir, FILE_SEP_CHAR, sCheckPoint1F );
len = strlen( workingDir ) + 1 + strlen( pattern ) + 1;
search = (char*)MyMalloc(len);
@@ -1093,7 +1154,7 @@ EXPORT int ExistsCheckpoint( void )
} else {
MyFree( search );
return FALSE;
- }
+ }
#ifdef LATER
@@ -1101,19 +1162,19 @@ EXPORT int ExistsCheckpoint( void )
dir = opendir( search );
MyFree( search );
-
+
if( dir ) {
closedir( dir );
return TRUE;
} else {
return FALSE;
- }
-#endif
+ }
+#endif
}
/**
- * Load checkpoint file
+ * Load checkpoint file
*
* \return TRUE if exists, FALSE otherwise
*
@@ -1123,7 +1184,7 @@ EXPORT int LoadCheckpoint( void )
{
int len;
char *search;
-
+
paramVersion = -1;
wSetCursor( wCursorWait );
@@ -1167,14 +1228,17 @@ static struct wFilSel_t * exportDXFFile_fs;
static int ImportTracks(
- const char * pathName,
- const char * fileName,
+ int cnt,
+ char **fileName,
void * data )
{
+ char *nameOfFile;
long paramVersionOld = paramVersion;
- if (pathName == NULL)
- return TRUE;
+ assert( fileName != NULL );
+ assert( cnt == 1 );
+
+ nameOfFile = FindName(fileName[ 0 ]);
paramVersion = -1;
wSetCursor( wCursorWait );
Reset();
@@ -1182,7 +1246,7 @@ static int ImportTracks(
ImportStart();
UndoStart( _("Import Tracks"), "importTracks" );
useCurrentLayer = TRUE;
- ReadTrackFile( pathName, fileName, FALSE, FALSE, TRUE );
+ ReadTrackFile( fileName[ 0 ], nameOfFile, FALSE, FALSE, TRUE );
ImportEnd();
/*DoRedraw();*/
EnableCommands();
@@ -1208,32 +1272,33 @@ EXPORT void DoImport( void )
/**
* Export the selected track pieces
*
- * \param pathname IN full path and filename for export file
- * \param filename IN pointer to filename part *within* pathname
+ * \param cnt IN Count of filenames, should always be 1
+ * \param fileName IN array of fileNames with cnt names
* \param data IN unused
* \return FALSE on error, TRUE on success
*/
static int DoExportTracks(
- const char * pathName,
- const char * fileName,
+ int cnt,
+ char **fileName,
void * data )
{
FILE * f;
time_t clock;
char *oldLocale = NULL;
- if (pathName == NULL)
- return TRUE;
- SetCurDir( pathName, fileName );
- f = fopen( pathName, "w" );
+ assert( fileName != NULL );
+ assert( cnt == 1 );
+
+ SetCurrentPath( IMPORTPATHKEY, fileName[ 0 ] );
+ f = fopen( fileName[ 0 ], "w" );
if (f==NULL) {
- NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Export"), fileName, strerror(errno) );
+ NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Export"), fileName[0], strerror(errno) );
return FALSE;
}
oldLocale = SaveLocale("C");
-
+
wSetCursor( wCursorWait );
time(&clock);
fprintf(f,"#%s Version: %s, Date: %s\n", sProdName, sVersion, ctime(&clock) );
@@ -1241,7 +1306,7 @@ static int DoExportTracks(
ExportTracks( f );
fprintf(f, "END\n");
fclose(f);
-
+
RestoreLocale( oldLocale );
Reset();
@@ -1360,19 +1425,20 @@ static drawCmd_t dxfD = {
NULL, &dxfDrawFuncs, 0, 1.0, 0.0, {0.0,0.0}, {0.0,0.0}, Pix2CoOrd, CoOrd2Pix, 100.0 };
static int DoExportDXFTracks(
- const char * pathName,
- const char * fileName,
+ int cnt,
+ char ** fileName,
void * data )
{
time_t clock;
char *oldLocale;
- if (pathName == NULL)
- return TRUE;
- SetCurDir( pathName, fileName );
- dxfF = fopen( pathName, "w" );
+ assert( fileName != NULL );
+ assert( cnt == 1 );
+
+ SetCurrentPath( DXFPATHKEY, fileName[ 0 ] );
+ dxfF = fopen( fileName[0], "w" );
if (dxfF==NULL) {
- NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, "DXF", fileName, strerror(errno) );
+ NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, "DXF", fileName[0], strerror(errno) );
return FALSE;
}
@@ -1486,7 +1552,7 @@ EXPORT BOOL_T EditCut( void )
/**
* Paste clipboard content. XTrackCAD uses a disk file as clipboard replacement. This file is read and the
* content is inserted.
- *
+ *
* \return TRUE if success, FALSE on error (file not found)
*/
@@ -1539,7 +1605,7 @@ EXPORT void FileInit( void )
if (pref != NULL) {
strcpy( curDirName, pref );
} else {
- sprintf( curDirName, "%s%sexamples", libDir, FILE_SEP_CHAR );
+ sprintf( curDirName, "%s%sexamples", libDir, FILE_SEP_CHAR );
}
}
diff --git a/app/bin/fileio.h b/app/bin/fileio.h
index b5abc78..f574126 100644
--- a/app/bin/fileio.h
+++ b/app/bin/fileio.h
@@ -57,7 +57,16 @@ int curDemo;
wMenuList_p fileList_ml;
-void SetCurDir( const char *, const char * );
+#define LAYOUTPATHKEY "layout"
+#define BITMAPPATHKEY "bitmap"
+#define DXFPATHKEY "dxf"
+#define PARTLISTPATHKEY "parts"
+#define CARSPATHKEY "cars"
+#define PARAMETERPATHKEY "params"
+#define IMPORTPATHKEY "import"
+#define MACROPATHKEY "macro"
+
+void SetCurrentPath( const char *, const char * );
void Stripcr( char * );
char * GetNextLine( void );
@@ -80,9 +89,9 @@ char * PutTitle( char * cp );
wBool_t IsParamValid( int );
char * GetParamFileName( int );
void RememberParamFiles( void );
-int LoadParamFile( const char *, const char *, void * );
+int LoadParamFile( int files, char **fileName, void *data );
void ReadParamFiles( void );
-int LoadTracks( const char *, const char *, void * );
+int LoadTracks( int cnt, char **fileName, void *data );
BOOL_T ReadParams( long, const char *, const char * );
typedef void (*doSaveCallBack_p)( void );
diff --git a/app/bin/i18n.c b/app/bin/i18n.c
index 92c68cf..ff4e28d 100644
--- a/app/bin/i18n.c
+++ b/app/bin/i18n.c
@@ -1,4 +1,7 @@
-/* XTrkCad - Model Railroad CAD
+/** \file i18n.c
+ * Internationalization stuff
+ *
+ * XTrkCad - Model Railroad CAD
* Copyright (C) 2007 Mikko Nissinen
*
* This program is free software; you can redistribute it and/or modify
@@ -22,21 +25,38 @@
#include <locale.h>
#include <stdio.h>
-/*
- * Initialize gettext environment.
+/**
+ * Initialize gettext environment. By default, the language files are installed
+ * in <install_dir>\share\locale\<language>
+ * The install dir is derived from the library directory by removing the last
+ * directory in the path (xtrkcad)
+ * Directory layout on Windows is:
+ * <install_dir>\bin\
+ * \share\xtrkcad
+ * \locale
*/
void InitGettext( void )
{
#ifdef XTRKCAD_USE_GETTEXT
char directory[2048];
+
setlocale(LC_ALL, "");
-#ifdef XTRKCAD_CMAKE_BUILD
- strcpy(directory, XTRKCAD_INSTALL_PREFIX);
- strcat(directory, "/share");
-#else
+
+#ifdef WINDOWS
+ // build the correct directory path
strcpy(directory, wGetAppLibDir());
-#endif
- strcat(directory, "/locale");
+ strcat( directory, "/../locale" );
+ _fullpath( directory, directory, 2048 );
+#else
+ #ifdef XTRKCAD_CMAKE_BUILD
+ strcpy(directory, XTRKCAD_INSTALL_PREFIX);
+ strcat(directory, "/share");
+ #else
+ strcpy(directory, wGetAppLibDir());
+ #endif
+ strcat(directory, "/locale");
+#endif
+ // initialize gettext
bindtextdomain(XTRKCAD_PACKAGE, directory);
bind_textdomain_codeset(XTRKCAD_PACKAGE, "UTF-8");
textdomain(XTRKCAD_PACKAGE);
diff --git a/app/bin/macro.c b/app/bin/macro.c
index 88ee928..2147eff 100644
--- a/app/bin/macro.c
+++ b/app/bin/macro.c
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/macro.c,v 1.7 2009-06-15 19:29:57 m_fischer Exp $
+/** \file macro.c
+ * Macros
*/
/* XTrkCad - Model Railroad CAD
@@ -154,15 +154,17 @@ EXPORT void RecordMouse( char * name, wAction_t action, POS_T px, POS_T py )
}
-static int StartRecord( const char * pathName, const char * fileName, void * context )
+static int StartRecord( int cnt, char ** pathName, void * context )
{
time_t clock;
- if (pathName == NULL)
- return TRUE;
- SetCurDir( pathName, fileName );
- recordF = fopen(pathName, "w");
+
+ assert( pathName != NULL );
+ assert( cnt == 1 );
+
+ SetCurrentPath( MACROPATHKEY, pathName[0] );
+ recordF = fopen(pathName[0], "w");
if (recordF==NULL) {
- NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Recording"), fileName, strerror(errno) );
+ NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Recording"), pathName[0], strerror(errno) );
return FALSE;
}
time(&clock);
@@ -484,7 +486,7 @@ static void PlaybackCursor(
case C_REDRAW:
MacroDrawBitMap( playbackD, playbackBm, playbackX, playbackY, playbackColor );
break;
-
+
default:
;
}
@@ -1027,7 +1029,7 @@ static void Playback( void )
continue;
snapshot_d.dpi=snapshot_d.scale=snapshot_d.orig.x=snapshot_d.orig.y=snapshot_d.size.x=snapshot_d.size.y=-1;
cp = paramLine+8;
- while (*cp && isspace(*cp)) cp++;
+ while (*cp && isspace((unsigned char)*cp)) cp++;
if (snapshot_d.dpi = strtod( cp, &cq ), cp == cq)
snapshot_d.dpi = -1;
else if (snapshot_d.scale = strtod( cq, &cp ), cp == cq)
@@ -1141,19 +1143,19 @@ static void Playback( void )
}
-static int StartPlayback( const char * pathName, const char * fileName, void * context )
+static int StartPlayback( int cnt, char **pathName, void * context )
{
- if (pathName == NULL)
- return TRUE;
+ assert( pathName != NULL );
+ assert( cnt ==1 );
- SetCurDir( pathName, fileName );
- paramFile = fopen( pathName, "r" );
+ SetCurrentPath( MACROPATHKEY, pathName[0] );
+ paramFile = fopen( pathName[0], "r" );
if ( paramFile == NULL ) {
- NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Playback"), pathName, strerror(errno) );
+ NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Playback"), pathName[0], strerror(errno) );
return FALSE;
}
- strcpy( paramFileName, pathName );
+ strcpy( paramFileName, pathName[0] );
PlaybackSetup();
curDemo = -1;
@@ -1352,7 +1354,7 @@ static void DemoInitValues( void )
for ( cpp = demoInitParams; *cpp; cpp++ )
paramPlaybackProc( *cpp );
}
-
+
static void DoDemo( void * demoNumber )
{
diff --git a/app/bin/misc.c b/app/bin/misc.c
index 609a210..77b46a2 100644
--- a/app/bin/misc.c
+++ b/app/bin/misc.c
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/misc.c,v 1.49 2010-04-28 04:04:39 dspagnol Exp $
+/* \file misc.c
+ * Main routine and initialization for the application
*/
/* XTrkCad - Model Railroad CAD
@@ -60,6 +60,8 @@
#include "i18n.h"
#include <locale.h>
+#define DEFAULT_SCALE ("N")
+
char *userLocale = NULL;
extern wBalloonHelp_t balloonHelp[];
@@ -193,7 +195,7 @@ EXPORT void * MyMalloc ( long size )
p = malloc( (size_t)size + sizeof (size_t) + 2 * sizeof (unsigned long) );
if (p == NULL)
AbortProg( "No memory" );
-
+
LOG1( log_malloc, ( "Malloc(%ld) = %lx (%lx-%lx)\n", size,
(long)((char*)p+sizeof (size_t) + sizeof (unsigned long)),
(long)p,
@@ -312,11 +314,11 @@ EXPORT void AbortProg(
EXPORT char * Strcpytrimed( char * dst, char * src, BOOL_T double_quotes )
{
char * cp;
- while (*src && isspace(*src) ) src++;
+ while (*src && isspace((unsigned char)*src) ) src++;
if (!*src)
return dst;
cp = src+strlen(src)-1;
- while ( cp>src && isspace(*cp) ) cp--;
+ while ( cp>src && isspace((unsigned char)*cp) ) cp--;
while ( src<=cp ) {
if (*src == '"' && double_quotes)
*dst++ = '"';
@@ -450,7 +452,7 @@ EXPORT void Confirm( char * label2, doSaveCallBack_p after )
{
int rc;
if (changed) {
- rc = wNotice3(
+ rc = wNotice3(
_("Save changes to the layout design before closing?\n\n"
"If you don't save now, your unsaved changes will be discarded."),
_("&Save"), _("&Cancel"), _("&Don't Save") );
@@ -473,15 +475,15 @@ static void ChkLoad( void )
static void ChkRevert( void )
{
int rc;
-
+
if( changed) {
rc = wNoticeEx( NT_WARNING, _("Do you want to return to the last saved state?\n\n"
"Revert will cause all changes done since last save to be lost."),
_("&Revert"), _("&Cancel") );
if( rc ) {
/* load the file */
- LoadTracks( curPathName, curFileName, NULL );
- }
+ LoadTracks( 1, &curFileName, NULL );
+ }
}
}
@@ -499,7 +501,7 @@ static void ChkFileList( int index, const char * label, void * data )
}
/**
- * Save information about current files and some settings to preferences file.
+ * Save information about current files and some settings to preferences file.
*/
EXPORT void SaveState( void )
@@ -515,9 +517,9 @@ EXPORT void SaveState( void )
wPrefSetInteger( "draw", "mainheight", height );
RememberParamFiles();
ParamUpdatePrefs();
-
+
wPrefSetString( "misc", "lastlayout", curPathName );
-
+
if ( fileList_ml ) {
strcpy( file, "file" );
file[5] = 0;
@@ -544,12 +546,12 @@ static void DoQuitAfter( void )
SaveState();
CleanupFiles();
-
+
quitting = TRUE;
}
/**
* Process shutdown request. This function is called when the user requests
- * to close the application. Before shutting down confirmation is gotten to
+ * to close the application. Before shutting down confirmation is gotten to
* prevent data loss.
*/
void DoQuit( void )
@@ -567,10 +569,10 @@ void DoQuit( void )
static void DoClearAfter( void )
{
ClearTracks();
-
+
/* set all layers to their default properties and set current layer to 0 */
DefaultLayerProperties();
-
+
checkPtMark = 0;
Reset();
DoChangeNotification( CHANGE_MAIN|CHANGE_MAP );
@@ -585,6 +587,29 @@ static void DoClear( void )
Confirm(_("Clear"), DoClearAfter);
}
+/**
+ * Toggle visibility state of map window.
+ */
+
+void MapWindowToggleShow( void )
+{
+ MapWindowShow( !mapVisible );
+}
+
+/**
+ * Set visibility state of map window.
+ */
+
+void MapWindowShow( int state )
+{
+ mapVisible = state;
+ wPrefSetInteger( "misc", "mapVisible", mapVisible );
+ wMenuToggleSet( mapShowMI, mapVisible );
+ if( mapVisible )
+ DoChangeNotification( CHANGE_MAP );
+
+ wWinShow( mapW, mapVisible );
+}
static void DoShowWindow(
int index,
@@ -593,10 +618,8 @@ static void DoShowWindow(
{
if (data == mapW) {
if (mapVisible == FALSE) {
- mapVisible = TRUE;
- DoChangeNotification( CHANGE_MAP );
+ MapWindowShow( TRUE );
}
- mapVisible = TRUE;
}
wWinShow( (wWin_p)data, TRUE );
}
@@ -690,8 +713,8 @@ EXPORT void SelectFont( void )
*
*/
-#define COMMAND_MAX (100)
-#define BUTTON_MAX (100)
+#define COMMAND_MAX (160)
+#define BUTTON_MAX (160)
#define NUM_CMDMENUS (4)
#ifdef LATER
@@ -820,7 +843,7 @@ LOG( log_command, 5, ( "COMMAND enable S%d M%d\n", selectedTrackCount, programMo
enable = TRUE;
wMenuPushEnable( (wMenuPush_p)menuPLs[inx].control, enable );
}
-
+
for ( inx=0; inx<buttonCnt; inx++ ) {
if ( buttonList[inx].cmdInx < 0 && (buttonList[inx].options&IC_SELECTED) )
wControlActive( buttonList[inx].control, selectedTrackCount>0 );
@@ -944,7 +967,7 @@ EXPORT wBool_t DoCurCommand( wAction_t action, coOrd pos )
{
wAction_t rc;
int mode;
-
+
if ( action == wActionMove && (commandList[curCommand].options & IC_WANT_MOVE) == 0 )
return C_CONTINUE;
@@ -1424,7 +1447,7 @@ EXPORT wIndex_t AddCommandControl(
commandList[cmdInx].stickyMask = 1L<<(stickyCnt-1);
}
if ( buttonGroupPopupM ) {
- commandList[cmdInx].menu[0] =
+ commandList[cmdInx].menu[0] =
wMenuPushCreate( buttonGroupPopupM, helpKey, GetBalloonHelpStr(helpKey), 0, DoCommandB, (void*)cmdInx );
tm = commandsSubmenu;
p1m = popup1Submenu;
@@ -1434,14 +1457,14 @@ EXPORT wIndex_t AddCommandControl(
p1m = (options&IC_POPUP2)?popup1aM:popup1M;
p2m = (options&IC_POPUP2)?popup2aM:popup2M;
}
- commandList[cmdInx].menu[1] =
+ commandList[cmdInx].menu[1] =
wMenuPushCreate( tm, helpKey, nameStr, acclKey, DoCommandB, (void*)cmdInx );
if ( (options & (IC_POPUP|IC_POPUP2)) ) {
if ( !(options & IC_SELECTED) ) {
- commandList[cmdInx].menu[2] =
+ commandList[cmdInx].menu[2] =
wMenuPushCreate( p1m, helpKey, nameStr, 0, DoCommandB, (void*)cmdInx );
}
- commandList[cmdInx].menu[3] =
+ commandList[cmdInx].menu[3] =
wMenuPushCreate( p2m, helpKey, nameStr, 0, DoCommandB, (void*)cmdInx );
}
@@ -1508,24 +1531,24 @@ EXPORT wIndex_t AddMenuButton(
commandList[cmdInx].stickyMask = 1L<<(stickyCnt-1);
}
if ( buttonGroupPopupM ) {
- commandList[cmdInx].menu[0] =
+ commandList[cmdInx].menu[0] =
wMenuPushCreate( buttonGroupPopupM, helpKey, GetBalloonHelpStr(helpKey), 0, DoCommandB, (void*)(intptr_t)cmdInx );
tm = commandsSubmenu;
p1m = popup1Submenu;
p2m = popup2Submenu;
} else {
- tm = menu;
+ tm = menu;
p1m = (options&IC_POPUP2)?popup1aM:popup1M;
p2m = (options&IC_POPUP2)?popup2aM:popup2M;
}
- commandList[cmdInx].menu[1] =
+ commandList[cmdInx].menu[1] =
wMenuPushCreate( tm, helpKey, nameStr, acclKey, DoCommandB, (void*)(intptr_t)cmdInx );
if ( (options & (IC_POPUP|IC_POPUP2)) ) {
if ( !(options & IC_SELECTED) ) {
- commandList[cmdInx].menu[2] =
+ commandList[cmdInx].menu[2] =
wMenuPushCreate( p1m, helpKey, nameStr, 0, DoCommandB, (void*)(intptr_t)cmdInx );
}
- commandList[cmdInx].menu[3] =
+ commandList[cmdInx].menu[3] =
wMenuPushCreate( p2m, helpKey, nameStr, 0, DoCommandB, (void*)(intptr_t)cmdInx );
}
@@ -1692,10 +1715,10 @@ static void DoSticky( void )
}
/*--------------------------------------------------------------------*/
-/*
+/*
* These array control the choices available in the Toolbar setup.
- * For each choice, the text is given and the respective mask is
- * specified in the following array.
+ * For each choice, the text is given and the respective mask is
+ * specified in the following array.
* Note: text and choices must be given in the same order.
*/
static char *AllToolbarLabels[] = {
@@ -1705,9 +1728,7 @@ static char *AllToolbarLabels[] = {
N_("Easement Button"),
N_("SnapGrid Buttons"),
N_("Create Track Buttons"),
-#ifdef XTRKCAD_USE_LAYOUTCONTROL
N_("Layout Control Elements"),
-#endif
N_("Modify Track Buttons"),
N_("Describe/Select"),
N_("Track Group Buttons"),
@@ -1718,15 +1739,13 @@ static char *AllToolbarLabels[] = {
N_("Hot Bar"),
NULL };
static long AllToolbarMasks[] = {
- 1<<BG_FILE,
+ 1<<BG_FILE,
1<<BG_ZOOM,
1<<BG_UNDO,
1<<BG_EASE,
1<<BG_SNAP,
1<<BG_TRKCRT,
-#ifdef XTRKCAD_USE_LAYOUTCONTROL
- 1<<BG_CONTROL,
-#endif
+ 1<<BG_CONTROL,
1<<BG_TRKMOD,
1<<BG_SELECT,
1<<BG_TRKGRP,
@@ -1926,7 +1945,7 @@ static void MiscMenuItemCreate(
menuPLs[menuPG.paramCnt].nameStr = name;
menuPLs[menuPG.paramCnt].option = option;
menuPLs[menuPG.paramCnt].context = context;
-
+
if ( name ) GetBalloonHelpStr( name );
menuPG.paramCnt++;
}
@@ -2022,9 +2041,9 @@ static void CreateMenus( void )
windowM = wMenuBarAdd( mainW, "menuWindow", _("&Window") );
helpM = wMenuBarAdd( mainW, "menuHelp", _("&Help") );
- /*
+ /*
* POPUP MENUS
- */
+ */
popup1M = wMenuPopupCreate( mainW, _("Commands") );
popup2M = wMenuPopupCreate( mainW, _("Commands") );
@@ -2073,7 +2092,7 @@ static void CreateMenus( void )
wControlActive( (wControl_p)undoB, FALSE );
wControlActive( (wControl_p)redoB, FALSE );
-
+
/*
* FILE MENU
@@ -2128,7 +2147,7 @@ static void CreateMenus( void )
MiscMenuItemCreate( editM, NULL, "cmdTunnel", _("Tu&nnel"), ACCL_TUNNEL, (void*)(wMenuCallBack_p)SelectTunnel, IC_SELECTED, (void *)0 );
MiscMenuItemCreate( editM, NULL, "cmdAbove", _("A&bove"), ACCL_ABOVE, (void*)(wMenuCallBack_p)SelectAbove, IC_SELECTED, (void *)0 );
MiscMenuItemCreate( editM, NULL, "cmdBelow", _("Belo&w"), ACCL_BELOW, (void*)(wMenuCallBack_p)SelectBelow, IC_SELECTED, (void *)0 );
-
+
wMenuSeparatorCreate( editM );
MiscMenuItemCreate( editM, NULL, "cmdWidth0", _("Thin Tracks"), ACCL_THIN, (void*)(wMenuCallBack_p)SelectTrackWidth, IC_SELECTED, (void *)0 );
MiscMenuItemCreate( editM, NULL, "cmdWidth2", _("Medium Tracks"), ACCL_MEDIUM, (void*)(wMenuCallBack_p)SelectTrackWidth, IC_SELECTED, (void *)2 );
@@ -2146,7 +2165,7 @@ static void CreateMenus( void )
/* these menu choices and toolbar buttons are synonymous and should be treated as such */
wControlLinkedSet( (wControl_p)zoomInM, (wControl_p)zoomUpB );
- wControlLinkedSet( (wControl_p)zoomOutM, (wControl_p)zoomDownB );
+ wControlLinkedSet( (wControl_p)zoomOutM, (wControl_p)zoomDownB );
wMenuPushCreate( viewM, "menuEdit-redraw", _("&Redraw"), ACCL_REDRAW, (wMenuCallBack_p)MainRedraw, NULL );
wMenuPushCreate( viewM, "menuEdit-redraw", _("Redraw All"), ACCL_REDRAWALL, (wMenuCallBack_p)DoRedraw, NULL );
@@ -2157,6 +2176,13 @@ static void CreateMenus( void )
snapGridShowMI = wMenuToggleCreate( viewM, "cmdGridShow", _("Show SnapGrid"), ACCL_SNAPSHOW,
FALSE, (wMenuToggleCallBack_p)SnapGridShow, NULL );
gridCmdInx = InitGrid( viewM );
+
+ // visibility toggle for map window
+ // get the start value
+ wPrefGetInteger( "misc", "mapVisible", (long *)&mapVisible, 1 );
+ mapShowMI = wMenuToggleCreate( viewM, "cmdMapShow", _("Show Map"), ACCL_MAPSHOW,
+ mapVisible, (wMenuToggleCallBack_p)MapWindowToggleShow, NULL );
+
wMenuSeparatorCreate( viewM );
toolbarM = wMenuMenuCreate( viewM, "toolbarM", _("&Tool Bar") );
@@ -2164,7 +2190,7 @@ static void CreateMenus( void )
cmdGroup = BG_EASE;
InitCmdEasement();
-
+
cmdGroup = BG_SNAP;
InitSnapGridButtons();
@@ -2172,7 +2198,7 @@ static void CreateMenus( void )
* ADD MENU
*/
- cmdGroup = BG_TRKCRT|BG_BIGGAP;
+ cmdGroup = BG_TRKCRT|BG_BIGGAP;
InitCmdStraight( addM );
InitCmdCurve( addM );
InitCmdParallel( addM );
@@ -2182,12 +2208,10 @@ static void CreateMenus( void )
InitCmdHelix( addM );
InitCmdTurntable( addM );
-#ifdef XTRKCAD_USE_LAYOUTCONTROL
cmdGroup = BG_CONTROL;
InitCmdBlock( addM );
InitCmdSwitchMotor( addM );
-#endif
-
+
/*
* CHANGE MENU
*/
@@ -2201,8 +2225,8 @@ static void CreateMenus( void )
InitCmdDelete();
InitCmdTunnel();
InitCmdAboveBelow();
-
- cmdGroup = BG_TRKMOD;
+
+ cmdGroup = BG_TRKMOD;
if (extraButtons)
MiscMenuItemCreate( changeM, NULL, "loosen", _("&Loosen Tracks"), ACCL_LOOSEN, (void*)(wMenuCallBack_p)LoosenTracks, IC_SELECTED, (void *)0 );
@@ -2223,10 +2247,10 @@ static void CreateMenus( void )
wMenuSeparatorCreate( changeM );
MiscMenuItemCreate( changeM, NULL, "cmdRescale", _("Change Scale"), 0, (void*)(wMenuCallBack_p)DoRescale, IC_SELECTED, (void *)0 );
-
- /*
+
+ /*
* DRAW MENU
- */
+ */
cmdGroup = BG_MISCCRT;
InitCmdDraw( drawM );
InitCmdText( drawM );
@@ -2235,7 +2259,7 @@ static void CreateMenus( void )
cmdGroup = BG_RULER;
InitCmdRuler( drawM );
-
+
/*
* OPTION MENU
*/
@@ -2268,8 +2292,8 @@ static void CreateMenus( void )
/*
* HELP MENU
*/
-
- /* main help window */
+
+ /* main help window */
wMenuAddHelp( helpM );
/* help on recent messages */
@@ -2296,7 +2320,7 @@ static void CreateMenus( void )
wMenuSeparatorCreate( manageM );
InitNewTurn( wMenuMenuCreate( manageM, "cmdTurnoutNew", _("Tur&nout Designer...") ) );
-
+
MiscMenuItemCreate( manageM, NULL, "cmdGroup", _("&Group"), ACCL_GROUP, (void*)(wMenuCallBack_p)DoGroup, IC_SELECTED, (void *)0 );
MiscMenuItemCreate( manageM, NULL, "cmdUngroup", _("&Ungroup"), ACCL_UNGROUP, (void*)(wMenuCallBack_p)DoUngroup, IC_SELECTED, (void *)0 );
@@ -2304,12 +2328,12 @@ static void CreateMenus( void )
MiscMenuItemCreate( manageM, NULL, "cmdRefreshCompound", _("Update Turnouts and Structures"), 0, (void*)(wMenuCallBack_p)DoRefreshCompound, 0, (void *)0 );
MiscMenuItemCreate( manageM, NULL, "cmdCarInventory", _("Car Inventory"), ACCL_CARINV, (void*)(wMenuCallBack_p)DoCarDlg, IC_MODETRAIN_TOO, (void *)0 );
-
+
wMenuSeparatorCreate( manageM );
MiscMenuItemCreate( manageM, NULL, "cmdLayer", _("Layers ..."), ACCL_LAYERS, (void*)InitLayersDialog(), 0, (void *)0 );
wMenuSeparatorCreate( manageM );
-
+
MiscMenuItemCreate( manageM, NULL, "cmdEnumerate", _("Parts &List ..."), ACCL_PARTSLIST, (void*)(wMenuCallBack_p)EnumerateTracks, 0, (void *)0 );
MiscMenuItemCreate( manageM, NULL, "cmdPricelist", _("Price List..."), ACCL_PRICELIST, (void*)PriceListInit(), 0, (void *)0 );
@@ -2358,7 +2382,7 @@ static void LoadFileList( void )
if (!cp)
continue;
pathName = MyStrdup(cp);
- fileName = strrchr( pathName, FILE_SEP_CHAR[0] );
+ fileName = strrchr( pathName, FILE_SEP_CHAR[0] );
if (fileName)
wMenuListAdd( fileList_ml, 0, fileName+1, pathName );
}
@@ -2376,25 +2400,25 @@ EXPORT void InitCmdExport( void )
AddToolbarButton( "cmdImport", wIconCreatePixMap(import_xpm), IC_ACCLKEY, (addButtonCallBack_t)DoImport, NULL );
}
-/* Give user the option to continue work after crash. This function gives the user
+/* Give user the option to continue work after crash. This function gives the user
* the option to load the checkpoint file to continue working after a crash.
*
* \param none
* \return none
*
*/
-
-static void OfferCheckpoint( void )
+
+static void OfferCheckpoint( void )
{
int ret;
-
+
/* sProdName */
ret = wNoticeEx( NT_INFORMATION,
- _("Program was not terminated properly. Do you want to resume working on the previous trackplan?"),
+ _("Program was not terminated properly. Do you want to resume working on the previous trackplan?"),
_("Resume"), _("Ignore") );
if( ret ) {
- /* load the checkpoint file */
- LoadCheckpoint();
+ /* load the checkpoint file */
+ LoadCheckpoint();
}
}
@@ -2442,11 +2466,11 @@ EXPORT wWin_p wMain(
case 'c': /* configuration name */
/* test for valid filename */
for( i = 0; i < strlen( optarg ); i++ ) {
- if( !isalnum( optarg[ i ]) && optarg[ i ] != '.' ) {
+ if( !isalnum( (unsigned char)optarg[ i ]) && optarg[ i ] != '.' ) {
NoticeMessage( MSG_BAD_OPTION, _("Ok"), NULL, optarg );
exit( 1 );
}
- }
+ }
/* append delimiter and argument to configuration name */
if( strlen( optarg ) < STR_SIZE - strlen( ";" ) - strlen( buffer ) - 1 ){
strcat( buffer, ";" );
@@ -2627,13 +2651,18 @@ LOG1( log_init, ( "Reset\n" ) )
/* Set up the data for scale and gauge description */
DoSetScaleDesc();
-
+
+ // get the preferred scale from the configuration file
pref = wPrefGetString( "misc", "scale" );
- DoSetScale( pref );
+ if( !pref )
+ // if preferred scale was not set (eg. during initial run), initialize to a default value
+ pref = DEFAULT_SCALE;
+ strcpy( buffer, pref );
+ DoSetScale( buffer );
- /* see whether last layout should be reopened on startup */
+ /* see whether last layout should be reopened on startup */
wPrefGetInteger( "DialogItem", "pref-onstartup", &onStartup, 0 );
-
+
/*
* THE END
*/
@@ -2646,19 +2675,18 @@ LOG1( log_init, ( "Initialization complete\n" ) )
DoChangeNotification( CHANGE_MAIN|CHANGE_MAP );
wWinShow( mainW, TRUE );
- mapVisible = TRUE;
- wShow( mapW );
- wDestroySplash();
+ wWinShow( mapW, mapVisible );
+ wDestroySplash();
/* this has to be called before ShowTip() */
InitSmallDlg();
- ShowTip(SHOWTIP_NEXTTIP);
-
+ ShowTip(SHOWTIP_NEXTTIP);
+
/* if work is to be resumed and no filename was given on startup, load last layout */
if( (onStartup == 0) && (!initialFile || !strlen(initialFile))) {
initialFile = (char*)wPrefGetString( "misc", "lastlayout" );
- }
+ }
if (initialFile && strlen(initialFile)) {
DoFileList( 0, NULL, initialFile );
diff --git a/app/bin/misc.h b/app/bin/misc.h
index 22e8f5a..7d3231e 100644
--- a/app/bin/misc.h
+++ b/app/bin/misc.h
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/misc.h,v 1.8 2009-09-05 16:40:53 m_fischer Exp $
+/** \file misc.h
+ * Application wide declarations and defines
*/
/* XTrkCad - Model Railroad CAD
@@ -23,7 +23,7 @@
#ifndef MISC_H
#define MISC_H
-#define EXPORT
+#define EXPORT
#include "acclkeys.h"
@@ -32,11 +32,8 @@ typedef void (*addButtonCallBack_t)(void*);
#include "custom.h"
#ifdef WINDOWS
-#define FILE_SEP_CHAR "\\"
/* suppress warning from *.bmp about conversion of int to char */
#pragma warning( disable : 4305)
-#else
-#define FILE_SEP_CHAR "/"
#endif
#define COUNT(A) (sizeof(A)/sizeof(A[0]))
@@ -192,7 +189,7 @@ extern wBool_t extraButtons;
extern wButton_p undoB;
extern wButton_p redoB;
extern wButton_p zoomUpB; /** ZoomUp button on toolbar */
-extern wButton_p zoomDownB; /** ZoomDown button on toolbar */
+extern wButton_p zoomDownB; /** ZoomDown button on toolbar */
// extern wButton_p easementB;
extern wIndex_t checkPtMark;
extern wMenu_p demoM;
@@ -313,11 +310,11 @@ void OutputBitMap( void );
wDrawColor snapGridColor;
addButtonCallBack_t ColorInit( void );
-addButtonCallBack_t PrefInit( void );
-addButtonCallBack_t LayoutInit( void );
-addButtonCallBack_t DisplayInit( void );
-addButtonCallBack_t CmdoptInit( void );
-addButtonCallBack_t OutputBitMapInit( void );
+addButtonCallBack_t PrefInit( void );
+addButtonCallBack_t LayoutInit( void );
+addButtonCallBack_t DisplayInit( void );
+addButtonCallBack_t CmdoptInit( void );
+addButtonCallBack_t OutputBitMapInit( void );
addButtonCallBack_t CustomMgrInit( void );
addButtonCallBack_t PriceListInit( void );
addButtonCallBack_t ParamFilesInit( void );
@@ -330,8 +327,10 @@ BOOL_T GridIsVisible( void );
void InitSnapGridButtons( void );
void SnapGridEnable( void );
void SnapGridShow( void );
+void MapWindowShow( int state );
wMenuToggle_p snapGridEnableMI;
wMenuToggle_p snapGridShowMI;
+wMenuToggle_p mapShowMI;
void ScaleLengthEnd( void );
void EnumerateList( long, FLOAT_T, char * );
diff --git a/app/bin/misc2.c b/app/bin/misc2.c
index 96e871a..1013179 100644
--- a/app/bin/misc2.c
+++ b/app/bin/misc2.c
@@ -126,7 +126,7 @@ EXPORT void Rprintf(
static changeNotificationCallBack_t changeNotificationCallBacks[20];
static int changeNotificationCallBackCnt = 0;
-
+
EXPORT void RegisterChangeNotification(
changeNotificationCallBack_t action )
{
@@ -219,12 +219,12 @@ EXPORT DIST_T GetScaleDescRatio( SCALEDESCINX_T sdi )
}
/**
- * Get the index into the linear list from a scale description and a gauge. All information about a
+ * Get the index into the linear list from a scale description and a gauge. All information about a
* scale/ gauge combination is stored in a linear list. The index in that list for a given scale and the
* gauge is returned by this function. Note that there is no error checking on parameters!
*
* \param IN scaleInx index into list of scale descriptions
- * \param IN gaugeInx index into list of gauges available for this scale
+ * \param IN gaugeInx index into list of gauges available for this scale
* \return index into master list of scale/gauge combinations
*/
@@ -317,14 +317,14 @@ EXPORT SCALEINX_T LookupScale( const char * name )
if (strcmp( scaleInfo(si).scale, name ) == 0)
return si;
}
- if ( isdigit(name[0]) ) {
+ if ( isdigit((unsigned char)name[0]) ) {
gauge = atof( name );
for ( si=0; si<scaleInfo_da.cnt; si++ ) {
if (scaleInfo(si).gauge == gauge)
return si;
}
}
- NoticeMessage( MSG_BAD_SCALE_NAME, "Ok", NULL, name, sProdNameLower );
+ NoticeMessage( MSG_BAD_SCALE_NAME, "Ok", NULL, name, sProdNameLower );
si = scaleInfo_da.cnt;
DYNARR_APPEND( scaleInfo_t, scaleInfo_da, 10 );
scaleInfo(si) = scaleInfo(0);
@@ -357,7 +357,7 @@ EXPORT BOOL_T CompatibleScale(
return FALSE;
}
-/** Split the scale and the gauge description for a given combination. Eg HOn3 will be
+/** Split the scale and the gauge description for a given combination. Eg HOn3 will be
* split to HO and n3.
* \param scaleInx IN scale/gauge combination
* \param scaleDescInx OUT scale part
@@ -372,7 +372,7 @@ GetScaleGauge( SCALEINX_T scaleInx, SCALEDESCINX_T *scaleDescInx, GAUGEINX_T *ga
char *scaleName = GetScaleName( scaleInx );
DIST_T scaleRatio = GetScaleRatio( scaleInx );
dynArr_t gauges_da;
-
+
for( i = 0; i < scaleDesc_da.cnt; i++ ) {
char *t = strchr( scaleDesc(i).scaleDesc, ' ' );
/* are the first characters (which describe the scale) identical? */
@@ -388,13 +388,13 @@ GetScaleGauge( SCALEINX_T scaleInx, SCALEDESCINX_T *scaleDescInx, GAUGEINX_T *ga
if( scaleInfo(ptr->scale).gauge == GetScaleTrackGauge( scaleInx )) {
*gaugeInx = j;
break;
- }
+ }
}
break;
- }
+ }
}
- }
-
+ }
+
return TRUE;
}
@@ -403,10 +403,10 @@ GetScaleGauge( SCALEINX_T scaleInx, SCALEDESCINX_T *scaleDescInx, GAUGEINX_T *ga
*
* \param newScaleInx IN the index of the selected scale/gauge combination
*/
-
-static void SetScale(
- SCALEINX_T newScaleInx )
-{
+
+static void
+SetScale( SCALEINX_T newScaleInx )
+{
if (newScaleInx < 0 && newScaleInx >= scaleInfo_da.cnt) {
NoticeMessage( MSG_BAD_SCALE_INDEX, _("Ok"), NULL, (int)newScaleInx );
return;
@@ -416,11 +416,11 @@ static void SetScale(
trackGauge = curScale->gauge;
curScaleRatio = curScale->ratio;
curScaleName = curScale->scale;
-
+
curScaleDescInx = 0;
-
+
GetScaleGauge( curScaleInx, &curScaleDescInx, &curGaugeInx );
-
+
wPrefSetString( "misc", "scale", curScaleName );
// now load the minimum radius for the newly selected scale
@@ -436,17 +436,17 @@ static void SetScale(
*/
EXPORT BOOL_T DoSetScale(
- const char * newScale )
+ char * newScale )
{
SCALEINX_T scale;
char * cp;
BOOL_T found = FALSE;
-
+
if ( newScale != NULL ) {
- cp = CAST_AWAY_CONST newScale+strlen(newScale)-1;
- while ( *cp=='\n' || *cp==' ' || *cp=='\t' ) cp--;
+ cp = newScale+strlen(newScale)-1;
+ while ( *cp=='\n' || *cp==' ' || *cp=='\t' ) cp--;
cp[1] = '\0';
- while (isspace(*newScale)) newScale++;
+ while (isspace((unsigned char)*newScale)) newScale++;
for (scale = 0; scale<scaleInfo_da.cnt; scale++) {
if (strcasecmp( scaleInfo(scale).scale, newScale ) == 0) {
curScaleInx = scale;
@@ -459,12 +459,12 @@ EXPORT BOOL_T DoSetScale(
DoChangeNotification( CHANGE_SCALE );
}
}
-
+
return found;
}
-/**
- * Setup the data structures for scale and gauge. XTC reads 'scales' into an dynamic array,
+/**
+ * Setup the data structures for scale and gauge. XTC reads 'scales' into an dynamic array,
* but doesn't differentiate between scale and gauge.
* This da is split into an dynamic array of scales. Each scale holds a dynamic array of gauges,
* with at least one gauge per scale (ie standard gauge)
@@ -473,26 +473,26 @@ EXPORT BOOL_T DoSetScale(
*
* \return TRUE
*/
-
+
EXPORT BOOL_T DoSetScaleDesc( void )
{
SCALEINX_T scaleInx;
SCALEINX_T work;
SCALEDESCINX_T descInx;
scaleDesc_p s = NULL;
- gaugeInfo_p g;
+ gaugeInfo_p g;
char *cp;
DIST_T ratio;
BOOL_T found;
char buf[ 80 ];
int len;
-
+
for( scaleInx = 0; scaleInx < scaleInfo_da.cnt; scaleInx++ ) {
ratio = DYNARR_N( scaleInfo_t, scaleInfo_da, scaleInx ).ratio;
-
+
/* do we already have a description for this scale? */
found = 0;
-
+
if( scaleDesc_da.cnt > 0 ) {
for( descInx = 0; descInx < scaleDesc_da.cnt; descInx++ ) {
work = scaleDesc(descInx).scale;
@@ -502,32 +502,32 @@ EXPORT BOOL_T DoSetScaleDesc( void )
}
}
}
-
-
+
+
if( !found ) {
/* if no, add as new scale */
-
+
DYNARR_APPEND( scaleDesc_t, scaleDesc_da, 1 );
-
+
s = &(scaleDesc( scaleDesc_da.cnt-1 ));
-
+
s->scale = scaleInx;
-
+
sprintf( buf, "%s (1/%.1f)", scaleInfo(scaleInx).scale, scaleInfo(scaleInx).ratio );
s->scaleDesc = MyStrdup( buf );
-
+
/* initialize the array with standard gauge */
-
+
DYNARR_APPEND( gaugeInfo_t, s->gauges_da, 10 );
-
+
g = &(DYNARR_N( gaugeInfo_t, s->gauges_da, (s->gauges_da).cnt - 1 ));
g->scale = scaleInx;
sprintf( buf, "Standard (%.1fmm)", scaleInfo(scaleInx).gauge*25.4 );
g->gauge = MyStrdup( buf );
-
- } else {
+
+ } else {
/* if yes, is this a new gauge to the scale? */
- DYNARR_APPEND( gaugeInfo_t, s->gauges_da, 10 );
+ DYNARR_APPEND( gaugeInfo_t, s->gauges_da, 10 );
g = &(DYNARR_N( gaugeInfo_t, s->gauges_da, (s->gauges_da).cnt - 1 ));
g->scale = scaleInx;
cp = strchr( s->scaleDesc, ' ' );
@@ -539,7 +539,7 @@ EXPORT BOOL_T DoSetScaleDesc( void )
g->gauge = MyStrdup( buf );
}
}
-
+
return( TRUE );
}
@@ -659,15 +659,15 @@ EXPORT void LoadGaugeList( wList_p gaugeList, SCALEDESCINX_T scale )
scaleDesc_t s;
gaugeInfo_p g;
dynArr_t *gauges_da_p;
-
+
s = scaleDesc(scale);
gauges_da_p = &(s.gauges_da);
g = gauges_da_p->ptr;
g = s.gauges_da.ptr;
- wListClear( gaugeList ); /* remove old list in case */
- for (inx=0; inx<gauges_da_p->cnt; inx++) {
- (g[inx]).index = wListAddValue( gaugeList, (g[inx]).gauge, NULL, (void*)(intptr_t)(g[inx]).scale );
+ wListClear( gaugeList ); /* remove old list in case */
+ for (inx=0; inx<gauges_da_p->cnt; inx++) {
+ (g[inx]).index = wListAddValue( gaugeList, (g[inx]).gauge, NULL, (void*)(intptr_t)(g[inx]).scale );
}
}
@@ -680,7 +680,7 @@ static void ScaleChange( long changes )
/*****************************************************************************
*
- *
+ *
*
*/
diff --git a/app/bin/misc2.h b/app/bin/misc2.h
index ba05394..86b466c 100644
--- a/app/bin/misc2.h
+++ b/app/bin/misc2.h
@@ -77,8 +77,9 @@ tieData_p GetScaleTieData( SCALEINX_T );
SCALEINX_T LookupScale( const char * );
BOOL_T GetScaleGauge( SCALEINX_T scaleInx, SCALEDESCINX_T *scaleDescInx, GAUGEINX_T *gaugeInx);
-BOOL_T DoSetScale( const char * );
+BOOL_T DoSetScale( char * );
+static void SetScale( SCALEINX_T );
void SetScaleGauge( SCALEDESCINX_T, GAUGEINX_T );
void ScaleLengthIncrement( SCALEINX_T, DIST_T );
void LoadScaleList( wList_p );
diff --git a/app/bin/param.c b/app/bin/param.c
index c58a4fa..f5ae69f 100644
--- a/app/bin/param.c
+++ b/app/bin/param.c
@@ -180,7 +180,7 @@ static int GetDigitStr( char ** cpp, long * numP, int * lenP )
getNumberError = N_("Unexpected End Of String");
return FALSE;
}
- while ( isspace(*cp) ) cp++;
+ while ( isspace((unsigned char)*cp) ) cp++;
*numP = strtol( cp, &cq, 10 );
if ( cp==cq ) {
*cpp = cp;
@@ -194,7 +194,7 @@ static int GetDigitStr( char ** cpp, long * numP, int * lenP )
getNumberError = N_("Overflow");
return FALSE;
}
- while ( isspace(*cq) ) cq++;
+ while ( isspace((unsigned char)*cq) ) cq++;
*cpp = cq;
return TRUE;
}
@@ -206,7 +206,7 @@ static int GetNumberStr( char ** cpp, FLOAT_T * numP, BOOL_T * hasFract )
char * cp = NULL;
struct lconv *lc;
- while ( isspace(**cpp) ) (*cpp)++;
+ while ( isspace((unsigned char)**cpp) ) (*cpp)++;
/* Find out the decimal separator of the current locale */
lc = localeconv();
@@ -216,18 +216,18 @@ static int GetNumberStr( char ** cpp, FLOAT_T * numP, BOOL_T * hasFract )
return FALSE;
if ( **cpp == lc->decimal_point[0] ) {
(*cpp)++;
- if ( !isdigit(**cpp) ) {
+ if ( !isdigit((unsigned char)**cpp) ) {
*hasFract = FALSE;
*numP = (FLOAT_T)n0;
return TRUE;
}
if ( !GetDigitStr( cpp, &f1, &l1 ) ) return FALSE;
- for ( f2=1; l1>0; l1-- ) f2 *= 10;
+ for ( f2=1; l1>0; l1-- ) f2 *= 10;
*numP = ((FLOAT_T)n0)+((FLOAT_T)f1)/((FLOAT_T)f2);
*hasFract = TRUE;
return TRUE; /* 999.999 */
}
- if ( isdigit( **cpp ) ) {
+ if ( isdigit( (unsigned char)**cpp ) ) {
cp = *cpp;
if ( !GetDigitStr( cpp, &f1, NULL ) ) return FALSE;
} else {
@@ -256,7 +256,7 @@ static int GetNumberStr( char ** cpp, FLOAT_T * numP, BOOL_T * hasFract )
}
return TRUE;
}
-extern wIndex_t distanceFormatInx; // distanceFormatInx
+//extern wIndex_t distanceFormatInx; // distanceFormatInx
static BOOL_T GetDistance( char ** cpp, FLOAT_T * distP )
{
@@ -266,7 +266,7 @@ static BOOL_T GetDistance( char ** cpp, FLOAT_T * distP )
BOOL_T expectInch = FALSE;
long distanceFormat;
- while ( isspace(**cpp) ) (*cpp)++;
+ while ( isspace((unsigned char)**cpp) ) (*cpp)++;
if ( (*cpp)[0] == '\0' ) {
*distP = 0.0;
return TRUE;
@@ -276,10 +276,10 @@ static BOOL_T GetDistance( char ** cpp, FLOAT_T * distP )
(*cpp)++;
}
if ( !GetNumberStr( cpp, &n1, &hasFract ) ) return FALSE;
-
+
distanceFormat = GetDistanceFormat();
-
-
+
+
if ( (*cpp)[0] == '\0' ) { /* EOL */
if ( units==UNITS_METRIC )
{
@@ -301,36 +301,36 @@ static BOOL_T GetDistance( char ** cpp, FLOAT_T * distP )
n1 *= 12.0;
(*cpp) += 1;
expectInch = !hasFract;
- } else if ( tolower((*cpp)[0]) == 'f' && tolower((*cpp)[1]) == 't' ) {
+ } else if ( tolower((unsigned char)(*cpp)[0]) == 'f' && tolower((unsigned char)(*cpp)[1]) == 't' ) {
n1 *= 12.0;
(*cpp) += 2;
expectInch = !hasFract;
- } else if ( tolower((*cpp)[0]) == 'c' && tolower((*cpp)[1]) == 'm' ) {
+ } else if ( tolower((unsigned char)(*cpp)[0]) == 'c' && tolower((unsigned char)(*cpp)[1]) == 'm' ) {
n1 /= 2.54;
(*cpp) += 2;
- } else if ( tolower((*cpp)[0]) == 'm' && tolower((*cpp)[1]) == 'm' ) {
+ } else if ( tolower((unsigned char)(*cpp)[0]) == 'm' && tolower((unsigned char)(*cpp)[1]) == 'm' ) {
n1 /= 25.4;
(*cpp) += 2;
- } else if ( tolower((*cpp)[0]) == 'm' ) {
+ } else if ( tolower((unsigned char)(*cpp)[0]) == 'm' ) {
n1 *= 100.0/2.54;
(*cpp) += 1;
} else if ( (*cpp)[0] == '"' ) {
(*cpp) += 1;
- } else if ( tolower((*cpp)[0]) == 'i' && tolower((*cpp)[1]) == 'n' ) {
+ } else if ( tolower((unsigned char)(*cpp)[0]) == 'i' && tolower((unsigned char)(*cpp)[1]) == 'n' ) {
(*cpp) += 2;
} else {
getNumberError = N_("Invalid Units Indicator");
return FALSE;
}
- while ( isspace(**cpp) ) (*cpp)++;
- if ( expectInch && isdigit( **cpp ) ) {
+ while ( isspace((unsigned char)**cpp) ) (*cpp)++;
+ if ( expectInch && isdigit( (unsigned char)**cpp ) ) {
if ( !GetNumberStr( cpp, &n2, &hasFract ) ) return FALSE;
n1 += n2;
if ( (*cpp)[0] == '"' )
(*cpp) += 1;
- else if ( tolower((*cpp)[0]) == 'i' && tolower((*cpp)[1]) == 'n' )
+ else if ( tolower((unsigned char)(*cpp)[0]) == 'i' && tolower((unsigned char)(*cpp)[1]) == 'n' )
(*cpp) += 2;
- while ( isspace(**cpp) ) (*cpp)++;
+ while ( isspace((unsigned char)**cpp) ) (*cpp)++;
}
if ( **cpp ) {
getNumberError = N_("Expected End Of String");
@@ -351,7 +351,7 @@ EXPORT FLOAT_T DecodeFloat(
const char *cp0, *cp1;
char *cp2;
cp0 = cp1 = wStringGetValue( strCtrl );
- while (isspace(*cp1)) cp1++;
+ while (isspace((unsigned char)*cp1)) cp1++;
if ( *cp1 ) {
valF = strtod( cp1, &cp2 );
if ( *cp2 != 0 ) {
@@ -378,7 +378,7 @@ EXPORT FLOAT_T DecodeDistance(
cp0 = cp1 = cpN = CAST_AWAY_CONST wStringGetValue( strCtrl );
cpN += strlen(cpN)-1;
- while (cpN > cp1 && isspace(*cpN) ) cpN--;
+ while (cpN > cp1 && isspace((unsigned char)*cpN) ) cpN--;
c1 = *cpN;
switch ( c1 ) {
case '=':
@@ -505,7 +505,7 @@ EXPORT char * FormatDistanceEx(
if ( (distanceFormat&DISTFMT_FMT) == DISTFMT_FMT_NONE ) {
FormatFraction( &cp, FALSE, digits, (distanceFormat&DISTFMT_FRACT) == DISTFMT_FRACT_FRC, valF, "" );
return formatStrings[formatStringInx];
- } else if ( units == UNITS_ENGLISH ) {
+ } else if ( units == UNITS_ENGLISH ) {
feet = (long)(floor)(valF/12.0);
valF -= feet*12.0;
if ( feet != 0 ) {
@@ -623,7 +623,7 @@ EXPORT void ParamLoadControl(
case PD_FLOAT:
tmpR = *(FLOAT_T*)p->valueP;
if (p->option&PDO_DIM) {
- if (p->option&PDO_SMALLDIM)
+ if (p->option&PDO_SMALLDIM)
valS = FormatSmallDistance( tmpR );
else
valS = FormatDistance( tmpR );
@@ -830,7 +830,7 @@ EXPORT void ParamLoadData(
break;
case PD_COLORLIST:
*(wDrawColor*)p->valueP = wColorSelectButtonGetColor( (wButton_p)p->control );
-#ifdef LATER
+#ifdef LATER
inx = wListGetIndex( (wList_p)p->control );
*(wDrawColor*)p->valueP = colorTab[inx].color;
#endif
@@ -1377,7 +1377,7 @@ static void ParamIntegerPush( const char * val, void * dp )
char * cp;
paramIntegerRange_t * irangeP;
- while ( isspace(*val)) val++;
+ while ( isspace((unsigned char)*val)) val++;
valL = strtol( val, &cp, 10 );
wControlSetBalloon( p->control, 0, -5, NULL );
@@ -1750,7 +1750,7 @@ static void ParamPlayback( char * line )
if ( p->nameStr == NULL )
continue;
len2 = strlen( p->nameStr );
- if ( strncmp(p->nameStr, line+len1+1, len2) != 0 ||
+ if ( strncmp(p->nameStr, line+len1+1, len2) != 0 ||
(line[len1+1+len2] != ' ' && line[len1+1+len2] != '\0') )
continue;
len = len1 + 1 + len2 + 1;
@@ -1975,7 +1975,7 @@ static void ParamCheck( char * line )
if ( p->nameStr == NULL )
continue;
len2 = strlen( p->nameStr );
- if ( strncmp(p->nameStr, line+len1+1, len2) != 0 ||
+ if ( strncmp(p->nameStr, line+len1+1, len2) != 0 ||
(line[len1+1+len2] != ' ' && line[len1+1+len2] != '\0') )
continue;
if ( p->valueP == NULL )
@@ -2391,7 +2391,7 @@ static void LayoutControls(
continue;
}
/*
- * Set control orig
+ * Set control orig
*/
if ( (pd->option&PDO_DLGNEWCOLUMN) ) {
columnK.orig.x = columnK.term.x;
@@ -2449,7 +2449,7 @@ static void LayoutControls(
* Set column term
*/
if ( (pd->option&PDO_DLGIGNOREX) == 0 ) {
- if ( (pd->option&PDO_DLGUNDERCMDBUTT) == 0 ) {
+ if ( (pd->option&PDO_DLGUNDERCMDBUTT) == 0 ) {
if ( columnK.term.x < controlK.term.x )
columnK.term.x = controlK.term.x;
} else {
@@ -2594,7 +2594,7 @@ EXPORT wWin_p ParamCreateDialog(
winOption |= F_RECALLSIZE;
sprintf( helpStr, "cmd%s", group->nameStr );
- helpStr[3] = toupper(helpStr[3]);
+ helpStr[3] = toupper((unsigned char)helpStr[3]);
group->win = wWinPopupCreate( mainW, DlgSepRight, DlgSepFrmBottom, helpStr, title, group->nameStr, F_AUTOSIZE|winOption, ParamDlgProc, group );
@@ -2607,7 +2607,7 @@ EXPORT wWin_p ParamCreateDialog(
}
if ( needHelpButton ) {
sprintf( helpStr, "cmd%s", group->nameStr );
- helpStr[3] = toupper(helpStr[3]);
+ helpStr[3] = toupper((unsigned char)helpStr[3]);
lastB = group->helpB = wButtonCreate( group->win, 0, 0, NULL, _("Help"), BB_HELP, 0, (wButtonCallBack_p)wHelp, MyStrdup(helpStr) );
}
@@ -2642,7 +2642,7 @@ EXPORT wWin_p ParamCreateDialog(
}
-/** Resize dialog window for the contained fields.
+/** Resize dialog window for the contained fields.
* \param IN OUT Prameter Group
*
*/
diff --git a/app/bin/trkseg.c b/app/bin/trkseg.c
index ff3725c..972463f 100644
--- a/app/bin/trkseg.c
+++ b/app/bin/trkseg.c
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/trkseg.c,v 1.2 2006-05-30 16:11:55 m_fischer Exp $
+/** \file trkseg.c
+ * Modification and drawing of track segments
*/
/* XTrkCad - Model Railroad CAD
@@ -123,7 +123,7 @@ EXPORT coOrd GetSegEndPt(
}
/**
- * Caclulate the bounding box for a string.
+ * Caclulate the bounding box for a string.
*
* \param coOrd IN position of text
* \param angle IN text angle
@@ -149,15 +149,15 @@ EXPORT void GetTextBounds(
int i;
DrawTextSize2( &mainD, str, NULL, fs, FALSE, &size, &descent );
-
+
// set up the corners of the rectangle
p[0].x = p[3].x = 0.0;
p[1].x = p[2].x = size.x;
p[0].y = p[1].y = -descent;
p[2].y = p[3].y = size.y;
-
+
lo = hi = zero;
-
+
// rotate each point
for ( i=1; i<4; i++ ) {
Rotate( &p[i], zero, angle );
@@ -166,7 +166,7 @@ EXPORT void GetTextBounds(
if ( p[i].x > hi.x ) hi.x = p[i].x;
if ( p[i].y > hi.y ) hi.y = p[i].y;
}
-
+
// now recaclulate the corners
loR->x = pos.x + lo.x;
loR->y = pos.y + lo.y;
@@ -199,17 +199,17 @@ static void Get1SegBounds( trkSeg_p segPtr, coOrd xlat, ANGLE_T angle, coOrd *lo
REORIGIN( p1, GetSegEndPt( segPtr, 1, FALSE, NULL ), angle, xlat )
if (p0.x < p1.x) {
lo->x = p0.x;
- hi->x = p1.x;
+ hi->x = p1.x;
} else {
lo->x = p1.x;
- hi->x = p0.x;
+ hi->x = p0.x;
}
if (p0.y < p1.y) {
lo->y = p0.y;
- hi->y = p1.y;
+ hi->y = p1.y;
} else {
lo->y = p1.y;
- hi->y = p0.y;
+ hi->y = p0.y;
}
if ( segPtr->type == SEG_CRVTRK ||
segPtr->type == SEG_CRVLIN ) {
@@ -761,7 +761,7 @@ EXPORT ANGLE_T GetAngleSegs(
*
* Color
*
- ****************************************************************************/
+ ****************************************************************************/
typedef struct {
FLOAT_T h, s, v;
@@ -948,7 +948,7 @@ EXPORT void RecolorSegs(
*
* Input/Output
*
- ****************************************************************************/
+ ****************************************************************************/
static void AppendPath( signed char c )
@@ -970,7 +970,7 @@ EXPORT BOOL_T ReadSegs( void )
BOOL_T rc=FALSE;
trkSeg_p s;
trkEndPt_p e;
- long rgb;
+ unsigned long rgb;
int i;
DIST_T elev0, elev1;
BOOL_T hasElev;
@@ -984,7 +984,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_RESET( trkEndPt_t, tempEndPts_da );
pathCnt = 0;
while ( (cp = GetNextLine()) != NULL ) {
- while (isspace(*cp)) cp++;
+ while (isspace((unsigned char)*cp)) cp++;
hasElev = FALSE;
if ( strncmp( cp, "END", 3 ) == 0 ) {
rc = TRUE;
@@ -1005,7 +1005,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = type;
- if ( !GetArgs( cp, hasElev?"lwpfpf":"lwpYpY",
+ if ( !GetArgs( cp, hasElev?"uwpfpf":"uwpYpY",
&rgb, &s->width, &s->u.l.pos[0], &elev0, &s->u.l.pos[1], &elev1 ) ) {
rc = FALSE;
break;
@@ -1018,7 +1018,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = type;
- if ( !GetArgs( cp, hasElev?"lwpfpfl":"lwpYpYZ",
+ if ( !GetArgs( cp, hasElev?"uwpfpfl":"uwpYpYZ",
&rgb, &s->width, &s->u.l.pos[0], &elev0, &s->u.l.pos[1], &elev1, &option ) ) {
rc = FALSE;
break;
@@ -1033,7 +1033,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = SEG_CRVLIN;
- if ( !GetArgs( cp, hasElev?"lwfpfff":"lwfpYff",
+ if ( !GetArgs( cp, hasElev?"uwfpfff":"uwfpYff",
&rgb, &s->width,
&s->u.c.radius,
&s->u.c.center,
@@ -1048,7 +1048,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = SEG_STRTRK;
- if ( !GetArgs( cp, hasElev?"lwpfpf":"lwpYpY",
+ if ( !GetArgs( cp, hasElev?"uwpfpf":"uwpYpY",
&rgb, &s->width,
&s->u.l.pos[0], &elev0,
&s->u.l.pos[1], &elev1 ) ) {
@@ -1061,7 +1061,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = SEG_CRVTRK;
- if ( !GetArgs( cp, hasElev?"lwfpfff":"lwfpYff",
+ if ( !GetArgs( cp, hasElev?"uwfpfff":"uwfpYff",
&rgb, &s->width,
&s->u.c.radius,
&s->u.c.center,
@@ -1076,7 +1076,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = SEG_JNTTRK;
- if ( !GetArgs( cp, hasElev?"lwpffffffl":"lwpYfffffl",
+ if ( !GetArgs( cp, hasElev?"uwpffffffl":"uwpYfffffl",
&rgb, &s->width,
&s->u.j.pos,
&elev0,
@@ -1098,7 +1098,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = SEG_FILCRCL;
- if ( !GetArgs( cp, hasElev?"lwfpf":"lwfpY",
+ if ( !GetArgs( cp, hasElev?"uwfpf":"uwfpY",
&rgb, &s->width,
&s->u.c.radius,
&s->u.c.center,
@@ -1115,7 +1115,7 @@ EXPORT BOOL_T ReadSegs( void )
DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 );
s = &tempSegs(tempSegs_da.cnt-1);
s->type = type;
- if ( !GetArgs( cp, "lwd",
+ if ( !GetArgs( cp, "uwd",
&rgb, &s->width,
&s->u.p.cnt ) ) {
rc = FALSE;
@@ -1138,7 +1138,7 @@ EXPORT BOOL_T ReadSegs( void )
s = &tempSegs(tempSegs_da.cnt-1);
s->type = type;
s->u.t.fontP = NULL;
- if ( !GetArgs( cp, "lpf0fq", &rgb, &s->u.t.pos, &s->u.t.angle, &s->u.t.fontSize, &s->u.t.string ) ) {
+ if ( !GetArgs( cp, "upf0fq", &rgb, &s->u.t.pos, &s->u.t.angle, &s->u.t.fontSize, &s->u.t.string ) ) {
rc = FALSE;
/*??*/break;
}
@@ -1188,7 +1188,7 @@ EXPORT BOOL_T ReadSegs( void )
}
break;
case SEG_PATH:
- while (isspace(*cp)) cp++;
+ while (isspace((unsigned char)*cp)) cp++;
if (*cp == '\"') cp++;
while ( *cp != '\"') AppendPath((signed char)*cp++);
AppendPath(0);
@@ -1455,7 +1455,7 @@ EXPORT void DrawDimLine(
p.y += fy*y;
DrawLine( d, p, p1, 0, color );
}
-
+
EXPORT void DrawSegsO(
drawCmd_p d,
track_p trk,