Commit Graph

9 Commits

Author SHA1 Message Date
Jeroen Vermeulen
b085ca542d Oops, that's a null pointer not a nul character. 2015-05-18 13:52:09 +07:00
Hieu Hoang
4f02f19ab4 beautify 2015-05-10 10:19:26 +01:00
Jeroen Vermeulen
91e699f90d Modernize symal source code.
Part of symal was still written in K&R C (though with an anachronistic C99
version comment!).  Updating it to ANSI C, adding const in many places for
clarity.  Reordering functions to eliminate forward declarations.

Moving definition of Cmd_T into cmd.c, since it's local to that file.
Adding some wrappers to reduce the casts around Cmd_T.p.  Narrowing the
scope of some variables.

Also updating the C++: use anonymous namespace for "static" definitions,
use enums and constants instead of preprocessor macros, use false/true as
boolean constants, throw exceptions instead of print-and-exit, avoid use of
"final" as an identifier since it's now a reserved word.
2015-05-10 15:28:28 +07:00
Hieu Hoang
cc8c6b7b10 beautify 2015-05-02 11:45:24 +01:00
Jeroen Vermeulen
eca5824100 Remove trailing whitespace in C++ files. 2015-04-30 12:05:11 +07:00
Hieu Hoang
e279135d78 create file stream and delete it at the end if user has specified a file for input & output 2015-04-16 00:50:54 +04:00
Hieu Hoang
c544dba7ad don't use /dev/stdin and /dev/stdout. Compatibility issues with some Redhat 2015-04-15 18:53:13 +04:00
Hieu Hoang
6249432407 beautify 2013-05-29 18:16:15 +01:00
Hieu Hoang
4eef94b121 move c++ code out of /script/ to / 2012-05-31 17:24:06 +01:00