version 1.4, 2001/05/04 01:06:24 |
version 1.7, 2020/10/06 11:33:46 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/kclass.c,v 1.3 2001/04/12 06:48:26 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/kclass.c,v 1.6 2006/01/30 10:38:36 takayama Exp $ */ |
/* kclass.c, 1997, 3/1 |
/* kclass.c, 1997, 3/1 |
This module handles class data base. |
This module handles class data base. |
This is a top level and provides an interface for sm1 for Sclass objects. |
This is a top level and provides an interface for sm1 for Sclass objects. |
|
|
grep the keyword CLASSNAME_sampleClass |
grep the keyword CLASSNAME_sampleClass |
*/ |
*/ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <string.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
#include "extern.h" |
#include "extern.h" |
Line 21 struct object * ClassDictionaries[CLASSTABLE_SIZE]; |
|
Line 22 struct object * ClassDictionaries[CLASSTABLE_SIZE]; |
|
char *ClassNames[CLASSTABLE_SIZE]; |
char *ClassNames[CLASSTABLE_SIZE]; |
int ClassTypes[CLASSTABLE_SIZE]; |
int ClassTypes[CLASSTABLE_SIZE]; |
|
|
initClassDataBase() { |
void initClassDataBase() { |
int i; |
int i; |
for (i=0; i<CLASSTABLE_SIZE; i++) { |
for (i=0; i<CLASSTABLE_SIZE; i++) { |
ClassTypes[i] = CLASS_NOT_USED; |
ClassTypes[i] = CLASS_NOT_USED; |
Line 160 void fprintMathCap(FILE *fp,struct object *op) |
|
Line 161 void fprintMathCap(FILE *fp,struct object *op) |
|
} |
} |
|
|
struct object KpoMathCap(struct object *obp) { |
struct object KpoMathCap(struct object *obp) { |
struct object rob; |
struct object rob = OINIT; |
struct object *newobp; |
struct object *newobp; |
|
|
newobp = (struct object *) sGC_malloc(sizeof(struct object)); |
newobp = (struct object *) sGC_malloc(sizeof(struct object)); |
Line 185 struct object KclassDataConversion(struct object ob1,s |
|
Line 186 struct object KclassDataConversion(struct object ob1,s |
|
ob1(with class tag) [(class) (class-name)] dc : method=2 |
ob1(with class tag) [(class) (class-name)] dc : method=2 |
ob1(with class tag) (usual flag) dc : method=3 |
ob1(with class tag) (usual flag) dc : method=3 |
It also create a new class object. |
It also create a new class object. |
|
ob1 (error) dc --> ErrorObject with the contents ob1 |
|
|
|
ob1(with class tag) (body) dc --> [left tag, right body of ob1.] |
*/ |
*/ |
struct object rob = NullObject; |
struct object rob = NullObject; |
int method ; |
int method ; |
struct object ff0; |
struct object ff0 = OINIT; |
struct object ff1; |
struct object ff1 = OINIT; |
struct object ob3; /* for work.*/ |
struct object ob3 = OINIT; /* for work.*/ |
struct object ob4; |
struct object ob4 = OINIT; |
char *ccc; |
char *ccc; |
char *key; |
char *key; |
|
|
Line 281 struct object KclassDataConversion(struct object ob1,s |
|
Line 285 struct object KclassDataConversion(struct object ob1,s |
|
}else if (strcmp(key,"error")==0) { |
}else if (strcmp(key,"error")==0) { |
rob = KnewErrorPacketObj(ob1); |
rob = KnewErrorPacketObj(ob1); |
return(rob); |
return(rob); |
|
} |
|
}else if (key[0] == 'b') { |
|
if (strcmp(key,"body") == 0) { |
|
rob = newObjectArray(2); |
|
putoa(rob,0,KpoInteger(ectag(ob1))); |
|
putoa(rob,1,*((struct object *)(ecbody(ob1)))); |
|
return rob; |
} |
} |
} |
} |
|
|