Differences From Artifact [fae1009da6]:

To Artifact [a29d76d05e]:


1
2
3
4
5
6
7



8
9
10
11
12
13
14
function args = alias_args(args,alias,delim,message,FileID)

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.2  1998/07/27 10:24:20  peterg
## Included , in the the list of seperators (SEPS)
## This makes it substitute for bits of args separated by commas.
##
## Revision 1.1  1998/07/03 18:29:40  peterg
## Initial revision
##







>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function args = alias_args(args,alias,delim,message,FileID)

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1998/08/11 14:09:05  peterg
## Replaced incorrect length(args>0) with !isempty(args)
##
## Revision 1.2  1998/07/27 10:24:20  peterg
## Included , in the the list of seperators (SEPS)
## This makes it substitute for bits of args separated by commas.
##
## Revision 1.1  1998/07/03 18:29:40  peterg
## Initial revision
##
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
        arg_ = strrep(arg,",","__");
        if struct_contains(alias,arg_)
          eval(["new_arg = alias.", arg_,";"]);
  	  mtt_info(["Replacing ", arg, "\t by ",\
		    new_arg, message],FileID);
          arg = new_arg;
        end
        SEPS = ",+-*/";
        for j = 1:length(SEPS)
	  if length(findstr(arg,SEPS(j)))>0
	    arg = alias_args(arg,alias,SEPS(j),message,FileID);
	  end 
	end;
        args = sprintf("%s%s%s", args, delim, arg);
      end
      args = substr(args,2); % loose leading ;
    end
  end;
endfunction;







|











27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
        arg_ = strrep(arg,",","__");
        if struct_contains(alias,arg_)
          eval(["new_arg = alias.", arg_,";"]);
  	  mtt_info(["Replacing ", arg, "\t by ",\
		    new_arg, message],FileID);
          arg = new_arg;
        end
        SEPS = ",+-*/()";
        for j = 1:length(SEPS)
	  if length(findstr(arg,SEPS(j)))>0
	    arg = alias_args(arg,alias,SEPS(j),message,FileID);
	  end 
	end;
        args = sprintf("%s%s%s", args, delim, arg);
      end
      args = substr(args,2); % loose leading ;
    end
  end;
endfunction;

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]