aboutsummaryrefslogtreecommitdiff
path: root/src/etc/asq.c.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-11-27 21:28:37 +0000
committerdos-reis <gdr@axiomatics.org>2010-11-27 21:28:37 +0000
commit31cd499e87188ec57621f12335d4db910facdc1b (patch)
tree711c088d7fd24bb8014396318c9ec3d7f6236d37 /src/etc/asq.c.pamphlet
parentd9d1578c937658aea790f713ec93a486a1a92478 (diff)
downloadopen-axiom-31cd499e87188ec57621f12335d4db910facdc1b.tar.gz
* 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.
Diffstat (limited to 'src/etc/asq.c.pamphlet')
-rw-r--r--src/etc/asq.c.pamphlet15
1 files changed, 6 insertions, 9 deletions
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 <ctype.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#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;