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:
7
eval.c
7
eval.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user