version 1.2, 2000/08/21 08:31:46 |
version 1.6, 2003/05/14 06:20:11 |
|
|
* shall be made on your publication or presentation in any form of the |
* shall be made on your publication or presentation in any form of the |
* results obtained by use of the SOFTWARE. |
* results obtained by use of the SOFTWARE. |
* (4) In the event that you modify the SOFTWARE, you shall notify FLL by |
* (4) In the event that you modify the SOFTWARE, you shall notify FLL by |
* e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification |
* e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification |
* for such modification or the source code of the modified part of the |
* for such modification or the source code of the modified part of the |
* SOFTWARE. |
* SOFTWARE. |
* |
* |
|
|
* 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/parse/comp.c,v 1.1.1.1 1999/12/03 07:39:11 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/comp.c,v 1.5 2001/06/04 02:49:48 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
#include "comp.h" |
#include "comp.h" |
#if defined(THINK_C) || defined(VISUAL) |
#if defined(VISUAL) || (defined(__MACH__) && defined(__ppc__)) |
#include <stdarg.h> |
#include <stdarg.h> |
#else |
#else |
#include <varargs.h> |
#include <varargs.h> |
|
|
|
|
extern f_return; |
extern f_return; |
|
|
#if defined(THINK_C) || defined(VISUAL) |
#if defined(VISUAL) || (defined(__MACH__) && defined(__ppc__)) |
void call_usrf(FUNC f,...) |
void call_usrf(FUNC f,...) |
{ |
{ |
va_list ap; |
va_list ap; |
int ac,i; |
int ac,i; |
pointer *c; |
pointer *c; |
|
VS prev_mpvs; |
NODE tn; |
NODE tn; |
|
|
va_start(ap,f); |
va_start(ap,f); |
Line 71 void call_usrf(FUNC f,...) |
|
Line 72 void call_usrf(FUNC f,...) |
|
notdef(0,0,0,0); |
notdef(0,0,0,0); |
else { |
else { |
pushpvs(f); |
pushpvs(f); |
|
if ( f->f.usrf->module ) { |
|
prev_mpvs = MPVS; |
|
MPVS = f->f.usrf->module->pvs; |
|
} |
ac = va_arg(ap,int); |
ac = va_arg(ap,int); |
for ( i = 0, tn = f->f.usrf->args; i < ac; |
for ( i = 0, tn = f->f.usrf->args; i < ac; |
i++, tn = NEXT(tn) ) |
i++, tn = NEXT(tn) ) |
Line 78 void call_usrf(FUNC f,...) |
|
Line 83 void call_usrf(FUNC f,...) |
|
c = va_arg(ap,pointer *); *c = evalstat(BDY(f->f.usrf)); |
c = va_arg(ap,pointer *); *c = evalstat(BDY(f->f.usrf)); |
va_end(ap); |
va_end(ap); |
f_return = 0; poppvs(); |
f_return = 0; poppvs(); |
|
if ( f->f.usrf->module ) |
|
MPVS = prev_mpvs; |
} |
} |
} |
} |
#else |
#else |
|
|
int ac,i; |
int ac,i; |
FUNC f; |
FUNC f; |
pointer a,b,*c; |
pointer a,b,*c; |
|
VS prev_mpvs; |
NODE tn; |
NODE tn; |
|
|
va_start(ap); f = va_arg(ap,FUNC); |
va_start(ap); f = va_arg(ap,FUNC); |
|
|
notdef(0,0,0,0); |
notdef(0,0,0,0); |
else { |
else { |
pushpvs(f); |
pushpvs(f); |
|
if ( f->f.usrf->module ) { |
|
prev_mpvs = MPVS; |
|
MPVS = f->f.usrf->module->pvs; |
|
} |
ac = va_arg(ap,int); |
ac = va_arg(ap,int); |
for ( i = 0, tn = f->f.usrf->args; i < ac; |
for ( i = 0, tn = f->f.usrf->args; i < ac; |
i++, tn = NEXT(tn) ) |
i++, tn = NEXT(tn) ) |
ASSPV((int)FA0((FNODE)BDY(tn)),va_arg(ap,pointer)); |
ASSPV((int)FA0((FNODE)BDY(tn)),va_arg(ap,pointer)); |
c = va_arg(ap,pointer *); *c = evalstat(BDY(f->f.usrf)); |
c = va_arg(ap,pointer *); *c = evalstat(BDY(f->f.usrf)); |
f_return = 0; poppvs(); |
f_return = 0; poppvs(); |
|
if ( f->f.usrf->module ) |
|
MPVS = prev_mpvs; |
} |
} |
} |
} |
#endif |
#endif |