Skip to content

Commit

Permalink
Bunch of tweaks related to Solaris build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
rburkey2005 committed Nov 22, 2016
1 parent 3145215 commit 88f19f0
Show file tree
Hide file tree
Showing 17 changed files with 244 additions and 207 deletions.
2 changes: 1 addition & 1 deletion ControlPulseSim/ControlPulseSim.c
Expand Up @@ -64,7 +64,7 @@ u (void)
int
main (void)
{
char ss[129] = { 0 }, sf[129], *sss, CondFlags[2] = "XX";
char ss[129] = { 0 }, sf[129], *sss, CondFlags[3] = "XX";
int i, Address, Value;
FILE *fin = NULL;
fin = stdin;
Expand Down
32 changes: 29 additions & 3 deletions Makefile
Expand Up @@ -237,6 +237,10 @@ ifdef SOLARIS
LIBS+=-L/usr/local/lib
LIBS+=-lsocket
LIBS+=-lnsl
CFLAGS0 += /opt/csw/include/wx-2.8
CFLAGS += /opt/csw/include/wx-2.8
dummy:=$(PATH):/opt/csw/bin
export PATH=$(dummy)
export SOLARIS
endif

Expand Down Expand Up @@ -298,6 +302,9 @@ endif
ifdef MACOSX
yaACA=-
endif
ifdef SOLARIS
yaACA=-
endif

# Note: The CURSES variable is misnamed. It really is just any special libraries
# for yaAGC, yaAGS, or yaACA3 that depend on Win32 vs. non-Win32 native builds.
Expand All @@ -321,6 +328,11 @@ CFLAGS0+=-I/opt/local/include -I/opt/local/include/allegro
CFLAGS+=-I/opt/local/include -I/opt/local/include/allegro
endif

ifdef SOLARIS
CFLAGS0 += -I/opt/csw/include/wx-2.8
CFLAGS += -I/opt/csw/include/wx-2.8
endif

ifdef MACOSX
CFLAGS0+=-DMACOSX=yes
CFLAGS+=-DMACOSX=yes
Expand All @@ -333,6 +345,8 @@ ifdef FREEBSD
CFLAGS0+=-DFREEBSD=yes
CFLAGS+=-DFREEBSD=yes
endif
export CFLAGS0
export CFLAGS

# We assume a *nix build environment.

Expand Down Expand Up @@ -383,6 +397,18 @@ SUBDIRS += yaDSKYb1
SUBDIRS += VirtualAGC
endif # NOGUI

# EXTSW is the switch for cp that's equivalent to -a in Linux.
ifdef MACOSX
EXTSW=-pR
else
ifdef SOLARIS
EXTSW=-r -@ -P
else
EXTSW=-a
endif
endif
export EXTSW

.PHONY: $(SUBDIRS)

.PHONY: default
Expand Down Expand Up @@ -488,9 +514,9 @@ buildbox: dev

.PHONY: binaries
binaries: clean all-archs
cp -a VirtualAGC/VirtualAGC-installer $(WEBSITE)/Downloads
cp -a VirtualAGC/VirtualAGC-setup.exe $(WEBSITE)/Downloads
cp -a VirtualAGC/VirtualAGC.app.tar.gz $(WEBSITE)/Downloads
cp ${EXTSW} VirtualAGC/VirtualAGC-installer $(WEBSITE)/Downloads
cp ${EXTSW} VirtualAGC/VirtualAGC-setup.exe $(WEBSITE)/Downloads
cp ${EXTSW} VirtualAGC/VirtualAGC.app.tar.gz $(WEBSITE)/Downloads
ls -ltr $(WEBSITE)/Downloads | tail -4

# I used this only for creating a development snapshot. It's no use to anybody
Expand Down
5 changes: 0 additions & 5 deletions VirtualAGC/Makefile
Expand Up @@ -112,11 +112,6 @@ SDK_MAC=${HOME}/IMCROSS/mac/SDKs/MacOSX10.4u.sdk
JAMMER_DIR=${HOME}/IMCROSS/installjammer

# cp and sed work slightly differently on Mac OS X than elsewhere.
ifdef MACOSX
EXTSW=-pR
else
EXTSW=-a
endif
INPLACE=-i~
CP=cp
CP+=${EXTSW}
Expand Down
367 changes: 185 additions & 182 deletions VirtualAGC/VirtualAGC.cpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions VirtualAGC/VirtualAGC.h
Expand Up @@ -251,7 +251,7 @@ class Simulation : public wxFrame
wxPanel* ScriptPanel;
wxPanel* DetailPanel;

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
virtual void
Expand Down Expand Up @@ -418,7 +418,7 @@ class VirtualAGC : public wxFrame
wxGridSizer* interfaceStylesBox;
wxGridSizer* debuggerBox;

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
virtual void
Expand Down
2 changes: 1 addition & 1 deletion jWiz/jWiz.h
Expand Up @@ -140,7 +140,7 @@ class MainFrameClass: public wxFrame {
wxPanel* panel_3;
// end wxGlade

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
virtual void Test3Clicked(wxCommandEvent &event); // wxGlade: <event_handler>
Expand Down
2 changes: 2 additions & 0 deletions yaACA3/yaACA3.c
Expand Up @@ -376,7 +376,9 @@ main (int argc, char *argv[])
PulseACA (); // Manage server connection.
}

#ifndef SOLARIS
return (0);
#endif
}


