mirror of
https://github.com/Interlisp/maiko.git
synced 2026-04-29 13:32:51 +00:00
Sprinkle some const on char * params. (#298)
This is enough to let us move `il_string` in `loopsops.c` into read-only storage.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#ifndef GCARRAYDEFS_H
|
#ifndef GCARRAYDEFS_H
|
||||||
#define GCARRAYDEFS_H 1
|
#define GCARRAYDEFS_H 1
|
||||||
LispPTR aref1(LispPTR array, int index);
|
LispPTR aref1(LispPTR array, int index);
|
||||||
LispPTR find_symbol(char *char_base, DLword offset, DLword length, LispPTR hashtbl, DLword fatp, DLword lispp);
|
LispPTR find_symbol(const char *char_base, DLword offset, DLword length, LispPTR hashtbl, DLword fatp, DLword lispp);
|
||||||
LispPTR get_package_atom(char *char_base, DLword charlen, char *packname, DLword packlen, int externalp);
|
LispPTR get_package_atom(const char *char_base, DLword charlen, const char *packname, DLword packlen, int externalp);
|
||||||
LispPTR with_symbol(LispPTR char_base, LispPTR offset, LispPTR charlen, LispPTR fatp, LispPTR hashtbl, LispPTR result);
|
LispPTR with_symbol(LispPTR char_base, LispPTR offset, LispPTR charlen, LispPTR fatp, LispPTR hashtbl, LispPTR result);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "cell.h"
|
#include "cell.h"
|
||||||
void print_package_name(int index);
|
void print_package_name(int index);
|
||||||
void print_atomname(LispPTR index);
|
void print_atomname(LispPTR index);
|
||||||
int find_package_from_name(char *packname, int len);
|
int find_package_from_name(const char *packname, int len);
|
||||||
void print_package_name(int index);
|
void print_package_name(int index);
|
||||||
void dump_dtd(void);
|
void dump_dtd(void);
|
||||||
void check_type_68k(int type, LispPTR *ptr);
|
void check_type_68k(int type, LispPTR *ptr);
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ LispPTR aref1(LispPTR array, int index) {
|
|||||||
/* */
|
/* */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
LispPTR find_symbol(char *char_base, DLword offset, DLword length, LispPTR hashtbl, DLword fatp,
|
LispPTR find_symbol(const char *char_base, DLword offset, DLword length, LispPTR hashtbl, DLword fatp,
|
||||||
DLword lispp)
|
DLword lispp)
|
||||||
|
|
||||||
/* T => the "chars" coming in are 16-bit */
|
/* T => the "chars" coming in are 16-bit */
|
||||||
@@ -253,7 +253,7 @@ retry:
|
|||||||
/* */
|
/* */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
LispPTR get_package_atom(char *char_base, DLword charlen, char *packname, DLword packlen,
|
LispPTR get_package_atom(const char *char_base, DLword charlen, const char *packname, DLword packlen,
|
||||||
int externalp) {
|
int externalp) {
|
||||||
int packindex;
|
int packindex;
|
||||||
PACKAGE *packaddr;
|
PACKAGE *packaddr;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "gcarraydefs.h"
|
#include "gcarraydefs.h"
|
||||||
#include "gchtfinddefs.h"
|
#include "gchtfinddefs.h"
|
||||||
|
|
||||||
static char il_string[] = "INTERLISP";
|
static const char il_string[] = "INTERLISP";
|
||||||
#define GET_IL_ATOM(string) get_package_atom((string), (sizeof(string) - 1), il_string, 9, NIL)
|
#define GET_IL_ATOM(string) get_package_atom((string), (sizeof(string) - 1), il_string, 9, NIL)
|
||||||
|
|
||||||
#define AtomValPtr(index) Addr68k_from_LADDR(*(GetVALCELL68k(index)))
|
#define AtomValPtr(index) Addr68k_from_LADDR(*(GetVALCELL68k(index)))
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ void print_atomname(LispPTR index)
|
|||||||
|
|
||||||
#define PACKAGES_LIMIT 255
|
#define PACKAGES_LIMIT 255
|
||||||
/** GET PACKAGE INDEX from PACKAGE FULL NAME */
|
/** GET PACKAGE INDEX from PACKAGE FULL NAME */
|
||||||
int find_package_from_name(char *packname, int len) {
|
int find_package_from_name(const char *packname, int len) {
|
||||||
int index;
|
int index;
|
||||||
PACKAGE *package;
|
PACKAGE *package;
|
||||||
NEWSTRINGP *namestring;
|
NEWSTRINGP *namestring;
|
||||||
|
|||||||
Reference in New Issue
Block a user