[BACK]Return to sm1stackmachine.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kxx

Diff for /OpenXM/src/kxx/sm1stackmachine.c between version 1.1 and 1.4

version 1.1, 1999/10/08 02:12:13 version 1.4, 2005/06/16 05:07:24
Line 31  int Sm1_start(int argc, char *fnames[],char *myname) {
Line 31  int Sm1_start(int argc, char *fnames[],char *myname) {
     for (i=0; i<argc; i++) {      for (i=0; i<argc; i++) {
       /* load files from the search path */        /* load files from the search path */
       if (strlen(fnames[i]) > 1024) {        if (strlen(fnames[i]) > 1024) {
         fprintf(stderr,"Too long name for sm1 library file to load.\n");          fprintf(stderr,"Too long name for sm1 library file to load.\n");
         exit(10);          exit(10);
       }        }
       sprintf(cmd," [(parse) (%s) pushfile ] extension pop ",fnames[i]);        sprintf(cmd," [(parse) (%s) pushfile ] extension pop ",fnames[i]);
       KSexecuteString(cmd);        KSexecuteString(cmd);
Line 57  int Sm1_setMathCap(ox_stream os) {
Line 57  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 93  char *Sm1_popString(void) {
Line 93  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 109  int Sm1_setName(void)
Line 109  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 137  int Sm1_popCMO(ox_stream fp,int serial)
Line 137  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 176  void Sm1_dupErrors(void) {
Line 176  void Sm1_dupErrors(void) {
   KSpush(KSdupErrors());    KSpush(KSdupErrors());
 }  }
   
   void Sm1_pushCMOtag(int serial) {
     struct object obj = OINIT;
     int t;
     obj = KSpeek(0);
     t = KgetCmoTagOfObject(obj);
     if (t != -1) {
       KSpush(KpoInteger(t));
     }else{
       Sm1_pushError2(serial,-1,"The top object on the server stack cannot be translated to cmo.");
     }
   }
   
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>