mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-07 16:51:21 +00:00
Use const more. (#183)
This commit is contained in:
@@ -56,7 +56,7 @@ extern char URaid_comm;
|
||||
extern char URaid_arg1[256];
|
||||
extern char URaid_arg2[10];
|
||||
extern int URaid_argnum;
|
||||
extern char *URaid_errmess;
|
||||
extern const char *URaid_errmess;
|
||||
extern int URaid_currentFX;
|
||||
extern FX *URaid_FXarray[];
|
||||
extern jmp_buf BT_jumpbuf;
|
||||
@@ -77,7 +77,7 @@ LispPTR Uraid_mess = NIL;
|
||||
/************************************************************************/
|
||||
|
||||
#define URMAXCOMM 512
|
||||
int error(char *cp) {
|
||||
int error(const char *cp) {
|
||||
char *ptr;
|
||||
if (device_before_raid() < 0) {
|
||||
fprintf(stderr, "Can't Enter URAID.\n");
|
||||
@@ -142,7 +142,7 @@ uraidloop:
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void warn(char *s)
|
||||
void warn(const char *s)
|
||||
{ printf("\nWARN: %s \n", s); }
|
||||
|
||||
/*****************************************************************
|
||||
|
||||
@@ -58,7 +58,7 @@ extern DspInterface currentdsp;
|
||||
#endif /* DOS || XWINDOW */
|
||||
|
||||
/* sys_size is sysout size in megabytes */
|
||||
int sysout_loader(char * sysout_file_name, int sys_size)
|
||||
int sysout_loader(const char * sysout_file_name, int sys_size)
|
||||
{
|
||||
int sysout; /* SysoutFile descriptor */
|
||||
|
||||
|
||||
16
src/mkatom.c
16
src/mkatom.c
@@ -63,7 +63,7 @@ extern DLword *Lisp_world;
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
DLword compute_hash(char *char_base, DLword offset, DLword length) {
|
||||
DLword compute_hash(const char *char_base, DLword offset, DLword length) {
|
||||
DLword hash;
|
||||
DLword number;
|
||||
DLword temp1;
|
||||
@@ -94,7 +94,7 @@ DLword compute_hash(char *char_base, DLword offset, DLword length) {
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
DLword compute_lisp_hash(char *char_base, DLword offset, DLword length, DLword fatp) {
|
||||
DLword compute_lisp_hash(const char *char_base, DLword offset, DLword length, DLword fatp) {
|
||||
DLword hash;
|
||||
DLword number;
|
||||
DLword temp1;
|
||||
@@ -146,7 +146,7 @@ DLword compute_lisp_hash(char *char_base, DLword offset, DLword length, DLword f
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
LispPTR compare_chars(register char *char1, register char *char2, register DLword length) {
|
||||
LispPTR compare_chars(register const char *char1, register const char *char2, register DLword length) {
|
||||
#ifndef BYTESWAP
|
||||
if (memcmp(char1, char2, length) == 0)
|
||||
#else
|
||||
@@ -161,7 +161,7 @@ LispPTR compare_chars(register char *char1, register char *char2, register DLwor
|
||||
|
||||
} /* end compare_chars */
|
||||
#ifdef BYTESWAP
|
||||
int bytecmp(char *char1, char *char2, int len)
|
||||
int bytecmp(const char *char1, const char *char2, int len)
|
||||
{
|
||||
int index;
|
||||
for (index = 0; index < len; index++) {
|
||||
@@ -188,7 +188,7 @@ int bytecmp(char *char1, char *char2, int len)
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
LispPTR compare_lisp_chars(register char *char1, register char *char2, register DLword length,
|
||||
LispPTR compare_lisp_chars(register const char *char1, register const char *char2, register DLword length,
|
||||
DLword fat1, DLword fat2) {
|
||||
if ((!fat1) == (!fat2)) { /* both fat or both non-fat. */
|
||||
#ifdef BYTESWAP
|
||||
@@ -231,7 +231,7 @@ LispPTR compare_lisp_chars(register char *char1, register char *char2, register
|
||||
|
||||
} /* end compare_lisp_chars */
|
||||
|
||||
int lispcmp(DLword *char1, unsigned char *char2, int len) {
|
||||
int lispcmp(const DLword *char1, const unsigned char *char2, int len) {
|
||||
int index;
|
||||
for (index = 0; index < len; index++) {
|
||||
if (GETWORD(char1++) != (unsigned char)GETBYTE(char2++)) return (0);
|
||||
@@ -259,7 +259,7 @@ int lispcmp(DLword *char1, unsigned char *char2, int len) {
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
LispPTR make_atom(char *char_base, DLword offset, DLword length, short int non_numericp)
|
||||
LispPTR make_atom(const char *char_base, DLword offset, DLword length, short int non_numericp)
|
||||
/* if it is NIL then these chars are treated as NUMBER */
|
||||
{
|
||||
extern DLword *Spospspace;
|
||||
@@ -346,7 +346,7 @@ LispPTR make_atom(char *char_base, DLword offset, DLword length, short int non_n
|
||||
/*********************************************************************/
|
||||
|
||||
/* Assume this func. should be called with C string in "char_base" */
|
||||
LispPTR parse_number(char *char_base, short int length) {
|
||||
LispPTR parse_number(const char *char_base, short int length) {
|
||||
register LispPTR sign_mask;
|
||||
register LispPTR val;
|
||||
register int radix;
|
||||
|
||||
@@ -266,7 +266,7 @@ char URaid_comm;
|
||||
char URaid_arg1[URMAXCOMM / 2];
|
||||
char URaid_arg2[URMAXCOMM / 2];
|
||||
int URaid_argnum;
|
||||
char *URaid_errmess;
|
||||
const char *URaid_errmess;
|
||||
|
||||
extern int PrintMaxLevel; /* for print level */
|
||||
|
||||
@@ -340,7 +340,7 @@ void uraid_commclear() {
|
||||
URaid_argnum = 0;
|
||||
}
|
||||
|
||||
void copy_region(DLword *src, DLword *dst, int width, int h)
|
||||
void copy_region(const DLword *src, DLword *dst, int width, int h)
|
||||
{
|
||||
register int w;
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ extern struct sockaddr_nit snit;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void print_Xusage(char *prog)
|
||||
void print_Xusage(const char *prog)
|
||||
{
|
||||
fprintf(stderr, " %s options:\n", prog);
|
||||
fprintf(stderr, " [-sysout] [<sysout>] -path to the Medley image\n");
|
||||
@@ -142,7 +142,7 @@ void print_Xusage(char *prog)
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void print_lispusage(char *prog)
|
||||
void print_lispusage(const char *prog)
|
||||
{
|
||||
TPRINT(("TRACE: print_lisp_usage()\n"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user