version 1.1, 1999/10/08 02:12:05 |
version 1.4, 1999/11/27 01:41:11 |
|
|
|
/*$OpenXM: OpenXM/src/kan96xx/plugin/cmo.c,v 1.3 1999/11/18 23:57:19 takayama Exp $*/ |
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
#include <netinet/in.h> |
/* #include <netinet/in.h> */ |
#include <stdlib.h> |
#include <stdlib.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
Line 36 int CmoClientMode = 1; /* This flag is used to transl |
|
Line 37 int CmoClientMode = 1; /* This flag is used to transl |
|
**************************************************************************/ |
**************************************************************************/ |
/* If you change the format of mathcap, do the follows. |
/* If you change the format of mathcap, do the follows. |
Mofify cmoCheckMathCap in oxmisc2.c, |
Mofify cmoCheckMathCap in oxmisc2.c, |
oxReq, SM_setMathCap:, and |
oxSendMathCap in oxmisc.c, |
|
newMathCap in cmo.c, |
|
oxReq, SM_setMathCap: in oxmisc2.c, and |
grep mathCap and make all modifications. |
grep mathCap and make all modifications. |
*/ |
*/ |
|
|
Line 86 struct cmoBuffer *cmoOutputToBuf(cmoAction a,void *dat |
|
Line 89 struct cmoBuffer *cmoOutputToBuf(cmoAction a,void *dat |
|
break; |
break; |
case CMOPUT: |
case CMOPUT: |
for (i=0; i<size; i++) { |
for (i=0; i<size; i++) { |
fp2fputc(((char *)data)[i], b.fp); |
fp2fputc((int) ((char *)data)[i], b.fp); |
} |
} |
break; |
break; |
case CMOFLUSH: |
case CMOFLUSH: |
Line 195 cmoToStream(struct object cmoObj,struct object of) |
|
Line 198 cmoToStream(struct object cmoObj,struct object of) |
|
s = (char *)(cb->buf); |
s = (char *)(cb->buf); |
for (i=0; i<size; i++) { |
for (i=0; i<size; i++) { |
if (file2) { |
if (file2) { |
fp2fputc(s[i],(FILE2 *)(of.rc.voidp)); |
fp2fputc((int) s[i],(FILE2 *)(of.rc.voidp)); |
}else{ |
}else{ |
fputc(s[i],of.rc.file); |
fputc((int) s[i],of.rc.file); |
} |
} |
} |
} |
} |
} |
Line 1317 struct object newMathCap(struct mathCap *mathcap){ |
|
Line 1320 struct object newMathCap(struct mathCap *mathcap){ |
|
struct object ob3; |
struct object ob3; |
struct object obOx; |
struct object obOx; |
struct object obSm; |
struct object obSm; |
|
struct object ob3tmp; |
struct object *obp; |
struct object *obp; |
int i; |
int i,j; |
struct object mathinfo; |
struct object mathinfo; |
|
|
rob = newObjectArray(3); |
rob = newObjectArray(3); |
Line 1328 struct object newMathCap(struct mathCap *mathcap){ |
|
Line 1332 struct object newMathCap(struct mathCap *mathcap){ |
|
for (i=0; i<getoaSize(mathinfo); i++) { |
for (i=0; i<getoaSize(mathinfo); i++) { |
putoa(ob1,i,getoa(mathinfo,i)); |
putoa(ob1,i,getoa(mathinfo,i)); |
} |
} |
ob2 = newObjectArray(mathcap->n); |
ob3 = newObjectArray(mathcap->oxSize); |
for (i=0; i<mathcap->n; i++) { |
|
putoa(ob2,i,KpoInteger((mathcap->cmo)[i])); |
|
} |
|
obOx = newObjectArray(mathcap->oxSize); |
|
for (i=0; i<mathcap->oxSize; i++) { |
for (i=0; i<mathcap->oxSize; i++) { |
putoa(obOx,i,KpoInteger((mathcap->ox)[i])); |
ob3tmp = newObjectArray(2); |
|
putoa(ob3tmp,0,KpoInteger((mathcap->ox)[i])); |
|
ob2 = newObjectArray(mathcap->n); |
|
for (j=0; j<mathcap->n; j++) { |
|
putoa(ob2,j,KpoInteger((mathcap->cmo)[j])); |
|
} |
|
putoa(ob3tmp,1,ob2); |
|
putoa(ob3,i,ob3tmp); |
} |
} |
ob3 = newObjectArray(2); |
|
putoa(ob3,0,obOx); |
|
putoa(ob3,1,ob2); |
|
|
|
obSm = newObjectArray(mathcap->smSize); |
obSm = newObjectArray(mathcap->smSize); |
for (i=0; i<mathcap->smSize; i++) { |
for (i=0; i<mathcap->smSize; i++) { |