123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- #include "slatec-internal.hpp"
- static integer const c__4 = 4;
- static integer const c__1 = 1;
- int xersve_(char const *librar, char const *subrou, char const *messg, integer
- const *kflag, integer const *nerr, integer const *level, integer *icount, ftnlen
- librar_len, ftnlen subrou_len, ftnlen messg_len)
- {
-
- static integer kountx = 0;
- static integer nmsg = 0;
-
- static char fmt_9000[] = "(\0020 ERROR MESSAGE SUMMARY\002/\002\
- LIBRARY SUBROUTINE MESSAGE START NERR\002,\002 LEVEL \
- COUNT\002)";
- static char fmt_9010[] = "(1x,a,3x,a,3x,a,3i10)";
- static char fmt_9020[] = "(\0020OTHER ERRORS NOT INDIVIDUALLY TABULATED \
- = \002,i10)";
- static char fmt_9030[] = "(1x)";
-
- integer i__1, i__2;
-
- integer i__;
- char lib[8], mes[20], sub[8];
- integer lun[5], iunit, kunit, nunit;
- static integer kount[10];
- static char libtab[8*10], mestab[20*10];
- static integer nertab[10], levtab[10];
- static char subtab[8*10];
-
- static cilist io___7 = { 0, 0, 0, fmt_9000, 0 };
- static cilist io___9 = { 0, 0, 0, fmt_9010, 0 };
- static cilist io___16 = { 0, 0, 0, fmt_9020, 0 };
- static cilist io___17 = { 0, 0, 0, fmt_9030, 0 };
- if (*kflag <= 0) {
- if (nmsg == 0) {
- return 0;
- }
- xgetua_(lun, &nunit);
- i__1 = nunit;
- for (kunit = 1; kunit <= i__1; ++kunit) {
- iunit = lun[kunit - 1];
- if (iunit == 0) {
- iunit = i1mach_(4);
- }
- io___7.ciunit = iunit;
- f2c::s_wsfe(&io___7);
- f2c::e_wsfe();
- i__2 = nmsg;
- for (i__ = 1; i__ <= i__2; ++i__) {
- io___9.ciunit = iunit;
- f2c::s_wsfe(&io___9);
- f2c::do_fio(&c__1, libtab + (i__ - 1 << 3), (ftnlen)8);
- f2c::do_fio(&c__1, subtab + (i__ - 1 << 3), (ftnlen)8);
- f2c::do_fio(&c__1, mestab + (i__ - 1) * 20, (ftnlen)20);
- f2c::do_fio(&c__1, (char *)&nertab[i__ - 1], (ftnlen)sizeof(integer));
- f2c::do_fio(&c__1, (char *)&levtab[i__ - 1], (ftnlen)sizeof(integer));
- f2c::do_fio(&c__1, (char *)&kount[i__ - 1], (ftnlen)sizeof(integer));
- f2c::e_wsfe();
- }
- if (kountx != 0) {
- io___16.ciunit = iunit;
- f2c::s_wsfe(&io___16);
- f2c::do_fio(&c__1, (char *)&kountx, (ftnlen)sizeof(integer));
- f2c::e_wsfe();
- }
- io___17.ciunit = iunit;
- f2c::s_wsfe(&io___17);
- f2c::e_wsfe();
- }
- if (*kflag == 0) {
- nmsg = 0;
- kountx = 0;
- }
- } else {
- f2c::s_copy(lib, librar, (ftnlen)8, librar_len);
- f2c::s_copy(sub, subrou, (ftnlen)8, subrou_len);
- f2c::s_copy(mes, messg, (ftnlen)20, messg_len);
- i__1 = nmsg;
- for (i__ = 1; i__ <= i__1; ++i__) {
- if (f2c::s_cmp(lib, libtab + (i__ - 1 << 3), (ftnlen)8, (ftnlen)8) ==
- 0 && f2c::s_cmp(sub, subtab + (i__ - 1 << 3), (ftnlen)8, (
- ftnlen)8) == 0 && f2c::s_cmp(mes, mestab + (i__ - 1) * 20, (
- ftnlen)20, (ftnlen)20) == 0 && *nerr == nertab[i__ - 1] &&
- *level == levtab[i__ - 1]) {
- ++kount[i__ - 1];
- *icount = kount[i__ - 1];
- return 0;
- }
- }
- if (nmsg < 10) {
- ++nmsg;
- f2c::s_copy(libtab + (i__ - 1 << 3), lib, (ftnlen)8, (ftnlen)8);
- f2c::s_copy(subtab + (i__ - 1 << 3), sub, (ftnlen)8, (ftnlen)8);
- f2c::s_copy(mestab + (i__ - 1) * 20, mes, (ftnlen)20, (ftnlen)20);
- nertab[i__ - 1] = *nerr;
- levtab[i__ - 1] = *level;
- kount[i__ - 1] = 1;
- *icount = 1;
- } else {
- ++kountx;
- *icount = 0;
- }
- }
- return 0;
- }
|