1
0
mirror of https://github.com/rfivet/uemacs.git synced 2025-11-18 09:11:17 -05:00

Review usage of mlreply/ macarg/ gettokval according to execution context.

This commit is contained in:
2015-09-01 11:29:08 +08:00
parent 8d412dc388
commit c3f4666ff3
5 changed files with 19 additions and 17 deletions

7
eval.c
View File

@@ -344,16 +344,17 @@ static char *gtfun( char *fname) {
arg1 = arg2 = NULL ;
assert( clexec == TRUE) ; /* means macarg can be replaced by gettokval */
/* if needed, retrieve the first argument */
if (funcs[fnum].f_type >= MONAMIC) {
if( macarg( argx, sizeof argx) != TRUE)
if( TRUE != gettokval( argx, sizeof argx))
return errorm;
/* if needed, retrieve the second argument */
if (funcs[fnum].f_type >= DYNAMIC) {
arg1 = malloc( strlen( argx) + 1) ;
strcpy( arg1, argx) ;
if( macarg( argx, sizeof argx) != TRUE) {
if( TRUE != gettokval( argx, sizeof argx)) {
free( arg1) ;
return errorm;
}
@@ -362,7 +363,7 @@ static char *gtfun( char *fname) {
if (funcs[fnum].f_type >= TRINAMIC) {
arg2 = malloc( strlen( argx) + 1) ;
strcpy( arg2, argx) ;
if( macarg( argx, sizeof argx) != TRUE) {
if( TRUE != gettokval( argx, sizeof argx)) {
free( arg1) ;
free( arg2) ;
return errorm;