To implement variables in chew, it's convenient to have a
pointer-sized integer on the stack. To this end, use intptr_t rather
than long.
2023-02-07 Tom Tromey <tom@tromey.com>
* doc/chew.c (pcu) <l>: Now intptr_t.
(internal_mode, istack, isp): Likewise.
(bang, atsign): Use intptr_t.
+2023-02-07 Tom Tromey <tom@tromey.com>
+
+ * doc/chew.c (pcu) <l>: Now intptr_t.
+ (internal_mode, istack, isp): Likewise.
+ (bang, atsign): Use intptr_t.
+
2023-02-07 Tom Tromey <tom@tromey.com>
* doc/proto.str (SYNOPSIS): Don't use paramstuff.
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#define DEF_SIZE 5000
#define STACK 50
void (*f) (void);
struct dict_struct *e;
char *s;
- long l;
+ intptr_t l;
} pcu;
typedef struct dict_struct
} dict_type;
int internal_wanted;
-int internal_mode;
+intptr_t internal_mode;
int warning;
unsigned int idx = 0; /* Pos in input buffer */
string_type *ptr; /* and the buffer */
-long istack[STACK];
-long *isp = &istack[0];
+intptr_t istack[STACK];
+intptr_t *isp = &istack[0];
dict_type *root;
static void
bang (void)
{
- *(long *) ((isp[0])) = isp[-1];
+ *(intptr_t *) ((isp[0])) = isp[-1];
isp -= 2;
icheck_range ();
pc++;
static void
atsign (void)
{
- isp[0] = *(long *) (isp[0]);
+ isp[0] = *(intptr_t *) (isp[0]);
pc++;
}