From 31cd499e87188ec57621f12335d4db910facdc1b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 27 Nov 2010 21:28:37 +0000 Subject: * etc/Makefile.in: Compile and link with a C++ compiler. * etc/asq.c.pamphlet: Fix bogus declarations of standard functions. Fix const-correctness for string literals. --- src/etc/asq.c.pamphlet | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/etc/asq.c.pamphlet') diff --git a/src/etc/asq.c.pamphlet b/src/etc/asq.c.pamphlet index 034c35d3..a5f37be0 100644 --- a/src/etc/asq.c.pamphlet +++ b/src/etc/asq.c.pamphlet @@ -524,12 +524,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* printhelp -- print the help info */ /* main */ +#include "openaxiom-c-macros.h" + +#include #include #include #include #include -#include "openaxiom-c-macros.h" #include "cfuns.h" /* we need to predeclare some functions so their signatures are known */ @@ -538,11 +540,6 @@ int printlist(char *list); int pprintobject(char *list); int pprintcond(int seekpt,char *path); -/* this bogucity is apparently due to the introduction of unicode */ -/* since we don't use unicode we default to the K&R C signatures */ -int isdigit(int c); -int isspace(int c); - /*defvar*/ char *AXIOM; /* the AXIOM shell variable */ /*defvar*/ char interppath[256]; /* where the file is */ @@ -603,7 +600,7 @@ int isspace(int c); return 1; } -/*defun*/ char* N2S(int n) +/*defun*/ const char* N2S(int n) { return ((n<=0 && n>-Nct) ? ct[-n] : "the unknown thing"); } @@ -1457,7 +1454,7 @@ int isspace(int c); /*defun*/ int main(int argc, char *argv[]) { /* FILE *test; when testing we leave tombstones */ - char *ssearch =""; /* the domain or abbreviation */ + const char *ssearch =""; /* the domain or abbreviation */ char *property=""; /* the property we want (e.g. niladic) */ int found=1; /* did we find the domain? print if yes */ char c; /* a temporary */ @@ -1491,7 +1488,7 @@ int isspace(int c); opencompress(); fseek(compress,seekcompress,SEEK_SET); fscanf(compress,"%d",&Nct); - ct = malloc(Nct*sizeof(char *)); + ct = (char**) malloc(Nct*sizeof(char *)); /* put entries in ct */ { int foo1,foo2; -- cgit v1.2.3