version 1.1, 2003/05/14 07:09:48 |
version 1.3, 2013/11/07 07:29:47 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/k097/sm1sm.c,v 1.2 2005/06/16 05:07:24 takayama Exp $ */ |
/* This is imported from kxx/sm1stackmachine.c */ |
/* This is imported from kxx/sm1stackmachine.c */ |
#include <stdio.h> |
#include <stdio.h> |
#include <setjmp.h> |
#include <setjmp.h> |
|
#include <string.h> |
#include "../kxx/ox_kan.h" |
#include "../kxx/ox_kan.h" |
#include "../kxx/serversm.h" |
#include "../kxx/serversm.h" |
extern int OXprintMessage; |
extern int OXprintMessage; |
|
void *GC_malloc(size_t size); |
|
void *sGC_malloc(size_t size); |
|
|
/* server stack machine */ |
/* server stack machine */ |
|
|
Line 20 int Sm1_setMathCap(ox_stream os) { |
|
Line 23 int Sm1_setMathCap(ox_stream os) { |
|
/* Set the mathcap data of the client in the server. */ |
/* Set the mathcap data of the client in the server. */ |
/* sm1 <====== ox_sm1 mathcap is set in ox_stream = FILE2 * */ |
/* sm1 <====== ox_sm1 mathcap is set in ox_stream = FILE2 * */ |
/* The mathcap data is on the stack. */ |
/* The mathcap data is on the stack. */ |
struct object ob; |
struct object ob = OINIT; |
struct object ob2; |
struct object ob2 = OINIT; |
int n,i; |
int n,i; |
ob = KSpop(); |
ob = KSpop(); |
KSpush(ob); KSexecuteString(" (mathcap data is ) message message "); |
KSpush(ob); KSexecuteString(" (mathcap data is ) message message "); |
Line 56 char *Sm1_popString(void) { |
|
Line 59 char *Sm1_popString(void) { |
|
int Sm1_setName(void) |
int Sm1_setName(void) |
{ |
{ |
char *s; |
char *s; |
struct object ob; |
struct object ob = OINIT; |
s = Sm1_popString(); |
s = Sm1_popString(); |
if (s == NULL) { |
if (s == NULL) { |
printf("NULL argument for setName.\n"); |
printf("NULL argument for setName.\n"); |
Line 72 int Sm1_setName(void) |
|
Line 75 int Sm1_setName(void) |
|
int Sm1_evalName(void) |
int Sm1_evalName(void) |
{ |
{ |
char *s; |
char *s; |
struct object ob; |
struct object ob = OINIT; |
s = Sm1_popString(); |
s = Sm1_popString(); |
if (s == NULL) { |
if (s == NULL) { |
printf("NULL argument for evalName.\n"); |
printf("NULL argument for evalName.\n"); |
Line 100 int Sm1_popCMO(ox_stream fp,int serial) |
|
Line 103 int Sm1_popCMO(ox_stream fp,int serial) |
|
|
|
int Sm1_pushError2(int serial, int no, char *s) |
int Sm1_pushError2(int serial, int no, char *s) |
{ |
{ |
struct object ob; |
struct object ob = OINIT; |
ob = KnewErrorPacket(serial,no,s); |
ob = KnewErrorPacket(serial,no,s); |
KSpush(ob); |
KSpush(ob); |
} |
} |
Line 140 void Sm1_dupErrors(void) { |
|
Line 143 void Sm1_dupErrors(void) { |
|
} |
} |
|
|
void Sm1_pushCMOtag(int serial) { |
void Sm1_pushCMOtag(int serial) { |
struct object obj; |
struct object obj = OINIT; |
int t; |
int t; |
obj = KSpeek(0); |
obj = KSpeek(0); |
t = KgetCmoTagOfObject(obj); |
t = KgetCmoTagOfObject(obj); |