unbreak rocrail

we're still at the ancient last GPL version, before it became closed
source, but a bit newer than the version before.
Made compatible with wxWidgets again, addressed a number of
other stability issues and improvements.

OK ian@
This commit is contained in:
sebastia
2026-05-22 13:59:05 +00:00
parent e4b8664ae3
commit b10ac90f36
40 changed files with 3173 additions and 760 deletions
+46 -25
View File
@@ -1,47 +1,43 @@
BROKEN = does not build with wxWidgets>=3.2
COMMENT-main = model railroad control daemon
COMMENT-gui = model railroad control daemon client
VERSION = 2.0
REV = 2585
DISTNAME = Rocrail-2585
PKGNAME-main = rocrail-${VERSION}.${REV}
PKGNAME-gui = rocview-${VERSION}.${REV}
GH_ACCOUNT = buzzdeee
GH_PROJECT = rocrail
GH_COMMIT = de50d21631ae4b2210206eecde1eb00f8a8838ef
DISTNAME = rocrail-${VERSION}.0.20260304
PKGNAME-main = rocrail-${VERSION}.0.20260304
PKGNAME-gui = rocview-${VERSION}.0.20260304
CATEGORIES = misc x11
REVISION-main = 11
REVISION-gui = 10
HOMEPAGE = http://www.rocrail.net/
HOMEPAGE = https://www.rocrail.net/
MAINTAINER = Sebastian Reitenbach <sebastia@openbsd.org>
# GPLv2
# GPLv2+
PERMIT_PACKAGE = Yes
SITES = http://bugs.launchpad.net/rocrail/sunrise/2.0/+download/
COMPILER = base-clang ports-gcc base-gcc
MULTI_PACKAGES = -main -gui
WANTLIB += c pthread
WANTLIB-gui += ${WANTLIB} m ${COMPILER_LIBCXX}
WANTLIB-gui += wx_baseu-3.2 wx_baseu_net-3.2 wx_baseu_xml-3.2 wx_gtk3u_adv-3.2
WANTLIB += ${COMPILER_LIBCXX} c m pthread
WANTLIB-gui += ${WANTLIB}
WANTLIB-gui += wx_baseu-3.2 wx_baseu_net-3.2 wx_baseu_xml-3.2
WANTLIB-gui += wx_gtk3u_core-3.2 wx_gtk3u_html-3.2 wx_gtk3u_qa-3.2
WANTLIB-gui += wx_gtk3u_xrc-3.2
RUN_DEPENDS-main += devel/desktop-file-utils
LIB_DEPENDS-gui += x11/wxWidgets>=3.0.4
RUN_DEPENDS-gui += ${PKGPATH},-main
USE_GMAKE = Yes
MAKE_ENV = CC="${CC}" CXX="${CXX}"
MAKE_FILE = makefile
MAKE_FLAGS = PLATFORM=OPENBSD
ALL_TARGET = fromtar
WRKDIST = ${WRKDIR}/Rocrail
FIX_CRLF_FILES = rocdigs/impl/dcc232.c
MAKE_FLAGS = CC="${CC}" CXX="${CXX}" CPP="${CC}" LNK="${CXX}" LINKTOOL="${CXX}"
MAKE_FLAGS += PLATFORM="OPENBSD"
ALL_TARGET = offline
WRKDIST = ${WRKDIR}/Rocrail-${GH_COMMIT}
THEMES1 = Basic \
CV19 \
DB \
ILTIS \
SBB-RHB \
@@ -49,8 +45,23 @@ THEMES1 = Basic \
THEMES2 = Accessories \
NL \
NMBS-SNCB \
OeBB \
Roads \
SpDrS60/alt
SZ \
SpDrS60/alt \
UK
AMERICANTHEMES = ATSF \
Amtrak \
"B&O" \
"C&O" \
CROR \
ICG \
"N&W" \
NORAC \
PRR \
Seaboard \
UP
post-extract:
mkdir ${WRKDIST}/unxgen
@@ -63,13 +74,18 @@ do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/symbols
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/symbols/control
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/svg/themes
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/svg/americanthemes
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/images
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/stylesheets
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
${INSTALL_PROGRAM} ${WRKBUILD}/unxbin/rocrail ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKBUILD}/unxbin/rocview ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/libexec/rocrail
${INSTALL_PROGRAM} ${WRKBUILD}/unxbin/rocview ${PREFIX}/libexec/rocrail
${INSTALL_DATA} ${WRKBUILD}/unxbin/*.so ${PREFIX}/lib/rocrail
${INSTALL_DATA} ${WRKBUILD}/rocrail/rocraild.png ${PREFIX}/share/rocrail
${INSTALL_DATA} ${WRKBUILD}/rocrail/package/rocrail.xpm ${PREFIX}/share/rocrail
${INSTALL_DATA} ${WRKBUILD}/rocrail/package/plan.xml ${PREFIX}/share/rocrail
${INSTALL_DATA} ${WRKBUILD}/rocview/icons/* ${PREFIX}/share/rocrail/icons
.for i in ${THEMES1}
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/svg/themes/${i}
@@ -79,15 +95,20 @@ do-install:
${PREFIX}/share/rocrail/svg/themes/${i}/
.endfor
.for i in ${THEMES2}
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/svg/themes/${i} \
${PREFIX}/share/rocrail/svg/themes/${i}
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/svg/themes/${i}
${INSTALL_DATA} ${WRKBUILD}/rocview/svg/themes/${i}/*.svg \
${PREFIX}/share/rocrail/svg/themes/${i}
.endfor
.for i in ${AMERICANTHEMES}
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail/svg/americanthemes/${i}
${INSTALL_DATA} ${WRKBUILD}/rocview/svg/americanthemes/${i}/* \
${PREFIX}/share/rocrail/svg/americanthemes/${i}
.endfor
${INSTALL_DATA} ${WRKBUILD}/rocrail/symbols/*.{png,gif,db,dbencryptable} ${PREFIX}/share/rocrail/symbols
${INSTALL_DATA} ${WRKBUILD}/rocrail/symbols/control/* ${PREFIX}/share/rocrail/symbols/control
${INSTALL_DATA} ${WRKBUILD}/stylesheets/* ${PREFIX}/share/rocrail/stylesheets
${INSTALL_DATA} ${WRKBUILD}/rocrail/package/images/* ${PREFIX}/share/rocrail/images
${SUBST_PROGRAM} ${FILESDIR}/rocview.sh ${PREFIX}/bin/rocview.sh
${INSTALL_DATA} ${WRKBUILD}/rocrail/package/*.desktop ${PREFIX}/share/applications
${SUBST_PROGRAM} ${FILESDIR}/rocview.sh ${PREFIX}/bin/rocview
.include <bsd.port.mk>
+2 -2
View File
@@ -1,2 +1,2 @@
SHA256 (Rocrail-2585.tar.gz) = oW/DrZdBJGpphYDe8bmAy3A2ivGnd68RzYpPZOuEyj0=
SIZE (Rocrail-2585.tar.gz) = 6915419
SHA256 (rocrail-2.0.0.20260304-de50d216.tar.gz) = XGGZwi5IZuWECmE6P0veR/1qaF+6M3Ah7RX1fLC3Spg=
SIZE (rocrail-2.0.0.20260304-de50d216.tar.gz) = 7669602
+1 -1
View File
@@ -3,4 +3,4 @@
mkdir -p ~/rocrail
cd ~/rocrail
${TRUEPREFIX}/bin/rocview -sp /var/rocrail -themespath ${TRUEPREFIX}/share/rocrail $@
${TRUEPREFIX}/libexec/rocrail/rocview -sp /var/rocrail -themespath ${TRUEPREFIX}/share/rocrail $@
@@ -1,39 +0,0 @@
Index: analyser/impl/analyse.c
--- analyser/impl/analyse.c.orig
+++ analyser/impl/analyse.c
@@ -1208,7 +1208,7 @@ static Boolean __analyseBehindConnector(iOAnalyse inst
__analyseItem(inst, nextitem, route, occ, travel, 0, depth, searchingSignal, behindABlock );
}
- return;
+ return found;
}
}
}
@@ -1437,7 +1437,7 @@ static Boolean __analyseItem(iOAnalyse inst, iONode it
searchingSignal = False;
if( behindABlock) {
- return;
+ return False;
}
}
@@ -1454,7 +1454,7 @@ static Boolean __analyseItem(iOAnalyse inst, iONode it
if( behindABlock) {
TraceOp.trc( name, TRCLEVEL_DEBUG, __LINE__, 9999, "behind a block");
- return;
+ return False;
}
TraceOp.trc( name, TRCLEVEL_INFO, __LINE__, 9999, "next is a block: [%s]", wItem.getid(nextitem));
@@ -1503,7 +1503,7 @@ static Boolean __analyseItem(iOAnalyse inst, iONode it
if( travelp > 10 && behindABlock){
TraceOp.trc( name, TRCLEVEL_INFO, __LINE__, 9999, " found a turnout [%s] behind the end block: return", wItem.getid(nextitem));
- return;
+ return False;
}
/* item is a turnout -> coming from the points: dive into branches */
@@ -1,24 +0,0 @@
Index: analyser/makefile
--- analyser/makefile.orig
+++ analyser/makefile
@@ -68,7 +68,7 @@ else ifeq ($(PLATFORM),OPENBSD)
DIRPREFIX=unx
CC_EXTRA_FLAGS=-fPIC
LNK_FLAGS=-shared
- LNK=gcc
+ LNK=$(CC)
SHAREDSUFFIX=.so
else
LIBS=-lpthread -ldl
@@ -87,9 +87,9 @@ DEBUG=-g
DESTDIR=$(FS)opt$(FS)rocrail
BINDIR=..$(FS)rocs$(FS)bin
-CPP=$(TOOLPREFIX)gcc
+CPP=$(TOOLPREFIX)$(CC)
INCL_PATH=$(MOUNTPOINT)
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
-11
View File
@@ -1,11 +0,0 @@
--- makefile.orig Sat Oct 8 22:24:43 2011
+++ makefile Sat Oct 8 22:25:19 2011
@@ -65,6 +65,7 @@ uninstall:
version:
echo $(QUOT)const int bzr = $(QUOT) > common$(FS)version.h
- bzr revno >> common$(FS)version.h
+ #bzr revno >> common$(FS)version.h
+ echo $(QUOT)2.0$(QUOT) >> common$(FS)version.h
echo $(QUOT);$(QUOT) >> common$(FS)version.h
@@ -1,12 +0,0 @@
Index: rocdigs/impl/dcc232.c
--- rocdigs/impl/dcc232.c.orig
+++ rocdigs/impl/dcc232.c
@@ -765,7 +765,7 @@ static int __getcvbyte(iODCC232 inst, int cv) {
/* no special error handling, it's job of the clients */
if (cv<0 || cv>1024) {
TraceOp.trc( name, TRCLEVEL_EXCEPTION, __LINE__, 9999, "PT: CV[%d] out of range", cv);
- return;
+ return 0;
}
TraceOp.trc( name, TRCLEVEL_MONITOR, __LINE__, 9999, "PT: enable booster output");
@@ -1,21 +0,0 @@
Index: rocdigs/impl/ddx/nmra.c
--- rocdigs/impl/ddx/nmra.c.orig
+++ rocdigs/impl/ddx/nmra.c
@@ -1112,7 +1112,7 @@ int protocol_nmra_sm_direct_cvbyte(obj inst, int cv, i
int ack = 0;
/* no special error handling, it's job of the clients */
- if (cv<0 || cv>1024 || value<0 || value>255) return;
+ if (cv<0 || cv>1024 || value<0 || value>255) return 0;
if (!sm_initialized) sm_init();
@@ -1333,7 +1333,7 @@ int nmragetcvbyte(obj inst, int cv) {
TraceOp.trc( __FILE__, TRCLEVEL_MONITOR, __LINE__, 9999, "PT: cvget for %d", cv);
/* no special error handling, it's job of the clients */
- if (cv<0 || cv>1024) return;
+ if (cv<0 || cv>1024) return 0;
if (!sm_initialized) sm_init();
@@ -1,12 +0,0 @@
Index: rocdigs/impl/loconet.c
--- rocdigs/impl/loconet.c.orig
+++ rocdigs/impl/loconet.c
@@ -1619,7 +1619,7 @@ static int __setFastClock(iOLocoNet loconet, iONode no
int hours = 10;
int mins = 30;
- long l_time = wClock.gettime(node);
+ time_t l_time = wClock.gettime(node);
struct tm* lTime = localtime( &l_time );
mins = lTime->tm_min;
@@ -1,25 +0,0 @@
Index: rocdigs/impl/loconet/lnmaster.c
--- rocdigs/impl/loconet/lnmaster.c.orig
+++ rocdigs/impl/loconet/lnmaster.c
@@ -379,17 +379,17 @@ static Boolean __setstat1byte(struct __lnslot* slot, i
slot[slotnr].format = 0;
if( stat & DEC_MODE_128 ) {
- slot[slotnr].steps == 128;
+ slot[slotnr].steps = 128;
}
else if( stat & DEC_MODE_28 ) {
- slot[slotnr].steps == 28;
+ slot[slotnr].steps = 28;
}
else if( stat & DEC_MODE_14 ) {
- slot[slotnr].steps == 14;
+ slot[slotnr].steps = 14;
}
else if( stat & DEC_MODE_28TRI ) {
slot[slotnr].format = 1;
- slot[slotnr].steps == 28;
+ slot[slotnr].steps = 28;
}
TraceOp.trc( name, TRCLEVEL_INFO, __LINE__, 9999,
@@ -1,12 +0,0 @@
Index: rocdigs/impl/nmra/nmra.c
--- rocdigs/impl/nmra/nmra.c.orig
+++ rocdigs/impl/nmra/nmra.c
@@ -1390,7 +1390,7 @@ int createCVsetpacket(int cv, int value, char* SendStr
int ack = 0;
/* no special error handling, it's job of the clients */
- if (cv<0 || cv>1024 || value<0 || value>255) return;
+ if (cv<0 || cv>1024 || value<0 || value>255) return 0;
if (!smInitialized)
smInit();
@@ -1,12 +0,0 @@
Index: rocdigs/impl/opendcc.c
--- rocdigs/impl/opendcc.c.orig
+++ rocdigs/impl/opendcc.c
@@ -140,7 +140,7 @@ static iONode _cmd( obj inst ,const iONode cmd ) {
iONode clockcmd = NodeOp.inst( wBinCmd.name(), NULL, ELEMENT_NODE );
char* byteStr = NULL;
byte outBytes[6];
- long l_time = wClock.gettime(cmd);
+ time_t l_time = wClock.gettime(cmd);
struct tm* lTime = localtime( &l_time );
int mins = lTime->tm_min;
@@ -1,12 +0,0 @@
Index: rocdigs/impl/p50x.c
--- rocdigs/impl/p50x.c.orig
+++ rocdigs/impl/p50x.c
@@ -602,7 +602,7 @@ static Boolean __getversion( iOP50x inst ) {
else
state = P50_SNDERR;
- if( state = P50_OK ) {
+ if( state == P50_OK ) {
int bAvail = 0;
ThreadOp.sleep( 500 );
bAvail = SerialOp.available(data->serial);
@@ -1,12 +0,0 @@
Index: rocdigs/impl/xpressnet/opendcc.c
--- rocdigs/impl/xpressnet/opendcc.c.orig
+++ rocdigs/impl/xpressnet/opendcc.c
@@ -245,7 +245,7 @@ void opendccTranslate( obj xpressnet, void* node ) {
When no Parameters are given, it is a query and the answer will be sent only to the requesting slave.
*/
if( data->fastclock && StrOp.equals( wClock.set, wClock.getcmd( node ) ) ) {
- long l_time = wClock.gettime(node);
+ time_t l_time = wClock.gettime(node);
struct tm* lTime = localtime( &l_time );
int mins = lTime->tm_min;
@@ -1,26 +0,0 @@
Index: rocdigs/makefile
--- rocdigs/makefile.orig
+++ rocdigs/makefile
@@ -69,7 +69,7 @@ else ifeq ($(PLATFORM),OPENBSD)
DIRPREFIX=unx
CC_EXTRA_FLAGS=-fPIC
LNK_FLAGS=-shared
- LNK=gcc
+ LNK=$(CC)
SHAREDSUFFIX=.so
else
LIBS=-lpthread -ldl
@@ -88,10 +88,10 @@ DEBUG=-g
DESTDIR=$(FS)opt$(FS)rocrail
BINDIR=..$(FS)rocs$(FS)bin
-CPP=$(TOOLPREFIX)gcc
+CPP=$(TOOLPREFIX)$(CC)
INCL_PATH=$(MOUNTPOINT)
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
-DDL_CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -O2 -I$(INCL_PATH) -I$(GENDIR)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
+DDL_CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -O2 -I$(INCL_PATH) -I$(GENDIR)
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocutils.a $(OUTDIR)$(FS)librocs.a
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
@@ -1,17 +0,0 @@
Index: rocint/makefile
--- rocint/makefile.orig
+++ rocint/makefile
@@ -67,10 +67,10 @@ TMPOUTDIR=$(GENDIR)$(FS)rocint$(FS)bin
DEBUG=-g
BINDIR=..$(FS)$(COREDIR)bin
-CPP=gcc
-LNK=gcc
+CPP=$(CC)
+LNK=$(CC)
INCL_PATH=$(MOUNTPOINT)
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
all:
cd $(GENDIR)$(FS)rocint$(CS) ..$(FS)..$(FS)rocs$(FS)bin$(FS)ogen$(GENSUFFIX) ..$(FS)..$(FS)rocint$(FS)rocint.xml
@@ -1,21 +0,0 @@
Index: roclcdr/impl/tools/schedules.c
--- roclcdr/impl/tools/schedules.c.orig
+++ roclcdr/impl/tools/schedules.c
@@ -50,7 +50,7 @@ static Boolean isHourlyInRange(iILcDriverInt inst, iON
int hours = 0;
int mins = 0;
- long modeltime = data->model->getTime( data->model );
+ time_t modeltime = data->model->getTime( data->model );
struct tm* ltm;
ltm = localtime( &modeltime );
@@ -214,7 +214,7 @@ Boolean checkScheduleTime( iILcDriverInt inst, const c
/* check if the schedule index is correct: */
while( entry != NULL ) {
if( idx == scheduleIdx ) {
- long modeltime = data->model->getTime( data->model );
+ time_t modeltime = data->model->getTime( data->model );
struct tm* ltm;
int modelminutes = 0;
int scheduleminutes = 0;
@@ -1,24 +0,0 @@
Index: roclcdr/makefile
--- roclcdr/makefile.orig
+++ roclcdr/makefile
@@ -69,7 +69,7 @@ else ifeq ($(PLATFORM),OPENBSD)
DIRPREFIX=unx
CC_EXTRA_FLAGS=-fPIC
LNK_FLAGS=-shared
- LNK=gcc
+ LNK=$(CC)
SHAREDSUFFIX=.so
else
LIBS=-lpthread -ldl
@@ -88,9 +88,9 @@ DEBUG=-g
DESTDIR=$(FS)opt$(FS)rocrail
BINDIR=..$(FS)rocs$(FS)bin
-CPP=$(TOOLPREFIX)gcc
+CPP=$(TOOLPREFIX)$(CC)
INCL_PATH=$(MOUNTPOINT)
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
@@ -1,12 +0,0 @@
Index: rocrail/impl/action.c
--- rocrail/impl/action.c.orig
+++ rocrail/impl/action.c
@@ -819,7 +819,7 @@ static void _exec( struct OAction* inst, iONode action
static void _tick( iOAction inst ) {
iOActionData data = Data(inst);
iOControl control = AppOp.getControl();
- long l_time = ControlOp.getTime(control);
+ time_t l_time = ControlOp.getTime(control);
struct tm* lTime = localtime( &l_time );
data->ticker++; /* scale minutes */
@@ -1,12 +0,0 @@
Index: rocrail/impl/display.c
--- rocrail/impl/display.c.orig
+++ rocrail/impl/display.c
@@ -97,7 +97,7 @@ static const char* __getSystemMenu(Boolean select) {
iODisplayData data = NULL;
if( __displayinst == NULL ) {
- return;
+ return "";
}
data = Data(__displayinst);
if( data->menulevel == 0 ) {
@@ -1,21 +0,0 @@
Index: rocrail/impl/hclient.c
--- rocrail/impl/hclient.c.orig
+++ rocrail/impl/hclient.c
@@ -174,7 +174,7 @@ static void __scan4Html( iOHClient inst ) {
if( StrOp.endsWithi( fileName, ".html" ) || StrOp.endsWithi( fileName, ".htm" ) ) {
char* path = StrOp.fmt( "%s%c%s", data->path, SystemOp.getFileSeparator(), fileName );
long size = FileOp.fileSize( path );
- long ftime = FileOp.fileTime( path );
+ time_t ftime = FileOp.fileTime( path );
StrOp.replaceAll( path, '\\', '/' );
SocketOp.fmt( data->socket, "<tr><td><a href=\"%s\">%s</a></td><td align=\"right\">%ld</td><td align=\"right\">%s</td></tr>\n",
path, path, size, ctime(&ftime) );
@@ -267,7 +267,7 @@ static void __getHome( iOHClient inst ) {
SocketOp.fmt( data->socket, "<table border=\"1\" cellpadding=\"4\" cellspacing= \"0\">\n" );
SocketOp.fmt( data->socket, "<tr><td>process id </td><td>%d </td></tr>\n", SystemOp.getpid() );
{
- long t = AppOp.getStartTime();
+ time_t t = AppOp.getStartTime();
SocketOp.fmt( data->socket, "<tr><td>started at</td><td>%s</td></tr>\n", ctime( &t ) );
}
@@ -1,12 +0,0 @@
Index: rocrail/impl/modplan.c
--- rocrail/impl/modplan.c.orig
+++ rocrail/impl/modplan.c
@@ -903,7 +903,7 @@ static iONode _setModule( iOModPlan inst, iONode modul
if( planmodule == NULL ) {
TraceOp.trc( name, TRCLEVEL_WARNING, __LINE__, 9999,
"no module found with id [%s] or [%s]", wModule.getid(module), wItem.getprev_id(module) );
- return;
+ return NULL;
}
wModule.settitle( planmodule, wModule.gettitle(module) );
@@ -1,12 +0,0 @@
Index: rocrail/impl/snmp.c
--- rocrail/impl/snmp.c.orig
+++ rocrail/impl/snmp.c
@@ -780,7 +780,7 @@ static int __handleGetRequest(iOSNMP snmp, iOSnmpHdr h
TraceOp.trc( name, TRCLEVEL_BYTE, __LINE__, 9999, "next request for %s=%s", oid, val );
}
else {
- val == NULL;
+ val = NULL;
break;
}
}
@@ -1,12 +0,0 @@
Index: rocrail/impl/srcpcon.c
--- rocrail/impl/srcpcon.c.orig
+++ rocrail/impl/srcpcon.c
@@ -346,7 +346,7 @@ static char* __rr2srcp(iOSrcpConData data, iONode evt,
}
else if( StrOp.equals( wClock.name(), NodeOp.getName(evt)) ) {
- long l_time = wClock.gettime(evt);
+ time_t l_time = wClock.gettime(evt);
struct tm* lTime = localtime( &l_time );
int mins = lTime->tm_min;
@@ -1,17 +0,0 @@
Index: rocrail/makefile
--- rocrail/makefile.orig
+++ rocrail/makefile
@@ -80,10 +80,10 @@ DEBUG=-g
DESTDIR=$(FS)opt$(FS)rocrail
BINDIR=..$(FS)rocs$(FS)bin
-CPP=$(TOOLPREFIX)gcc
-LNK=$(TOOLPREFIX)gcc
+CPP=$(TOOLPREFIX)$(CC)
+LNK=$(TOOLPREFIX)$(CC)
INCL_PATH=$(MOUNTPOINT)
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(ANSI) -I$(INCL_PATH) -I$(GENDIR)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(CFLAGS) $(ANSI) -I$(INCL_PATH) -I$(GENDIR)
LNK_FLAGS=
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a $(OUTDIR)$(FS)librocutils.a $(OUTDIR)$(FS)librocrail.a
@@ -1,11 +0,0 @@
Index: rocs/gen/mdoc.c
--- rocs/gen/mdoc.c.orig
+++ rocs/gen/mdoc.c
@@ -46,6 +46,7 @@
#include <signal.h>
#include <errno.h>
#include <time.h>
+#include <string.h>
/* ------------------------------------------------------------
* platform dependent interfaces.
@@ -1,11 +0,0 @@
Index: rocs/gen/ogen.c
--- rocs/gen/ogen.c.orig
+++ rocs/gen/ogen.c
@@ -14,6 +14,7 @@
#include <signal.h>
#include <errno.h>
#include <time.h>
+#include <string.h>
/* ------------------------------------------------------------
* platform dependent interfaces.
@@ -1,11 +0,0 @@
Index: rocs/gen/wgen.c
--- rocs/gen/wgen.c.orig
+++ rocs/gen/wgen.c
@@ -14,6 +14,7 @@
#include <signal.h>
#include <errno.h>
#include <time.h>
+#include <string.h>
/* ------------------------------------------------------------
* platform dependent interfaces.
@@ -1,21 +0,0 @@
Index: rocs/impl/mem.c
--- rocs/impl/mem.c.orig
+++ rocs/impl/mem.c
@@ -53,13 +53,13 @@ static void _mem_init( void ) {
static char __opStr[1024];
static const char* _mem_getLastOperation( void ) {
const char* op = "?";
- if( mt.type = MEMTYPE_ALLOC )
+ if( mt.type == MEMTYPE_ALLOC )
op = "alloc";
- else if( mt.type = MEMTYPE_FREE )
+ else if( mt.type == MEMTYPE_FREE )
op = "free";
- else if( mt.type = MEMTYPE_CHECK )
+ else if( mt.type == MEMTYPE_CHECK )
op = "check";
- else if( mt.type = MEMTYPE_REALLOC )
+ else if( mt.type == MEMTYPE_REALLOC )
op = "realloc";
sprintf( __opStr, ">>>>> memLastOp: op=%s p=0x%08X file=%s line=%d <<<<<", op, mt.p, mt.file, mt.line );
return __opStr;
@@ -1,29 +0,0 @@
Index: rocs/impl/str.c
--- rocs/impl/str.c.orig
+++ rocs/impl/str.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <stdarg.h>
#include <time.h>
+#include <ctype.h>
#include "rocs/public/str.h"
#include "rocs/public/mem.h"
@@ -520,7 +521,7 @@ static char* _createStampNoDotsID( RocsMemID id ) {
}
-static char* _isoDate( long tt ) {
+static char* _isoDate( time_t tt ) {
struct tm* t = NULL;
/* Alloc a string for the stamp; caller should freeup! */
@@ -536,7 +537,7 @@ static char* _isoDate( long tt ) {
return s;
}
-static char* _isoTime( long tt ) {
+static char* _isoTime( time_t tt ) {
struct tm* t = NULL;
/* Alloc a string for the stamp; caller should freeup! */
@@ -1,12 +0,0 @@
Index: rocs/impl/unx/umutex.c
--- rocs/impl/unx/umutex.c.orig
+++ rocs/impl/unx/umutex.c
@@ -94,7 +94,7 @@ Boolean rocs_mutex_wait( iOMutexData o, int t ) {
if( t == -1 ) {
rc = pthread_mutex_lock( (pthread_mutex_t*)data->mh );
}
- else if( rc = pthread_mutex_trylock( (pthread_mutex_t*)data->mh ) == EBUSY ) {
+ else if( (rc = pthread_mutex_trylock( (pthread_mutex_t*)data->mh )) == EBUSY ) {
int try = t / 10 + 1;
do {
ThreadOp.sleep( 10 );
@@ -1,47 +0,0 @@
Index: rocs/impl/unx/uthread.c
--- rocs/impl/unx/uthread.c.orig
+++ rocs/impl/unx/uthread.c
@@ -26,6 +26,7 @@
#include <stddef.h>
#include <signal.h>
#include <errno.h>
+#include <unistd.h>
#include <pthread.h>
#include <sched.h>
@@ -38,7 +39,7 @@
static void* rocs_thread_wrapper( void* inst ) {
#ifdef __ROCS_THREAD__
iOThreadData o = Data(inst);
- o->id = pthread_self();
+ o->id = ( unsigned long )pthread_self();
o->run( inst );
#endif
}
@@ -90,7 +91,7 @@ void rocs_thread_sleep( const int ms ) {
unsigned long rocs_thread_id(void) {
#ifdef __ROCS_THREAD__
- return pthread_self();
+ return ( unsigned long )pthread_self();
#else
return 0;
#endif
@@ -100,7 +101,7 @@ void rocs_thread_kill( iOThread inst ) {
#ifdef __ROCS_THREAD__
iOThreadData o = Data(inst);
/*pthread_kill( o->handle, SIGABRT );*/
- pthread_cancel( o->handle );
+ pthread_cancel( ( pthread_t )o->handle );
#endif
}
@@ -144,7 +145,7 @@ Boolean rocs_thread_join( iOThread inst ) {
iOThreadData o = Data(inst);
int rc = 0;
if( o != NULL && o->handle != 0 )
- rc = pthread_join( o->handle, NULL );
+ rc = pthread_join( ( pthread_t )o->handle, NULL );
if( rc == ESRCH )
TraceOp.trc( name, TRCLEVEL_DEBUG, __LINE__, 9999, "pthread_join rc=%d", rc );
else if( rc != 0 )
-28
View File
@@ -1,28 +0,0 @@
Index: rocs/makefile
--- rocs/makefile.orig
+++ rocs/makefile
@@ -85,11 +85,11 @@ OPENSSL=
SSLLIBS=
AR=$(TOOLPREFIX)ar
-CPP=$(TOOLPREFIX)gcc
-LNK=$(TOOLPREFIX)gcc
+CPP=$(TOOLPREFIX)$(CC)
+LNK=$(TOOLPREFIX)$(CC)
# --- compile flags ---
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(OPENSSL) -I$(SRCMOUNTPOINT) -I$(GENMOUNTPOINT)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(CFLAGS) $(OPENSSL) -I$(SRCMOUNTPOINT) -I$(GENMOUNTPOINT)
# --- link flags ---
LNK_FLAGS=
@@ -172,8 +172,7 @@ fromtar:
-$(MKDIR) $(GENMOUNTPOINT)$(FS)rocs
-$(REMOVE) $(TMPOUTDIR)$(FS)*.o
-$(REMOVE) $(OUTDIR)$(FS)librocs.a
- cd $(GENMOUNTPOINT)$(CS) \
- $(COPY) ..$(FS)rocs$(FS)rocs-gen.tar.gz .$(CS) gzip -df rocs-gen.tar.gz$(CS) tar -xf rocs-gen.tar
+
ssl: OPENSSL=-D__OPENSSL__
@@ -1,12 +0,0 @@
Index: rocs/public/rocs.h
--- rocs/public/rocs.h.orig
+++ rocs/public/rocs.h
@@ -40,7 +40,7 @@
#define _POSIX_SOURCE
#define __EXTENSIONS__
#elif defined __unix__
- #pragma message("--- [Unix] ---")
+/* SHHHH who cares */
#else
#error *** Unsupported Operating System ***
#endif
@@ -1,18 +0,0 @@
Index: rocutils/makefile
--- rocutils/makefile.orig
+++ rocutils/makefile
@@ -69,11 +69,11 @@ BINDIR=..$(FS)$(COREDIR)bin
AR=$(TOOLPREFIX)ar
-CPP=$(TOOLPREFIX)gcc
-LNK=$(TOOLPREFIX)gcc
+CPP=$(TOOLPREFIX)$(CC)
+LNK=$(TOOLPREFIX)$(CC)
INCL_PATH=$(MOUNTPOINT)
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
@@ -1,37 +0,0 @@
Initialize m_LNCVPanel earlier to prevent a crash with recent wxWidgets.
Index: rocview/impl/guiframe.cpp
--- rocview/impl/guiframe.cpp.orig
+++ rocview/impl/guiframe.cpp
@@ -1759,16 +1759,6 @@ void RocGuiFrame::create() {
m_StatNotebook->AddPage(m_ActiveLocsPanel, wxGetApp().getMsg("activelocs") );
-
- TraceOp.trc( "frame", TRCLEVEL_INFO, __LINE__, 9999, "Creating PT Panel..." );
- m_CVPanel = new wxScrolledWindow( m_StatNotebook, -1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER||wxHSCROLL|wxVSCROLL );
- m_CVPanel->SetScrollbars(1, 1, 0, 0);
- m_CV = NULL;
- m_CV = new CV( m_CVPanel, wGui.getcvconf( m_Ini ), this );
-
- m_StatNotebook->AddPage(m_CVPanel, wxGetApp().getMsg("programming") );
-
-
TraceOp.trc( "frame", TRCLEVEL_INFO, __LINE__, 9999, "Creating LNCV Panel..." );
m_LNCVPanel = new wxScrolledWindow( m_StatNotebook, -1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER||wxHSCROLL|wxVSCROLL );
m_LNCVPanel->SetScrollbars(1, 1, 0, 0);
@@ -1779,6 +1769,14 @@ void RocGuiFrame::create() {
if( wGui.islncvtab(m_Ini) ) {
m_StatNotebook->AddPage(m_LNCVPanel, wxGetApp().getMsg("lncvprogramming") );
}
+
+ TraceOp.trc( "frame", TRCLEVEL_INFO, __LINE__, 9999, "Creating PT Panel..." );
+ m_CVPanel = new wxScrolledWindow( m_StatNotebook, -1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER||wxHSCROLL|wxVSCROLL );
+ m_CVPanel->SetScrollbars(1, 1, 0, 0);
+ m_CV = NULL;
+ m_CV = new CV( m_CVPanel, wGui.getcvconf( m_Ini ), this );
+
+ m_StatNotebook->AddPage(m_CVPanel, wxGetApp().getMsg("programming") );
TraceOp.trc( "frame", TRCLEVEL_INFO, __LINE__, 9999, "Creating PlanNotebook..." );
m_PlanNotebook = new wxNotebook( m_PlanSplitter, -1, wxDefaultPosition, wxDefaultSize, wxNB_TOP );
@@ -1,21 +0,0 @@
Index: rocview/makefile
--- rocview/makefile.orig
+++ rocview/makefile
@@ -104,13 +104,12 @@ DEBUG=-g
DESTDIR=$(FS)opt$(FS)rocrail
BINDIR=..$(FS)rocs$(FS)bin
-CPP=$(TOOLPREFIX)c++
-CC=$(TOOLPREFIX)gcc
-LNK=$(TOOLPREFIX)$(LINKTOOL)
+CPP=$(TOOLPREFIX)$(CXX)
+LNK=$(TOOLPREFIX)$(CXX)
INCL_PATH=$(MOUNTPOINT)
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
-CC_WXFLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(WX_FLAGS) $(WX_INCL) -I$(INCL_PATH) -I$(GENDIR)
+CC_WXFLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) $(WX_FLAGS) $(WX_INCL) -I$(INCL_PATH) -I$(GENDIR)
RRLIBS=$(OUTDIR)$(FS)librocrail.a $(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a
SRCS=impl$(FS)guiapp.cpp impl$(FS)item.cpp impl$(FS)locdlg.cpp impl$(FS)planpanel.cpp impl$(FS)propdlg.cpp impl$(FS)swdlg.cpp impl$(FS)streetdlg.cpp impl$(FS)bktext.cpp
@@ -1,12 +0,0 @@
Index: unxgen/rocs/public/serial.h
--- unxgen/rocs/public/serial.h.orig
+++ unxgen/rocs/public/serial.h
@@ -23,7 +23,7 @@ typedef enum {cts=1,dsr=2,xon=3} serial_flow;
typedef enum {onestopbit=1,twostopbits=2} serial_stopbits;
typedef enum {eight=8,seven=7} serial_databits;
typedef enum {undefined=0,mm=1,dcc=2,mma=3} serial_mode;
-typedef serial_bps;
+typedef int serial_bps;
+5 -4
View File
@@ -1,5 +1,7 @@
@bin bin/rocview
bin/rocview.sh
bin/rocview
libexec/rocrail/
@bin libexec/rocrail/rocview
share/applications/Rocview.desktop
share/rocrail/svg/
share/rocrail/svg/themes/
share/rocrail/svg/themes/Accessories/
@@ -184,8 +186,6 @@ share/rocrail/svg/themes/DB/sensor-on-route.svg
share/rocrail/svg/themes/DB/sensor-on.svg
share/rocrail/svg/themes/DB/shunting-f-g.svg
share/rocrail/svg/themes/DB/shunting-f-r.svg
share/rocrail/svg/themes/DB/signaldistance.svg
share/rocrail/svg/themes/DB/signaldistant -2.svg
share/rocrail/svg/themes/DB/signaldistant-2-g.svg
share/rocrail/svg/themes/DB/signaldistant-2-r.svg
share/rocrail/svg/themes/DB/signaldistant-2-y.svg
@@ -649,3 +649,4 @@ share/rocrail/svg/themes/SpDrS60/turnoutright-r.svg
share/rocrail/svg/themes/SpDrS60/turnoutright-t-occ.svg
share/rocrail/svg/themes/SpDrS60/turnoutright-t.svg
share/rocrail/svg/themes/SpDrS60/turnoutright.svg
@tag update-desktop-database
File diff suppressed because it is too large Load Diff