xgetua.cpp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* xgetua.f -- translated by f2c (version 20100827).
  2. This file no longer depends on f2c.
  3. */
  4. #include "slatec-internal.hpp"
  5. /* Table of constant values */
  6. static integer const c__5 = 5;
  7. static integer const c__0 = 0;
  8. static logical c_false = FALSE_;
  9. int xgetua_(integer *iunita, integer *n)
  10. {
  11. /* System generated locals */
  12. integer i__1;
  13. /* Local variables */
  14. integer i__, index;
  15. /* ***BEGIN PROLOGUE XGETUA */
  16. /* ***PURPOSE Return unit number(s) to which error messages are being */
  17. /* sent. */
  18. /* ***LIBRARY SLATEC (XERROR) */
  19. /* ***CATEGORY R3C */
  20. /* ***TYPE ALL (XGETUA-A) */
  21. /* ***KEYWORDS ERROR, XERROR */
  22. /* ***AUTHOR Jones, R. E., (SNLA) */
  23. /* ***DESCRIPTION */
  24. /* Abstract */
  25. /* XGETUA may be called to determine the unit number or numbers */
  26. /* to which error messages are being sent. */
  27. /* These unit numbers may have been set by a call to XSETUN, */
  28. /* or a call to XSETUA, or may be a default value. */
  29. /* Description of Parameters */
  30. /* --Output-- */
  31. /* IUNIT - an array of one to five unit numbers, depending */
  32. /* on the value of N. A value of zero refers to the */
  33. /* default unit, as defined by the I1MACH machine */
  34. /* constant routine. Only IUNIT(1),...,IUNIT(N) are */
  35. /* defined by XGETUA. The values of IUNIT(N+1),..., */
  36. /* IUNIT(5) are not defined (for N .LT. 5) or altered */
  37. /* in any way by XGETUA. */
  38. /* N - the number of units to which copies of the */
  39. /* error messages are being sent. N will be in the */
  40. /* range from 1 to 5. */
  41. /* ***REFERENCES R. E. Jones and D. K. Kahaner, XERROR, the SLATEC */
  42. /* Error-handling Package, SAND82-0800, Sandia */
  43. /* Laboratories, 1982. */
  44. /* ***ROUTINES CALLED J4SAVE */
  45. /* ***REVISION HISTORY (YYMMDD) */
  46. /* 790801 DATE WRITTEN */
  47. /* 861211 REVISION DATE from Version 3.2 */
  48. /* 891214 Prologue converted to Version 4.0 format. (BAB) */
  49. /* 920501 Reformatted the REFERENCES section. (WRB) */
  50. /* ***END PROLOGUE XGETUA */
  51. /* ***FIRST EXECUTABLE STATEMENT XGETUA */
  52. /* Parameter adjustments */
  53. --iunita;
  54. /* Function Body */
  55. *n = j4save_(&c__5, &c__0, &c_false);
  56. i__1 = *n;
  57. for (i__ = 1; i__ <= i__1; ++i__) {
  58. index = i__ + 4;
  59. if (i__ == 1) {
  60. index = 3;
  61. }
  62. iunita[i__] = j4save_(&index, &c__0, &c_false);
  63. /* L30: */
  64. }
  65. return 0;
  66. } /* xgetua_ */