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