A umacr2.c stub is given below.
struct {
/* C definition for common block umac1.h
(yes it is umac1.h not umac2.h) */
char uct[4];
} umac1_;
void umacr2_( char (* lct)[15], double (* ctl)[3],
int *prt )
/* Use trailing underscore for C routine names; define input types (At
least on many machine types) */
{
/* F E A P A Finite Element Analysis Program
Copyright (c) 1984-1999: Robert L. Taylor
Purpose: User interface for adding
solution command language
instructions. C language interface by Sanjay Govindjee
Inputs:
(*lct) - Pointer to Command
character parameter string 15
(*ctl)[3] - Command numerical parameters
*prt - Flag, output if
true
Outputs:
N.B. Users are responsible for command actions. See
programmers manual for example.
*/
/* Set macro name to xxxx in common
block umac1 */ /*
Set uct variable to name you desire if uct = mac2 */
if( strcmp(umac1_.uct,"mac2")==0
) {
strcpy(umac1_.uct,"xxxx");
/* command will be known to FEAP as xxxx
*/
return;
}
/* From here down is the source that gets executed when one calls XXXX from FEAP. */
return;
}