1 /* zzddhmnm.f -- translated by f2c (version 19980913).
2 You must link the resulting object file with the libraries:
3 -lf2c -lm (in that order)
4 */
5
6 #include "f2c.h"
7
8 /* Table of constant values */
9
10 static integer c__1 = 1;
11 static integer c__20 = 20;
12
13 /* $Procedure ZZDDHMNM ( Return unique enough DP number for a file ) */
zzddhmnm_(integer * unit)14 doublereal zzddhmnm_(integer *unit)
15 {
16 /* Initialized data */
17
18 static logical first = TRUE_;
19 static integer natbff = 0;
20
21 /* System generated locals */
22 integer i__1;
23 doublereal ret_val;
24
25 /* Builtin functions */
26 integer s_rdue(cilist *), do_uio(integer *, char *, ftnlen), e_rdue(void),
27 s_cmp(char *, char *, ftnlen, ftnlen), s_rnge(char *, integer,
28 char *, integer);
29
30 /* Local variables */
31 char arch[8], type__[8];
32 extern /* Subroutine */ int zzddhini_(integer *, integer *, integer *,
33 char *, char *, char *, ftnlen, ftnlen, ftnlen), zzddhppf_(
34 integer *, integer *, integer *), zzxlatei_(integer *, char *,
35 integer *, integer *, ftnlen);
36 integer i__;
37 extern /* Subroutine */ int chkin_(char *, ftnlen), idw2at_(char *, char *
38 , char *, ftnlen, ftnlen, ftnlen);
39 extern logical failed_(void);
40 extern integer isrchi_(integer *, integer *, integer *);
41 char idword[8], strbff[8*4];
42 static integer supbff[4];
43 extern /* Subroutine */ int chkout_(char *, ftnlen);
44 char stramh[8*4], strarc[8*2];
45 integer intarr[20], iostat;
46 char strbuf[80];
47 integer supidx;
48 extern logical return_(void);
49 static integer numsup;
50 integer bff;
51 doublereal mnm;
52
53 /* Fortran I/O blocks */
54 static cilist io___10 = { 1, 0, 1, 0, 1 };
55 static cilist io___18 = { 1, 0, 1, 0, 1 };
56 static cilist io___20 = { 1, 0, 1, 0, 0 };
57
58
59 /* $ Abstract */
60
61 /* SPICE Private routine intended solely for the support of SPICE */
62 /* routines. Users should not call this routine directly due */
63 /* to the volatile nature of this routine. */
64
65 /* Return a unique enough DP number ("Magic NuMber") computed */
66 /* using the contents of the file attached to the specified unit. */
67
68 /* $ Disclaimer */
69
70 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
71 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
72 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
73 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
74 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
75 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
76 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
77 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
78 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
79 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
80
81 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
82 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
83 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
84 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
85 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
86 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
87
88 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
89 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
90 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
91 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
92
93 /* $ Required_Reading */
94
95 /* None. */
96
97 /* $ Keywords */
98
99 /* PRIVATE */
100
101 /* $ Declarations */
102
103 /* $ Abstract */
104
105 /* Parameter declarations for the DAF/DAS handle manager. */
106
107 /* $ Disclaimer */
108
109 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
110 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
111 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
112 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
113 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
114 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
115 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
116 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
117 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
118 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
119
120 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
121 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
122 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
123 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
124 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
125 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
126
127 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
128 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
129 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
130 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
131
132 /* $ Required_Reading */
133
134 /* DAF, DAS */
135
136 /* $ Keywords */
137
138 /* PRIVATE */
139
140 /* $ Particulars */
141
142 /* This include file contains parameters defining limits and */
143 /* integer codes that are utilized in the DAF/DAS handle manager */
144 /* routines. */
145
146 /* $ Restrictions */
147
148 /* None. */
149
150 /* $ Author_and_Institution */
151
152 /* F.S. Turner (JPL) */
153
154 /* $ Literature_References */
155
156 /* None. */
157
158 /* $ Version */
159
160 /* - SPICELIB Version 2.5.0, 10-MAR-2014 (BVS) */
161
162 /* Updated for SUN-SOLARIS-64BIT-INTEL. */
163
164 /* - SPICELIB Version 2.4.0, 10-MAR-2014 (BVS) */
165
166 /* Updated for PC-LINUX-64BIT-IFORT. */
167
168 /* - SPICELIB Version 2.3.0, 10-MAR-2014 (BVS) */
169
170 /* Updated for PC-CYGWIN-GFORTRAN. */
171
172 /* - SPICELIB Version 2.2.0, 10-MAR-2014 (BVS) */
173
174 /* Updated for PC-CYGWIN-64BIT-GFORTRAN. */
175
176 /* - SPICELIB Version 2.1.0, 10-MAR-2014 (BVS) */
177
178 /* Updated for PC-CYGWIN-64BIT-GCC_C. */
179
180 /* - SPICELIB Version 2.0.0, 12-APR-2012 (BVS) */
181
182 /* Increased FTSIZE (from 1000 to 5000). */
183
184 /* - SPICELIB Version 1.20.0, 13-MAY-2010 (BVS) */
185
186 /* Updated for SUN-SOLARIS-INTEL. */
187
188 /* - SPICELIB Version 1.19.0, 13-MAY-2010 (BVS) */
189
190 /* Updated for SUN-SOLARIS-INTEL-CC_C. */
191
192 /* - SPICELIB Version 1.18.0, 13-MAY-2010 (BVS) */
193
194 /* Updated for SUN-SOLARIS-INTEL-64BIT-CC_C. */
195
196 /* - SPICELIB Version 1.17.0, 13-MAY-2010 (BVS) */
197
198 /* Updated for SUN-SOLARIS-64BIT-NATIVE_C. */
199
200 /* - SPICELIB Version 1.16.0, 13-MAY-2010 (BVS) */
201
202 /* Updated for PC-WINDOWS-64BIT-IFORT. */
203
204 /* - SPICELIB Version 1.15.0, 13-MAY-2010 (BVS) */
205
206 /* Updated for PC-LINUX-64BIT-GFORTRAN. */
207
208 /* - SPICELIB Version 1.14.0, 13-MAY-2010 (BVS) */
209
210 /* Updated for PC-64BIT-MS_C. */
211
212 /* - SPICELIB Version 1.13.0, 13-MAY-2010 (BVS) */
213
214 /* Updated for MAC-OSX-64BIT-INTEL_C. */
215
216 /* - SPICELIB Version 1.12.0, 13-MAY-2010 (BVS) */
217
218 /* Updated for MAC-OSX-64BIT-IFORT. */
219
220 /* - SPICELIB Version 1.11.0, 13-MAY-2010 (BVS) */
221
222 /* Updated for MAC-OSX-64BIT-GFORTRAN. */
223
224 /* - SPICELIB Version 1.10.0, 18-MAR-2009 (BVS) */
225
226 /* Updated for PC-LINUX-GFORTRAN. */
227
228 /* - SPICELIB Version 1.9.0, 18-MAR-2009 (BVS) */
229
230 /* Updated for MAC-OSX-GFORTRAN. */
231
232 /* - SPICELIB Version 1.8.0, 19-FEB-2008 (BVS) */
233
234 /* Updated for PC-LINUX-IFORT. */
235
236 /* - SPICELIB Version 1.7.0, 14-NOV-2006 (BVS) */
237
238 /* Updated for PC-LINUX-64BIT-GCC_C. */
239
240 /* - SPICELIB Version 1.6.0, 14-NOV-2006 (BVS) */
241
242 /* Updated for MAC-OSX-INTEL_C. */
243
244 /* - SPICELIB Version 1.5.0, 14-NOV-2006 (BVS) */
245
246 /* Updated for MAC-OSX-IFORT. */
247
248 /* - SPICELIB Version 1.4.0, 14-NOV-2006 (BVS) */
249
250 /* Updated for PC-WINDOWS-IFORT. */
251
252 /* - SPICELIB Version 1.3.0, 26-OCT-2005 (BVS) */
253
254 /* Updated for SUN-SOLARIS-64BIT-GCC_C. */
255
256 /* - SPICELIB Version 1.2.0, 03-JAN-2005 (BVS) */
257
258 /* Updated for PC-CYGWIN_C. */
259
260 /* - SPICELIB Version 1.1.0, 03-JAN-2005 (BVS) */
261
262 /* Updated for PC-CYGWIN. */
263
264 /* - SPICELIB Version 1.0.1, 17-JUL-2002 */
265
266 /* Added MAC-OSX environments. */
267
268 /* - SPICELIB Version 1.0.0, 07-NOV-2001 */
269
270 /* -& */
271
272 /* Unit and file table size parameters. */
273
274 /* FTSIZE is the maximum number of files (DAS and DAF) that a */
275 /* user may have open simultaneously. */
276
277
278 /* RSVUNT is the number of units protected from being locked */
279 /* to a particular handle by ZZDDHHLU. */
280
281
282 /* SCRUNT is the number of units protected for use by scratch */
283 /* files. */
284
285
286 /* UTSIZE is the maximum number of logical units this manager */
287 /* will utilize at one time. */
288
289
290 /* Access method enumeration. These parameters are used to */
291 /* identify which access method is associated with a particular */
292 /* handle. They need to be synchronized with the STRAMH array */
293 /* defined in ZZDDHGSD in the following fashion: */
294
295 /* STRAMH ( READ ) = 'READ' */
296 /* STRAMH ( WRITE ) = 'WRITE' */
297 /* STRAMH ( SCRTCH ) = 'SCRATCH' */
298 /* STRAMH ( NEW ) = 'NEW' */
299
300 /* These values are used in the file table variable FTAMH. */
301
302
303 /* Binary file format enumeration. These parameters are used to */
304 /* identify which binary file format is associated with a */
305 /* particular handle. They need to be synchronized with the STRBFF */
306 /* array defined in ZZDDHGSD in the following fashion: */
307
308 /* STRBFF ( BIGI3E ) = 'BIG-IEEE' */
309 /* STRBFF ( LTLI3E ) = 'LTL-IEEE' */
310 /* STRBFF ( VAXGFL ) = 'VAX-GFLT' */
311 /* STRBFF ( VAXDFL ) = 'VAX-DFLT' */
312
313 /* These values are used in the file table variable FTBFF. */
314
315
316 /* Some random string lengths... more documentation required. */
317 /* For now this will have to suffice. */
318
319
320 /* Architecture enumeration. These parameters are used to identify */
321 /* which file architecture is associated with a particular handle. */
322 /* They need to be synchronized with the STRARC array defined in */
323 /* ZZDDHGSD in the following fashion: */
324
325 /* STRARC ( DAF ) = 'DAF' */
326 /* STRARC ( DAS ) = 'DAS' */
327
328 /* These values will be used in the file table variable FTARC. */
329
330
331 /* For the following environments, record length is measured in */
332 /* characters (bytes) with eight characters per double precision */
333 /* number. */
334
335 /* Environment: Sun, Sun FORTRAN */
336 /* Source: Sun Fortran Programmer's Guide */
337
338 /* Environment: PC, MS FORTRAN */
339 /* Source: Microsoft Fortran Optimizing Compiler User's Guide */
340
341 /* Environment: Macintosh, Language Systems FORTRAN */
342 /* Source: Language Systems FORTRAN Reference Manual, */
343 /* Version 1.2, page 12-7 */
344
345 /* Environment: PC/Linux, g77 */
346 /* Source: Determined by experiment. */
347
348 /* Environment: PC, Lahey F77 EM/32 Version 4.0 */
349 /* Source: Lahey F77 EM/32 Language Reference Manual, */
350 /* page 144 */
351
352 /* Environment: HP-UX 9000/750, FORTRAN/9000 Series 700 computers */
353 /* Source: FORTRAN/9000 Reference-Series 700 Computers, */
354 /* page 5-110 */
355
356 /* Environment: NeXT Mach OS (Black Hardware), */
357 /* Absoft Fortran Version 3.2 */
358 /* Source: NAIF Program */
359
360
361 /* The following parameter defines the size of a string used */
362 /* to store a filenames on this target platform. */
363
364
365 /* The following parameter controls the size of the character record */
366 /* buffer used to read data from non-native files. */
367
368 /* $ Brief_I/O */
369
370 /* VARIABLE I/O DESCRIPTION */
371 /* -------- --- -------------------------------------------------- */
372 /* UNIT I Logical unit attached to a file. */
373
374 /* The function returns a unique enough DP number computed */
375 /* using the contents of the file attached to the UNIT. */
376
377 /* $ Detailed_Input */
378
379 /* UNIT is the logical unit attached to a file opened for */
380 /* direct access prior to calling this routine. */
381
382 /* $ Detailed_Output */
383
384 /* The function returns a DP number, computed using a few integers */
385 /* read from the file attached to the UNIT, that is unique enough */
386 /* for the handle manager to check if two files opened for READ */
387 /* access are not the same file. */
388
389 /* If reading the first record of the file or any of the lower level */
390 /* routines called by this function fail for any reason, the */
391 /* returned value is set to 0.D0. */
392
393 /* $ Parameters */
394
395 /* IDLEN is the length of the ID word. */
396
397 /* NINTS is the number of integers that will be read from */
398 /* a particular record of the file. NINTS must be */
399 /* big enough to make sure that unique pointers from */
400 /* the file record of DAF and DAS files are read and */
401 /* used to compute the output value. */
402
403 /* The function also uses some DDH general parameters from */
404 /* zzddhman.inc. */
405
406 /* $ Exceptions */
407
408 /* Error free. */
409
410 /* This routine and routines in its call tree signal several */
411 /* SPICE(BUG) exceptions. They are signaled if the module or modules */
412 /* in its calling tree are improperly configured to run on this */
413 /* platform. */
414
415 /* $ Files */
416
417 /* The input UNIT must be attached to a file opened for direct */
418 /* access prior to calling this function. */
419
420 /* $ Particulars */
421
422 /* This function reads the first IDLEN characters (assumed to be the */
423 /* ID word) followed by NINTS integers from the first record of the */
424 /* direct access file attached to the input UNIT. */
425
426 /* If successful, it examines the ID word to determine the file */
427 /* architecture. */
428
429 /* For DAF files it then tries to determine the binary format. */
430
431 /* For DAF files in the native binary format, it adds up NINTS */
432 /* integers read from the first record to get initial output value. */
433 /* Then it reads additional NINTS integers from the first descriptor */
434 /* record and, if the second read is successful, it adds these */
435 /* additional integers to the output value. */
436
437 /* For DAF files in a non-native binary format supported by run-time */
438 /* translation, it re-read NINTS integers from the first record as */
439 /* characters, converts them to NINTS integers using ZZXLATEI, and */
440 /* adds them up to get initial output value. Then it reads as */
441 /* characters NINTS integers from the first descriptor record of the */
442 /* file, converts them to NINTS integers using ZZXLATEI and ,if the */
443 /* second read is successful, it adds these additional integers to */
444 /* the output value. */
445
446 /* For DAS files, text kernels and unrecognized files, it simply */
447 /* adds up NINTS integers to get the output value. */
448
449 /* If the initial read is not successful, the output value is set to */
450 /* zero. */
451
452 /* $ Examples */
453
454 /* See the caller routine, ZZDDHF2H. */
455
456 /* $ Restrictions */
457
458 /* The input UNIT must be attached to a file opened for direct */
459 /* access prior to calling this function. */
460
461 /* $ Literature_References */
462
463 /* None. */
464
465 /* $ Author_and_Institution */
466
467 /* B.B. Semenov (JPL) */
468
469 /* $ Version */
470
471 /* - SPICELIB Version 1.0.0, 26-APR-2012 (BVS) */
472
473 /* -& */
474
475 /* SPICELIB Functions */
476
477
478 /* Local parameters. */
479
480 /* Character buffer size consistent with the number of integers */
481 /* that will be read from the file. */
482
483
484 /* Minimum and maximum values for the range of ASCII printing */
485 /* characters. */
486
487
488 /* Local variables. */
489
490
491 /* Saved variables. */
492
493
494 /* Data statements. */
495
496
497 /* Set default output value to zero. */
498
499 mnm = 0.;
500 ret_val = 0.;
501
502 /* Standard SPICE error handling. */
503
504 if (return_()) {
505 return ret_val;
506 } else {
507 chkin_("ZZDDHMNM", (ftnlen)8);
508 }
509
510 /* Perform some initialization tasks. */
511
512 if (first) {
513 zzddhini_(&natbff, supbff, &numsup, stramh, strarc, strbff, (ftnlen)8,
514 (ftnlen)8, (ftnlen)8);
515
516 /* Check FAILED() to handle the unlikely event that */
517 /* ZZDDHINI signaled SPICE(BUG). */
518
519 if (failed_()) {
520 chkout_("ZZDDHMNM", (ftnlen)8);
521 return ret_val;
522 }
523
524 /* Do not perform initialization tasks again. */
525
526 first = FALSE_;
527 }
528
529 /* Read ID word string followed by NINTS integers from the first */
530 /* record of the file. */
531
532 io___10.ciunit = *unit;
533 iostat = s_rdue(&io___10);
534 if (iostat != 0) {
535 goto L100001;
536 }
537 iostat = do_uio(&c__1, idword, (ftnlen)8);
538 if (iostat != 0) {
539 goto L100001;
540 }
541 iostat = do_uio(&c__20, (char *)&intarr[0], (ftnlen)sizeof(integer));
542 if (iostat != 0) {
543 goto L100001;
544 }
545 iostat = e_rdue();
546 L100001:
547 if (iostat == 0) {
548
549 /* Read succeeded. Try to determine the file architecture and */
550 /* type from the ID word. To do this, mimic the part of GETFAT */
551 /* that deals only with the ID word. First replace any non */
552 /* printing ASCII characters in the ID word with blanks, then use */
553 /* IDW2AT on the "cleaned" ID word to get architecture and type. */
554
555 for (i__ = 1; i__ <= 8; ++i__) {
556 if (*(unsigned char *)&idword[i__ - 1] < 32 || *(unsigned char *)&
557 idword[i__ - 1] > 126) {
558 *(unsigned char *)&idword[i__ - 1] = ' ';
559 }
560 }
561 idw2at_(idword, arch, type__, (ftnlen)8, (ftnlen)8, (ftnlen)8);
562
563 /* Compute the output value based on the file architecture. */
564
565 if (s_cmp(arch, "DAF", (ftnlen)8, (ftnlen)3) == 0) {
566
567 /* For DAF files, try to get the file's binary format. */
568
569 zzddhppf_(unit, &c__1, &bff);
570 if (failed_()) {
571 chkout_("ZZDDHMNM", (ftnlen)8);
572 return ret_val;
573 }
574
575 /* If the file is in a non-native format, we will need to read */
576 /* the first record again, now directly as characters, and */
577 /* translate these character to native integers. */
578
579 if (bff != natbff) {
580
581 /* First, check if run-time translation is supported for */
582 /* this BFF. This check, stolen from ZZDDHMAN, is needed */
583 /* because ZZXLATEI accepts only BFFs for which translation */
584 /* is guaranteed to be supported on this platform. If it */
585 /* is not supported, simply get out (note that the default */
586 /* return value was set to zero at the start.) */
587
588 supidx = isrchi_(&bff, &numsup, supbff);
589 if (supidx == 0) {
590 chkout_("ZZDDHMNM", (ftnlen)8);
591 return ret_val;
592 }
593
594 /* Read the first record as characters and do translation. */
595
596 io___18.ciunit = *unit;
597 iostat = s_rdue(&io___18);
598 if (iostat != 0) {
599 goto L100002;
600 }
601 iostat = do_uio(&c__1, idword, (ftnlen)8);
602 if (iostat != 0) {
603 goto L100002;
604 }
605 iostat = do_uio(&c__1, strbuf, (ftnlen)80);
606 if (iostat != 0) {
607 goto L100002;
608 }
609 iostat = e_rdue();
610 L100002:
611 zzxlatei_(&bff, strbuf, &c__20, intarr, (ftnlen)80);
612 if (failed_()) {
613 chkout_("ZZDDHMNM", (ftnlen)8);
614 return ret_val;
615 }
616 }
617
618 /* Add integers from the file record to the output value. */
619
620 for (i__ = 1; i__ <= 20; ++i__) {
621 mnm += intarr[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 :
622 s_rnge("intarr", i__1, "zzddhmnm_", (ftnlen)354)];
623 }
624
625 /* Read more integers from the start of the first descriptor */
626 /* record without regard to the file's binary format and, */
627 /* if successful, add them to the total. */
628
629 io___20.ciunit = *unit;
630 io___20.cirec = intarr[17];
631 iostat = s_rdue(&io___20);
632 if (iostat != 0) {
633 goto L100003;
634 }
635 iostat = do_uio(&c__20, (char *)&intarr[0], (ftnlen)sizeof(
636 integer));
637 if (iostat != 0) {
638 goto L100003;
639 }
640 iostat = e_rdue();
641 L100003:
642 if (iostat == 0) {
643 for (i__ = 1; i__ <= 20; ++i__) {
644 mnm += intarr[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 :
645 s_rnge("intarr", i__1, "zzddhmnm_", (ftnlen)367)];
646 }
647 }
648 } else if (s_cmp(arch, "DAS", (ftnlen)8, (ftnlen)3) == 0) {
649
650 /* For DAS files, for now, add up integers from the first */
651 /* record to get the output value. */
652
653 for (i__ = 1; i__ <= 20; ++i__) {
654 mnm += intarr[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 :
655 s_rnge("intarr", i__1, "zzddhmnm_", (ftnlen)379)];
656 }
657 } else {
658
659 /* For all other files, add up integers from the first record */
660 /* to get the output value. */
661
662 for (i__ = 1; i__ <= 20; ++i__) {
663 mnm += intarr[(i__1 = i__ - 1) < 20 && 0 <= i__1 ? i__1 :
664 s_rnge("intarr", i__1, "zzddhmnm_", (ftnlen)389)];
665 }
666 }
667 } else {
668
669 /* The read of the file record failed. Do nothing as the output */
670 /* value has already been set at the start of the function. */
671
672 }
673 ret_val = mnm;
674 chkout_("ZZDDHMNM", (ftnlen)8);
675 return ret_val;
676 } /* zzddhmnm_ */
677
678