1 /* zzekue03.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 /* $Procedure      ZZEKUE03 ( EK, update column entry, class 3 ) */
zzekue03_(integer * handle,integer * segdsc,integer * coldsc,integer * recptr,char * cval,logical * isnull,ftnlen cval_len)9 /* Subroutine */ int zzekue03_(integer *handle, integer *segdsc, integer *
10 	coldsc, integer *recptr, char *cval, logical *isnull, ftnlen cval_len)
11 {
12     extern /* Subroutine */ int chkin_(char *, ftnlen);
13     extern logical failed_(void), return_(void);
14     extern /* Subroutine */ int chkout_(char *, ftnlen), zzekad03_(integer *,
15 	    integer *, integer *, integer *, char *, logical *, ftnlen),
16 	    zzekde03_(integer *, integer *, integer *, integer *);
17 
18 /* $ Abstract */
19 
20 /*     Update a specified class 3 column entry in an EK record. */
21 
22 /* $ Disclaimer */
23 
24 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
25 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
26 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
27 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
28 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
29 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
30 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
31 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
32 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
33 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
34 
35 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
36 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
37 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
38 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
39 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
40 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
41 
42 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
43 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
44 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
45 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
46 
47 /* $ Required_Reading */
48 
49 /*     EK */
50 
51 /* $ Keywords */
52 
53 /*     EK */
54 /*     PRIVATE */
55 
56 /* $ Declarations */
57 /* $ Disclaimer */
58 
59 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
60 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
61 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
62 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
63 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
64 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
65 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
66 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
67 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
68 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
69 
70 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
71 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
72 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
73 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
74 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
75 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
76 
77 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
78 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
79 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
80 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
81 
82 
83 /*     Include Section:  EK Boolean Enumerated Type */
84 
85 
86 /*        ekbool.inc Version 1   21-DEC-1994 (NJB) */
87 
88 
89 /*     Within the EK system, boolean values sometimes must be */
90 /*     represented by integer or character codes.  The codes and their */
91 /*     meanings are listed below. */
92 
93 /*     Integer code indicating `true': */
94 
95 
96 /*     Integer code indicating `false': */
97 
98 
99 /*     Character code indicating `true': */
100 
101 
102 /*     Character code indicating `false': */
103 
104 
105 /*     End Include Section:  EK Boolean Enumerated Type */
106 
107 /* $ Disclaimer */
108 
109 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
110 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
111 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
112 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
113 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
114 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
115 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
116 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
117 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
118 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
119 
120 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
121 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
122 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
123 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
124 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
125 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
126 
127 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
128 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
129 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
130 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
131 
132 
133 /*     Include Section:  EK Column Descriptor Parameters */
134 
135 /*        ekcoldsc.inc Version 6    23-AUG-1995 (NJB) */
136 
137 
138 /*     Note:  The column descriptor size parameter CDSCSZ  is */
139 /*     declared separately in the include section CDSIZE$INC.FOR. */
140 
141 /*     Offset of column descriptors, relative to start of segment */
142 /*     integer address range.  This number, when added to the last */
143 /*     integer address preceding the segment, yields the DAS integer */
144 /*     base address of the first column descriptor.  Currently, this */
145 /*     offset is exactly the size of a segment descriptor.  The */
146 /*     parameter SDSCSZ, which defines the size of a segment descriptor, */
147 /*     is declared in the include file eksegdsc.inc. */
148 
149 
150 /*     Size of column descriptor */
151 
152 
153 /*     Indices of various pieces of column descriptors: */
154 
155 
156 /*     CLSIDX is the index of the column's class code.  (We use the */
157 /*     word `class' to distinguish this item from the column's data */
158 /*     type.) */
159 
160 
161 /*     TYPIDX is the index of the column's data type code (CHR, INT, DP, */
162 /*     or TIME).  The type is actually implied by the class, but it */
163 /*     will frequently be convenient to look up the type directly. */
164 
165 
166 
167 /*     LENIDX is the index of the column's string length value, if the */
168 /*     column has character type.  A value of IFALSE in this element of */
169 /*     the descriptor indicates that the strings have variable length. */
170 
171 
172 /*     SIZIDX is the index of the column's element size value.  This */
173 /*     descriptor element is meaningful for columns with fixed-size */
174 /*     entries.  For variable-sized columns, this value is IFALSE. */
175 
176 
177 /*     NAMIDX is the index of the base address of the column's name. */
178 
179 
180 /*     IXTIDX is the data type of the column's index.  IXTIDX */
181 /*     contains a type value only if the column is indexed. For columns */
182 /*     that are not indexed, the location IXTIDX contains the boolean */
183 /*     value IFALSE. */
184 
185 
186 /*     IXPIDX is a pointer to the column's index.  IXTPDX contains a */
187 /*     meaningful value only if the column is indexed.  The */
188 /*     interpretation of the pointer depends on the data type of the */
189 /*     index. */
190 
191 
192 /*     NFLIDX is the index of a flag indicating whether nulls are */
193 /*     permitted in the column.  The value at location NFLIDX is */
194 /*     ITRUE if nulls are permitted and IFALSE otherwise. */
195 
196 
197 /*     ORDIDX is the index of the column's ordinal position in the */
198 /*     list of columns belonging to the column's parent segment. */
199 
200 
201 /*     METIDX is the index of the column's integer metadata pointer. */
202 /*     This pointer is a DAS integer address. */
203 
204 
205 /*     The last position in the column descriptor is reserved.  No */
206 /*     parameter is defined to point to this location. */
207 
208 
209 /*     End Include Section:  EK Column Descriptor Parameters */
210 
211 /* $ Disclaimer */
212 
213 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
214 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
215 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
216 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
217 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
218 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
219 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
220 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
221 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
222 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
223 
224 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
225 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
226 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
227 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
228 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
229 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
230 
231 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
232 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
233 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
234 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
235 
236 
237 /*     Include Section:  EK Data Page Parameters */
238 
239 /*        ekfilpar.inc  Version 1  03-APR-1995 (NJB) */
240 
241 /*     These parameters apply to EK files using architecture 4. */
242 /*     These files use a paged DAS file as their underlying file */
243 /*     structure. */
244 
245 /*     In paged DAS EK files, data pages are structured:  they contain */
246 /*     metadata as well as data.  The metadata is located in the last */
247 /*     few addresses of each page, so as to interfere as little as */
248 /*     possible with calculation of data addresses. */
249 
250 /*     Each data page belongs to exactly one segment.  Some bookkeeping */
251 /*     information, such as record pointers, is also stored in data */
252 /*     pages. */
253 
254 /*     Each page contains a forward pointer that allows rapid lookup */
255 /*     of data items that span multiple pages.  Each page also keeps */
256 /*     track of the current number of links from its parent segment */
257 /*     to the page.  Link counts enable pages to `know' when they */
258 /*     are no longer in use by a segment; unused pages are deallocated */
259 /*     and returned to the free list. */
260 
261 /*     The parameters in this include file depend on the parameters */
262 /*     declared in the include file ekpage.inc.  If those parameters */
263 /*     change, this file must be updated.  The specified parameter */
264 /*     declarations we need from that file are: */
265 
266 /*        INTEGER               PGSIZC */
267 /*        PARAMETER           ( PGSIZC = 1024 ) */
268 
269 /*        INTEGER               PGSIZD */
270 /*        PARAMETER           ( PGSIZD = 128 ) */
271 
272 /*        INTEGER               PGSIZI */
273 /*        PARAMETER           ( PGSIZI = 256 ) */
274 
275 
276 
277 /*     Character pages use an encoding mechanism to represent integer */
278 /*     metadata.  Each integer is encoded in five consecutive */
279 /*     characters. */
280 
281 
282 /*     Character data page parameters: */
283 
284 
285 /*     Size of encoded integer: */
286 
287 
288 /*     Usable page size: */
289 
290 
291 /*     Location of character forward pointer: */
292 
293 
294 /*     Location of character link count: */
295 
296 
297 /*     Double precision data page parameters: */
298 
299 /*     Usable page size: */
300 
301 
302 /*     Location of d.p. forward pointer: */
303 
304 
305 /*     Location of d.p. link count: */
306 
307 
308 /*     Integer data page parameters: */
309 
310 /*     Usable page size: */
311 
312 
313 /*     Location of integer forward pointer: */
314 
315 
316 /*     Location of integer link count: */
317 
318 
319 /*     End Include Section:  EK Data Page Parameters */
320 
321 /* $ Disclaimer */
322 
323 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
324 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
325 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
326 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
327 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
328 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
329 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
330 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
331 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
332 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
333 
334 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
335 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
336 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
337 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
338 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
339 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
340 
341 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
342 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
343 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
344 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
345 
346 
347 /*     Include Section:  EK Record Pointer Parameters */
348 
349 /*        ekrecptr.inc Version 2  18-JUL-1995 (NJB) */
350 
351 
352 /*     This file declares parameters used in EK record pointers. */
353 /*     Each segment references data in a given record via two levels */
354 /*     of indirection:  a record number points to a record pointer, */
355 /*     which is a structured array of metadata and data pointers. */
356 
357 /*     Record pointers always occupy contiguous ranges of integer */
358 /*     addresses. */
359 
360 /*     The parameter declarations in this file depend on the assumption */
361 /*     that integer pages contain 256 DAS integer words and that the */
362 /*     maximum number of columns in a segment is 100.  Record pointers */
363 /*     are stored in integer data pages, so they must fit within the */
364 /*     usable data area afforded by these pages.  The size of the usable */
365 /*     data area is given by the parameter IPSIZE which is declared in */
366 /*     ekdatpag.inc.  The assumed value of IPSIZE is 254. */
367 
368 
369 /*     The first element of each record pointer is a status indicator. */
370 /*     The meanings of status indicators depend on whether the parent EK */
371 /*     is shadowed or not.  For shadowed EKs, allowed status values and */
372 /*     their meanings are: */
373 
374 /*        OLD       The record has not been modified since */
375 /*                  the EK containing the record was opened. */
376 
377 /*        UPDATE    The record is an update of a previously existing */
378 /*                  record.  The original record is now on the */
379 /*                  modified record list. */
380 
381 /*        NEW       The record has been added since the EK containing the */
382 /*                  record was opened.  The record is not an update */
383 /*                  of a previously existing record. */
384 
385 /*        DELOLD    This status applies only to a backup record. */
386 /*                  DELOLD status indicates that the record corresponds */
387 /*                  to a deleted OLD record in the source segment. */
388 
389 /*        DELNEW    This status applies only to a backup record. */
390 /*                  DELNEW status indicates that the record corresponds */
391 /*                  to a deleted NEW record in the source segment. */
392 
393 /*        DELUPD    This status applies only to a backup record. */
394 /*                  DELUPD status indicates that the record corresponds */
395 /*                  to a deleted UPDATEd record in the source segment. */
396 
397 /*     In EKs that are not shadowed, all records have status OLD. */
398 
399 
400 
401 /*     The following parameters refer to indices within the record */
402 /*     pointer structure: */
403 
404 /*     Index of status indicator: */
405 
406 
407 /*     Each record pointer contains a pointer to its companion:  for a */
408 /*     record belonging to a shadowed EK, this is the backup counterpart, */
409 /*     or if the parent EK is itself a backup EK, a pointer to the */
410 /*     record's source record.  The pointer is UNINIT (see below) if the */
411 /*     record is unmodified. */
412 
413 /*     Record companion pointers contain record numbers, not record */
414 /*     base addresses. */
415 
416 /*     Index of record's companion pointer: */
417 
418 
419 /*     Each data item is referenced by an integer.  The meaning of */
420 /*     this integer depends on the representation of data in the */
421 /*     column to which the data item belongs.  Actual lookup of a */
422 /*     data item must be done by subroutines appropriate to the class of */
423 /*     the column to which the item belongs.  Note that data items don't */
424 /*     necessarily occupy contiguous ranges of DAS addresses. */
425 
426 /*     Base address of data pointers: */
427 
428 
429 /*     Maximum record pointer size: */
430 
431 
432 /*     Data pointers are given the value UNINIT to start with; this */
433 /*     indicates that the data item is uninitialized.  UNINIT is */
434 /*     distinct from the value NULL.  NOBACK indicates an uninitialized */
435 /*     backup column entry. */
436 
437 
438 /*     End Include Section:  EK Record Pointer Parameters */
439 
440 /* $ Disclaimer */
441 
442 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
443 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
444 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
445 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
446 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
447 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
448 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
449 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
450 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
451 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
452 
453 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
454 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
455 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
456 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
457 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
458 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
459 
460 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
461 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
462 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
463 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
464 
465 
466 /*     Include Section:  EK Segment Descriptor Parameters */
467 
468 /*        eksegdsc.inc  Version 8  06-NOV-1995 (NJB) */
469 
470 
471 /*     All `base addresses' referred to below are the addresses */
472 /*     *preceding* the item the base applies to.  This convention */
473 /*     enables simplied address calculations in many cases. */
474 
475 /*     Size of segment descriptor.  Note:  the include file ekcoldsc.inc */
476 /*     must be updated if this parameter is changed.  The parameter */
477 /*     CDOFF in that file should be kept equal to SDSCSZ. */
478 
479 
480 /*     Index of the segment type code: */
481 
482 
483 /*     Index of the segment's number.  This number is the segment's */
484 /*     index in the list of segments contained in the EK to which */
485 /*     the segment belongs. */
486 
487 
488 /*     Index of the DAS integer base address of the segment's integer */
489 /*     meta-data: */
490 
491 
492 /*     Index of the DAS character base address of the table name: */
493 
494 
495 /*     Index of the segment's column count: */
496 
497 
498 /*     Index of the segment's record count: */
499 
500 
501 /*     Index of the root page number of the record tree: */
502 
503 
504 /*     Index of the root page number of the character data page tree: */
505 
506 
507 /*     Index of the root page number of the double precision data page */
508 /*     tree: */
509 
510 
511 /*     Index of the root page number of the integer data page tree: */
512 
513 
514 /*     Index of the `modified' flag: */
515 
516 
517 /*     Index of the `initialized' flag: */
518 
519 
520 /*     Index of the shadowing flag: */
521 
522 
523 /*     Index of the companion file handle: */
524 
525 
526 /*     Index of the companion segment number: */
527 
528 
529 /*     The next three items are, respectively, the page numbers of the */
530 /*     last character, d.p., and integer data pages allocated by the */
531 /*     segment: */
532 
533 
534 /*     The next three items are, respectively, the page-relative */
535 /*     indices of the last DAS word in use in the segment's */
536 /*     last character, d.p., and integer data pages: */
537 
538 
539 /*     Index of the DAS character base address of the column name list: */
540 
541 
542 /*     The last descriptor element is reserved for future use.  No */
543 /*     parameter is defined to point to this location. */
544 
545 
546 /*     End Include Section:  EK Segment Descriptor Parameters */
547 
548 /* $ Disclaimer */
549 
550 /*     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE */
551 /*     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. */
552 /*     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE */
553 /*     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE */
554 /*     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" */
555 /*     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY */
556 /*     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A */
557 /*     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC */
558 /*     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE */
559 /*     SOFTWARE AND RELATED MATERIALS, HOWEVER USED. */
560 
561 /*     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA */
562 /*     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT */
563 /*     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, */
564 /*     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, */
565 /*     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE */
566 /*     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. */
567 
568 /*     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF */
569 /*     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY */
570 /*     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE */
571 /*     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. */
572 
573 
574 /*     Include Section:  EK Data Types */
575 
576 /*        ektype.inc Version 1  27-DEC-1994 (NJB) */
577 
578 
579 /*     Within the EK system, data types of EK column contents are */
580 /*     represented by integer codes.  The codes and their meanings */
581 /*     are listed below. */
582 
583 /*     Integer codes are also used within the DAS system to indicate */
584 /*     data types; the EK system makes no assumptions about compatibility */
585 /*     between the codes used here and those used in the DAS system. */
586 
587 
588 /*     Character type: */
589 
590 
591 /*     Double precision type: */
592 
593 
594 /*     Integer type: */
595 
596 
597 /*     `Time' type: */
598 
599 /*     Within the EK system, time values are represented as ephemeris */
600 /*     seconds past J2000 (TDB), and double precision numbers are used */
601 /*     to store these values.  However, since time values require special */
602 /*     treatment both on input and output, and since the `TIME' column */
603 /*     has a special role in the EK specification and code, time values */
604 /*     are identified as a type distinct from double precision numbers. */
605 
606 
607 /*     End Include Section:  EK Data Types */
608 
609 /* $ Brief_I/O */
610 
611 /*     Variable  I/O  Description */
612 /*     --------  ---  -------------------------------------------------- */
613 /*     HANDLE     I   File handle. */
614 /*     SEGDSC     I   Segment descriptor. */
615 /*     COLDSC     I   Column descriptor. */
616 /*     RECPTR     I   Record pointer. */
617 /*     CVAL       I   Character string value. */
618 /*     ISNULL     I   Null flag. */
619 
620 /* $ Detailed_Input */
621 
622 /*     HANDLE         is a file handle of an EK open for write access. */
623 
624 /*     SEGDSC         is the descriptor of the segment containing */
625 /*                    the specified column entry. */
626 
627 /*     COLDSC         is the descriptor of the column containing */
628 /*                    the specified column entry. */
629 
630 /*     RECPTR         is a pointer to the record containing the column */
631 /*                    entry to update. */
632 
633 /*     CVAL           is the character string value with which to update */
634 /*                    the specified column entry. */
635 
636 /*     ISNULL         is a logical flag indicating whether the value */
637 /*                    of the specified column entry is to be set to NULL. */
638 /*                    If so, the input CVAL is ignored. */
639 
640 /* $ Detailed_Output */
641 
642 /*     None.  See the $Particulars section for a description of the */
643 /*     effect of this routine. */
644 
645 /* $ Parameters */
646 
647 /*     None. */
648 
649 /* $ Exceptions */
650 
651 /*     1)  If HANDLE is invalid, the error will be diagnosed by routines */
652 /*         called by this routine.  The file will not be modified. */
653 
654 /*     2)  If RECNO is out of range, the error SPICE(INVALIDINDEX) */
655 /*         will be signalled.  The file will not be modified. */
656 
657 /*     3)  If an I/O error occurs while reading or writing the indicated */
658 /*         file, the error will be diagnosed by routines called by this */
659 /*         routine.  The file may be corrupted. */
660 
661 /* $ Files */
662 
663 /*     See the EK Required Reading for a discussion of the EK file */
664 /*     format. */
665 
666 /* $ Particulars */
667 
668 /*     This routine operates by side effects:  it updates a column entry */
669 /*     in an EK segment.  This routine does not participate in shadowing */
670 /*     functions.  If the target EK is shadowed, the caller is */
671 /*     responsible for performing necessary backup operations.  If the */
672 /*     target EK is not shadowed, the target record's status is not */
673 /*     modified. */
674 
675 /*     If the column containing the entry is indexed, the corresponding */
676 /*     index is updated. */
677 
678 /*     The changes made by this routine to the target EK file become */
679 /*     permanent when the file is closed.  Failure to close the file */
680 /*     properly will leave it in an indeterminate state. */
681 
682 /* $ Examples */
683 
684 /*     See EKUCEC. */
685 
686 /* $ Restrictions */
687 
688 /*     None. */
689 
690 /* $ Literature_References */
691 
692 /*     None. */
693 
694 /* $ Author_and_Institution */
695 
696 /*     N.J. Bachman   (JPL) */
697 
698 /* $ Version */
699 
700 /* -    Beta Version 1.0.0, 27-SEP-1995 (NJB) */
701 
702 /* -& */
703 
704 /*     SPICELIB functions */
705 
706 
707 /*     Standard SPICE error handling. */
708 
709     if (return_()) {
710 	return 0;
711     } else {
712 	chkin_("ZZEKUE03", (ftnlen)8);
713     }
714 
715 /*     Get rid of the old column entry first. */
716 
717     zzekde03_(handle, segdsc, coldsc, recptr);
718     if (failed_()) {
719 	chkout_("ZZEKUE03", (ftnlen)8);
720 	return 0;
721     }
722 
723 /*     We've reduced the problem to a solved one:  that of adding */
724 /*     a column entry. */
725 
726     zzekad03_(handle, segdsc, coldsc, recptr, cval, isnull, cval_len);
727     chkout_("ZZEKUE03", (ftnlen)8);
728     return 0;
729 } /* zzekue03_ */
730 
731