integer function ixsav (ipar, ivalue, iset) C***BEGIN PROLOGUE IXSAV C***SUBSIDIARY C***PURPOSE Save and recall error message control parameters. C***CATEGORY R3C C***TYPE ALL (IXSAV-A) C***AUTHOR Hindmarsh, Alan C., (LLNL) C***DESCRIPTION C C IXSAV saves and recalls one of two error message parameters: C LUNIT, the logical unit number to which messages are printed, and C MESFLG, the message print flag. C This is a modification of the SLATEC library routine J4SAVE. C C Saved local variables.. c lunit = logical unit number for messages. the default is obtained c by a call to iumach (may be machine-dependent). c mesflg = print control flag.. c 1 means print all messages (the default). c 0 means no printing. C C On input.. c ipar = parameter indicator (1 for lunit, 2 for mesflg). c ivalue = the value to be set for the parameter, if iset = .true. c iset = logical flag to indicate whether to read or write. c if iset = .true., the parameter will be given c the value ivalue. if iset = .false., the parameter c will be unchanged, and ivalue is a dummy argument. C C On return.. C IXSAV = The (old) value of the parameter. C C***SEE ALSO XERRWD, XERRWV C***ROUTINES CALLED IUMACH C***REVISION HISTORY (YYMMDD) C 921118 DATE WRITTEN C 930329 Modified prologue to SLATEC format. (FNF) C 930915 Added IUMACH call to get default output unit. (ACH) C 930922 Minor cosmetic changes. (FNF) C 010425 Type declaration for IUMACH added. (ACH) C***END PROLOGUE IXSAV C C Subroutines called by IXSAV.. None C Function routine called by IXSAV.. IUMACH C----------------------------------------------------------------------- C**End logical iset integer ipar, ivalue c----------------------------------------------------------------------- integer iumach, lunit, mesflg c----------------------------------------------------------------------- c the following fortran-77 declaration is to cause the values of the c listed (local) variables to be saved between calls to this routine. c----------------------------------------------------------------------- save lunit, mesflg data lunit/-1/, mesflg/1/ c c***first executable statement ixsav if (ipar .eq. 1) then if (lunit .eq. -1) lunit = iumach() ixsav = lunit if (iset) lunit = ivalue endif c if (ipar .eq. 2) then ixsav = mesflg if (iset) mesflg = ivalue endif c return c----------------------- end of function ixsav ------------------------- end