Annotation of OpenXM/src/kan96xx/plugin/asir.hh, Revision 1.2
1.2 ! takayama 1: /* $OpenXM$ */
1.1 maekawa 2: else if (strcmp(key,"Asir_ExecuteString") == 0) {
3: if (size != 2) errorKan1("%s\n","[(Asir_ExecuteString) string] extension result.");
4: obj1 = getoa(obj,1);
5: if (obj1.tag != Sdollar) errorKan1("%s\n","[(Asir_ExecuteString) string] extension result");
6: rob = KpoInteger(Asir_ExecuteString(obj1.lc.str));
7: }
8: else if (strcmp(key,"Asir_PopString") == 0) {
9: if (size != 1) errorKan1("%s\n","[(Asir_PopString)] extension result.");
10: rob = KpoString(Asir_PopString());
11: }
12: else if (strcmp(key,"Asir_Start") == 0) {
13: if (size != 1) errorKan1("%s\n","[(Asir_Start)] extension result.");
14: rob = KpoInteger(Asir_Start());
15: }
16: else if (strcmp(key,"Asir_to_kan") == 0) {
17: if (size != 2) errorKan1("%s\n","[(Asir_to_kan) string] extension result.");
18: obj1 = getoa(obj,1);
19: if (obj1.tag != Sdollar) errorKan1("%s\n","[(Asir_to_kan) string] extension result");
20: rob = KpoString(KasirKanConvert(obj1.lc.str));
21: }
22: else if (strcmp(key,"Asir_Set") == 0) {
23: if (size != 2) errorKan1("%s\n","[(Asir_Set) string] extension result.");
24: obj1 = getoa(obj,1);
25: if (obj1.tag != Sdollar) errorKan1("%s\n","[(Asir_Set) string] extension result");
26: rob = KpoInteger(Asir_Set(obj1.lc.str));
27: }
28: else if (strcmp(key,"Asir_PushBinary") == 0) {
29: if (size != 2) errorKan1("%s\n","[(Asir_PushCmo) cmo-obj] extension result.");
30: obj1 = getoa(obj,1);
31: if (obj1.tag != CMO) {
32: errorKan1("%s\n","Argument must be cmo-object.");
33: }
34: rob=KpoInteger(Asir_PushBinary(((struct cmoBuffer *)(obj1.lc.voidp))->size,
35: (((struct cmoBuffer *)(obj1.lc.voidp))->buf)));
36: }
37: else if (strcmp(key,"Asir_PopBinary") == 0) {
38: if (size != 1) errorKan1("%s\n","[(Asir_PopCmo)] extension cmo-obj.");
39: rob.tag =CMO;
40: rob.lc.voidp = GC_malloc(sizeof(struct cmoBuffer));
41: if (rob.lc.voidp == NULL) {
42: fprintf(stderr,"No more memory.");
43: }
44: ((struct cmoBuffer *)(rob.lc.voidp))->buf = Asir_PopBinary(&size);
45: ((struct cmoBuffer *)(rob.lc.voidp))->size = size;
46: ((struct cmoBuffer *)(rob.lc.voidp))->pos = size;
47: ((struct cmoBuffer *)(rob.lc.voidp))->rpos = 0;
48: }
49:
50:
51:
52:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>