1 /* zztime.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__64 = 64;
12 static integer c__320 = 320;
13 static integer c__0 = 0;
14 static integer c__12 = 12;
15
16 /* $Procedure ZZTIME ( Private, Time --- time parsing utilities ) */
zztime_0_(int n__,char * string,char * transl,char * letter,char * error,char * pic,doublereal * tvec,integer * b,integer * e,logical * l2r,logical * yabbrv,ftnlen string_len,ftnlen transl_len,ftnlen letter_len,ftnlen error_len,ftnlen pic_len)17 logical zztime_0_(int n__, char *string, char *transl, char *letter, char *
18 error, char *pic, doublereal *tvec, integer *b, integer *e, logical *
19 l2r, logical *yabbrv, ftnlen string_len, ftnlen transl_len, ftnlen
20 letter_len, ftnlen error_len, ftnlen pic_len)
21 {
22 /* Initialized data */
23
24 static integer size = 0;
25 static logical first = TRUE_;
26 static char months[3*12] = "JAN" "FEB" "MAR" "APR" "MAY" "JUN" "JUL"
27 "AUG" "SEP" "OCT" "NOV" "DEC";
28
29 /* System generated locals */
30 integer i__1, i__2, i__3;
31 logical ret_val;
32
33 /* Builtin functions */
34 integer i_len(char *, ftnlen), s_rnge(char *, integer, char *, integer);
35 /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
36 integer i_indx(char *, char *, ftnlen, ftnlen), s_cmp(char *, char *,
37 ftnlen, ftnlen);
38
39 /* Local variables */
40 static integer case__, begs[64], kind, nsec, ends[64];
41 static logical ampm;
42 static integer nday, item, from;
43 extern integer cpos_(char *, char *, integer *, ftnlen, ftnlen);
44 static integer last, nmin, nmon;
45 static char this__[1];
46 static integer ndoy, next;
47 extern integer posr_(char *, char *, integer *, ftnlen, ftnlen);
48 extern /* Subroutine */ int zzrepsub_(char *, integer *, integer *, char *
49 , char *, ftnlen, ftnlen, ftnlen);
50 static integer f[95];
51 extern /* Subroutine */ int zzinssub_(char *, char *, integer *, char *,
52 ftnlen, ftnlen, ftnlen), zztknerr_(char *, char *, char *, char *,
53 logical *, ftnlen, ftnlen, ftnlen, ftnlen);
54 static integer i__, j, k, l[95];
55 static logical check;
56 static integer r__, blank, w, nchar;
57 extern /* Subroutine */ int chkin_(char *, ftnlen);
58 static char recog[12*70];
59 static integer pbegs[64];
60 extern /* Subroutine */ int ucase_(char *, char *, ftnlen, ftnlen);
61 static char names[32*95], class__[1*70];
62 extern /* Subroutine */ int repmc_(char *, char *, char *, char *, ftnlen,
63 ftnlen, ftnlen, ftnlen);
64 static integer pends[64], value;
65 extern /* Subroutine */ int repmi_(char *, char *, integer *, char *,
66 ftnlen, ftnlen, ftnlen);
67 static integer nyear, width[70];
68 static char wkday[12*3*2];
69 static integer pfrom;
70 static char mnmrk[12*3*2], month[3];
71 static integer nhour;
72 extern integer rtrim_(char *, ftnlen);
73 static char myerr[32];
74 static integer pnext, p1, p2;
75 extern /* Subroutine */ int lx4uns_(char *, integer *, integer *, integer
76 *, ftnlen);
77 static integer to;
78 extern logical samchi_(char *, integer *, char *, integer *, ftnlen,
79 ftnlen);
80 extern integer isrchc_(char *, integer *, char *, ftnlen, ftnlen);
81 static char spcial[12];
82 extern logical samsbi_(char *, integer *, integer *, char *, integer *,
83 integer *, ftnlen, ftnlen);
84 static char messge[320], picerr[320];
85 extern /* Subroutine */ int nparsd_(char *, doublereal *, char *, integer
86 *, ftnlen, ftnlen), sigerr_(char *, ftnlen), nparsi_(char *,
87 integer *, char *, integer *, ftnlen, ftnlen), chkout_(char *,
88 ftnlen), prefix_(char *, integer *, char *, ftnlen, ftnlen),
89 suffix_(char *, integer *, char *, ftnlen, ftnlen);
90 static char pictur[320], tknerr[320];
91 static integer mnsize[2], wksize[2];
92 extern /* Subroutine */ int zzmkpc_(char *, integer *, integer *, char *,
93 char *, ftnlen, ftnlen, ftnlen);
94 static logical did;
95 static integer njd, get;
96 static char rep[64];
97 static doublereal hms[3];
98 static logical got;
99 extern integer pos_(char *, char *, integer *, ftnlen, ftnlen);
100 static integer pto, ptr, put;
101
102 /* $ Abstract */
103
104 /* SPICE Private routine intended solely for the support of SPICE */
105 /* routines. Users should not call this routine directly due */
106 /* to the volatile nature of this routine. */
107
108 /* This is an umbrella routine for a collection of entry points */
109 /* to the time parsing utility functions. */
110
111 /* $ Disclaimer */
112
113 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
114 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
115 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
116 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
117 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
118 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
119 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
120 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
121 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
122 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
123
124 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
125 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
126 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
127 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
128 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
129 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
130
131 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
132 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
133 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
134 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
135
136 /* $ Required_Reading */
137
138 /* None. */
139
140 /* $ Keywords */
141
142 /* TIME --- Private */
143
144 /* $ Declarations */
145 /* $ Brief_I/O */
146
147 /* VARIABLE I/O Entry Points */
148 /* -------- --- -------------------------------------------------- */
149 /* STRING I/O ZZUNPCK ZZCMBT ZZGREP ZZISPT ZZSUBT ZZTOKNS ZZVALT */
150 /* TRANSL I ZZUNPCK ZZSUBT */
151 /* LETTER I ZZCMBT ZZIST ZZNOTE ZZREMT ZZVALT */
152 /* ERROR O ZZUNPCK ZZTOKNS */
153 /* TVEC O ZZUNPCK */
154 /* B O ZZISPT ZZNOTE ZZVALT */
155 /* E O ZZISPT ZZNOTE ZZUNPCK ZZVALT */
156 /* L2R I ZZCMBT ZZSUBT */
157 /* YABBRV I ZZUNPCK */
158
159 /* $ Detailed_Input */
160
161 /* See Individual Entry Points. */
162
163 /* $ Detailed_Output */
164
165 /* See Individual Entry Points. */
166
167 /* $ Parameters */
168
169 /* None. */
170
171 /* $ Exceptions */
172
173 /* 1) If ZZTIME is called directly the error 'SPICE(BOGUSENTRY)' */
174 /* is signaled. */
175
176 /* $ Files */
177
178 /* None. */
179
180 /* $ Particulars */
181
182 /* This routine serves as an umbrella for a collection of */
183 /* related entry points that are used to parse time strings. */
184
185 /* Normal usage is to first call ZZTOKNS to create an internal */
186 /* representation for a time string. This internal representations */
187 /* maintains a list of identified substrings from the original */
188 /* input time string. For example the call to ZZTOKNS using */
189 /* the string */
190
191 /* '1996 JAN 25 12:18:19.199' */
192 /* 123456789012345678901234 */
193
194 /* yields the following internal representation: */
195
196 /* 'ibmbibi:i:i.i' */
197
198 /* where the individual tokens correspond to the substrings */
199 /* indicated in the following table: */
200
201 /* Identifier Substring meaning */
202 /* ---------- ------------- ---------------- */
203 /* i from 01 to 04 unsigned integer */
204 /* b from 05 to 05 blanks or tab */
205 /* m from 06 to 08 month */
206 /* b from 09 to 09 blanks or tab */
207 /* i from 10 to 11 unsigned integer */
208 /* b from 12 to 12 blank or tab */
209 /* i from 13 to 14 unsigned integer */
210 /* : from 15 to 15 colon */
211 /* i from 16 to 17 unsigned integer */
212 /* : from 18 to 18 colon */
213 /* i from 19 to 20 unsigned integer */
214 /* . from 21 to 21 decimal point */
215 /* i from 22 to 24 unsigned integer */
216
217 /* These substrings may be combined and reidentified, removed */
218 /* or re-identified using the various entry points listed here: */
219
220 /* ZZCMBT combine several tokens into a single token */
221 /* for example you might scan right to left and replace */
222 /* the token sequence i.i by n (for number). In this */
223 /* case the substring boundaries of n would be from 19 */
224 /* to 24. */
225
226 /* ZZGREP returns the current internal representation */
227 /* in the case above 'ibmbibi:i:i.i' */
228
229
230 /* ZZISPT returns TRUE if a pair of letters from a list are */
231 /* present in the internal representation. This is */
232 /* used primarily to detect erroneous substrings such */
233 /* as ',,' or ':,' */
234
235 /* ZZIST Return TRUE if a particular letter is present in the */
236 /* string. */
237
238 /* ZZNOTE Returns the substring boundaries associated with */
239 /* a letter and removes the letter from the internal */
240 /* representation. This is used primarily for calendar */
241 /* string modifiers such as 'B.C.', 'A.D.' etc. */
242
243 /* ZZREMT remove a letter from the internal representation. */
244 /* In the input example you might remove all white space */
245 /* markers. */
246
247 /* ZZSUBT substitute a different letter for one listed in the */
248 /* input one for one. For example after removing blanks */
249 /* you might substitute YmD for imi. */
250
251
252 /* ZZVALT replace an integer by a new marker if the integer */
253 /* lies withing a particular range. For example */
254 /* you might replace any integer between 1000 and 10000 */
255 /* by Y (for year). */
256
257 /* Once all substitutions and removals have been performed that */
258 /* can be made, the entry point ZZUNPCK allows you to extract */
259 /* year(Y), month(m), day or month(D), day of year (y), hours(H), */
260 /* minutes(M) and seconds(S) from the input string */
261
262 /* $ Examples */
263
264 /* See TPARTV. */
265
266 /* $ Restrictions */
267
268 /* None. */
269
270 /* $ Literature_References */
271
272 /* None. */
273
274 /* $ Author_and_Institution */
275
276 /* N.J. Bachman (JPL) */
277 /* B.V. Semenov (JPL) */
278 /* W.L. Taber (JPL) */
279
280 /* $ Version */
281
282 /* - SPICELIB Version 1.6.0, 05-FEB-2014 (EDW) (BVS) */
283
284 /* BUG FIX: entry point ZZUNPCK: added error check on ITEM value. */
285 /* Failure to perform this check can cause BADSUBSCRIPT error */
286 /* signals from CSPICE code on invalid time strings. */
287
288 /* BUG FIX: entry point ZZTOKNS: added checks for token indexes */
289 /* overflowing the maximum number of tokens and for the character */
290 /* positions in the time picture overflowing the time picture */
291 /* length. Both overflows previously resulted in segmentation */
292 /* faults for invalid input time strings that contained too many */
293 /* recognizable tokens or were too long and required too many */
294 /* characters in the picture representation. */
295
296 /* - SPICELIB Version 1.5.0, 08-MAR-2009 (NJB) */
297
298 /* Bug fix: in entry point ZZTOKNS, changed upper */
299 /* bound used to detect non-printing characters from 128 */
300 /* to 126. */
301
302 /* Bug fix: added error handling to this routine. Header */
303 /* already referred to SPICE(BOGUSENTRY) error, but no */
304 /* such error was signaled. */
305
306 /* Changed upper bound of arrays NAMES, F, and L from 128 */
307 /* to 126. */
308
309 /* Re-ordered header sections in various entry points. */
310
311 /* - SPICELIB Version 1.4.0, 27-OCT-2006 (BVS) */
312
313 /* Fixed the bug in the ZZTOKNS entry that in the case of a one */
314 /* character long blank input time string caused the TO variable */
315 /* be set to the value greater than the string length, triggering */
316 /* an OUT OF BOUNDS runtime error on HP. Added to ZZTOKNS a */
317 /* separate check for the blank input strings. */
318
319 /* - SPICELIB Version 1.3.0, 13-Nov-2000 (WLT) */
320
321 /* Changed the call to EQSTR to a call to SAMSBI so as to */
322 /* guard against overflowing strings. */
323
324 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
325
326 /* The main routine (which should never be called) now returns */
327 /* the value .FALSE. */
328
329 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
330
331 /* Added a RETURN statement at the end of the main routine. */
332 /* Enhanced error message for the case when the input string */
333 /* to ZZTOKNS has a non-printing character. */
334
335 /* - SPICELIB Version 1.0.0, 8-APR-1996 (WLT) */
336
337 /* -& */
338
339 /* Entry points */
340
341
342 /* SPICELIB Functions */
343
344
345 /* Standard Parameters */
346
347
348 /* LOWER */
349 /* UPPER */
350 /* MIXED */
351
352
353 /* FULL */
354 /* SHORT */
355
356
357 /* Maximum number of tokens that a valid time string can contain. */
358
359
360 /* Length of the string buffer containing the time string picture. */
361
362
363 /* Representation Variables. */
364
365
366 /* Token Recognition Variables. */
367
368 /* At the moment there are 53 recognized substrings, we */
369 /* make room for 70 just so we won't have to increase */
370 /* the parameter NRECOG soon. */
371
372 /* Parameter adjustments */
373 if (tvec) {
374 }
375
376 /* Function Body */
377 switch(n__) {
378 case 1: goto L_zzcmbt;
379 case 2: goto L_zzgrep;
380 case 3: goto L_zzispt;
381 case 4: goto L_zzist;
382 case 5: goto L_zznote;
383 case 6: goto L_zzremt;
384 case 7: goto L_zzsubt;
385 case 8: goto L_zztokns;
386 case 9: goto L_zzunpck;
387 case 10: goto L_zzvalt;
388 }
389
390 ret_val = FALSE_;
391 chkin_("ZZTIME", (ftnlen)6);
392 sigerr_("SPICE(BOGUSENTRY)", (ftnlen)17);
393 chkout_("ZZTIME", (ftnlen)6);
394 return ret_val;
395 /* $Procedure ZZCMBT ( Private, Time --- combine tokens ) */
396
397 L_zzcmbt:
398 /* $ Abstract */
399
400 /* SPICE Private routine intended solely for the support of SPICE */
401 /* routines. Users should not call this routine directly due */
402 /* to the volatile nature of this routine. */
403
404 /* Combine several token representatives into a single token. */
405
406 /* $ Disclaimer */
407
408 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
409 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
410 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
411 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
412 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
413 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
414 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
415 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
416 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
417 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
418
419 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
420 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
421 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
422 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
423 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
424 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
425
426 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
427 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
428 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
429 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
430
431 /* $ Required_Reading */
432
433 /* None. */
434
435 /* $ Keywords */
436
437 /* TIME --- PRIVATE */
438
439
440 /* $ Declarations */
441
442 /* CHARACTER*(*) STRING */
443 /* CHARACTER*(1) LETTER */
444 /* LOGICAL L2R */
445
446 /* $ Brief_I/O */
447 /* VARIABLE I/O DESCRIPTION */
448 /* -------- --- -------------------------------------------------- */
449 /* STRING I A sequence of tokens to be combined. */
450 /* LETTER I The replacement token for the combination */
451 /* L2R I If TRUE scan left to right, else scan right to left */
452
453 /* The function returns TRUE is a combination was performed. */
454
455 /* $ Detailed_Input */
456
457 /* STRING is a sequence of tokens to look for in the */
458 /* stored internal representation. */
459
460 /* LETTER is the replacement token to insert for STRING. */
461
462 /* If letter is a blank, the combination is simply */
463 /* replaced by a blank. */
464
465 /* L2R is a logical. If TRUE, the internal representation */
466 /* is scanned left to right. If FALSE, the internal */
467 /* representation is scanned right to left. */
468
469 /* $ Detailed_Output */
470
471 /* The function returns TRUE if a combination is performed. */
472 /* Otherwise it returns FALSE. */
473
474 /* Note that the most important action of this function is a */
475 /* side-effect. The internal representation of a time string */
476 /* is modified to reflect the requested token combination. */
477
478 /* $ Parameters */
479
480 /* None. */
481
482 /* $ Exceptions */
483
484 /* Error Free. */
485
486 /* $ Files */
487
488 /* None. */
489
490 /* $ Particulars */
491
492 /* This function allows you to alter the internal representation */
493 /* of a time string by combining two or more tokens into a single */
494 /* token. */
495
496 /* $ Examples */
497
498 /* See TPARTV */
499
500 /* $ Restrictions */
501
502 /* None. */
503
504 /* $ Literature_References */
505
506 /* None. */
507
508 /* $ Author_and_Institution */
509
510 /* W.L. Taber (JPL) */
511
512 /* $ Version */
513
514 /* - SPICELIB Version 1.2.1, 08-MAR-2009 (NJB) */
515
516 /* Re-ordered header sections. */
517
518 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
519
520 /* The main routine (which should never be called) now returns */
521 /* the value .FALSE. */
522
523 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
524
525 /* Added a RETURN statement at the end of the main routine. */
526 /* Enhanced error message for the case when the input string */
527 /* to ZZTOKNS has a non-printing character. */
528
529 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
530
531
532 /* -& */
533
534 /* So far we haven't combined anything. */
535
536 did = FALSE_;
537
538 /* Look for the substring either looking from the */
539 /* left (L2R is YES) or from the right (L2R is NO). */
540
541 if (*l2r) {
542 from = pos_(rep, string, &c__1, size, string_len);
543 } else {
544 from = posr_(rep, string, &size, size, string_len);
545 }
546 to = from + i_len(string, string_len) - 1;
547 if (from > 0) {
548 did = TRUE_;
549 ends[(i__1 = from - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends", i__1,
550 "zztime_", (ftnlen)610)] = ends[(i__2 = to - 1) < 64 && 0 <=
551 i__2 ? i__2 : s_rnge("ends", i__2, "zztime_", (ftnlen)610)];
552 pends[(i__1 = from - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("pends",
553 i__1, "zztime_", (ftnlen)611)] = pends[(i__2 = to - 1) < 64 &&
554 0 <= i__2 ? i__2 : s_rnge("pends", i__2, "zztime_", (ftnlen)
555 611)];
556 put = from + 1;
557 next = to + 1;
558
559 /* Perform the substitution in the representation */
560
561 zzrepsub_(rep, &from, &to, letter, rep, (ftnlen)64, (ftnlen)1, (
562 ftnlen)64);
563
564 /* Now update the begins and ends of tokens in the original */
565 /* string. */
566
567 i__1 = size;
568 for (get = next; get <= i__1; ++get) {
569 begs[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("begs",
570 i__2, "zztime_", (ftnlen)625)] = begs[(i__3 = get - 1) <
571 64 && 0 <= i__3 ? i__3 : s_rnge("begs", i__3, "zztime_", (
572 ftnlen)625)];
573 ends[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("ends",
574 i__2, "zztime_", (ftnlen)626)] = ends[(i__3 = get - 1) <
575 64 && 0 <= i__3 ? i__3 : s_rnge("ends", i__3, "zztime_", (
576 ftnlen)626)];
577 pbegs[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pbegs",
578 i__2, "zztime_", (ftnlen)627)] = pbegs[(i__3 = get - 1) <
579 64 && 0 <= i__3 ? i__3 : s_rnge("pbegs", i__3, "zztime_",
580 (ftnlen)627)];
581 pends[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
582 i__2, "zztime_", (ftnlen)628)] = pends[(i__3 = get - 1) <
583 64 && 0 <= i__3 ? i__3 : s_rnge("pends", i__3, "zztime_",
584 (ftnlen)628)];
585 ++put;
586 }
587 size = size - i_len(string, string_len) + 1;
588 }
589 ret_val = did;
590 return ret_val;
591 /* $Procedure ZZGREP ( Private, Time --- get representation ) */
592
593 L_zzgrep:
594 /* $ Abstract */
595
596 /* SPICE Private routine intended solely for the support of SPICE */
597 /* routines. Users should not call this routine directly due */
598 /* to the volatile nature of this routine. */
599
600 /* Return the internal representation of the time string. */
601
602 /* $ Disclaimer */
603
604 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
605 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
606 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
607 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
608 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
609 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
610 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
611 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
612 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
613 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
614
615 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
616 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
617 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
618 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
619 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
620 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
621
622 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
623 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
624 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
625 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
626
627 /* $ Required_Reading */
628
629 /* None. */
630
631 /* $ Keywords */
632
633 /* TIME --- PRIVATE */
634
635
636 /* $ Declarations */
637
638 /* CHARACTER*(*) STRING */
639
640 /* $ Brief_I/O */
641
642 /* VARIABLE I/O DESCRIPTION */
643 /* -------- --- -------------------------------------------------- */
644 /* STRING O The current representation of tokenized time */
645
646 /* $ Detailed_Input */
647
648 /* None. */
649
650 /* $ Detailed_Output */
651
652 /* STRING is the current internal tokenized representation of */
653 /* the time string that was last supplied to ZZTIME */
654 /* via the entry point ZZTOKNS. */
655
656 /* The function returns TRUE. */
657
658 /* $ Parameters */
659
660 /* None. */
661
662 /* $ Exceptions */
663
664 /* Error free. */
665
666 /* $ Files */
667
668 /* None. */
669
670 /* $ Particulars */
671
672 /* This returns the current internal representation of the */
673 /* tokenized time string. The function always returns the */
674 /* value TRUE. */
675
676 /* $ Examples */
677
678 /* See TPARTV. */
679
680 /* $ Restrictions */
681
682 /* None. */
683
684 /* $ Literature_References */
685
686 /* None. */
687
688 /* $ Author_and_Institution */
689
690 /* W.L. Taber (JPL) */
691
692 /* $ Version */
693
694 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
695
696 /* The main routine (which should never be called) now returns */
697 /* the value .FALSE. */
698
699 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
700
701 /* Added a RETURN statement at the end of the main routine. */
702 /* Enhanced error message for the case when the input string */
703 /* to ZZTOKNS has a non-printing character. */
704
705 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
706
707
708 /* -& */
709 s_copy(string, rep, string_len, (max(1,size)));
710 ret_val = TRUE_;
711 return ret_val;
712 /* $Procedure ZZISPT ( Private, Time --- is pair of tokens ) */
713
714 L_zzispt:
715 /* $ Abstract */
716
717 /* SPICE Private routine intended solely for the support of SPICE */
718 /* routines. Users should not call this routine directly due */
719 /* to the volatile nature of this routine. */
720
721 /* Determine if there is a pair of consecutive tokens from */
722 /* a user specified list of tokens. */
723
724 /* $ Disclaimer */
725
726 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
727 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
728 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
729 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
730 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
731 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
732 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
733 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
734 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
735 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
736
737 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
738 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
739 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
740 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
741 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
742 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
743
744 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
745 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
746 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
747 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
748
749 /* $ Required_Reading */
750
751 /* None. */
752
753 /* $ Keywords */
754
755 /* TIME --- PRIVATE */
756
757 /* $ Declarations */
758
759 /* CHARACTER*(*) STRING */
760 /* INTEGER B */
761 /* INTEGER E */
762
763 /* $ Brief_I/O */
764
765 /* VARIABLE I/O DESCRIPTION */
766 /* -------- --- -------------------------------------------------- */
767 /* STRING I a list of tokens to search for. */
768 /* B O the beginning of the first matching token */
769 /* E O the ending of the last matching token. */
770
771 /* The function returns TRUE if a pair is found. */
772
773 /* $ Detailed_Input */
774
775 /* STRING is a character string that gives a list of tokens */
776 /* to search for in a string. */
777
778 /* $ Detailed_Output */
779
780 /* B is the location in the original time string supplied */
781 /* to ZZTOKNS of the beginning a pair of consecutive */
782 /* tokens from the list specified by STRING. */
783
784 /* E is the location in the original time string supplied */
785 /* to ZZTOKENS of the end a pair of consecutive */
786 /* tokens from the list specified by STRING. */
787
788 /* The function returns the TRUE is a consecutive pair of tokens */
789 /* from STRING is located. Otherwise it returns FALSE. */
790
791 /* $ Parameters */
792
793 /* None. */
794
795 /* $ Exceptions */
796
797 /* Error Free. */
798
799 /* $ Files */
800
801 /* None. */
802
803 /* $ Particulars */
804
805 /* This routine exists primarily to assist in the diagnosis */
806 /* of consecutive delimiters in a time string. */
807
808 /* $ Examples */
809
810 /* See TPARTV */
811
812 /* $ Restrictions */
813
814 /* None. */
815
816 /* $ Literature_References */
817
818 /* None. */
819
820 /* $ Author_and_Institution */
821
822 /* W.L. Taber (JPL) */
823
824 /* $ Version */
825
826 /* - SPICELIB Version 1.2.1, 08-MAR-2009 (NJB) */
827
828 /* Re-ordered header sections. */
829
830 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
831
832 /* The main routine (which should never be called) now returns */
833 /* the value .FALSE. */
834
835 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
836
837 /* Added a RETURN statement at the end of the main routine. */
838 /* Enhanced error message for the case when the input string */
839 /* to ZZTOKNS has a non-printing character. */
840
841 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
842
843
844 /* -& */
845 did = FALSE_;
846 from = cpos_(rep, string, &c__1, (ftnlen)64, string_len);
847 while(from > 0) {
848 if (from < size) {
849 to = from + 1;
850 did = i_indx(string, rep + (to - 1), string_len, (ftnlen)1) > 0;
851 } else {
852 *b = 0;
853 *e = 0;
854 ret_val = FALSE_;
855 return ret_val;
856 }
857 if (did) {
858 *b = begs[(i__1 = from - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge(
859 "begs", i__1, "zztime_", (ftnlen)922)];
860 *e = ends[(i__1 = to - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends"
861 , i__1, "zztime_", (ftnlen)923)];
862 ret_val = TRUE_;
863 return ret_val;
864 }
865 from = cpos_(rep, string, &to, (ftnlen)64, string_len);
866 }
867 *b = 0;
868 *e = 0;
869 ret_val = FALSE_;
870 return ret_val;
871 /* $Procedure ZZIST ( Private, Time --- is there a token ) */
872
873 L_zzist:
874 /* $ Abstract */
875
876 /* SPICE Private routine intended solely for the support of SPICE */
877 /* routines. Users should not call this routine directly due */
878 /* to the volatile nature of this routine. */
879
880 /* Determine if a token is present in the internal representation */
881 /* of a tokenized time string. */
882
883 /* $ Disclaimer */
884
885 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
886 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
887 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
888 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
889 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
890 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
891 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
892 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
893 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
894 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
895
896 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
897 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
898 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
899 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
900 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
901 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
902
903 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
904 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
905 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
906 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
907
908 /* $ Required_Reading */
909
910 /* None. */
911
912 /* $ Keywords */
913
914 /* TIME --- PRIVATE */
915
916
917 /* $ Declarations */
918
919 /* CHARACTER*(1) LETTER */
920
921 /* $ Brief_I/O */
922
923 /* VARIABLE I/O DESCRIPTION */
924 /* -------- --- -------------------------------------------------- */
925 /* LETTER I */
926
927 /* The function returns */
928
929 /* $ Detailed_Input */
930
931 /* LETTER is a token to look for in the tokenized representation */
932 /* of a time string. */
933
934 /* $ Detailed_Output */
935
936 /* The function returns TRUE is LETTER is present in the internal */
937 /* representation of the last time string passed to ZZTOKNS. */
938 /* Otherwise it returns FALSE. */
939
940 /* $ Parameters */
941
942 /* None. */
943
944 /* $ Exceptions */
945
946 /* Error free. */
947
948 /* $ Files */
949
950 /* None. */
951
952 /* $ Particulars */
953
954 /* This routine determines whether or not a particular token */
955 /* is present in a tokenized representation of a time. */
956
957 /* $ Examples */
958
959 /* See TPARTV */
960
961 /* $ Restrictions */
962
963 /* None. */
964
965 /* $ Literature_References */
966
967 /* None. */
968
969 /* $ Author_and_Institution */
970
971 /* W.L. Taber (JPL) */
972
973 /* $ Version */
974
975 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
976
977 /* The main routine (which should never be called) now returns */
978 /* the value .FALSE. */
979
980 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
981
982 /* Added a RETURN statement at the end of the main routine. */
983 /* Enhanced error message for the case when the input string */
984 /* to ZZTOKNS has a non-printing character. */
985
986 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
987
988
989 /* -& */
990 ret_val = i_indx(rep, letter, size, (ftnlen)1) > 0;
991 return ret_val;
992 /* $Procedure ZZNOTE ( Private, Time --- note the existence and remove ) */
993
994 L_zznote:
995 /* $ Abstract */
996
997 /* SPICE Private routine intended solely for the support of SPICE */
998 /* routines. Users should not call this routine directly due */
999 /* to the volatile nature of this routine. */
1000
1001 /* Return the beginning and ending of a token in a time string */
1002 /* and remove the token from the internal representation. */
1003
1004 /* $ Disclaimer */
1005
1006 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
1007 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
1008 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
1009 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
1010 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
1011 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
1012 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
1013 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
1014 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
1015 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
1016
1017 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
1018 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
1019 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
1020 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
1021 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
1022 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
1023
1024 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
1025 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
1026 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
1027 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
1028
1029 /* $ Required_Reading */
1030
1031 /* None. */
1032
1033 /* $ Keywords */
1034
1035 /* TIME --- PRIVATE */
1036
1037 /* $ Declarations */
1038
1039 /* CHARACTER*(1) LETTER */
1040 /* INTEGER B */
1041 /* INTEGER E */
1042
1043 /* $ Brief_I/O */
1044
1045 /* VARIABLE I/O DESCRIPTION */
1046 /* -------- --- -------------------------------------------------- */
1047 /* LETTER I a token to look for in the internal representation */
1048 /* B O is the beginning of the token */
1049 /* E O is the end of the token. */
1050
1051 /* The function returns TRUE if the token is located. */
1052
1053 /* $ Detailed_Input */
1054
1055 /* LETTER is a token to look for and remove from the */
1056 /* current tokenization of a time string. */
1057
1058 /* If located the token is removed from the string. */
1059
1060 /* Note that this simply finds the first matching */
1061 /* token. If others are present they are not */
1062 /* affected. */
1063
1064 /* $ Detailed_Output */
1065
1066 /* B is the beginning of the requested token if it */
1067 /* was found. Otherwise B is zero. */
1068
1069 /* E is the ending of the requested token if it was */
1070 /* found. Otherwise E is zero. */
1071
1072 /* The function returns the value TRUE if the token is located. */
1073
1074 /* $ Parameters */
1075
1076 /* None. */
1077
1078 /* $ Exceptions */
1079
1080 /* Error free. */
1081
1082 /* $ Files */
1083
1084 /* None. */
1085
1086 /* $ Particulars */
1087
1088 /* Look up and remove a token from the internal representation */
1089 /* of a time string. This is useful in removing modifiers */
1090 /* from a string (such as the ERA of an epoch, AM/PM of a time */
1091 /* etc.) */
1092
1093 /* $ Examples */
1094
1095 /* See TPARTV */
1096
1097 /* $ Restrictions */
1098
1099 /* None. */
1100
1101 /* $ Literature_References */
1102
1103 /* None. */
1104
1105 /* $ Author_and_Institution */
1106
1107 /* W.L. Taber (JPL) */
1108
1109 /* $ Version */
1110
1111 /* - SPICELIB Version 1.2.1, 08-MAR-2009 (NJB) */
1112
1113 /* Re-ordered header sections. */
1114
1115 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
1116
1117 /* The main routine (which should never be called) now returns */
1118 /* the value .FALSE. */
1119
1120 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
1121
1122 /* Added a RETURN statement at the end of the main routine. */
1123 /* Enhanced error message for the case when the input string */
1124 /* to ZZTOKNS has a non-printing character. */
1125
1126 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
1127
1128
1129 /* -& */
1130 put = i_indx(rep, letter, (ftnlen)64, (ftnlen)1);
1131 if (put > 0) {
1132 *b = begs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
1133 i__1, "zztime_", (ftnlen)1212)];
1134 *e = ends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
1135 i__1, "zztime_", (ftnlen)1213)];
1136 next = put + 1;
1137 i__1 = size;
1138 for (get = next; get <= i__1; ++get) {
1139 begs[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("begs",
1140 i__2, "zztime_", (ftnlen)1219)] = begs[(i__3 = get - 1) <
1141 64 && 0 <= i__3 ? i__3 : s_rnge("begs", i__3, "zztime_", (
1142 ftnlen)1219)];
1143 ends[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("ends",
1144 i__2, "zztime_", (ftnlen)1220)] = ends[(i__3 = get - 1) <
1145 64 && 0 <= i__3 ? i__3 : s_rnge("ends", i__3, "zztime_", (
1146 ftnlen)1220)];
1147 pbegs[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pbegs",
1148 i__2, "zztime_", (ftnlen)1221)] = pbegs[(i__3 = get - 1) <
1149 64 && 0 <= i__3 ? i__3 : s_rnge("pbegs", i__3, "zztime_",
1150 (ftnlen)1221)];
1151 pends[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
1152 i__2, "zztime_", (ftnlen)1222)] = pends[(i__3 = get - 1) <
1153 64 && 0 <= i__3 ? i__3 : s_rnge("pends", i__3, "zztime_",
1154 (ftnlen)1222)];
1155 *(unsigned char *)&rep[put - 1] = *(unsigned char *)&rep[get - 1];
1156 ++put;
1157 }
1158 s_copy(rep + (size - 1), " ", 64 - (size - 1), (ftnlen)1);
1159 --size;
1160 did = TRUE_;
1161 } else {
1162 *b = 0;
1163 *e = 0;
1164 did = FALSE_;
1165 }
1166 ret_val = did;
1167 return ret_val;
1168 /* $Procedure ZZREMT ( Private, Time --- remove token ) */
1169
1170 L_zzremt:
1171 /* $ Abstract */
1172
1173 /* SPICE Private routine intended solely for the support of SPICE */
1174 /* routines. Users should not call this routine directly due */
1175 /* to the volatile nature of this routine. */
1176
1177 /* Remove a specified token from the internal representation */
1178
1179 /* $ Disclaimer */
1180
1181 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
1182 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
1183 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
1184 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
1185 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
1186 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
1187 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
1188 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
1189 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
1190 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
1191
1192 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
1193 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
1194 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
1195 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
1196 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
1197 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
1198
1199 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
1200 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
1201 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
1202 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
1203
1204 /* $ Required_Reading */
1205
1206 /* None. */
1207
1208 /* $ Keywords */
1209
1210 /* TIME --- Private */
1211
1212
1213 /* $ Declarations */
1214
1215 /* CHARACTER*(1) LETTER */
1216
1217 /* $ Brief_I/O */
1218 /* VARIABLE I/O DESCRIPTION */
1219 /* -------- --- -------------------------------------------------- */
1220 /* LETTER I token to remove from the internal representation. */
1221
1222 /* The function returns TRUE if any tokens are removed. */
1223
1224 /* $ Detailed_Input */
1225
1226 /* LETTER is a token to be removed from the internal */
1227 /* representation of a tokenized time string. */
1228 /* All instances of LETTER will be removed from */
1229 /* the internal representation. */
1230
1231 /* $ Detailed_Output */
1232
1233 /* The function returns TRUE if any instance of LETTER is removed */
1234 /* from the internal representation of a tokenized time string. */
1235 /* If no instances are removed the function returns FALSE. */
1236
1237 /* $ Parameters */
1238
1239 /* None. */
1240
1241 /* $ Exceptions */
1242
1243 /* Error free. */
1244
1245 /* $ Files */
1246
1247 /* None. */
1248
1249 /* $ Particulars */
1250
1251 /* This routine is used to remove various delimiters that */
1252 /* appear in a tokenized time string (although it could be */
1253 /* used to remove any token from a tokenized time string). */
1254
1255 /* $ Examples */
1256
1257 /* See TPARTV */
1258
1259 /* $ Restrictions */
1260
1261 /* None. */
1262
1263 /* $ Literature_References */
1264
1265 /* None. */
1266
1267 /* $ Author_and_Institution */
1268
1269 /* W.L. Taber (JPL) */
1270
1271 /* $ Version */
1272
1273 /* - SPICELIB Version 1.2.1, 08-MAR-2009 (NJB) */
1274
1275 /* Re-ordered header sections. */
1276
1277 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
1278
1279 /* The main routine (which should never be called) now returns */
1280 /* the value .FALSE. */
1281
1282 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
1283
1284 /* Added a RETURN statement at the end of the main routine. */
1285 /* Enhanced error message for the case when the input string */
1286 /* to ZZTOKNS has a non-printing character. */
1287
1288 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
1289
1290
1291 /* -& */
1292 put = 0;
1293 did = FALSE_;
1294 i__1 = size;
1295 for (i__ = 1; i__ <= i__1; ++i__) {
1296 if (*(unsigned char *)&rep[i__ - 1] != *(unsigned char *)letter) {
1297 ++put;
1298 *(unsigned char *)&rep[put - 1] = *(unsigned char *)&rep[i__ - 1];
1299 begs[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("begs",
1300 i__2, "zztime_", (ftnlen)1378)] = begs[(i__3 = i__ - 1) <
1301 64 && 0 <= i__3 ? i__3 : s_rnge("begs", i__3, "zztime_", (
1302 ftnlen)1378)];
1303 ends[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("ends",
1304 i__2, "zztime_", (ftnlen)1379)] = ends[(i__3 = i__ - 1) <
1305 64 && 0 <= i__3 ? i__3 : s_rnge("ends", i__3, "zztime_", (
1306 ftnlen)1379)];
1307 pbegs[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pbegs",
1308 i__2, "zztime_", (ftnlen)1380)] = pbegs[(i__3 = i__ - 1) <
1309 64 && 0 <= i__3 ? i__3 : s_rnge("pbegs", i__3, "zztime_",
1310 (ftnlen)1380)];
1311 pends[(i__2 = put - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
1312 i__2, "zztime_", (ftnlen)1381)] = pends[(i__3 = i__ - 1) <
1313 64 && 0 <= i__3 ? i__3 : s_rnge("pends", i__3, "zztime_",
1314 (ftnlen)1381)];
1315 } else {
1316 did = TRUE_;
1317 }
1318 }
1319 size = put;
1320 if (put == 0) {
1321 s_copy(rep, " ", (ftnlen)64, (ftnlen)1);
1322 } else if (put < i_len(rep, (ftnlen)64)) {
1323 i__1 = put;
1324 s_copy(rep + i__1, " ", 64 - i__1, (ftnlen)1);
1325 }
1326 ret_val = did;
1327 return ret_val;
1328 /* $Procedure ZZSUBT ( Private, Time --- substitute tokens ) */
1329
1330 L_zzsubt:
1331 /* $ Abstract */
1332
1333 /* SPICE Private routine intended solely for the support of SPICE */
1334 /* routines. Users should not call this routine directly due */
1335 /* to the volatile nature of this routine. */
1336
1337 /* Substitute one token for another in the internal representation */
1338 /* of a tokenized time string. */
1339
1340 /* $ Disclaimer */
1341
1342 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
1343 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
1344 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
1345 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
1346 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
1347 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
1348 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
1349 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
1350 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
1351 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
1352
1353 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
1354 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
1355 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
1356 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
1357 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
1358 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
1359
1360 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
1361 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
1362 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
1363 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
1364
1365 /* $ Required_Reading */
1366
1367 /* None. */
1368
1369 /* $ Keywords */
1370
1371 /* TIME --- Private */
1372
1373
1374 /* $ Declarations */
1375
1376 /* IMPLICIT NONE */
1377 /* CHARACTER*(*) STRING */
1378 /* CHARACTER*(*) TRANSL */
1379 /* LOGICAL L2R */
1380
1381 /* $ Brief_I/O */
1382
1383 /* VARIABLE I/O DESCRIPTION */
1384 /* -------- --- -------------------------------------------------- */
1385 /* STRING I token pattern to look for. */
1386 /* TRANSL I token replacement pattern. */
1387 /* L2R I direction to scan internal representation. */
1388
1389 /* The function returns TRUE is a substitution is performed. */
1390
1391 /* $ Detailed_Input */
1392
1393 /* STRING is a string of tokens to look for in the internal */
1394 /* representation of a tokenized time string. */
1395
1396 /* Only the first occurrence of STRING will be modified. */
1397
1398 /* If the first character in STRING is '<', (and string */
1399 /* is more than 1 character in length) substitutions */
1400 /* will be performed in the4 tokenized string only if */
1401 /* STRING exactly matches the tokenized string */
1402 /* starting at the left most character. */
1403
1404 /* If the last character in STRING is '>' (and string */
1405 /* is more than 1 character in length) substitutions */
1406 /* will be performed in the4 tokenized string only if */
1407 /* STRING exactly matches the tokenized string */
1408 /* ending at the right most character. */
1409
1410 /* If first and last character of STRING are '<' and '>' */
1411 /* respectively, the first case above is applied and the */
1412 /* greater than character ('>') is regarded as just */
1413 /* another character. */
1414
1415 /* TRANSL is a sequence of replacement tokens to substitute */
1416 /* in place of STRING. */
1417
1418 /* L2R is a logical flag. If L2R is TRUE, the internal */
1419 /* representation is scanned from left to right. If */
1420 /* L2R is FALSE, the internal representation is scanned */
1421 /* from right to left. */
1422
1423 /* $ Detailed_Output */
1424
1425 /* The function returns TRUE if a substitution is performed. */
1426 /* Otherwise it returns FALSE. */
1427
1428 /* $ Parameters */
1429
1430 /* None. */
1431
1432 /* $ Exceptions */
1433
1434 /* Error free. */
1435
1436 /* $ Files */
1437
1438 /* None. */
1439
1440 /* $ Particulars */
1441
1442 /* This routine searches for the first instance of a specified */
1443 /* pattern in the internal representation of a tokenized */
1444 /* time string. If the pattern is found, it is replaced */
1445 /* by that value of TRANSL. Only one pattern substitution */
1446 /* is performed per call to this function. */
1447
1448 /* $ Examples */
1449
1450 /* See TPARTV */
1451
1452 /* $ Restrictions */
1453
1454 /* None. */
1455
1456 /* $ Literature_References */
1457
1458 /* None. */
1459
1460 /* $ Author_and_Institution */
1461
1462 /* W.L. Taber (JPL) */
1463
1464 /* $ Version */
1465
1466 /* - SPICELIB Version 1.2.1, 08-MAR-2009 (NJB) */
1467
1468 /* Re-ordered header sections. */
1469
1470 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
1471
1472 /* The main routine (which should never be called) now returns */
1473 /* the value .FALSE. */
1474
1475 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
1476
1477 /* Added a RETURN statement at the end of the main routine. */
1478 /* Enhanced error message for the case when the input string */
1479 /* to ZZTOKNS has a non-printing character. */
1480
1481 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
1482
1483
1484 /* -& */
1485
1486 /* So far we haven't combined anything. */
1487
1488 did = FALSE_;
1489 k = i_len(string, string_len);
1490
1491 /* We have two special cases to deal with. */
1492
1493 if (*(unsigned char *)string == '<' && k > 1) {
1494 /* Computing MIN */
1495 i__1 = k - 1;
1496 to = min(i__1,size);
1497 from = 1;
1498 if (s_cmp(string + 1, rep + (from - 1), k - 1, to - (from - 1)) == 0)
1499 {
1500 s_copy(rep + (from - 1), transl, to - (from - 1), transl_len);
1501 ret_val = TRUE_;
1502 } else {
1503 ret_val = FALSE_;
1504 }
1505 return ret_val;
1506 } else if (*(unsigned char *)&string[k - 1] == '>' && k > 1) {
1507 /* Computing MAX */
1508 i__1 = 1, i__2 = size - k + 2;
1509 from = max(i__1,i__2);
1510 to = size;
1511 if (s_cmp(string, rep + (from - 1), k - 1, to - (from - 1)) == 0) {
1512 s_copy(rep + (from - 1), transl, to - (from - 1), transl_len);
1513 ret_val = TRUE_;
1514 } else {
1515 ret_val = FALSE_;
1516 }
1517 return ret_val;
1518 }
1519
1520 /* Look for the substring either looking from the */
1521 /* left (L2R is YES) or from the right (L2R is NO). */
1522
1523 if (*l2r) {
1524 from = pos_(rep, string, &c__1, (ftnlen)64, string_len);
1525 } else {
1526 from = posr_(rep, string, &size, (ftnlen)64, string_len);
1527 }
1528 to = from + i_len(transl, transl_len) - 1;
1529 if (from > 0) {
1530 did = TRUE_;
1531 s_copy(rep + (from - 1), transl, to - (from - 1), transl_len);
1532 }
1533 ret_val = did;
1534 return ret_val;
1535 /* $Procedure ZZTOKNS ( Private, Time --- Time Tokens ) */
1536
1537 L_zztokns:
1538 /* $ Abstract */
1539
1540 /* SPICE Private routine intended solely for the support of SPICE */
1541 /* routines. Users should not call this routine directly due */
1542 /* to the volatile nature of this routine. */
1543
1544 /* Construct an internal tokenized representation of STRING. */
1545
1546 /* $ Disclaimer */
1547
1548 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
1549 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
1550 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
1551 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
1552 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
1553 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
1554 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
1555 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
1556 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
1557 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
1558
1559 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
1560 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
1561 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
1562 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
1563 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
1564 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
1565
1566 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
1567 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
1568 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
1569 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
1570
1571 /* $ Required_Reading */
1572
1573 /* None. */
1574
1575 /* $ Keywords */
1576
1577 /* TIME --- PRIVATE */
1578
1579 /* $ Declarations */
1580
1581 /* IMPLICIT NONE */
1582 /* CHARACTER*(*) STRING */
1583 /* CHARACTER*(*) ERROR */
1584
1585 /* $ Brief_I/O */
1586
1587 /* VARIABLE I/O DESCRIPTION */
1588 /* -------- --- -------------------------------------------------- */
1589 /* STRING I A time string to be tokenized and internalized. */
1590 /* ERROR O A diagnostic message */
1591
1592 /* The function returns TRUE is STRING can be tokenized. */
1593
1594 /* $ Detailed_Input */
1595
1596 /* STRING is a string that is intended to represent some */
1597 /* epoch and that needs parsing. */
1598
1599 /* $ Detailed_Output */
1600
1601 /* ERROR is a diagnostic message that is returned if a */
1602 /* problem occurs while trying to tokenize the */
1603 /* input time string. If no problems arise, ERROR */
1604 /* will be returned as a blank. */
1605
1606 /* The function returns TRUE if the input string can be successfully */
1607 /* tokenized. If a problem arises, the function returns FALSE */
1608 /* and diagnostic is returned in ERROR. */
1609
1610 /* $ Parameters */
1611
1612 /* None. */
1613
1614 /* $ Exceptions */
1615
1616 /* Error free. */
1617
1618 /* $ Files */
1619
1620 /* None. */
1621
1622 /* $ Particulars */
1623
1624 /* This is the first step in parsing a time string. The */
1625 /* string is examined for integers, month, weekdays, time systems */
1626 /* time zones, eras, am/pm and various separators. This */
1627 /* representation is maintained and manipulated by the */
1628 /* companion entry points in ZZTIME. */
1629
1630 /* The various recognized tokens represented by this routine */
1631 /* are: */
1632
1633 /* ' --- the quote character (year abbreviation) */
1634 /* , --- a comma (delimiter) */
1635 /* - --- a dash (delimiter) */
1636 /* . --- a period (delimiter) */
1637 /* / --- a slash (delimiter) */
1638 /* : --- a colon (delimiter) */
1639 /* N --- AM/PM marker */
1640 /* O --- UTC+ marker */
1641 /* Z --- US Time Zone Marker */
1642 /* [ --- left parenthesis marker */
1643 /* ] --- right parenthesis marker */
1644 /* b --- stands for blanks, or tabs (delimiter) */
1645 /* d --- day of year marker (delimiter) */
1646 /* e --- era marker */
1647 /* j --- Julian date system marker */
1648 /* m --- month marker */
1649 /* o --- UTC- marker */
1650 /* s --- time system marker */
1651 /* t --- the "T" marker used in ISO formats. */
1652 /* w --- the weekday marker */
1653 /* i --- unsigned integer marker */
1654
1655 /* Using the other entry points in ZZTIME, these markers are */
1656 /* gradually removed and transformed to more meaningful markers. */
1657
1658 /* $ Examples */
1659
1660 /* See TPARTV */
1661
1662 /* $ Restrictions */
1663
1664 /* None. */
1665
1666 /* $ Literature_References */
1667
1668 /* None. */
1669
1670 /* $ Author_and_Institution */
1671
1672 /* N.J. Bachman (JPL) */
1673 /* B.V. Semenov (JPL) */
1674 /* W.L. Taber (JPL) */
1675
1676 /* $ Version */
1677
1678 /* - SPICELIB Version 1.6.0, 05-JAN-2014 (NJB) */
1679
1680 /* BUG FIX: added checks for token indexes overflowing the */
1681 /* maximum number of tokens and for the character positions in */
1682 /* the time picture overflowing the time picture length. Both */
1683 /* overflows previously resulted in segmentation faults for */
1684 /* invalid input time strings that contained too many */
1685 /* recognizable tokens or were too long and required too many */
1686 /* characters in the picture representation. */
1687
1688 /* - SPICELIB Version 1.5.0, 08-MAR-2009 (NJB) */
1689
1690 /* Bug fix: changed upper bound used to detect */
1691 /* non-printing characters from 128 to 126. */
1692
1693 /* Re-ordered header sections. */
1694
1695 /* - SPICELIB Version 1.3.0, 27-OCT-2006 (BVS) */
1696
1697 /* Fixed the bug that in the case of a one character long blank */
1698 /* input time string caused the TO variable be set to the value */
1699 /* greater than the string length, triggering an OUT OF BOUNDS */
1700 /* runtime error on HP. Added a separate up-front check for the */
1701 /* blank input string. */
1702
1703 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
1704
1705 /* The main routine (which should never be called) now returns */
1706 /* the value .FALSE. */
1707
1708 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
1709
1710 /* Added a RETURN statement at the end of the main routine. */
1711 /* Enhanced error message for the case when the input string */
1712 /* to ZZTOKNS has a non-printing character. */
1713
1714 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
1715
1716
1717 /* -& */
1718
1719 /* The first time in this routine we initialize our "tokenizing" */
1720 /* table. */
1721
1722 ret_val = FALSE_;
1723 if (first) {
1724 first = FALSE_;
1725 blank = ' ';
1726
1727 /* These are the error message templates for errors generated */
1728 /* for input time strings that have too many recognizable tokens */
1729 /* or are too long for their pictures to fit in the internal */
1730 /* picture buffer. */
1731
1732 s_copy(tknerr, "The input time string '#' cannot be processed becaus"
1733 "e it contains more than @ recognizable tokens. The token tha"
1734 "t could not be processed was '#'.", (ftnlen)320, (ftnlen)145);
1735 repmi_(tknerr, "@", &c__64, tknerr, (ftnlen)320, (ftnlen)1, (ftnlen)
1736 320);
1737 s_copy(picerr, "The input time string '#' cannot be processed becaus"
1738 "e the internal picture describing it requires more than @ ch"
1739 "aracters. The token that could not be processed was '#'.", (
1740 ftnlen)320, (ftnlen)168);
1741 repmi_(picerr, "@", &c__320, picerr, (ftnlen)320, (ftnlen)1, (ftnlen)
1742 320);
1743
1744 /* Below is the list of recognized substrings. The basic */
1745 /* pattern here is to find the block of special tokens */
1746 /* that begin with a particular character. Insert into */
1747 /* that block the lines of code below */
1748
1749 /* I = I + 1 */
1750 /* F( ICHAR('letter')) = I */
1751 /* RECOG(I) = 'the full substring that's recognized ' */
1752 /* WIDTH(I) = number of characters required to match */
1753 /* CLASS(I) = 'the classification of this substring' */
1754 /* L( ICHAR('b')) = I */
1755
1756 /* Note matching is performed from the first string in the */
1757 /* group to the last. */
1758
1759
1760 for (i__ = 32; i__ <= 126; ++i__) {
1761 f[(i__1 = i__ - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1762 "zztime_", (ftnlen)1856)] = 0;
1763 l[(i__1 = i__ - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1764 "zztime_", (ftnlen)1857)] = -1;
1765 s_copy(names + (((i__1 = i__ - 32) < 95 && 0 <= i__1 ? i__1 :
1766 s_rnge("names", i__1, "zztime_", (ftnlen)1858)) << 5),
1767 "substring", (ftnlen)32, (ftnlen)9);
1768 }
1769 s_copy(names + (((i__1 = '\'' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1770 "names", i__1, "zztime_", (ftnlen)1862)) << 5), "\"Year Abbr"
1771 "eviation Mark\"", (ftnlen)32, (ftnlen)24);
1772 s_copy(names + (((i__1 = ',' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1773 "names", i__1, "zztime_", (ftnlen)1863)) << 5), "comma", (
1774 ftnlen)32, (ftnlen)5);
1775 s_copy(names + (((i__1 = '-' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1776 "names", i__1, "zztime_", (ftnlen)1864)) << 5), "dash", (
1777 ftnlen)32, (ftnlen)4);
1778 s_copy(names + (((i__1 = '.' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1779 "names", i__1, "zztime_", (ftnlen)1865)) << 5), "period", (
1780 ftnlen)32, (ftnlen)6);
1781 s_copy(names + (((i__1 = '/' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1782 "names", i__1, "zztime_", (ftnlen)1866)) << 5), "slash", (
1783 ftnlen)32, (ftnlen)5);
1784 s_copy(names + (((i__1 = ':' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1785 "names", i__1, "zztime_", (ftnlen)1867)) << 5), "colon", (
1786 ftnlen)32, (ftnlen)5);
1787 s_copy(names + (((i__1 = 'D' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1788 "names", i__1, "zztime_", (ftnlen)1868)) << 5), "Day of Month"
1789 , (ftnlen)32, (ftnlen)12);
1790 s_copy(names + (((i__1 = 'H' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1791 "names", i__1, "zztime_", (ftnlen)1869)) << 5), "Hour", (
1792 ftnlen)32, (ftnlen)4);
1793 s_copy(names + (((i__1 = 'M' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1794 "names", i__1, "zztime_", (ftnlen)1870)) << 5), "Minute", (
1795 ftnlen)32, (ftnlen)6);
1796 s_copy(names + (((i__1 = 'N' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1797 "names", i__1, "zztime_", (ftnlen)1871)) << 5), "AM/PM indic"
1798 "ator", (ftnlen)32, (ftnlen)15);
1799 s_copy(names + (((i__1 = 'O' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1800 "names", i__1, "zztime_", (ftnlen)1872)) << 5), "UTC-Offset "
1801 "indicator", (ftnlen)32, (ftnlen)20);
1802 s_copy(names + (((i__1 = 'S' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1803 "names", i__1, "zztime_", (ftnlen)1873)) << 5), "Second", (
1804 ftnlen)32, (ftnlen)6);
1805 s_copy(names + (((i__1 = 'Y' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1806 "names", i__1, "zztime_", (ftnlen)1874)) << 5), "Year", (
1807 ftnlen)32, (ftnlen)4);
1808 s_copy(names + (((i__1 = 'Z' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1809 "names", i__1, "zztime_", (ftnlen)1875)) << 5), "Time-Zone i"
1810 "ndicator", (ftnlen)32, (ftnlen)19);
1811 s_copy(names + (((i__1 = '[' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1812 "names", i__1, "zztime_", (ftnlen)1876)) << 5), "Left Parent"
1813 "hesis", (ftnlen)32, (ftnlen)16);
1814 s_copy(names + (((i__1 = ']' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1815 "names", i__1, "zztime_", (ftnlen)1877)) << 5), "Right Paren"
1816 "thesis", (ftnlen)32, (ftnlen)17);
1817 s_copy(names + (((i__1 = 'b' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1818 "names", i__1, "zztime_", (ftnlen)1878)) << 5), "White Space",
1819 (ftnlen)32, (ftnlen)11);
1820 s_copy(names + (((i__1 = 'd' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1821 "names", i__1, "zztime_", (ftnlen)1879)) << 5), "Day-of-Year"
1822 " indicator", (ftnlen)32, (ftnlen)21);
1823 s_copy(names + (((i__1 = 'e' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1824 "names", i__1, "zztime_", (ftnlen)1880)) << 5), "Era", (
1825 ftnlen)32, (ftnlen)3);
1826 s_copy(names + (((i__1 = 'i' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1827 "names", i__1, "zztime_", (ftnlen)1881)) << 5), "Integer", (
1828 ftnlen)32, (ftnlen)7);
1829 s_copy(names + (((i__1 = 'j' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1830 "names", i__1, "zztime_", (ftnlen)1882)) << 5), "Julian Date"
1831 " indicator", (ftnlen)32, (ftnlen)21);
1832 s_copy(names + (((i__1 = 'm' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1833 "names", i__1, "zztime_", (ftnlen)1883)) << 5), "Month", (
1834 ftnlen)32, (ftnlen)5);
1835 s_copy(names + (((i__1 = 'n' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1836 "names", i__1, "zztime_", (ftnlen)1884)) << 5), "Decimal Num"
1837 "ber", (ftnlen)32, (ftnlen)14);
1838 s_copy(names + (((i__1 = 'o' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1839 "names", i__1, "zztime_", (ftnlen)1885)) << 5), "UTC-Offset "
1840 "indicator", (ftnlen)32, (ftnlen)20);
1841 s_copy(names + (((i__1 = 's' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1842 "names", i__1, "zztime_", (ftnlen)1886)) << 5), "Time System"
1843 " specification", (ftnlen)32, (ftnlen)25);
1844 s_copy(names + (((i__1 = 't' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1845 "names", i__1, "zztime_", (ftnlen)1887)) << 5), "ISO Time Se"
1846 "parator", (ftnlen)32, (ftnlen)18);
1847 s_copy(names + (((i__1 = 'w' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1848 "names", i__1, "zztime_", (ftnlen)1888)) << 5), "Weekday", (
1849 ftnlen)32, (ftnlen)7);
1850 s_copy(names + (((i__1 = 'y' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
1851 "names", i__1, "zztime_", (ftnlen)1889)) << 5), "Day of Year",
1852 (ftnlen)32, (ftnlen)11);
1853 s_copy(mnmrk, "month", (ftnlen)12, (ftnlen)5);
1854 s_copy(mnmrk + 12, "MONTH", (ftnlen)12, (ftnlen)5);
1855 s_copy(mnmrk + 24, "Month", (ftnlen)12, (ftnlen)5);
1856 s_copy(mnmrk + 36, "mon", (ftnlen)12, (ftnlen)3);
1857 s_copy(mnmrk + 48, "MON", (ftnlen)12, (ftnlen)3);
1858 s_copy(mnmrk + 60, "Mon", (ftnlen)12, (ftnlen)3);
1859 s_copy(wkday, "weekday", (ftnlen)12, (ftnlen)7);
1860 s_copy(wkday + 12, "WEEKDAY", (ftnlen)12, (ftnlen)7);
1861 s_copy(wkday + 24, "Weekday", (ftnlen)12, (ftnlen)7);
1862 s_copy(wkday + 36, "wkd", (ftnlen)12, (ftnlen)3);
1863 s_copy(wkday + 48, "WKD", (ftnlen)12, (ftnlen)3);
1864 s_copy(wkday + 60, "Wkd", (ftnlen)12, (ftnlen)3);
1865
1866 /* Length of the items Month, Mon, weekday, wkd */
1867
1868 wksize[0] = 7;
1869 wksize[1] = 3;
1870 mnsize[0] = 5;
1871 mnsize[1] = 3;
1872 i__ = 0;
1873
1874 /* Tokens beginning with ' ' */
1875
1876 ++i__;
1877 f[(i__1 = ' ' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1878 "zztime_", (ftnlen)1917)] = i__;
1879 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1880 "recog", i__1, "zztime_", (ftnlen)1918)) * 12, " ", (ftnlen)
1881 12, (ftnlen)1);
1882 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1883 i__1, "zztime_", (ftnlen)1919)] = 1;
1884 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1885 s_rnge("class", i__1, "zztime_", (ftnlen)1920)] = 'b';
1886 l[(i__1 = ' ' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1887 "zztime_", (ftnlen)1921)] = i__;
1888
1889 /* Tokens beginning with '(' */
1890
1891 ++i__;
1892 f[(i__1 = '(' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1893 "zztime_", (ftnlen)1927)] = i__;
1894 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1895 "recog", i__1, "zztime_", (ftnlen)1928)) * 12, "(", (ftnlen)
1896 12, (ftnlen)1);
1897 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1898 i__1, "zztime_", (ftnlen)1929)] = 1;
1899 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1900 s_rnge("class", i__1, "zztime_", (ftnlen)1930)] = '[';
1901 l[(i__1 = '(' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1902 "zztime_", (ftnlen)1931)] = i__;
1903
1904 /* Tokens beginning with ')' */
1905
1906 ++i__;
1907 f[(i__1 = ')' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1908 "zztime_", (ftnlen)1936)] = i__;
1909 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1910 "recog", i__1, "zztime_", (ftnlen)1937)) * 12, ")", (ftnlen)
1911 12, (ftnlen)1);
1912 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1913 i__1, "zztime_", (ftnlen)1938)] = 1;
1914 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1915 s_rnge("class", i__1, "zztime_", (ftnlen)1939)] = ']';
1916 l[(i__1 = ')' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1917 "zztime_", (ftnlen)1940)] = i__;
1918
1919 /* Tokens beginning with ',' */
1920
1921 ++i__;
1922 f[(i__1 = ',' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1923 "zztime_", (ftnlen)1945)] = i__;
1924 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1925 "recog", i__1, "zztime_", (ftnlen)1946)) * 12, ",", (ftnlen)
1926 12, (ftnlen)1);
1927 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1928 i__1, "zztime_", (ftnlen)1947)] = 1;
1929 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1930 s_rnge("class", i__1, "zztime_", (ftnlen)1948)] = ',';
1931 l[(i__1 = ',' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1932 "zztime_", (ftnlen)1949)] = i__;
1933
1934 /* Tokens beginning with '-' */
1935
1936 ++i__;
1937 f[(i__1 = '-' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1938 "zztime_", (ftnlen)1955)] = i__;
1939 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1940 "recog", i__1, "zztime_", (ftnlen)1956)) * 12, "-", (ftnlen)
1941 12, (ftnlen)1);
1942 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1943 i__1, "zztime_", (ftnlen)1957)] = 1;
1944 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1945 s_rnge("class", i__1, "zztime_", (ftnlen)1958)] = '-';
1946 l[(i__1 = '-' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1947 "zztime_", (ftnlen)1959)] = i__;
1948
1949 /* Tokens beginning with '.' */
1950
1951 ++i__;
1952 f[(i__1 = '.' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1953 "zztime_", (ftnlen)1965)] = i__;
1954 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1955 "recog", i__1, "zztime_", (ftnlen)1966)) * 12, ".", (ftnlen)
1956 12, (ftnlen)1);
1957 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1958 i__1, "zztime_", (ftnlen)1967)] = 1;
1959 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1960 s_rnge("class", i__1, "zztime_", (ftnlen)1968)] = '.';
1961 l[(i__1 = '.' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1962 "zztime_", (ftnlen)1969)] = i__;
1963
1964 /* Tokens beginning with '/' */
1965
1966 ++i__;
1967 f[(i__1 = '/' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1968 "zztime_", (ftnlen)1975)] = i__;
1969 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1970 "recog", i__1, "zztime_", (ftnlen)1976)) * 12, "//", (ftnlen)
1971 12, (ftnlen)2);
1972 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1973 i__1, "zztime_", (ftnlen)1977)] = 2;
1974 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1975 s_rnge("class", i__1, "zztime_", (ftnlen)1978)] = 'd';
1976 l[(i__1 = '/' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1977 "zztime_", (ftnlen)1979)] = i__;
1978 ++i__;
1979 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1980 "recog", i__1, "zztime_", (ftnlen)1982)) * 12, "/", (ftnlen)
1981 12, (ftnlen)1);
1982 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1983 i__1, "zztime_", (ftnlen)1983)] = 1;
1984 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
1985 s_rnge("class", i__1, "zztime_", (ftnlen)1984)] = '/';
1986 l[(i__1 = '/' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
1987 "zztime_", (ftnlen)1985)] = i__;
1988
1989 /* Tokens beginning with ':' */
1990
1991 ++i__;
1992 f[(i__1 = ':' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
1993 "zztime_", (ftnlen)1990)] = i__;
1994 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
1995 "recog", i__1, "zztime_", (ftnlen)1991)) * 12, "::", (ftnlen)
1996 12, (ftnlen)2);
1997 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
1998 i__1, "zztime_", (ftnlen)1992)] = 2;
1999 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2000 s_rnge("class", i__1, "zztime_", (ftnlen)1993)] = 'd';
2001 l[(i__1 = ':' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2002 "zztime_", (ftnlen)1994)] = i__;
2003 ++i__;
2004 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2005 "recog", i__1, "zztime_", (ftnlen)1997)) * 12, ":", (ftnlen)
2006 12, (ftnlen)1);
2007 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2008 i__1, "zztime_", (ftnlen)1998)] = 1;
2009 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2010 s_rnge("class", i__1, "zztime_", (ftnlen)1999)] = ':';
2011 l[(i__1 = ':' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2012 "zztime_", (ftnlen)2000)] = i__;
2013
2014 /* Tokens beginning with 'A' */
2015
2016 ++i__;
2017 f[(i__1 = 'A' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2018 "zztime_", (ftnlen)2006)] = i__;
2019 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2020 "recog", i__1, "zztime_", (ftnlen)2007)) * 12, "A.D.", (
2021 ftnlen)12, (ftnlen)4);
2022 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2023 i__1, "zztime_", (ftnlen)2008)] = 4;
2024 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2025 s_rnge("class", i__1, "zztime_", (ftnlen)2009)] = 'e';
2026 l[(i__1 = 'A' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2027 "zztime_", (ftnlen)2010)] = i__;
2028 ++i__;
2029 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2030 "recog", i__1, "zztime_", (ftnlen)2013)) * 12, "AD", (ftnlen)
2031 12, (ftnlen)2);
2032 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2033 i__1, "zztime_", (ftnlen)2014)] = 2;
2034 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2035 s_rnge("class", i__1, "zztime_", (ftnlen)2015)] = 'e';
2036 l[(i__1 = 'A' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2037 "zztime_", (ftnlen)2016)] = i__;
2038 ++i__;
2039 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2040 "recog", i__1, "zztime_", (ftnlen)2019)) * 12, "A.M.", (
2041 ftnlen)12, (ftnlen)4);
2042 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2043 i__1, "zztime_", (ftnlen)2020)] = 4;
2044 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2045 s_rnge("class", i__1, "zztime_", (ftnlen)2021)] = 'N';
2046 l[(i__1 = 'A' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2047 "zztime_", (ftnlen)2022)] = i__;
2048 ++i__;
2049 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2050 "recog", i__1, "zztime_", (ftnlen)2025)) * 12, "AM", (ftnlen)
2051 12, (ftnlen)2);
2052 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2053 i__1, "zztime_", (ftnlen)2026)] = 2;
2054 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2055 s_rnge("class", i__1, "zztime_", (ftnlen)2027)] = 'N';
2056 l[(i__1 = 'A' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2057 "zztime_", (ftnlen)2028)] = i__;
2058 ++i__;
2059 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2060 "recog", i__1, "zztime_", (ftnlen)2031)) * 12, "APRIL", (
2061 ftnlen)12, (ftnlen)5);
2062 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2063 i__1, "zztime_", (ftnlen)2032)] = 3;
2064 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2065 s_rnge("class", i__1, "zztime_", (ftnlen)2033)] = 'm';
2066 l[(i__1 = 'A' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2067 "zztime_", (ftnlen)2034)] = i__;
2068 ++i__;
2069 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2070 "recog", i__1, "zztime_", (ftnlen)2037)) * 12, "AUGUST", (
2071 ftnlen)12, (ftnlen)6);
2072 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2073 i__1, "zztime_", (ftnlen)2038)] = 3;
2074 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2075 s_rnge("class", i__1, "zztime_", (ftnlen)2039)] = 'm';
2076 l[(i__1 = 'A' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2077 "zztime_", (ftnlen)2040)] = i__;
2078
2079 /* Tokens beginning with 'B' */
2080
2081 ++i__;
2082 f[(i__1 = 'B' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2083 "zztime_", (ftnlen)2046)] = i__;
2084 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2085 "recog", i__1, "zztime_", (ftnlen)2047)) * 12, "B.C.", (
2086 ftnlen)12, (ftnlen)4);
2087 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2088 i__1, "zztime_", (ftnlen)2048)] = 4;
2089 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2090 s_rnge("class", i__1, "zztime_", (ftnlen)2049)] = 'e';
2091 l[(i__1 = 'B' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2092 "zztime_", (ftnlen)2050)] = i__;
2093 ++i__;
2094 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2095 "recog", i__1, "zztime_", (ftnlen)2053)) * 12, "BC", (ftnlen)
2096 12, (ftnlen)2);
2097 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2098 i__1, "zztime_", (ftnlen)2054)] = 2;
2099 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2100 s_rnge("class", i__1, "zztime_", (ftnlen)2055)] = 'e';
2101 l[(i__1 = 'B' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2102 "zztime_", (ftnlen)2056)] = i__;
2103
2104 /* Tokens beginning with 'C' */
2105
2106 ++i__;
2107 f[(i__1 = 'C' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2108 "zztime_", (ftnlen)2062)] = i__;
2109 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2110 "recog", i__1, "zztime_", (ftnlen)2063)) * 12, "CDT", (ftnlen)
2111 12, (ftnlen)3);
2112 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2113 i__1, "zztime_", (ftnlen)2064)] = 3;
2114 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2115 s_rnge("class", i__1, "zztime_", (ftnlen)2065)] = 'Z';
2116 l[(i__1 = 'C' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2117 "zztime_", (ftnlen)2066)] = i__;
2118 ++i__;
2119 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2120 "recog", i__1, "zztime_", (ftnlen)2069)) * 12, "CST", (ftnlen)
2121 12, (ftnlen)3);
2122 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2123 i__1, "zztime_", (ftnlen)2070)] = 3;
2124 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2125 s_rnge("class", i__1, "zztime_", (ftnlen)2071)] = 'Z';
2126 l[(i__1 = 'C' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2127 "zztime_", (ftnlen)2072)] = i__;
2128
2129 /* Tokens beginning with 'D' */
2130
2131 ++i__;
2132 f[(i__1 = 'D' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2133 "zztime_", (ftnlen)2078)] = i__;
2134 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2135 "recog", i__1, "zztime_", (ftnlen)2079)) * 12, "DECEMBER", (
2136 ftnlen)12, (ftnlen)8);
2137 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2138 i__1, "zztime_", (ftnlen)2080)] = 3;
2139 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2140 s_rnge("class", i__1, "zztime_", (ftnlen)2081)] = 'm';
2141 l[(i__1 = 'D' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2142 "zztime_", (ftnlen)2082)] = i__;
2143 ++i__;
2144 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2145 "recog", i__1, "zztime_", (ftnlen)2085)) * 12, "D+", (ftnlen)
2146 12, (ftnlen)2);
2147 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2148 i__1, "zztime_", (ftnlen)2086)] = 2;
2149 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2150 s_rnge("class", i__1, "zztime_", (ftnlen)2087)] = 'E';
2151 l[(i__1 = 'D' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2152 "zztime_", (ftnlen)2088)] = i__;
2153 ++i__;
2154 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2155 "recog", i__1, "zztime_", (ftnlen)2091)) * 12, "D-", (ftnlen)
2156 12, (ftnlen)2);
2157 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2158 i__1, "zztime_", (ftnlen)2092)] = 2;
2159 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2160 s_rnge("class", i__1, "zztime_", (ftnlen)2093)] = 'E';
2161 l[(i__1 = 'D' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2162 "zztime_", (ftnlen)2094)] = i__;
2163 ++i__;
2164 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2165 "recog", i__1, "zztime_", (ftnlen)2097)) * 12, "D", (ftnlen)
2166 12, (ftnlen)1);
2167 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2168 i__1, "zztime_", (ftnlen)2098)] = 1;
2169 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2170 s_rnge("class", i__1, "zztime_", (ftnlen)2099)] = 'E';
2171 l[(i__1 = 'D' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2172 "zztime_", (ftnlen)2100)] = i__;
2173
2174 /* Tokens beginning with 'E' */
2175
2176 ++i__;
2177 f[(i__1 = 'E' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2178 "zztime_", (ftnlen)2109)] = i__;
2179 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2180 "recog", i__1, "zztime_", (ftnlen)2110)) * 12, "EDT", (ftnlen)
2181 12, (ftnlen)3);
2182 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2183 i__1, "zztime_", (ftnlen)2111)] = 3;
2184 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2185 s_rnge("class", i__1, "zztime_", (ftnlen)2112)] = 'Z';
2186 l[(i__1 = 'E' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2187 "zztime_", (ftnlen)2113)] = i__;
2188 ++i__;
2189 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2190 "recog", i__1, "zztime_", (ftnlen)2116)) * 12, "EST", (ftnlen)
2191 12, (ftnlen)3);
2192 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2193 i__1, "zztime_", (ftnlen)2117)] = 3;
2194 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2195 s_rnge("class", i__1, "zztime_", (ftnlen)2118)] = 'Z';
2196 l[(i__1 = 'E' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2197 "zztime_", (ftnlen)2119)] = i__;
2198 ++i__;
2199 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2200 "recog", i__1, "zztime_", (ftnlen)2122)) * 12, "E+", (ftnlen)
2201 12, (ftnlen)2);
2202 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2203 i__1, "zztime_", (ftnlen)2123)] = 2;
2204 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2205 s_rnge("class", i__1, "zztime_", (ftnlen)2124)] = 'E';
2206 l[(i__1 = 'E' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2207 "zztime_", (ftnlen)2125)] = i__;
2208 ++i__;
2209 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2210 "recog", i__1, "zztime_", (ftnlen)2128)) * 12, "E-", (ftnlen)
2211 12, (ftnlen)2);
2212 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2213 i__1, "zztime_", (ftnlen)2129)] = 2;
2214 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2215 s_rnge("class", i__1, "zztime_", (ftnlen)2130)] = 'E';
2216 l[(i__1 = 'E' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2217 "zztime_", (ftnlen)2131)] = i__;
2218 ++i__;
2219 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2220 "recog", i__1, "zztime_", (ftnlen)2134)) * 12, "E", (ftnlen)
2221 12, (ftnlen)1);
2222 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2223 i__1, "zztime_", (ftnlen)2135)] = 1;
2224 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2225 s_rnge("class", i__1, "zztime_", (ftnlen)2136)] = 'E';
2226 l[(i__1 = 'E' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2227 "zztime_", (ftnlen)2137)] = i__;
2228
2229 /* Tokens beginning with 'F' */
2230
2231 ++i__;
2232 f[(i__1 = 'F' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2233 "zztime_", (ftnlen)2144)] = i__;
2234 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2235 "recog", i__1, "zztime_", (ftnlen)2145)) * 12, "FEBRUARY", (
2236 ftnlen)12, (ftnlen)8);
2237 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2238 i__1, "zztime_", (ftnlen)2146)] = 3;
2239 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2240 s_rnge("class", i__1, "zztime_", (ftnlen)2147)] = 'm';
2241 l[(i__1 = 'F' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2242 "zztime_", (ftnlen)2148)] = i__;
2243 ++i__;
2244 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2245 "recog", i__1, "zztime_", (ftnlen)2151)) * 12, "FRIDAY", (
2246 ftnlen)12, (ftnlen)6);
2247 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2248 i__1, "zztime_", (ftnlen)2152)] = 3;
2249 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2250 s_rnge("class", i__1, "zztime_", (ftnlen)2153)] = 'w';
2251 l[(i__1 = 'F' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2252 "zztime_", (ftnlen)2154)] = i__;
2253
2254 /* Tokens beginning with 'J' */
2255
2256 ++i__;
2257 f[(i__1 = 'J' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2258 "zztime_", (ftnlen)2160)] = i__;
2259 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2260 "recog", i__1, "zztime_", (ftnlen)2161)) * 12, "JANUARY", (
2261 ftnlen)12, (ftnlen)7);
2262 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2263 i__1, "zztime_", (ftnlen)2162)] = 3;
2264 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2265 s_rnge("class", i__1, "zztime_", (ftnlen)2163)] = 'm';
2266 l[(i__1 = 'J' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2267 "zztime_", (ftnlen)2164)] = i__;
2268 ++i__;
2269 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2270 "recog", i__1, "zztime_", (ftnlen)2167)) * 12, "JD", (ftnlen)
2271 12, (ftnlen)2);
2272 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2273 i__1, "zztime_", (ftnlen)2168)] = 2;
2274 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2275 s_rnge("class", i__1, "zztime_", (ftnlen)2169)] = 'j';
2276 l[(i__1 = 'J' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2277 "zztime_", (ftnlen)2170)] = i__;
2278 ++i__;
2279 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2280 "recog", i__1, "zztime_", (ftnlen)2173)) * 12, "JULY", (
2281 ftnlen)12, (ftnlen)4);
2282 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2283 i__1, "zztime_", (ftnlen)2174)] = 3;
2284 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2285 s_rnge("class", i__1, "zztime_", (ftnlen)2175)] = 'm';
2286 l[(i__1 = 'J' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2287 "zztime_", (ftnlen)2176)] = i__;
2288 ++i__;
2289 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2290 "recog", i__1, "zztime_", (ftnlen)2179)) * 12, "JUNE", (
2291 ftnlen)12, (ftnlen)4);
2292 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2293 i__1, "zztime_", (ftnlen)2180)] = 3;
2294 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2295 s_rnge("class", i__1, "zztime_", (ftnlen)2181)] = 'm';
2296 l[(i__1 = 'J' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2297 "zztime_", (ftnlen)2182)] = i__;
2298
2299 /* Tokens beginning with 'M' */
2300
2301 ++i__;
2302 f[(i__1 = 'M' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2303 "zztime_", (ftnlen)2188)] = i__;
2304 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2305 "recog", i__1, "zztime_", (ftnlen)2189)) * 12, "MARCH", (
2306 ftnlen)12, (ftnlen)5);
2307 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2308 i__1, "zztime_", (ftnlen)2190)] = 3;
2309 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2310 s_rnge("class", i__1, "zztime_", (ftnlen)2191)] = 'm';
2311 l[(i__1 = 'M' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2312 "zztime_", (ftnlen)2192)] = i__;
2313 ++i__;
2314 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2315 "recog", i__1, "zztime_", (ftnlen)2195)) * 12, "MAY", (ftnlen)
2316 12, (ftnlen)3);
2317 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2318 i__1, "zztime_", (ftnlen)2196)] = 3;
2319 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2320 s_rnge("class", i__1, "zztime_", (ftnlen)2197)] = 'm';
2321 l[(i__1 = 'M' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2322 "zztime_", (ftnlen)2198)] = i__;
2323 ++i__;
2324 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2325 "recog", i__1, "zztime_", (ftnlen)2201)) * 12, "MDT", (ftnlen)
2326 12, (ftnlen)3);
2327 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2328 i__1, "zztime_", (ftnlen)2202)] = 3;
2329 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2330 s_rnge("class", i__1, "zztime_", (ftnlen)2203)] = 'Z';
2331 l[(i__1 = 'M' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2332 "zztime_", (ftnlen)2204)] = i__;
2333 ++i__;
2334 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2335 "recog", i__1, "zztime_", (ftnlen)2207)) * 12, "MONDAY", (
2336 ftnlen)12, (ftnlen)6);
2337 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2338 i__1, "zztime_", (ftnlen)2208)] = 3;
2339 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2340 s_rnge("class", i__1, "zztime_", (ftnlen)2209)] = 'w';
2341 l[(i__1 = 'M' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2342 "zztime_", (ftnlen)2210)] = i__;
2343 ++i__;
2344 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2345 "recog", i__1, "zztime_", (ftnlen)2213)) * 12, "MST", (ftnlen)
2346 12, (ftnlen)3);
2347 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2348 i__1, "zztime_", (ftnlen)2214)] = 3;
2349 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2350 s_rnge("class", i__1, "zztime_", (ftnlen)2215)] = 'Z';
2351 l[(i__1 = 'M' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2352 "zztime_", (ftnlen)2216)] = i__;
2353
2354 /* Tokens beginning with 'N' */
2355
2356 ++i__;
2357 f[(i__1 = 'N' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2358 "zztime_", (ftnlen)2222)] = i__;
2359 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2360 "recog", i__1, "zztime_", (ftnlen)2223)) * 12, "NOVEMBER", (
2361 ftnlen)12, (ftnlen)8);
2362 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2363 i__1, "zztime_", (ftnlen)2224)] = 3;
2364 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2365 s_rnge("class", i__1, "zztime_", (ftnlen)2225)] = 'm';
2366 l[(i__1 = 'N' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2367 "zztime_", (ftnlen)2226)] = i__;
2368
2369 /* Tokens beginning with 'O' */
2370
2371 ++i__;
2372 f[(i__1 = 'O' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2373 "zztime_", (ftnlen)2232)] = i__;
2374 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2375 "recog", i__1, "zztime_", (ftnlen)2233)) * 12, "OCTOBER", (
2376 ftnlen)12, (ftnlen)7);
2377 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2378 i__1, "zztime_", (ftnlen)2234)] = 3;
2379 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2380 s_rnge("class", i__1, "zztime_", (ftnlen)2235)] = 'm';
2381 l[(i__1 = 'O' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2382 "zztime_", (ftnlen)2236)] = i__;
2383
2384 /* Tokens beginning with 'P' */
2385
2386 ++i__;
2387 f[(i__1 = 'P' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2388 "zztime_", (ftnlen)2242)] = i__;
2389 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2390 "recog", i__1, "zztime_", (ftnlen)2243)) * 12, "P.M.", (
2391 ftnlen)12, (ftnlen)4);
2392 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2393 i__1, "zztime_", (ftnlen)2244)] = 4;
2394 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2395 s_rnge("class", i__1, "zztime_", (ftnlen)2245)] = 'N';
2396 l[(i__1 = 'P' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2397 "zztime_", (ftnlen)2246)] = i__;
2398 ++i__;
2399 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2400 "recog", i__1, "zztime_", (ftnlen)2249)) * 12, "PDT", (ftnlen)
2401 12, (ftnlen)3);
2402 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2403 i__1, "zztime_", (ftnlen)2250)] = 3;
2404 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2405 s_rnge("class", i__1, "zztime_", (ftnlen)2251)] = 'Z';
2406 l[(i__1 = 'P' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2407 "zztime_", (ftnlen)2252)] = i__;
2408 ++i__;
2409 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2410 "recog", i__1, "zztime_", (ftnlen)2255)) * 12, "PM", (ftnlen)
2411 12, (ftnlen)2);
2412 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2413 i__1, "zztime_", (ftnlen)2256)] = 2;
2414 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2415 s_rnge("class", i__1, "zztime_", (ftnlen)2257)] = 'N';
2416 l[(i__1 = 'P' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2417 "zztime_", (ftnlen)2258)] = i__;
2418 ++i__;
2419 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2420 "recog", i__1, "zztime_", (ftnlen)2261)) * 12, "PST", (ftnlen)
2421 12, (ftnlen)3);
2422 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2423 i__1, "zztime_", (ftnlen)2262)] = 3;
2424 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2425 s_rnge("class", i__1, "zztime_", (ftnlen)2263)] = 'Z';
2426 l[(i__1 = 'P' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2427 "zztime_", (ftnlen)2264)] = i__;
2428
2429 /* Tokens beginning with 'S' */
2430
2431 ++i__;
2432 f[(i__1 = 'S' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2433 "zztime_", (ftnlen)2270)] = i__;
2434 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2435 "recog", i__1, "zztime_", (ftnlen)2271)) * 12, "SATURDAY", (
2436 ftnlen)12, (ftnlen)8);
2437 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2438 i__1, "zztime_", (ftnlen)2272)] = 3;
2439 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2440 s_rnge("class", i__1, "zztime_", (ftnlen)2273)] = 'w';
2441 l[(i__1 = 'S' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2442 "zztime_", (ftnlen)2274)] = i__;
2443 ++i__;
2444 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2445 "recog", i__1, "zztime_", (ftnlen)2277)) * 12, "SEPTEMBER", (
2446 ftnlen)12, (ftnlen)9);
2447 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2448 i__1, "zztime_", (ftnlen)2278)] = 3;
2449 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2450 s_rnge("class", i__1, "zztime_", (ftnlen)2279)] = 'm';
2451 l[(i__1 = 'S' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2452 "zztime_", (ftnlen)2280)] = i__;
2453 ++i__;
2454 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2455 "recog", i__1, "zztime_", (ftnlen)2283)) * 12, "SUNDAY", (
2456 ftnlen)12, (ftnlen)6);
2457 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2458 i__1, "zztime_", (ftnlen)2284)] = 3;
2459 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2460 s_rnge("class", i__1, "zztime_", (ftnlen)2285)] = 'w';
2461 l[(i__1 = 'S' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2462 "zztime_", (ftnlen)2286)] = i__;
2463
2464 /* Tokens beginning with 'T' */
2465
2466 ++i__;
2467 f[(i__1 = 'T' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2468 "zztime_", (ftnlen)2292)] = i__;
2469 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2470 "recog", i__1, "zztime_", (ftnlen)2293)) * 12, "TDB", (ftnlen)
2471 12, (ftnlen)3);
2472 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2473 i__1, "zztime_", (ftnlen)2294)] = 3;
2474 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2475 s_rnge("class", i__1, "zztime_", (ftnlen)2295)] = 's';
2476 l[(i__1 = 'T' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2477 "zztime_", (ftnlen)2296)] = i__;
2478 ++i__;
2479 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2480 "recog", i__1, "zztime_", (ftnlen)2299)) * 12, "TDT", (ftnlen)
2481 12, (ftnlen)3);
2482 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2483 i__1, "zztime_", (ftnlen)2300)] = 3;
2484 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2485 s_rnge("class", i__1, "zztime_", (ftnlen)2301)] = 's';
2486 l[(i__1 = 'T' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2487 "zztime_", (ftnlen)2302)] = i__;
2488 ++i__;
2489 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2490 "recog", i__1, "zztime_", (ftnlen)2305)) * 12, "THURSDAY", (
2491 ftnlen)12, (ftnlen)8);
2492 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2493 i__1, "zztime_", (ftnlen)2306)] = 3;
2494 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2495 s_rnge("class", i__1, "zztime_", (ftnlen)2307)] = 'w';
2496 l[(i__1 = 'T' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2497 "zztime_", (ftnlen)2308)] = i__;
2498 ++i__;
2499 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2500 "recog", i__1, "zztime_", (ftnlen)2311)) * 12, "TUESDAY", (
2501 ftnlen)12, (ftnlen)7);
2502 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2503 i__1, "zztime_", (ftnlen)2312)] = 3;
2504 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2505 s_rnge("class", i__1, "zztime_", (ftnlen)2313)] = 'w';
2506 l[(i__1 = 'T' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2507 "zztime_", (ftnlen)2314)] = i__;
2508 ++i__;
2509 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2510 "recog", i__1, "zztime_", (ftnlen)2317)) * 12, "T", (ftnlen)
2511 12, (ftnlen)1);
2512 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2513 i__1, "zztime_", (ftnlen)2318)] = 1;
2514 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2515 s_rnge("class", i__1, "zztime_", (ftnlen)2319)] = 't';
2516 l[(i__1 = 'T' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2517 "zztime_", (ftnlen)2320)] = i__;
2518
2519 /* Tokens beginning with 'U' */
2520
2521 ++i__;
2522 f[(i__1 = 'U' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2523 "zztime_", (ftnlen)2326)] = i__;
2524 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2525 "recog", i__1, "zztime_", (ftnlen)2327)) * 12, "UTC+", (
2526 ftnlen)12, (ftnlen)4);
2527 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2528 i__1, "zztime_", (ftnlen)2328)] = 4;
2529 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2530 s_rnge("class", i__1, "zztime_", (ftnlen)2329)] = 'O';
2531 l[(i__1 = 'U' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2532 "zztime_", (ftnlen)2330)] = i__;
2533 ++i__;
2534 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2535 "recog", i__1, "zztime_", (ftnlen)2333)) * 12, "UTC-", (
2536 ftnlen)12, (ftnlen)4);
2537 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2538 i__1, "zztime_", (ftnlen)2334)] = 4;
2539 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2540 s_rnge("class", i__1, "zztime_", (ftnlen)2335)] = 'o';
2541 l[(i__1 = 'U' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2542 "zztime_", (ftnlen)2336)] = i__;
2543 ++i__;
2544 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2545 "recog", i__1, "zztime_", (ftnlen)2339)) * 12, "UTC", (ftnlen)
2546 12, (ftnlen)3);
2547 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2548 i__1, "zztime_", (ftnlen)2340)] = 3;
2549 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2550 s_rnge("class", i__1, "zztime_", (ftnlen)2341)] = 's';
2551 l[(i__1 = 'U' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2552 "zztime_", (ftnlen)2342)] = i__;
2553
2554 /* Tokens beginning with '''' */
2555
2556 ++i__;
2557 f[(i__1 = '\'' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2558 "zztime_", (ftnlen)2347)] = i__;
2559 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2560 "recog", i__1, "zztime_", (ftnlen)2348)) * 12, "'", (ftnlen)
2561 12, (ftnlen)1);
2562 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2563 i__1, "zztime_", (ftnlen)2349)] = 1;
2564 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2565 s_rnge("class", i__1, "zztime_", (ftnlen)2350)] = '\'';
2566 l[(i__1 = '\'' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2567 "zztime_", (ftnlen)2351)] = i__;
2568
2569 /* Tokens beginning with 'W' */
2570
2571 ++i__;
2572 f[(i__1 = 'W' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("f", i__1,
2573 "zztime_", (ftnlen)2356)] = i__;
2574 s_copy(recog + ((i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2575 "recog", i__1, "zztime_", (ftnlen)2357)) * 12, "WEDNESDAY", (
2576 ftnlen)12, (ftnlen)9);
2577 width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge("width",
2578 i__1, "zztime_", (ftnlen)2358)] = 3;
2579 *(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 :
2580 s_rnge("class", i__1, "zztime_", (ftnlen)2359)] = 'w';
2581 l[(i__1 = 'W' - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge("l", i__1,
2582 "zztime_", (ftnlen)2360)] = i__;
2583 }
2584
2585 /* If the input string is blank, return with an error message. */
2586
2587 if (s_cmp(string, " ", string_len, (ftnlen)1) == 0) {
2588 s_copy(error, "The input time string is blank.", error_len, (ftnlen)
2589 31);
2590 ret_val = FALSE_;
2591 return ret_val;
2592 }
2593
2594 /* OK. Initializations are out of the way. We now take */
2595 /* apart the string. */
2596
2597 did = FALSE_;
2598 s_copy(error, " ", error_len, (ftnlen)1);
2599 s_copy(rep, " ", (ftnlen)64, (ftnlen)1);
2600 s_copy(pictur, " ", (ftnlen)320, (ftnlen)1);
2601 size = 0;
2602 next = 1;
2603 pnext = 1;
2604 put = 0;
2605 ampm = FALSE_;
2606 last = rtrim_(string, string_len);
2607 while(next <= last) {
2608
2609 /* FROM and NEXT point to parts of the string, PFROM and PNEXT */
2610 /* point to parts of the picture we will construct. */
2611
2612 from = next;
2613 pfrom = pnext;
2614 item = *(unsigned char *)&string[next - 1];
2615
2616 /* First we try to find an unsigned integer in the string. */
2617
2618 lx4uns_(string, &from, &to, &nchar, last);
2619 if (nchar > 0) {
2620
2621 /* We found an unsigned integer, add a letter to the */
2622 /* internal representation, note the begin and end */
2623 /* of the token and set NEXT to the first character */
2624 /* beyond this token. */
2625
2626 ++put;
2627 if (put > 64) {
2628 zztknerr_(tknerr, string, string + (from - 1), error, &
2629 ret_val, (ftnlen)320, string_len, to - (from - 1),
2630 error_len);
2631 return ret_val;
2632 }
2633 *(unsigned char *)&rep[put - 1] = 'i';
2634 begs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
2635 i__1, "zztime_", (ftnlen)2417)] = from;
2636 ends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
2637 i__1, "zztime_", (ftnlen)2418)] = to;
2638 next = to + 1;
2639 pto = pfrom + nchar - 1;
2640 if (pto > 320) {
2641 zztknerr_(picerr, string, string + (from - 1), error, &
2642 ret_val, (ftnlen)320, string_len, to - (from - 1),
2643 error_len);
2644 return ret_val;
2645 }
2646 pnext = pto + 1;
2647 s_copy(pictur + (pfrom - 1), string + (from - 1), pto - (pfrom -
2648 1), to - (from - 1));
2649 pbegs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("pbegs",
2650 i__1, "zztime_", (ftnlen)2430)] = pfrom;
2651 pends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("pends",
2652 i__1, "zztime_", (ftnlen)2431)] = pto;
2653 } else if (item == blank) {
2654
2655 /* We have a blank. We lump all consecutive */
2656 /* blanks together as one big fat blank. */
2657
2658 ++put;
2659 if (put > 64) {
2660 zztknerr_(tknerr, string, " ", error, &ret_val, (ftnlen)320,
2661 string_len, (ftnlen)1, error_len);
2662 return ret_val;
2663 }
2664 to = from;
2665 begs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
2666 i__1, "zztime_", (ftnlen)2446)] = from;
2667 *(unsigned char *)&rep[put - 1] = 'b';
2668 while(item == blank && to <= last) {
2669 ++to;
2670 if (to <= last) {
2671 item = *(unsigned char *)&string[to - 1];
2672 }
2673 }
2674 next = to;
2675 --to;
2676 ends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
2677 i__1, "zztime_", (ftnlen)2460)] = to;
2678 pto = pfrom + to - from;
2679 if (pto > 320) {
2680 zztknerr_(picerr, string, " ", error, &ret_val, (ftnlen)320,
2681 string_len, (ftnlen)1, error_len);
2682 return ret_val;
2683 }
2684 pnext = pto + 1;
2685 s_copy(pictur + (pfrom - 1), string + (from - 1), pto - (pfrom -
2686 1), to - (from - 1));
2687 pbegs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("pbegs",
2688 i__1, "zztime_", (ftnlen)2471)] = pfrom;
2689 pends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("pends",
2690 i__1, "zztime_", (ftnlen)2472)] = pto;
2691 } else if (item == 9) {
2692
2693 /* We've got a tab character, we treat tabs as */
2694 /* blanks. */
2695
2696 ++put;
2697 if (put > 64) {
2698 zztknerr_(tknerr, string, "<TAB>", error, &ret_val, (ftnlen)
2699 320, string_len, (ftnlen)5, error_len);
2700 return ret_val;
2701 }
2702 *(unsigned char *)&rep[put - 1] = 'b';
2703 begs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
2704 i__1, "zztime_", (ftnlen)2488)] = from;
2705 ends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
2706 i__1, "zztime_", (ftnlen)2489)] = from;
2707 ++next;
2708 pto = pfrom;
2709 if (pto > 320) {
2710 zztknerr_(picerr, string, "<TAB>", error, &ret_val, (ftnlen)
2711 320, string_len, (ftnlen)5, error_len);
2712 return ret_val;
2713 }
2714 pnext = pto + 1;
2715 s_copy(pictur + (pfrom - 1), " ", pto - (pfrom - 1), (ftnlen)1);
2716 pbegs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("pbegs",
2717 i__1, "zztime_", (ftnlen)2502)] = pfrom;
2718 pends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("pends",
2719 i__1, "zztime_", (ftnlen)2503)] = pfrom;
2720 } else if (item < 32 || item > 126) {
2721
2722 /* This is a non-printing character. This is */
2723 /* regarded as an error. */
2724
2725 s_copy(error, string, error_len, string_len);
2726 zzinssub_(error, "<", &next, error, error_len, (ftnlen)1,
2727 error_len);
2728
2729 /* Overwrite the non-printing character with a */
2730 /* closing angle bracket. */
2731
2732 if (next < i_len(error, error_len)) {
2733 i__1 = next;
2734 s_copy(error + i__1, ">", next + 1 - i__1, (ftnlen)1);
2735 }
2736 prefix_("There is a non-printing, non-tab character (ASCII #) at"
2737 " position # of the time string: ", &c__1, error, (ftnlen)
2738 87, error_len);
2739 repmi_(error, "#", &item, error, error_len, (ftnlen)1, error_len);
2740 repmi_(error, "#", &next, error, error_len, (ftnlen)1, error_len);
2741 ret_val = FALSE_;
2742 return ret_val;
2743 } else {
2744
2745 /* This has to be one of the known types or we */
2746 /* have an unknown component in the string. We've constructed */
2747 /* a "parsing" table for handling these special cases. */
2748 /* This table uses the first letter of the string */
2749 /* to begin a search. We get that code and force it */
2750 /* into a suitable range. */
2751
2752 ucase_(string + (next - 1), this__, (ftnlen)1, (ftnlen)1);
2753 item = *(unsigned char *)this__;
2754 from = next;
2755 check = TRUE_;
2756 i__ = f[(i__1 = item - 32) < 95 && 0 <= i__1 ? i__1 : s_rnge(
2757 "f", i__1, "zztime_", (ftnlen)2547)];
2758 while(check && i__ <= l[(i__1 = item - 32) < 95 && 0 <= i__1 ?
2759 i__1 : s_rnge("l", i__1, "zztime_", (ftnlen)2549)]) {
2760 w = width[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1 : s_rnge(
2761 "width", i__1, "zztime_", (ftnlen)2551)];
2762 to = from + w - 1;
2763 got = samsbi_(string, &from, &to, recog + ((i__1 = i__ - 1) <
2764 70 && 0 <= i__1 ? i__1 : s_rnge("recog", i__1, "zzti"
2765 "me_", (ftnlen)2554)) * 12, &c__1, &w, string_len, (
2766 ftnlen)12);
2767 if (got) {
2768
2769 /* We have a match. If it is the match of a month */
2770 /* or day of the week, we keep looking for the */
2771 /* end of the match. */
2772
2773 if (*(unsigned char *)&class__[(i__1 = i__ - 1) < 70 && 0
2774 <= i__1 ? i__1 : s_rnge("class", i__1, "zztime_",
2775 (ftnlen)2562)] == 'm' || *(unsigned char *)&
2776 class__[(i__2 = i__ - 1) < 70 && 0 <= i__2 ? i__2
2777 : s_rnge("class", i__2, "zztime_", (ftnlen)2562)]
2778 == 'w') {
2779 s_copy(spcial, recog + ((i__1 = i__ - 1) < 70 && 0 <=
2780 i__1 ? i__1 : s_rnge("recog", i__1, "zztime_",
2781 (ftnlen)2566)) * 12, (ftnlen)12, (ftnlen)12);
2782 r__ = rtrim_(spcial, (ftnlen)12);
2783 ++w;
2784 ++to;
2785 while(samchi_(string, &to, spcial, &w, string_len,
2786 r__)) {
2787 ++w;
2788 ++to;
2789 }
2790 --to;
2791 if (w > r__) {
2792 kind = 1;
2793 } else {
2794 kind = 2;
2795 }
2796 if (*(unsigned char *)this__ != *(unsigned char *)&
2797 string[next - 1]) {
2798 case__ = 1;
2799 } else if (s_cmp(string + (next - 1), spcial, (ftnlen)
2800 3, (ftnlen)3) == 0) {
2801 case__ = 2;
2802 } else {
2803 case__ = 3;
2804 }
2805 if (*(unsigned char *)&class__[(i__1 = i__ - 1) < 70
2806 && 0 <= i__1 ? i__1 : s_rnge("class", i__1,
2807 "zztime_", (ftnlen)2593)] == 'm') {
2808 pto = pfrom + mnsize[(i__1 = kind - 1) < 2 && 0 <=
2809 i__1 ? i__1 : s_rnge("mnsize", i__1,
2810 "zztime_", (ftnlen)2595)] - 1;
2811 if (pto > 320) {
2812 zztknerr_(picerr, string, string + (from - 1),
2813 error, &ret_val, (ftnlen)320,
2814 string_len, to - (from - 1),
2815 error_len);
2816 return ret_val;
2817 }
2818 pnext = pto + 1;
2819 s_copy(pictur + (pfrom - 1), mnmrk + ((i__1 =
2820 case__ + kind * 3 - 4) < 6 && 0 <= i__1 ?
2821 i__1 : s_rnge("mnmrk", i__1, "zztime_", (
2822 ftnlen)2604)) * 12, pto - (pfrom - 1), (
2823 ftnlen)12);
2824 } else {
2825 pto = pfrom + wksize[(i__1 = kind - 1) < 2 && 0 <=
2826 i__1 ? i__1 : s_rnge("wksize", i__1,
2827 "zztime_", (ftnlen)2608)] - 1;
2828 if (pto > 320) {
2829 zztknerr_(picerr, string, string + (from - 1),
2830 error, &ret_val, (ftnlen)320,
2831 string_len, to - (from - 1),
2832 error_len);
2833 return ret_val;
2834 }
2835 pnext = pto + 1;
2836 s_copy(pictur + (pfrom - 1), wkday + ((i__1 =
2837 case__ + kind * 3 - 4) < 6 && 0 <= i__1 ?
2838 i__1 : s_rnge("wkday", i__1, "zztime_", (
2839 ftnlen)2617)) * 12, pto - (pfrom - 1), (
2840 ftnlen)12);
2841 }
2842 } else if (*(unsigned char *)&class__[(i__1 = i__ - 1) <
2843 70 && 0 <= i__1 ? i__1 : s_rnge("class", i__1,
2844 "zztime_", (ftnlen)2621)] == 'e') {
2845 pto = pfrom + 2;
2846 if (pto > 320) {
2847 zztknerr_(picerr, string, string + (from - 1),
2848 error, &ret_val, (ftnlen)320, string_len,
2849 to - (from - 1), error_len);
2850 return ret_val;
2851 }
2852 pnext = pto + 1;
2853 if (*(unsigned char *)&string[from - 1] == *(unsigned
2854 char *)this__) {
2855 s_copy(pictur + (pfrom - 1), "ERA", pto - (pfrom
2856 - 1), (ftnlen)3);
2857 } else {
2858 s_copy(pictur + (pfrom - 1), "era", pto - (pfrom
2859 - 1), (ftnlen)3);
2860 }
2861 } else if (*(unsigned char *)&class__[(i__1 = i__ - 1) <
2862 70 && 0 <= i__1 ? i__1 : s_rnge("class", i__1,
2863 "zztime_", (ftnlen)2639)] == 'N') {
2864 pto = pfrom + 3;
2865 if (pto > 320) {
2866 zztknerr_(picerr, string, string + (from - 1),
2867 error, &ret_val, (ftnlen)320, string_len,
2868 to - (from - 1), error_len);
2869 return ret_val;
2870 }
2871 pnext = pto + 1;
2872 if (*(unsigned char *)&string[from - 1] == *(unsigned
2873 char *)this__) {
2874 s_copy(pictur + (pfrom - 1), "AMPM", pto - (pfrom
2875 - 1), (ftnlen)4);
2876 } else {
2877 s_copy(pictur + (pfrom - 1), "ampm", pto - (pfrom
2878 - 1), (ftnlen)4);
2879 }
2880 ampm = TRUE_;
2881 } else {
2882 pto = pfrom + to - from;
2883 if (pto > 320) {
2884 zztknerr_(picerr, string, string + (from - 1),
2885 error, &ret_val, (ftnlen)320, string_len,
2886 to - (from - 1), error_len);
2887 return ret_val;
2888 }
2889 pnext = pto + 1;
2890 s_copy(pictur + (pfrom - 1), string + (from - 1), pto
2891 - (pfrom - 1), to - (from - 1));
2892 }
2893 ++put;
2894 if (put > 64) {
2895 zztknerr_(tknerr, string, string + (from - 1), error,
2896 &ret_val, (ftnlen)320, string_len, to - (from
2897 - 1), error_len);
2898 return ret_val;
2899 }
2900 *(unsigned char *)&rep[put - 1] = *(unsigned char *)&
2901 class__[(i__1 = i__ - 1) < 70 && 0 <= i__1 ? i__1
2902 : s_rnge("class", i__1, "zztime_", (ftnlen)2681)];
2903 begs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge(
2904 "begs", i__1, "zztime_", (ftnlen)2682)] = from;
2905 ends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge(
2906 "ends", i__1, "zztime_", (ftnlen)2683)] = to;
2907 pbegs[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge(
2908 "pbegs", i__1, "zztime_", (ftnlen)2684)] = pfrom;
2909 pends[(i__1 = put - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge(
2910 "pends", i__1, "zztime_", (ftnlen)2685)] = pto;
2911 check = FALSE_;
2912 next = to + 1;
2913 }
2914 ++i__;
2915 }
2916
2917 /* If we reach the end of the loop and CHECK is still */
2918 /* set to TRUE, we have a bit of unrecognizable string. */
2919
2920 if (check) {
2921 s_copy(error, string, error_len, string_len);
2922 i__1 = from + 1;
2923 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1,
2924 error_len);
2925 zzinssub_(error, "<", &from, error, error_len, (ftnlen)1,
2926 error_len);
2927 prefix_("The input string contains an unrecognizable substri"
2928 "ng beginning at the character marked by <#>: \"", &
2929 c__0, error, (ftnlen)97, error_len);
2930 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
2931 repmc_(error, "#", string + (from - 1), error, error_len, (
2932 ftnlen)1, (ftnlen)1, error_len);
2933 ret_val = FALSE_;
2934 return ret_val;
2935 }
2936 }
2937 }
2938 size = put;
2939 ret_val = TRUE_;
2940 return ret_val;
2941 /* $Procedure ZZUNPCK ( Private, Time --- Unpack a time string ) */
2942
2943 L_zzunpck:
2944 /* $ Abstract */
2945
2946 /* SPICE Private routine intended solely for the support of SPICE */
2947 /* routines. Users should not call this routine directly due */
2948 /* to the volatile nature of this routine. */
2949
2950 /* Unpack the time string and parse its components using the */
2951 /* stored internal representation. */
2952
2953 /* $ Disclaimer */
2954
2955 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
2956 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
2957 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
2958 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
2959 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
2960 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
2961 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
2962 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
2963 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
2964 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
2965
2966 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
2967 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
2968 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
2969 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
2970 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
2971 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
2972
2973 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
2974 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
2975 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
2976 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
2977
2978 /* $ Required_Reading */
2979
2980 /* None. */
2981
2982 /* $ Keywords */
2983
2984 /* TIME --- PRIVATE */
2985
2986 /* $ Declarations */
2987
2988 /* IMPLICIT NONE */
2989 /* CHARACTER*(*) STRING */
2990 /* LOGICAL YABBRV */
2991 /* DOUBLE PRECISION TVEC ( * ) */
2992 /* INTEGER E */
2993 /* CHARACTER*(*) TRANSL */
2994 /* CHARACTER*(*) ERROR */
2995
2996 /* $ Brief_I/O */
2997
2998 /* VARIABLE I/O DESCRIPTION */
2999 /* -------- --- -------------------------------------------------- */
3000 /* STRING I is a time string that has been tokenized. */
3001 /* YABBRV I has the year been abbreviated. */
3002 /* TVEC O is a vector of time components */
3003 /* E O is the actual number of components present */
3004 /* TRANSL O is the type TVEC ( YMD or YD ) */
3005 /* PIC O is a picture of the format used for the time string */
3006 /* ERROR O a diagnostic of any problems */
3007
3008 /* The function returns TRUE if the string was unpacked completely. */
3009
3010 /* $ Detailed_Input */
3011
3012 /* STRING is the original string from which the current */
3013 /* internal representation was derived. */
3014
3015 /* YABBRV is a logical that indicates whether or not an */
3016 /* abbreviated year was encountered in the string. */
3017 /* YABBRV is TRUE if such an abbreviation was present */
3018 /* otherwise it is FALSE. */
3019
3020 /* $ Detailed_Output */
3021
3022 /* TVEC is a double precision array of the parsed time */
3023 /* components. TVEC will have either 5 or 6 values */
3024 /* depending upon whether the string is Year, Month, */
3025 /* and Day of Month, or Year and Day of Year. */
3026
3027 /* E is the actual number of components that were */
3028 /* present in the internal representation. */
3029
3030 /* If STRING cannot be fully resolved, E is returned */
3031 /* as a zero. */
3032
3033 /* TRANSL is the type of time vector. The value will be */
3034 /* 'YD' (day of year) or 'YMD' (Year, Month, Day). */
3035
3036 /* If STRING cannot be fully resolved, TRANSL is */
3037 /* returned as a blank. */
3038
3039 /* PIC is a picture of the time format corresponding the */
3040 /* the time string in the last call to ZZTOKNS. */
3041
3042 /* If some part of the input string can't be identified */
3043 /* PIC is returned as a blank. Note that there is a */
3044 /* distinction between recognizable and parsable. */
3045 /* The input string must be unambiguous to be parsable, */
3046 /* However, even if a string is ambiguous it may */
3047 /* correspond to a legitimate format picture. Since */
3048 /* occasionally, that's what you want (an ambiguous */
3049 /* format), we allow it in PIC. */
3050
3051 /* ERROR is a diagnostic that indicates some problem in */
3052 /* resolving STRING. If no problems occur ERROR */
3053 /* is returned as a blank. */
3054
3055 /* The function returns TRUE if STRING was successfully unpacked. */
3056 /* That is the string is parsed and is unambiguously recognized. */
3057
3058 /* $ Parameters */
3059
3060 /* None. */
3061
3062 /* $ Exceptions */
3063
3064 /* Error free. */
3065
3066 /* $ Files */
3067
3068 /* None. */
3069
3070 /* $ Particulars */
3071
3072 /* This routine is the last routine that will normally be */
3073 /* called by a time parsing routine. This call should be */
3074 /* made after all combinations, replacements and removals */
3075 /* that make sense to perform have been made. */
3076
3077 /* $ Examples */
3078
3079 /* See TPARTV */
3080
3081 /* $ Restrictions */
3082
3083 /* None. */
3084
3085 /* $ Literature_References */
3086
3087 /* None. */
3088
3089 /* $ Author_and_Institution */
3090
3091 /* W.L. Taber (JPL) */
3092
3093 /* $ Version */
3094
3095 /* - SPICELIB Version 1.3.0, 29-APR-2013 (EDW) */
3096
3097 /* Added error check on ITEM value. Failure to perform */
3098 /* this check can cause BADSUBSCRIPT error signals */
3099 /* from CSPICE code on invalid time strings. */
3100
3101 /* - SPICELIB Version 1.2.1, 08-MAR-2009 (NJB) */
3102
3103 /* Re-ordered header sections. */
3104
3105 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
3106
3107 /* The main routine (which should never be called) now returns */
3108 /* the value .FALSE. */
3109
3110 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
3111
3112 /* Added a RETURN statement at the end of the main routine. */
3113 /* Enhanced error message for the case when the input string */
3114 /* to ZZTOKNS has a non-printing character. */
3115
3116 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
3117
3118
3119 /* -& */
3120 nyear = 0;
3121 nmon = 0;
3122 nday = 0;
3123 nhour = 0;
3124 nmin = 0;
3125 nsec = 0;
3126 ndoy = 0;
3127 njd = 0;
3128 *e = 0;
3129 s_copy(transl, " ", transl_len, (ftnlen)1);
3130 hms[0] = 0.;
3131 hms[1] = 0.;
3132 hms[2] = 0.;
3133 for (i__ = size; i__ >= 1; --i__) {
3134 item = *(unsigned char *)&rep[i__ - 1];
3135
3136 /* Confirm ITEM range [32,126]. */
3137
3138 if (item < 32 || item > 126) {
3139
3140 /* A non-printing character found in REP. This is */
3141 /* an error. */
3142
3143 s_copy(error, "A character at location #1 does not have ASCII va"
3144 "lue [32,126] for REP string.", error_len, (ftnlen)77);
3145 repmi_(error, "#1", &i__, error, error_len, (ftnlen)2, error_len);
3146
3147 /* Error condition, return. */
3148
3149 ret_val = FALSE_;
3150 return ret_val;
3151 }
3152 j = begs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3153 i__1, "zztime_", (ftnlen)2954)];
3154 k = ends[(i__1 = i__ - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3155 i__1, "zztime_", (ftnlen)2955)];
3156 if (item == 'Y') {
3157 ++nyear;
3158 ++(*e);
3159 nparsd_(string + (j - 1), tvec, error, &ptr, k - (j - 1),
3160 error_len);
3161 if (*yabbrv) {
3162 zzrepsub_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ?
3163 i__1 : s_rnge("pbegs", i__1, "zztime_", (ftnlen)2964)]
3164 , &pends[(i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 :
3165 s_rnge("pends", i__2, "zztime_", (ftnlen)2964)],
3166 "YR", pictur, (ftnlen)320, (ftnlen)2, (ftnlen)320);
3167 } else {
3168 zzrepsub_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ?
3169 i__1 : s_rnge("pbegs", i__1, "zztime_", (ftnlen)2967)]
3170 , &pends[(i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 :
3171 s_rnge("pends", i__2, "zztime_", (ftnlen)2967)],
3172 "YYYY", pictur, (ftnlen)320, (ftnlen)4, (ftnlen)320);
3173 }
3174 } else if (item == 'm') {
3175 ++nmon;
3176 ++(*e);
3177 ucase_(string + (j - 1), month, k - (j - 1), (ftnlen)3);
3178 value = isrchc_(month, &c__12, months, (ftnlen)3, (ftnlen)3);
3179 if (value == 0) {
3180 nparsd_(string + (j - 1), &tvec[1], error, &ptr, k - (j - 1),
3181 error_len);
3182 zzrepsub_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ?
3183 i__1 : s_rnge("pbegs", i__1, "zztime_", (ftnlen)2981)]
3184 , &pends[(i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 :
3185 s_rnge("pends", i__2, "zztime_", (ftnlen)2981)],
3186 "MM", pictur, (ftnlen)320, (ftnlen)2, (ftnlen)320);
3187 } else {
3188 tvec[1] = (doublereal) value;
3189 }
3190 } else if (item == 'D') {
3191 ++nday;
3192 ++(*e);
3193 nparsd_(string + (j - 1), &tvec[2], error, &ptr, k - (j - 1),
3194 error_len);
3195 zzmkpc_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ? i__1 :
3196 s_rnge("pbegs", i__1, "zztime_", (ftnlen)2994)], &pends[(
3197 i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
3198 i__2, "zztime_", (ftnlen)2994)], "DD", string + (j - 1),
3199 (ftnlen)320, (ftnlen)2, k - (j - 1));
3200 } else if (item == 'y') {
3201 ++ndoy;
3202 ++(*e);
3203 nparsd_(string + (j - 1), &tvec[1], error, &ptr, k - (j - 1),
3204 error_len);
3205 zzmkpc_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ? i__1 :
3206 s_rnge("pbegs", i__1, "zztime_", (ftnlen)3004)], &pends[(
3207 i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
3208 i__2, "zztime_", (ftnlen)3004)], "DOY", string + (j - 1),
3209 (ftnlen)320, (ftnlen)3, k - (j - 1));
3210 } else if (item == 'H') {
3211 ++nhour;
3212 ++(*e);
3213 nparsd_(string + (j - 1), hms, error, &ptr, k - (j - 1),
3214 error_len);
3215
3216 /* We have to handle the hour component based on the */
3217 /* presence of the AM/PM mark in the picture. We earlier */
3218 /* set up the logical AMPM to indicate its presence. */
3219
3220 if (ampm) {
3221 zzmkpc_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ?
3222 i__1 : s_rnge("pbegs", i__1, "zztime_", (ftnlen)3020)]
3223 , &pends[(i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 :
3224 s_rnge("pends", i__2, "zztime_", (ftnlen)3020)],
3225 "AP", string + (j - 1), (ftnlen)320, (ftnlen)2, k - (
3226 j - 1));
3227 } else {
3228 zzmkpc_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ?
3229 i__1 : s_rnge("pbegs", i__1, "zztime_", (ftnlen)3025)]
3230 , &pends[(i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 :
3231 s_rnge("pends", i__2, "zztime_", (ftnlen)3025)],
3232 "HR", string + (j - 1), (ftnlen)320, (ftnlen)2, k - (
3233 j - 1));
3234 }
3235 } else if (item == 'M') {
3236 ++nmin;
3237 ++(*e);
3238 nparsd_(string + (j - 1), &hms[1], error, &ptr, k - (j - 1),
3239 error_len);
3240 zzmkpc_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ? i__1 :
3241 s_rnge("pbegs", i__1, "zztime_", (ftnlen)3037)], &pends[(
3242 i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
3243 i__2, "zztime_", (ftnlen)3037)], "MN", string + (j - 1),
3244 (ftnlen)320, (ftnlen)2, k - (j - 1));
3245 } else if (item == 'S') {
3246 ++nsec;
3247 ++(*e);
3248 nparsd_(string + (j - 1), &hms[2], error, &ptr, k - (j - 1),
3249 error_len);
3250 zzmkpc_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ? i__1 :
3251 s_rnge("pbegs", i__1, "zztime_", (ftnlen)3047)], &pends[(
3252 i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
3253 i__2, "zztime_", (ftnlen)3047)], "SC", string + (j - 1),
3254 (ftnlen)320, (ftnlen)2, k - (j - 1));
3255 } else if (item == 'J') {
3256 ++njd;
3257 ++(*e);
3258 nparsd_(string + (j - 1), tvec, error, &ptr, k - (j - 1),
3259 error_len);
3260 zzmkpc_(pictur, &pbegs[(i__1 = i__ - 1) < 64 && 0 <= i__1 ? i__1 :
3261 s_rnge("pbegs", i__1, "zztime_", (ftnlen)3057)], &pends[(
3262 i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("pends",
3263 i__2, "zztime_", (ftnlen)3057)], "JULIAND", string + (j
3264 - 1), (ftnlen)320, (ftnlen)7, k - (j - 1));
3265 } else if (item == 'i') {
3266 s_copy(error, string, error_len, string_len);
3267 i__1 = k + 1;
3268 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1,
3269 error_len);
3270 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3271 prefix_("The meaning of the integer <#> could not be determined:"
3272 " '", &c__1, error, (ftnlen)57, error_len);
3273 suffix_("'", &c__0, error, (ftnlen)1, error_len);
3274 repmc_(error, "#", string + (j - 1), error, error_len, (ftnlen)1,
3275 k - (j - 1), error_len);
3276 *e = 0;
3277 s_copy(pic, " ", pic_len, (ftnlen)1);
3278 ret_val = FALSE_;
3279 return ret_val;
3280 } else if (item == 'n') {
3281 s_copy(error, string, error_len, string_len);
3282 i__1 = k + 1;
3283 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1,
3284 error_len);
3285 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3286 prefix_("The meaning of the decimal number <#> could not be dete"
3287 "rmined: ", &c__1, error, (ftnlen)63, error_len);
3288 repmc_(error, "#", string + (j - 1), error, error_len, (ftnlen)1,
3289 k - (j - 1), error_len);
3290 *e = 0;
3291 s_copy(pic, " ", pic_len, (ftnlen)1);
3292 ret_val = FALSE_;
3293 return ret_val;
3294 } else {
3295 s_copy(error, string, error_len, string_len);
3296 i__1 = k + 1;
3297 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1,
3298 error_len);
3299 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3300 prefix_("An unexpected # (\"#\") was encountered in the time str"
3301 "ing: ", &c__1, error, (ftnlen)58, error_len);
3302 repmc_(error, "#", names + (((i__1 = item - 32) < 95 && 0 <= i__1
3303 ? i__1 : s_rnge("names", i__1, "zztime_", (ftnlen)3105))
3304 << 5), error, error_len, (ftnlen)1, (ftnlen)32, error_len)
3305 ;
3306 repmc_(error, "#", string + (j - 1), error, error_len, (ftnlen)1,
3307 k - (j - 1), error_len);
3308 s_copy(pic, " ", pic_len, (ftnlen)1);
3309 *e = 0;
3310 ret_val = FALSE_;
3311 return ret_val;
3312 }
3313 }
3314
3315 /* Ok. Check the counts of substrings to make sure everything */
3316 /* looks ok. If so move the HMS into the appropriate slots */
3317 /* in TVEC, set the kind of TVEC, set the function value to YES, */
3318 /* and RETURN. Note regardless of the correctness of the parsing */
3319 /* we have a legitimate format picture at this point so we keep it. */
3320
3321 s_copy(pic, pictur, pic_len, (ftnlen)320);
3322 if (nyear == 1 && nmon == 1 && nday == 1 && ndoy == 0 && njd == 0 &&
3323 nhour <= 1 && nmin <= nhour && nsec <= nmin) {
3324 tvec[3] = hms[0];
3325 tvec[4] = hms[1];
3326 tvec[5] = hms[2];
3327 s_copy(transl, "YMD", transl_len, (ftnlen)3);
3328 ret_val = TRUE_;
3329 return ret_val;
3330 } else if (nyear == 1 && nmon == 0 && nday == 0 && njd == 0 && ndoy == 1
3331 && nhour <= 1 && nmin <= nhour && nsec <= nmin) {
3332 tvec[2] = hms[0];
3333 tvec[3] = hms[1];
3334 tvec[4] = hms[2];
3335 s_copy(transl, "YD", transl_len, (ftnlen)2);
3336 ret_val = TRUE_;
3337 return ret_val;
3338 } else if (nyear == 0 && nmon == 0 && nday == 0 && njd == 1 && ndoy == 0
3339 && nhour <= 0 && nmin <= 0 && nsec <= 0) {
3340 s_copy(transl, "JD", transl_len, (ftnlen)2);
3341 ret_val = TRUE_;
3342 return ret_val;
3343 }
3344
3345 /* If we're still here, there is some kind of an error */
3346 /* in the input string. There are a lot of possible */
3347 /* problems. */
3348
3349 *e = 0;
3350 if (nyear == 0 && nday == 0 && njd == 0 && ndoy == 0 && nhour == 0 &&
3351 nmin == 0 && nsec == 0) {
3352 s_copy(error, "No numeric components were supplied in the time strin"
3353 "g. ", error_len, (ftnlen)56);
3354 } else if (njd == 1) {
3355 s_copy(error, "The string possesses calendar components in addition "
3356 "to Julian Date specifier. ", error_len, (ftnlen)79);
3357 } else if (njd > 1) {
3358 s_copy(error, "There is more than one Julian Date specified in the e"
3359 "poch string. ", error_len, (ftnlen)66);
3360 } else if (nyear == 0) {
3361 s_copy(error, "The year associated with the calendar string \"#\" co"
3362 "uld not be identified. ", error_len, (ftnlen)74);
3363 repmc_(error, "#", string, error, error_len, (ftnlen)1, string_len,
3364 error_len);
3365 } else if (nyear > 1) {
3366 s_copy(error, string, error_len, string_len);
3367 s_copy(messge, "Two substrings indicating a calendar year were ident"
3368 "ified in the input time string <#> and <#>: \"", (ftnlen)320,
3369 (ftnlen)97);
3370 p1 = pos_(rep, "Y", &c__1, (ftnlen)64, (ftnlen)1);
3371 i__1 = p1 + 1;
3372 p2 = pos_(rep, "Y", &i__1, (ftnlen)64, (ftnlen)1);
3373 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3374 i__1, "zztime_", (ftnlen)3224)];
3375 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3376 i__1, "zztime_", (ftnlen)3225)];
3377 i__1 = k + 1;
3378 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3379 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3380 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3381 k - (j - 1), (ftnlen)320);
3382 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3383 i__1, "zztime_", (ftnlen)3231)];
3384 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3385 i__1, "zztime_", (ftnlen)3232)];
3386 i__1 = k + 1;
3387 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3388 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3389 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3390 k - (j - 1), (ftnlen)320);
3391 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3392 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3393 } else if (nmon > 0 && ndoy > 0) {
3394 s_copy(error, string, error_len, string_len);
3395 s_copy(messge, "Both a day of year and month were identified in the "
3396 "input string. \"", (ftnlen)320, (ftnlen)67);
3397 /* Computing MAX */
3398 i__1 = pos_(rep, "m", &c__1, (ftnlen)64, (ftnlen)1), i__2 = pos_(rep,
3399 "y", &c__1, (ftnlen)64, (ftnlen)1);
3400 p2 = max(i__1,i__2);
3401 /* Computing MIN */
3402 i__1 = pos_(rep, "m", &c__1, (ftnlen)64, (ftnlen)1), i__2 = pos_(rep,
3403 "y", &c__1, (ftnlen)64, (ftnlen)1);
3404 p1 = min(i__1,i__2);
3405 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3406 i__1, "zztime_", (ftnlen)3254)];
3407 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3408 i__1, "zztime_", (ftnlen)3255)];
3409 i__1 = k + 1;
3410 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3411 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3412 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3413 i__1, "zztime_", (ftnlen)3260)];
3414 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3415 i__1, "zztime_", (ftnlen)3261)];
3416 i__1 = k + 1;
3417 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3418 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3419 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3420 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3421 } else if (nmon > 1) {
3422 s_copy(error, string, error_len, string_len);
3423 s_copy(messge, "Two substrings indicating a calendar month were iden"
3424 "tified in the input time string <#> and <#>: \"", (ftnlen)320,
3425 (ftnlen)98);
3426 p1 = pos_(rep, "m", &c__1, (ftnlen)64, (ftnlen)1);
3427 i__1 = p1 + 1;
3428 p2 = pos_(rep, "m", &i__1, (ftnlen)64, (ftnlen)1);
3429 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3430 i__1, "zztime_", (ftnlen)3280)];
3431 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3432 i__1, "zztime_", (ftnlen)3281)];
3433 i__1 = k + 1;
3434 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3435 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3436 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3437 k - (j - 1), (ftnlen)320);
3438 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3439 i__1, "zztime_", (ftnlen)3287)];
3440 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3441 i__1, "zztime_", (ftnlen)3288)];
3442 i__1 = k + 1;
3443 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3444 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3445 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3446 k - (j - 1), (ftnlen)320);
3447 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3448 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3449 } else if (ndoy > 1) {
3450 s_copy(error, string, error_len, string_len);
3451 s_copy(messge, "Two substrings indicating a day of year were identif"
3452 "ied in the input time string <#> and <#>: \"", (ftnlen)320, (
3453 ftnlen)95);
3454 p1 = pos_(rep, "y", &c__1, (ftnlen)64, (ftnlen)1);
3455 i__1 = p1 + 1;
3456 p2 = pos_(rep, "y", &i__1, (ftnlen)64, (ftnlen)1);
3457 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3458 i__1, "zztime_", (ftnlen)3308)];
3459 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3460 i__1, "zztime_", (ftnlen)3309)];
3461 i__1 = k + 1;
3462 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3463 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3464 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3465 k - (j - 1), (ftnlen)320);
3466 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3467 i__1, "zztime_", (ftnlen)3315)];
3468 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3469 i__1, "zztime_", (ftnlen)3316)];
3470 i__1 = k + 1;
3471 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3472 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3473 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3474 k - (j - 1), (ftnlen)320);
3475 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3476 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3477 } else if (nday > 1) {
3478 s_copy(error, string, error_len, string_len);
3479 s_copy(messge, "Two substrings indicating a day of month were identi"
3480 "fied in the input time string <#> and <#>: \"", (ftnlen)320, (
3481 ftnlen)96);
3482 p1 = pos_(rep, "D", &c__1, (ftnlen)64, (ftnlen)1);
3483 i__1 = p1 + 1;
3484 p2 = pos_(rep, "D", &i__1, (ftnlen)64, (ftnlen)1);
3485 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3486 i__1, "zztime_", (ftnlen)3336)];
3487 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3488 i__1, "zztime_", (ftnlen)3337)];
3489 i__1 = k + 1;
3490 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3491 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3492 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3493 k - (j - 1), (ftnlen)320);
3494 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3495 i__1, "zztime_", (ftnlen)3343)];
3496 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3497 i__1, "zztime_", (ftnlen)3344)];
3498 i__1 = k + 1;
3499 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3500 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3501 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3502 k - (j - 1), (ftnlen)320);
3503 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3504 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3505 } else if (nhour > 1) {
3506 s_copy(error, string, error_len, string_len);
3507 s_copy(messge, "Two substrings representing an hour of the day were "
3508 "identified in the input time string <#> and <#>: \"", (ftnlen)
3509 320, (ftnlen)102);
3510 p1 = pos_(rep, "H", &c__1, (ftnlen)64, (ftnlen)1);
3511 i__1 = p1 + 1;
3512 p2 = pos_(rep, "H", &i__1, (ftnlen)64, (ftnlen)1);
3513 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3514 i__1, "zztime_", (ftnlen)3364)];
3515 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3516 i__1, "zztime_", (ftnlen)3365)];
3517 i__1 = k + 1;
3518 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3519 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3520 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3521 k - (j - 1), (ftnlen)320);
3522 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3523 i__1, "zztime_", (ftnlen)3371)];
3524 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3525 i__1, "zztime_", (ftnlen)3372)];
3526 i__1 = k + 1;
3527 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3528 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3529 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3530 k - (j - 1), (ftnlen)320);
3531 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3532 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3533 } else if (nmin > 1) {
3534 s_copy(error, string, error_len, string_len);
3535 s_copy(messge, "Two substrings representing minutes of the hour were"
3536 " identified in the input time string <#> and <#>: \"", (
3537 ftnlen)320, (ftnlen)103);
3538 p1 = pos_(rep, "M", &c__1, (ftnlen)64, (ftnlen)1);
3539 i__1 = p1 + 1;
3540 p2 = pos_(rep, "M", &i__1, (ftnlen)64, (ftnlen)1);
3541 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3542 i__1, "zztime_", (ftnlen)3392)];
3543 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3544 i__1, "zztime_", (ftnlen)3393)];
3545 i__1 = k + 1;
3546 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3547 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3548 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3549 k - (j - 1), (ftnlen)320);
3550 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3551 i__1, "zztime_", (ftnlen)3399)];
3552 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3553 i__1, "zztime_", (ftnlen)3400)];
3554 i__1 = k + 1;
3555 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3556 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3557 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3558 k - (j - 1), (ftnlen)320);
3559 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3560 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3561 } else if (nsec > 1) {
3562 s_copy(error, string, error_len, string_len);
3563 s_copy(messge, "Two substrings representing seconds were identified "
3564 "in the input time string <#> and <#>: \"", (ftnlen)320, (
3565 ftnlen)91);
3566 p1 = pos_(rep, "S", &c__1, (ftnlen)64, (ftnlen)1);
3567 i__1 = p1 + 1;
3568 p2 = pos_(rep, "S", &i__1, (ftnlen)64, (ftnlen)1);
3569 j = begs[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3570 i__1, "zztime_", (ftnlen)3420)];
3571 k = ends[(i__1 = p2 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3572 i__1, "zztime_", (ftnlen)3421)];
3573 i__1 = k + 1;
3574 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3575 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3576 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3577 k - (j - 1), (ftnlen)320);
3578 j = begs[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("begs",
3579 i__1, "zztime_", (ftnlen)3427)];
3580 k = ends[(i__1 = p1 - 1) < 64 && 0 <= i__1 ? i__1 : s_rnge("ends",
3581 i__1, "zztime_", (ftnlen)3428)];
3582 i__1 = k + 1;
3583 zzinssub_(error, ">", &i__1, error, error_len, (ftnlen)1, error_len);
3584 zzinssub_(error, "<", &j, error, error_len, (ftnlen)1, error_len);
3585 repmc_(messge, "#", string + (j - 1), messge, (ftnlen)320, (ftnlen)1,
3586 k - (j - 1), (ftnlen)320);
3587 prefix_(messge, &c__1, error, (ftnlen)320, error_len);
3588 suffix_("\"", &c__0, error, (ftnlen)1, error_len);
3589 } else if (ndoy == 0 && nmon == 0) {
3590 s_copy(error, "Neither a month nor day of year could be identified i"
3591 "n the input time string: \"#\" ", error_len, (ftnlen)82);
3592 repmc_(error, "#", string, error, error_len, (ftnlen)1, string_len,
3593 error_len);
3594 } else if (nmon == 1 && nday == 0) {
3595 s_copy(error, "A month was identified in the time string \"#\", but "
3596 "a day of month could not be identified. ", error_len, (ftnlen)
3597 91);
3598 repmc_(error, "#", string, error, error_len, (ftnlen)1, string_len,
3599 error_len);
3600 } else if (nmon == 0 && nday == 1) {
3601 s_copy(error, "A day of month was identified in the time string \""
3602 "#\", but the month it belongs to could not be identified. ",
3603 error_len, (ftnlen)107);
3604 repmc_(error, "#", string, error, error_len, (ftnlen)1, string_len,
3605 error_len);
3606 } else if (nmin > nhour) {
3607 s_copy(error, "A minutes components of the time was identified in t"
3608 "he time string \"#\", but the hours component could not be i"
3609 "dentified. ", error_len, (ftnlen)122);
3610 repmc_(error, "#", string, error, error_len, (ftnlen)1, string_len,
3611 error_len);
3612 } else if (nsec > nmin) {
3613 s_copy(error, "A seconds components of the time was identified in th"
3614 "e time string \"#\", but the minutes component could not be "
3615 "identified. ", error_len, (ftnlen)123);
3616 repmc_(error, "#", string, error, error_len, (ftnlen)1, string_len,
3617 error_len);
3618 }
3619 ret_val = FALSE_;
3620 return ret_val;
3621 /* $Procedure ZZVALT ( Private, Time --- Value Based Tokens ) */
3622
3623 L_zzvalt:
3624 /* $ Abstract */
3625
3626 /* SPICE Private routine intended solely for the support of SPICE */
3627 /* routines. Users should not call this routine directly due */
3628 /* to the volatile nature of this routine. */
3629
3630 /* Examine the value of an integer token and if it is within the */
3631 /* range from B to E replace the token with the new token */
3632 /* specified by LETTER. */
3633
3634 /* $ Disclaimer */
3635
3636 /* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
3637 /* CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
3638 /* GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
3639 /* ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
3640 /* PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
3641 /* TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
3642 /* WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
3643 /* PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
3644 /* SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
3645 /* SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
3646
3647 /* IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
3648 /* BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
3649 /* LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
3650 /* INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
3651 /* REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
3652 /* REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
3653
3654 /* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
3655 /* THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
3656 /* CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
3657 /* ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
3658
3659 /* $ Required_Reading */
3660
3661 /* None. */
3662
3663 /* $ Keywords */
3664
3665 /* TIME --- PRIVATE */
3666
3667 /* $ Declarations */
3668
3669 /* IMPLICIT NONE */
3670 /* CHARACTER*(*) STRING */
3671 /* INTEGER B */
3672 /* INTEGER E */
3673 /* CHARACTER*(1) LETTER */
3674
3675 /* $ Brief_I/O */
3676
3677 /* VARIABLE I/O DESCRIPTION */
3678 /* -------- --- -------------------------------------------------- */
3679 /* STRING I Original time string. */
3680 /* B I Lower bound of value range */
3681 /* E I Upper bound of value range */
3682 /* LETTER I New token if integer is within range. */
3683
3684 /* The function returns TRUE if any substitutions are performed. */
3685
3686 /* $ Detailed_Input */
3687
3688 /* STRING is an original time string as last supplied to ZZTOKNS. */
3689
3690 /* B is the lower bound of some test range of integers */
3691
3692 /* E is the upper bound of some test range of integers */
3693
3694 /* LETTER is the new token value to put in place of 'i' if */
3695 /* the value of the integer is between B and E */
3696 /* (inclusive). */
3697 /* $ Detailed_Output */
3698
3699 /* The function returns TRUE if any substitutions are performed.. */
3700
3701 /* $ Parameters */
3702
3703 /* None. */
3704
3705 /* $ Exceptions */
3706
3707 /* Error free. */
3708
3709 /* $ Files */
3710
3711 /* None. */
3712
3713 /* $ Particulars */
3714
3715 /* This function replaces every occurrence of 'i' in the internal */
3716 /* representation by the value LETTER if the numerical value */
3717 /* of the token corresponding to 'i' is between B and E. */
3718
3719 /* This is used primarily to identify YEAR tokens in a time */
3720 /* string. */
3721
3722 /* $ Examples */
3723
3724 /* See TPARTV */
3725
3726 /* $ Restrictions */
3727
3728 /* None. */
3729
3730 /* $ Literature_References */
3731
3732 /* None. */
3733
3734 /* $ Author_and_Institution */
3735
3736 /* W.L. Taber (JPL) */
3737
3738 /* $ Version */
3739
3740 /* - SPICELIB Version 1.2.1, 08-MAR-2009 (NJB) */
3741
3742 /* Re-ordered header sections. */
3743
3744 /* - SPICELIB Version 1.2.0, 09-DEC-1999 (WLT) */
3745
3746 /* The main routine (which should never be called) now returns */
3747 /* the value .FALSE. */
3748
3749 /* - SPICELIB Version 1.1.0, 30-JUN-1999 (WLT) */
3750
3751 /* Added a RETURN statement at the end of the main routine. */
3752 /* Enhanced error message for the case when the input string */
3753 /* to ZZTOKNS has a non-printing character. */
3754
3755 /* - SPICELIB Version 1.0.0, 4-APR-1996 (WLT) */
3756
3757
3758 /* -& */
3759
3760 /* So far no translations have been performed. */
3761
3762 did = FALSE_;
3763
3764 /* Examine each token to see if it is an integer. */
3765
3766 i__1 = size;
3767 for (i__ = 1; i__ <= i__1; ++i__) {
3768 item = *(unsigned char *)&rep[i__ - 1];
3769 if (item == 'i') {
3770
3771 /* We've got an integer. Parse it to see if it */
3772 /* is in the specified range. */
3773
3774 j = begs[(i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("begs"
3775 , i__2, "zztime_", (ftnlen)3639)];
3776 k = ends[(i__2 = i__ - 1) < 64 && 0 <= i__2 ? i__2 : s_rnge("ends"
3777 , i__2, "zztime_", (ftnlen)3640)];
3778 nparsi_(string + (j - 1), &value, myerr, &ptr, k - (j - 1), (
3779 ftnlen)32);
3780 if (ptr == 0 && value >= *b && value <= *e) {
3781 *(unsigned char *)&rep[i__ - 1] = *(unsigned char *)letter;
3782 did = TRUE_;
3783 }
3784 }
3785 }
3786 ret_val = did;
3787 return ret_val;
3788 } /* zztime_ */
3789
zztime_(char * string,char * transl,char * letter,char * error,char * pic,doublereal * tvec,integer * b,integer * e,logical * l2r,logical * yabbrv,ftnlen string_len,ftnlen transl_len,ftnlen letter_len,ftnlen error_len,ftnlen pic_len)3790 logical zztime_(char *string, char *transl, char *letter, char *error, char *
3791 pic, doublereal *tvec, integer *b, integer *e, logical *l2r, logical *
3792 yabbrv, ftnlen string_len, ftnlen transl_len, ftnlen letter_len,
3793 ftnlen error_len, ftnlen pic_len)
3794 {
3795 return zztime_0_(0, string, transl, letter, error, pic, tvec, b, e, l2r,
3796 yabbrv, string_len, transl_len, letter_len, error_len, pic_len);
3797 }
3798
zzcmbt_(char * string,char * letter,logical * l2r,ftnlen string_len,ftnlen letter_len)3799 logical zzcmbt_(char *string, char *letter, logical *l2r, ftnlen string_len,
3800 ftnlen letter_len)
3801 {
3802 return zztime_0_(1, string, (char *)0, letter, (char *)0, (char *)0, (
3803 doublereal *)0, (integer *)0, (integer *)0, l2r, (logical *)0,
3804 string_len, (ftnint)0, letter_len, (ftnint)0, (ftnint)0);
3805 }
3806
zzgrep_(char * string,ftnlen string_len)3807 logical zzgrep_(char *string, ftnlen string_len)
3808 {
3809 return zztime_0_(2, string, (char *)0, (char *)0, (char *)0, (char *)0, (
3810 doublereal *)0, (integer *)0, (integer *)0, (logical *)0, (
3811 logical *)0, string_len, (ftnint)0, (ftnint)0, (ftnint)0, (ftnint)
3812 0);
3813 }
3814
zzispt_(char * string,integer * b,integer * e,ftnlen string_len)3815 logical zzispt_(char *string, integer *b, integer *e, ftnlen string_len)
3816 {
3817 return zztime_0_(3, string, (char *)0, (char *)0, (char *)0, (char *)0, (
3818 doublereal *)0, b, e, (logical *)0, (logical *)0, string_len, (
3819 ftnint)0, (ftnint)0, (ftnint)0, (ftnint)0);
3820 }
3821
zzist_(char * letter,ftnlen letter_len)3822 logical zzist_(char *letter, ftnlen letter_len)
3823 {
3824 return zztime_0_(4, (char *)0, (char *)0, letter, (char *)0, (char *)0, (
3825 doublereal *)0, (integer *)0, (integer *)0, (logical *)0, (
3826 logical *)0, (ftnint)0, (ftnint)0, letter_len, (ftnint)0, (ftnint)
3827 0);
3828 }
3829
zznote_(char * letter,integer * b,integer * e,ftnlen letter_len)3830 logical zznote_(char *letter, integer *b, integer *e, ftnlen letter_len)
3831 {
3832 return zztime_0_(5, (char *)0, (char *)0, letter, (char *)0, (char *)0, (
3833 doublereal *)0, b, e, (logical *)0, (logical *)0, (ftnint)0, (
3834 ftnint)0, letter_len, (ftnint)0, (ftnint)0);
3835 }
3836
zzremt_(char * letter,ftnlen letter_len)3837 logical zzremt_(char *letter, ftnlen letter_len)
3838 {
3839 return zztime_0_(6, (char *)0, (char *)0, letter, (char *)0, (char *)0, (
3840 doublereal *)0, (integer *)0, (integer *)0, (logical *)0, (
3841 logical *)0, (ftnint)0, (ftnint)0, letter_len, (ftnint)0, (ftnint)
3842 0);
3843 }
3844
zzsubt_(char * string,char * transl,logical * l2r,ftnlen string_len,ftnlen transl_len)3845 logical zzsubt_(char *string, char *transl, logical *l2r, ftnlen string_len,
3846 ftnlen transl_len)
3847 {
3848 return zztime_0_(7, string, transl, (char *)0, (char *)0, (char *)0, (
3849 doublereal *)0, (integer *)0, (integer *)0, l2r, (logical *)0,
3850 string_len, transl_len, (ftnint)0, (ftnint)0, (ftnint)0);
3851 }
3852
zztokns_(char * string,char * error,ftnlen string_len,ftnlen error_len)3853 logical zztokns_(char *string, char *error, ftnlen string_len, ftnlen
3854 error_len)
3855 {
3856 return zztime_0_(8, string, (char *)0, (char *)0, error, (char *)0, (
3857 doublereal *)0, (integer *)0, (integer *)0, (logical *)0, (
3858 logical *)0, string_len, (ftnint)0, (ftnint)0, error_len, (ftnint)
3859 0);
3860 }
3861
zzunpck_(char * string,logical * yabbrv,doublereal * tvec,integer * e,char * transl,char * pic,char * error,ftnlen string_len,ftnlen transl_len,ftnlen pic_len,ftnlen error_len)3862 logical zzunpck_(char *string, logical *yabbrv, doublereal *tvec, integer *e,
3863 char *transl, char *pic, char *error, ftnlen string_len, ftnlen
3864 transl_len, ftnlen pic_len, ftnlen error_len)
3865 {
3866 return zztime_0_(9, string, transl, (char *)0, error, pic, tvec, (integer
3867 *)0, e, (logical *)0, yabbrv, string_len, transl_len, (ftnint)0,
3868 error_len, pic_len);
3869 }
3870
zzvalt_(char * string,integer * b,integer * e,char * letter,ftnlen string_len,ftnlen letter_len)3871 logical zzvalt_(char *string, integer *b, integer *e, char *letter, ftnlen
3872 string_len, ftnlen letter_len)
3873 {
3874 return zztime_0_(10, string, (char *)0, letter, (char *)0, (char *)0, (
3875 doublereal *)0, b, e, (logical *)0, (logical *)0, string_len, (
3876 ftnint)0, letter_len, (ftnint)0, (ftnint)0);
3877 }
3878
3879