j4save.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* j4save.f -- translated by f2c (version 20100827).
  2. This file no longer depends on f2c.
  3. */
  4. #include "slatec-internal.hpp"
  5. integer j4save_(integer const *iwhich, integer const *ivalue, logical const *iset)
  6. {
  7. /* Initialized data */
  8. static integer iparam[9] = { 0,2,0,10,1,0,0,0,0 };
  9. /* System generated locals */
  10. integer ret_val;
  11. /* ***BEGIN PROLOGUE J4SAVE */
  12. /* ***SUBSIDIARY */
  13. /* ***PURPOSE Save or recall global variables needed by error */
  14. /* handling routines. */
  15. /* ***LIBRARY SLATEC (XERROR) */
  16. /* ***TYPE INTEGER (J4SAVE-I) */
  17. /* ***KEYWORDS ERROR MESSAGES, ERROR NUMBER, RECALL, SAVE, XERROR */
  18. /* ***AUTHOR Jones, R. E., (SNLA) */
  19. /* ***DESCRIPTION */
  20. /* Abstract */
  21. /* J4SAVE saves and recalls several global variables needed */
  22. /* by the library error handling routines. */
  23. /* Description of Parameters */
  24. /* --Input-- */
  25. /* IWHICH - Index of item desired. */
  26. /* = 1 Refers to current error number. */
  27. /* = 2 Refers to current error control flag. */
  28. /* = 3 Refers to current unit number to which error */
  29. /* messages are to be sent. (0 means use standard.) */
  30. /* = 4 Refers to the maximum number of times any */
  31. /* message is to be printed (as set by XERMAX). */
  32. /* = 5 Refers to the total number of units to which */
  33. /* each error message is to be written. */
  34. /* = 6 Refers to the 2nd unit for error messages */
  35. /* = 7 Refers to the 3rd unit for error messages */
  36. /* = 8 Refers to the 4th unit for error messages */
  37. /* = 9 Refers to the 5th unit for error messages */
  38. /* IVALUE - The value to be set for the IWHICH-th parameter, */
  39. /* if ISET is .TRUE. . */
  40. /* ISET - If ISET=.TRUE., the IWHICH-th parameter will BE */
  41. /* given the value, IVALUE. If ISET=.FALSE., the */
  42. /* IWHICH-th parameter will be unchanged, and IVALUE */
  43. /* is a dummy parameter. */
  44. /* --Output-- */
  45. /* The (old) value of the IWHICH-th parameter will be returned */
  46. /* in the function value, J4SAVE. */
  47. /* ***SEE ALSO XERMSG */
  48. /* ***REFERENCES R. E. Jones and D. K. Kahaner, XERROR, the SLATEC */
  49. /* Error-handling Package, SAND82-0800, Sandia */
  50. /* Laboratories, 1982. */
  51. /* ***ROUTINES CALLED (NONE) */
  52. /* ***REVISION HISTORY (YYMMDD) */
  53. /* 790801 DATE WRITTEN */
  54. /* 891214 Prologue converted to Version 4.0 format. (BAB) */
  55. /* 900205 Minor modifications to prologue. (WRB) */
  56. /* 900402 Added TYPE section. (WRB) */
  57. /* 910411 Added KEYWORDS section. (WRB) */
  58. /* 920501 Reformatted the REFERENCES section. (WRB) */
  59. /* ***END PROLOGUE J4SAVE */
  60. /* ***FIRST EXECUTABLE STATEMENT J4SAVE */
  61. ret_val = iparam[(0 + (0 + (*iwhich - 1 << 2))) / 4];
  62. if (*iset) {
  63. iparam[*iwhich - 1] = *ivalue;
  64. }
  65. return ret_val;
  66. } /* j4save_ */