mirror of
https://github.com/Interlisp/maiko.git
synced 2026-05-03 14:59:26 +00:00
Remove unnecessary struct definition for SX hash arguments.
modified: inc/sxhashdefs.h modified: src/miscn.c modified: src/sxhash.c
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
#ifndef SXHASHDEFS_H
|
#ifndef SXHASHDEFS_H
|
||||||
#define SXHASHDEFS_H 1
|
#define SXHASHDEFS_H 1
|
||||||
typedef struct { LispPTR object; } SXHASHARG;
|
LispPTR SX_hash(LispPTR object);
|
||||||
LispPTR SX_hash(register SXHASHARG *args);
|
LispPTR STRING_EQUAL_HASHBITS(LispPTR object);
|
||||||
LispPTR STRING_EQUAL_HASHBITS(SXHASHARG *args);
|
LispPTR STRING_HASHBITS(LispPTR object);
|
||||||
LispPTR STRING_HASHBITS(SXHASHARG *args);
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -72,11 +72,11 @@ int OP_miscn(int misc_index, int arg_count) {
|
|||||||
N_GETNUMBER(args[0], user_subr, do_ufn);
|
N_GETNUMBER(args[0], user_subr, do_ufn);
|
||||||
if ((result = UserSubr(user_subr, arg_count - 1, &args[1])) < 0) goto do_ufn;
|
if ((result = UserSubr(user_subr, arg_count - 1, &args[1])) < 0) goto do_ufn;
|
||||||
} break;
|
} break;
|
||||||
case miscn_SXHASH: result = SX_hash(args); break;
|
case miscn_SXHASH: result = SX_hash(args[0]); break;
|
||||||
|
|
||||||
case miscn_STRING_EQUAL_HASHBITS: result = STRING_EQUAL_HASHBITS(args); break;
|
case miscn_STRING_EQUAL_HASHBITS: result = STRING_EQUAL_HASHBITS(args[0]); break;
|
||||||
|
|
||||||
case miscn_STRINGHASHBITS: result = STRING_HASHBITS(args); break;
|
case miscn_STRINGHASHBITS: result = STRING_HASHBITS(args[0]); break;
|
||||||
|
|
||||||
case miscn_VALUES:
|
case miscn_VALUES:
|
||||||
if (arg_count > 255) {
|
if (arg_count > 255) {
|
||||||
|
|||||||
12
src/sxhash.c
12
src/sxhash.c
@@ -50,8 +50,8 @@ static unsigned short stringhash(LispPTR obj);
|
|||||||
/* */
|
/* */
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
||||||
LispPTR SX_hash(register SXHASHARG *args) {
|
LispPTR SX_hash(LispPTR object) {
|
||||||
return (S_POSITIVE | (0xFFFF & (sxhash(args->object))));
|
return (S_POSITIVE | (0xFFFF & (sxhash(object))));
|
||||||
/* Smash the top of the stack to a 0xe, offset */
|
/* Smash the top of the stack to a 0xe, offset */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,8 +194,8 @@ static unsigned short sxhash_pathname(LispPTR obj) {
|
|||||||
/* */
|
/* */
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
||||||
LispPTR STRING_EQUAL_HASHBITS(SXHASHARG *args) {
|
LispPTR STRING_EQUAL_HASHBITS(LispPTR object) {
|
||||||
return (S_POSITIVE | (0xFFFF & (stringequalhash(args->object))));
|
return (S_POSITIVE | (0xFFFF & (stringequalhash(object))));
|
||||||
} /* STRING_EQUAL_HASHBITS */
|
} /* STRING_EQUAL_HASHBITS */
|
||||||
|
|
||||||
static unsigned short stringequalhash(LispPTR obj) {
|
static unsigned short stringequalhash(LispPTR obj) {
|
||||||
@@ -262,8 +262,8 @@ static unsigned short stringequalhash(LispPTR obj) {
|
|||||||
/* */
|
/* */
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
||||||
LispPTR STRING_HASHBITS(SXHASHARG *args) {
|
LispPTR STRING_HASHBITS(LispPTR object) {
|
||||||
return (S_POSITIVE | (0xFFFF & (stringhash(args->object))));
|
return (S_POSITIVE | (0xFFFF & (stringhash(object))));
|
||||||
} /* STRING_HASHBITS */
|
} /* STRING_HASHBITS */
|
||||||
|
|
||||||
static unsigned short stringhash(LispPTR obj) {
|
static unsigned short stringhash(LispPTR obj) {
|
||||||
|
|||||||
Reference in New Issue
Block a user