[BACK]Return to strobj.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Diff for /OpenXM_contrib2/asir2000/builtin/strobj.c between version 1.25 and 1.26

version 1.25, 2004/03/05 01:34:24 version 1.26, 2004/03/05 01:47:19
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/builtin/strobj.c,v 1.24 2004/03/05 01:19:09 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/strobj.c,v 1.25 2004/03/05 01:34:24 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 119  static char *(*conv_rule)(char *);
Line 119  static char *(*conv_rule)(char *);
 static char **dp_vars;  static char **dp_vars;
 static int dp_vars_len;  static int dp_vars_len;
 static char *dp_vars_prefix;  static char *dp_vars_prefix;
   static FUNC convfunc;
   
 static struct {  static struct {
         char *name;          char *name;
Line 202  END:
Line 203  END:
         return r;          return r;
 }  }
   
   char *call_convfunc(char *name)
   {
           STRING str,r;
           NODE arg;
   
           MKSTR(str,name);
           arg = mknode(1,str);
           r = (STRING)bevalf(convfunc,arg);
           if ( !r || OID(r) != O_STR )
                   error("call_convfunc : invalid result");
           return BDY(r);
   }
   
 int register_symbol_table(Obj arg)  int register_symbol_table(Obj arg)
 {  {
         NODE n,t;          NODE n,t;
Line 248  int register_symbol_table(Obj arg)
Line 262  int register_symbol_table(Obj arg)
         return 1;          return 1;
 }  }
   
   
 int register_conv_rule(Obj arg)  int register_conv_rule(Obj arg)
 {  {
         if ( INT(arg) ) {          if ( INT(arg) ) {
Line 264  int register_conv_rule(Obj arg)
Line 279  int register_conv_rule(Obj arg)
                                 return 0;                                  return 0;
                                 break;                                  break;
                 }                  }
           } else if ( OID(arg) == O_P &&
                   (int)(VR((P)arg))->attr == V_SR ) {
                   convfunc = (FUNC)(VR((P)arg)->priv);
                   /* f must be a function which takes single argument */
                   conv_rule = call_convfunc;
                   return 1;
         } else return 0;          } else return 0;
 }  }
   

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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