Expand Down
2 changes: 1 addition & 1 deletion yaAGC/agc_cli.c
Expand Up @@ -276,7 +276,7 @@ Options_t* CliParseArguments(int argc, char *argv[])
{
/* If a new working directory is specified then change to it
* immediately */
if (Options.cd > 0)
if (Options.cd != NULL)
{
if (chdir(Options.cd) < 0)
{
Expand Down
12 changes: 6 additions & 6 deletions yaAGC/agc_debugger.c
Expand Up @@ -562,7 +562,7 @@ DbgInitialize (Options_t * Options, agc_t * State)
FromFiles[0] = stdin;

/* Allow a command file to be used with initial debugger commands */
if (Options->fromfile > 0)
if (Options->fromfile != NULL)
{
if (NumFromFiles < MAX_FROMFILES)
{
Expand All @@ -575,7 +575,7 @@ DbgInitialize (Options_t * Options, agc_t * State)
/* If a new source path is given then apply this to prevent the
* default source path from the symbol table to be used.
*/
if (Options->directory > 0)
if (Options->directory != NULL)
SourcePathName = Options->directory;

/* Add the AGC starting point */
Expand Down Expand Up @@ -893,7 +893,7 @@ DbgNativeAddr (unsigned linear_addr)
unsigned
DbgLinearAddr (Address_t * agc_addr)
{
unsigned LinearAddress = ~0; /* Default invalid Address */
unsigned LinearAddress = ~((unsigned) 0); /* Default invalid Address */

if (agc_addr->SReg < 01400) /* Must be Unbanked Eraseable */
{
Expand Down Expand Up @@ -996,15 +996,15 @@ DbgGetValueByAddress (unsigned gdbmi_addr)
unsigned
DbgLinearAddrFromAddrStr (char *addr_str)
{
unsigned Address = ~0;
unsigned Address = ~((unsigned) 0);
unsigned Bank, SReg;
Symbol_t *Symbol = NULL;
Address_t *agc_addr;

/* First determine if this address is a pseudo address or a banked
* address by checking the existence of a comma (i.e. banked address )
*/
if (strstr (addr_str, ",") > 0)
if (strstr (addr_str, ",") != NULL)
{
/* Try Eraseable translation first then fixed */
if (2 == sscanf (addr_str, "E%o,%o", &Bank, &SReg))
Expand All @@ -1020,7 +1020,7 @@ DbgLinearAddrFromAddrStr (char *addr_str)
Address = DbgLinearFixedAddr (SReg, Bank, 0);
}
}
else if (strstr (addr_str, "&") > 0)
else if (strstr (addr_str, "&") != NULL)
{
/* Looks like a symbol based address */
addr_str++;
Expand Down
2 changes: 2 additions & 0 deletions yaAGC/nbfgets.c
Expand Up @@ -278,7 +278,9 @@ static void * nbfgetsThreadFunction (void *Arg)
// This function doesn't actually return, but I've
// put in the following line to avoid a compiler
// warning in some compiler versions.
#ifndef SOLARIS
return (NULL);
#endif
}

// Signals to the thread reading in the input from stdin to actually go
Expand Down
2 changes: 2 additions & 0 deletions yaAGCb1/main.c
Expand Up @@ -231,5 +231,7 @@ main(int argc, char *argv[])
}
}

#ifndef SOLARIS
return (0);
#endif
}
2 changes: 2 additions & 0 deletions yaAGCb1/nbfgets.c
Expand Up @@ -118,7 +118,9 @@ nbfgetsThreadFunction(void *Arg)
// This function doesn't actually return, but I've
// put in the following line to avoid a compiler
// warning in some compiler versions.
#ifndef SOLARIS
return (NULL);
#endif
}

// Signals to the thread reading in the input from stdin to actually go
Expand Down
2 changes: 1 addition & 1 deletion yaDEDA2/yaDEDA2.h
Expand Up @@ -165,7 +165,7 @@ class MainFrame: public wxFrame {
wxBitmapButton* KeyHold;
// end wxGlade

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
virtual void on_KeyPlus_pressed(wxCommandEvent &event); // wxGlade: <event_handler>
Expand Down
2 changes: 1 addition & 1 deletion yaDSKY2/yaDSKY2.h
Expand Up @@ -201,7 +201,7 @@ class MainFrame: public wxFrame {
wxBitmapButton* RsetButton;
// end wxGlade

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
virtual void on_VerbButton_pressed(wxCommandEvent &event); // wxGlade: <event_handler>
Expand Down
2 changes: 1 addition & 1 deletion yaDSKYb1/yaDSKYb1-widgetized.h
Expand Up @@ -150,7 +150,7 @@ class MyFrame: public wxFrame
wxImagePanel* panel;
// end wxGlade

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
virtual void on_VerbButton_pressed(wxCommandEvent &event); // wxGlade: <event_handler>
Expand Down
4 changes: 2 additions & 2 deletions yaTelemetry/yaTelemetry.h
Expand Up @@ -85,7 +85,7 @@ class SimpleFrameClass: public wxFrame {
wxStaticText* TextCtrl;
// end wxGlade

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
virtual void BiggerPressed(wxCommandEvent &event); // wxGlade: <event_handler>
Expand Down Expand Up @@ -121,7 +121,7 @@ class MainFrameClass: public wxFrame {
wxStaticBitmap* bitmap_2;
// end wxGlade

DECLARE_EVENT_TABLE();
DECLARE_EVENT_TABLE()

public:
void TimerStop(wxCloseEvent &event);
Expand Down
7 changes: 6 additions & 1 deletion yaYUL/yaYUL.h
Expand Up @@ -200,11 +200,16 @@ typedef struct
} Address_t;

// Invalid, Constant, Address, SReg, Erasable, Fixed, Unbanked, Banked, EB, FB, Super, Overflow, Value, Syllable.
#ifdef MSC_VS
#if defined(MSC_VS)
#define VALID_ADDRESS ( { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } )
#define REG(n) ( { 0, 0, 1, n, 1, 0, 1, 0, 0, 0, 0, 0, n, 0 })
#define CONSTANT(n) ( { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, n, 0 })
#define FIXEDADD(n) ( { 0, 0, 1, n, 0, 1, 1, 0, 0, 0, 0, 0, n, 0 })
#elif defined(SOLARIS)
#define VALID_ADDRESS ((const Address_t) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } )
#define REG(n) { 0, 0, 1, n, 1, 0, 1, 0, 0, 0, 0, 0, n, 0 }
#define CONSTANT(n) { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, n, 0 }
#define FIXEDADD(n) { 0, 0, 1, n, 0, 1, 1, 0, 0, 0, 0, 0, n, 0 }
#else
#define VALID_ADDRESS ((const Address_t) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } )
#define REG(n) ((const Address_t) { 0, 0, 1, n, 1, 0, 1, 0, 0, 0, 0, 0, n, 0 })
Expand Down

0 comments on commit 88f19f0

Please sign in to comment.