Skip to content

Commit

Permalink
Cleanup, compiler warning, fixes, and linker hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
mesheets committed Jul 4, 2024
1 parent c1986b9 commit 9a38958
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ exec: info $(EXEC_DIR)/nqc$(EXEC_EXT)

$(EXEC_DIR)/nqc$(EXEC_EXT): compiler/parse.cpp $(OBJ)
$(MKDIR) $(dir $@)
$(CXX) $(CFLAGS) $(CFLAGS_EXEC) -o $@ $(OBJ) $(LIBS)
$(CXX) $(CFLAGS) $(CFLAGS_EXEC) -o $@ $(OBJ) $(LIBS) $(LDFLAGS)

#
# Emscripten build for WebAssembly
Expand Down Expand Up @@ -322,7 +322,7 @@ install: all
test -d $(DESTDIR)$(BINDIR) || mkdir -p $(DESTDIR)$(BINDIR)
cp -r $(EXEC_DIR)/* $(DESTDIR)$(BINDIR)
test -d $(DESTDIR)$(MANDIR) || mkdir -p $(DESTDIR)$(MANDIR)
cp nqc-man-2.1r1-0.man $(DESTDIR)$(MANDIR)/nqc.$(MANEXT)
cp nqc-man.man $(DESTDIR)$(MANDIR)/nqc.$(MANEXT)

#
# Print some info about the environment
Expand Down
2 changes: 1 addition & 1 deletion compiler/Error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static const char *sErrorText[] = {
"internal error",
"%s",
"unterminated #if/#ifdef/#ifndef",
"%s without preceeding #if/#ifdef/#ifndef",
"%s without preceding #if/#ifdef/#ifndef",
"illegal preprocessor directive",
"#include requires a filename",
"could not open file %s",
Expand Down
4 changes: 2 additions & 2 deletions compiler/rcx1.nqh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@


/**************************
* ouput
* output
**************************/

// constants for selecting outputs
Expand Down Expand Up @@ -171,7 +171,7 @@
// CM specific data sources
#define TachoCount(n) @(0x50000 + (n)-1) // Use OUT_x as parameter
#define TachoSpeed(n) @(0x60000 + (n)-1) // Use OUT_x as parameter
#define ExternalMotorRunning() @(0x70002) // Refered in the SDK as MotorCurrent(2). Non zero if external motor running.
#define ExternalMotorRunning() @(0x70002) // Referred in the SDK as MotorCurrent(2). Non zero if external motor running.
#define AGC() @(0x100000) // Automatic Gain Control
#endif

Expand Down
2 changes: 1 addition & 1 deletion mkdata/mkdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using std::strcmp;
static const char *sTestArgs[] = {"mkdata", "-s", "fastdl.srec", "RCX_nub.h", "rcxNub" };


int main(int argc, char **argv)
int main(int argc, const char **argv)
{
FILE *src;
FILE *dst;
Expand Down
4 changes: 2 additions & 2 deletions nqc-man-2.1r1-0.man → nqc-man.man
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ instead of to stderr.
.TP
\fB\-I\fR\fIpath\fR
search \fIpath\fR for include files. Multiple directories should be
seperated as normal for the platform (under Linux / Unix, that'd be "\fB\:\fR").
separated as normal for the platform (under Linux / Unix, that'd be "\fB\:\fR").
Can also be set with the NQC_INCLUDE environment variable.
.TP
\fB\-L\fR[\fIfilename\fR]
Expand Down Expand Up @@ -195,7 +195,7 @@ bytecode listing to the screen in human-readable format:
.PP
)
.SH FILES
Older versions of nqc required a seperate \fIrcx.nqh\fR or \fIrcx2.nqh\fR
Older versions of nqc required a separate \fIrcx.nqh\fR or \fIrcx2.nqh\fR
file. This is now integrated into the binary and no longer necessary,
but for reference, \fIrcx2.nqh\fR is included with the package.
(If you installed the RPM, try \fI/usr/doc/nqc-2.1.0/rcx2.nqh\fR).
Expand Down

0 comments on commit 9a38958

Please sign in to comment.