~ubuntu-branches/ubuntu/trusty/silo-llnl/trusty

« back to all changes in this revision

Viewing changes to src/pdb/pdb.h

  • Committer: Bazaar Package Importer
  • Author(s): Alastair McKinstry
  • Date: 2011-01-02 00:03:01 UTC
  • Revision ID: james.westby@ubuntu.com-20110102000301-9s2hfsjrkguz6h4r
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
 
3
LLNL-CODE-425250.
 
4
All rights reserved.
 
5
 
 
6
This file is part of Silo. For details, see silo.llnl.gov.
 
7
 
 
8
Redistribution and use in source and binary forms, with or without
 
9
modification, are permitted provided that the following conditions
 
10
are met:
 
11
 
 
12
   * Redistributions of source code must retain the above copyright
 
13
     notice, this list of conditions and the disclaimer below.
 
14
   * Redistributions in binary form must reproduce the above copyright
 
15
     notice, this list of conditions and the disclaimer (as noted
 
16
     below) in the documentation and/or other materials provided with
 
17
     the distribution.
 
18
   * Neither the name of the LLNS/LLNL nor the names of its
 
19
     contributors may be used to endorse or promote products derived
 
20
     from this software without specific prior written permission.
 
21
 
 
22
THIS SOFTWARE  IS PROVIDED BY  THE COPYRIGHT HOLDERS  AND CONTRIBUTORS
 
23
"AS  IS" AND  ANY EXPRESS  OR IMPLIED  WARRANTIES, INCLUDING,  BUT NOT
 
24
LIMITED TO, THE IMPLIED  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 
25
A  PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN  NO  EVENT SHALL  LAWRENCE
 
26
LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY OR
 
27
CONTRIBUTORS BE LIABLE FOR  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
28
EXEMPLARY, OR  CONSEQUENTIAL DAMAGES  (INCLUDING, BUT NOT  LIMITED TO,
 
29
PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS  OF USE,  DATA, OR
 
30
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 
31
LIABILITY, WHETHER  IN CONTRACT, STRICT LIABILITY,  OR TORT (INCLUDING
 
32
NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT  OF THE USE  OF THIS
 
33
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
34
 
 
35
This work was produced at Lawrence Livermore National Laboratory under
 
36
Contract No.  DE-AC52-07NA27344 with the DOE.
 
37
 
 
38
Neither the  United States Government nor  Lawrence Livermore National
 
39
Security, LLC nor any of  their employees, makes any warranty, express
 
40
or  implied,  or  assumes  any  liability or  responsibility  for  the
 
41
accuracy, completeness,  or usefulness of  any information, apparatus,
 
42
product, or  process disclosed, or  represents that its use  would not
 
43
infringe privately-owned rights.
 
44
 
 
45
Any reference herein to  any specific commercial products, process, or
 
46
services by trade name,  trademark, manufacturer or otherwise does not
 
47
necessarily  constitute or imply  its endorsement,  recommendation, or
 
48
favoring  by  the  United  States  Government  or  Lawrence  Livermore
 
49
National Security,  LLC. The views  and opinions of  authors expressed
 
50
herein do not necessarily state  or reflect those of the United States
 
51
Government or Lawrence Livermore National Security, LLC, and shall not
 
52
be used for advertising or product endorsement purposes.
 
53
*/
 
54
/*
 
55
 * PDB.H - header file supporting PDBLIB routines
 
56
 *       -
 
57
 * Source Version: 9.0
 
58
 * Software Release #92-0043
 
59
 *
 
60
 */
 
61
 
 
62
#ifndef _PDB_H
 
63
#define _PDB_H
 
64
 
 
65
#include <setjmp.h> /* For the setjmp/long structure jmp_buf. */
 
66
#include <stdio.h>
 
67
#include "score.h" /* For type definitions */ 
 
68
 
 
69
/* The MAXLINE macro is defined in score.h and taken from stdio.h's */
 
70
/* FILENAME_MAX.  HP's is only 14, so correct that here. */
 
71
 
 
72
#ifndef MAXLINE
 
73
  #define MAXLINE 1024
 
74
#else
 
75
  #if MAXLINE < 1024
 
76
     #undef MAXLINE
 
77
     #define MAXLINE 1024
 
78
  #endif
 
79
#endif
 
80
 
 
81
#define PDB_SYSTEM_VERSION  14
 
82
#define PDB_WRITE /*Include code to write to pdb files*/
 
83
 
 
84
/* PDBFile Layout:
 
85
 *       
 
86
 *       Header (ASCII)
 
87
 *         Identifying token
 
88
 *         Data Formats
 
89
 *         Structure Chart Address
 
90
 *         Symbol Table Address
 
91
 *       Data
 
92
 *       Structure Chart
 
93
 *       Symbol Table
 
94
 *       Extensions
 
95
 *       EOF
 
96
 */
 
97
 
 
98
#define NORMAL_ORDER    1
 
99
#define REVERSE_ORDER   2  /* this must not be -1 which turns out to be EOF */
 
100
 
 
101
#define IEEE_32_64   1        /* IEEE standard 32 bit float : 64 bit double */
 
102
#define INTEL_X86    2                        /* Intel 80x86 class machines */
 
103
#define CRAY_64      3                               /* CRAY class machines */
 
104
#define VAX_11       4                                /* VAX class machines */
 
105
#define IEEE_32_96   6        /* IEEE standard 32 bit float : 96 bit double */
 
106
#define NSTD         6       /* Number of standards currently in the system 
 
107
                                            should be same as last standard */
 
108
 
 
109
#define PD_READ   0
 
110
#define PD_WRITE  1
 
111
#define PD_APPEND 2
 
112
#define PD_OPEN   3
 
113
#define PD_CREATE 4
 
114
#define PD_CLOSE  5
 
115
#define PD_TRACE  6
 
116
#define PD_PRINT  7
 
117
 
 
118
#define ROW_MAJOR_ORDER     101
 
119
#define COLUMN_MAJOR_ORDER  102
 
120
 
 
121
#define PF_ALPHABETIC 1
 
122
#define PF_DISK_ORDER 2
 
123
 
 
124
#define X_AND_Y 1
 
125
#define X_ONLY  2
 
126
#define Y_ONLY  3
 
127
 
 
128
/*--------------------------------------------------------------------------*/
 
129
/* Macros                                                                   */
 
130
/*--------------------------------------------------------------------------*/
 
131
 
 
132
#define PN_sizeof(type, tab)  _lite_PD_lookup_size(type, tab)
 
133
 
 
134
#define PD_get_mode(file)        ((file)->mode)
 
135
#define PD_set_mode(file, v)     (file)->mode = (v)
 
136
#define PD_get_offset(file)      ((file)->default_offset)
 
137
#define PD_set_offset(file, v)   (file)->default_offset = (v)
 
138
 
 
139
/* #define PD_file_maximum_size(file) file->maximum_size           */
 
140
/* replaced by PD_get_max_file_size and PD_set_max_file_size below */
 
141
 
 
142
#define PD_get_max_file_size(file)    ((file)->maximum_size)
 
143
#define PD_set_max_file_size(file, v) (file)->maximum_size = (v)
 
144
 
 
145
 
 
146
#define PD_entry_type(ep)          ((ep)->type)
 
147
#define PD_entry_dimensions(ep)    ((ep)->dimensions)
 
148
#define PD_entry_address(ep)       ((ep)->blocks[0].diskaddr)
 
149
#define PD_entry_number(ep)        ((ep)->number)
 
150
#define PD_entry_indirects(ep)     ((ep)->indirects)
 
151
#define PD_entry_blocks(ep)        ((ep)->blocks)
 
152
#define PD_block_address(ep, n)    ((ep)->blocks[n].diskaddr)
 
153
#define PD_block_number(ep, n)     ((ep)->blocks[n].number)
 
154
#define PD_n_blocks(ep)         (lite_SC_arrlen((ep)->blocks)/sizeof(symblock))
 
155
 
 
156
#define PD_get_major_order(file)       ((file)->major_order)
 
157
#define PD_set_major_order(file, type) (file)->major_order = (type)
 
158
 
 
159
#define PD_has_directories(file)                                             \
 
160
 (lite_SC_def_lookup("Directory", file->chart) != NULL)
 
161
 
 
162
#define PD_inquire_type(file, name)                                          \
 
163
 (defstr *) lite_SC_def_lookup(name, file->chart)
 
164
 
 
165
#define PD_inquire_host_type(file, name)                                     \
 
166
 (defstr *) lite_SC_def_lookup(name, file->host_chart)
 
167
 
 
168
#define PD_inquire_table_type(table, name)                                   \
 
169
 (defstr *) lite_SC_def_lookup(name, table)
 
170
 
 
171
#define PD_hyper_refp(name, commnd)                                          \
 
172
   {char c, s[MAXLINE];                                                      \
 
173
    strcpy(s, name);                                                         \
 
174
    c = s[strlen(s) - 1];                                                    \
 
175
    if ((c == ')') || (c == ']'))                                            \
 
176
       (commnd);}
 
177
 
 
178
#define PD_hyper_ref(s, name)                                                \
 
179
   {char c;                                                                  \
 
180
    strcpy(s, name);                                                         \
 
181
    c = s[strlen(s) - 1];                                                    \
 
182
    if ((c == ')') || (c == ']'))                                            \
 
183
       {s[strlen(s) - 1] = '\0';                                             \
 
184
        lite_SC_lasttok(s, "[]()");};}
 
185
 
 
186
#define PD_INQUIRE_ATTRIBUTE(x)                                              \
 
187
    ((attribute *) lite_SC_def_lookup((x), file->attrtab))
 
188
 
 
189
#define PD_INQUIRE_ATTRIBUTE_VALUE(x)                                        \
 
190
    ((attribute_value *) lite_SC_def_lookup((x), file->attrtab))
 
191
 
 
192
#define PD_CAST_TYPE(t, d, vg, vl, err_fnc, err_msg, err_arg)                \
 
193
    {if (d->cast_offs < 0L)                                                  \
 
194
        t = d->type;                                                         \
 
195
     else                                                                    \
 
196
        {t = DEREF(vl + d->cast_offs);                                       \
 
197
         if (t == NULL)                                                      \
 
198
            {if (DEREF(vg) != NULL)                                          \
 
199
                {err_fnc(err_msg, err_arg);}                                 \
 
200
             else                                                            \
 
201
                t = d->type;};};}
 
202
 
 
203
/*--------------------------------------------------------------------------*/
 
204
/*                          TYPEDEFS AND STRUCTS                            */
 
205
/*--------------------------------------------------------------------------*/
 
206
 
 
207
struct s_data_alignment {
 
208
   int char_alignment;
 
209
   int ptr_alignment;
 
210
   int short_alignment;
 
211
   int int_alignment;
 
212
   int long_alignment;
 
213
   int longlong_alignment;
 
214
   int float_alignment;
 
215
   int double_alignment;
 
216
   int struct_alignment;
 
217
};
 
218
 
 
219
typedef struct s_data_alignment data_alignment;
 
220
 
 
221
 
 
222
struct s_data_standard {
 
223
   int ptr_bytes;
 
224
   int short_bytes;
 
225
   int short_order;
 
226
   int int_bytes;
 
227
   int int_order;
 
228
   int long_bytes;
 
229
   int long_order;
 
230
   int longlong_bytes;
 
231
   int longlong_order;
 
232
   int float_bytes;
 
233
   long *float_format;
 
234
   int *float_order;
 
235
   int double_bytes;
 
236
   long *double_format;
 
237
   int *double_order;
 
238
};
 
239
 
 
240
typedef struct s_data_standard data_standard;
 
241
 
 
242
 
 
243
struct s_PDBfile {
 
244
   FILE *stream;
 
245
   char *name;
 
246
   char *type;                        /* used by files masqerading as PDB */
 
247
   HASHTAB *symtab;
 
248
   HASHTAB *chart;
 
249
   HASHTAB *host_chart;
 
250
   HASHTAB *attrtab;
 
251
   long maximum_size;                  /* for file family bookkeeping */
 
252
   char *previous_file;                /* for file family bookkeeping */
 
253
   int mode;
 
254
   int default_offset;
 
255
   data_standard *std;
 
256
   data_standard *host_std;
 
257
   data_alignment *align;
 
258
   data_alignment *host_align;
 
259
   char *current_prefix;
 
260
   int flushed;
 
261
   int virtual_internal;
 
262
   int system_version;
 
263
   int major_order;
 
264
   char *date;
 
265
   long headaddr;
 
266
   long symtaddr;
 
267
   long chrtaddr;
 
268
};
 
269
 
 
270
typedef struct s_PDBfile PDBfile;
 
271
 
 
272
 
 
273
/*
 
274
 * Dimension descriptor - describe an array dimension range
 
275
 * NOTE: changes here must be reflected in sxhook.c
 
276
 */
 
277
struct s_dimdes {
 
278
   long index_min;
 
279
   long index_max;
 
280
   long number;
 
281
   struct s_dimdes *next;
 
282
};
 
283
 
 
284
typedef struct s_dimdes dimdes;
 
285
 
 
286
 
 
287
/*
 
288
 * Member descriptor - describe a member efficiently
 
289
 * NOTE: changes here must be reflected in sxhook.c
 
290
 */
 
291
struct s_memdes {
 
292
   char *member;
 
293
   long member_offs;
 
294
   char *cast_memb;
 
295
   long cast_offs;
 
296
   char *type;
 
297
   char *base_type;
 
298
   char *name;
 
299
   dimdes *dimensions;
 
300
   long number;
 
301
   struct s_memdes *next;
 
302
};
 
303
 
 
304
typedef struct s_memdes memdes;
 
305
 
 
306
/*
 
307
 * Symbol table entry block - manage discontiguous data items
 
308
 * NOTE: changes here must be reflected in sxhook.c
 
309
 */
 
310
struct s_symblock {
 
311
   long number;
 
312
   long diskaddr;
 
313
};
 
314
 
 
315
typedef struct s_symblock symblock;
 
316
 
 
317
 
 
318
/*
 
319
 * Symbol table entry indirects
 
320
 * NOTE: changes here must be reflected in sxhook.c
 
321
 */
 
322
struct s_symindir {
 
323
   long addr;
 
324
   long n_ind_type;
 
325
   long arr_offs;
 
326
};
 
327
 
 
328
typedef struct s_symindir symindir;
 
329
 
 
330
 
 
331
/*
 
332
 * Symbol table entry - the def member of a hashel
 
333
 * NOTE: changes here must be reflected in sxhook.c
 
334
 */
 
335
struct s_syment {
 
336
   char *type;
 
337
   dimdes *dimensions;
 
338
   long number;
 
339
   symindir indirects;
 
340
   symblock *blocks;
 
341
};
 
342
 
 
343
typedef struct s_syment syment;
 
344
 
 
345
 
 
346
/*
 
347
 * Structure chart entry - the def member of a hashel
 
348
 * NOTE: changes here must be reflected in sxhook.c
 
349
 */
 
350
struct s_defstr {
 
351
   char *type;
 
352
   long size_bits;
 
353
   long size;
 
354
   int alignment;   /* type begins on byte boundary divisible by alignment */
 
355
   int n_indirects;                              /* number of indirections */
 
356
   int convert;
 
357
   int onescmp;      /* TRUE iff ones complement arithmetic - old machines */
 
358
   int unsgned;                  /* TRUE iff the integral type is unsigned */
 
359
   int order_flag;
 
360
   int *order;
 
361
   long *format;
 
362
   memdes *members;
 
363
};
 
364
 
 
365
typedef struct s_defstr defstr;
 
366
 
 
367
typedef memdes  *(*PFPmemdes)() ;
 
368
typedef memdes  *(*ReaderFuncType)(memdes *);
 
369
typedef memdes  *(*WriterFuncType)(PDBfile *,char *,defstr *);
 
370
 
 
371
/*
 
372
 * Indirect reference tag.
 
373
 */
 
374
struct s_PD_itag {
 
375
   long nitems;                              /* number of items pointed to */
 
376
   char *type;                                  /* type of item pointed to */
 
377
   long addr;                           /* address of the itag owning data */
 
378
   int flag;                            /* TRUE if this itag owns the data */
 
379
};
 
380
 
 
381
typedef struct s_PD_itag PD_itag;
 
382
 
 
383
 
 
384
/*
 
385
 * Hyper-index support structure
 
386
 */
 
387
struct s_dimind {
 
388
   long stride;
 
389
   long start;
 
390
   long stop;
 
391
   long step;
 
392
};
 
393
 
 
394
typedef struct s_dimind dimind;
 
395
 
 
396
 
 
397
struct s_attribute {
 
398
   char *name;
 
399
   char *type;
 
400
   byte **data;
 
401
   long size;
 
402
   long indx;
 
403
};
 
404
 
 
405
typedef struct s_attribute attribute;
 
406
 
 
407
 
 
408
struct s_attribute_value {
 
409
   attribute *attr;
 
410
   long indx;
 
411
   struct s_attribute_value *next;
 
412
};
 
413
 
 
414
typedef struct s_attribute_value attribute_value;
 
415
 
 
416
 
 
417
/*
 
418
 * PD_IMAGE is a faithful shadow of the PG_image which is not defined yet
 
419
 * any changes to PG_image must be reflected here
 
420
 */
 
421
struct s_PD_image {
 
422
   int version_id;
 
423
   char *label;
 
424
   double xmin;
 
425
   double xmax;
 
426
   double ymin;
 
427
   double ymax;
 
428
   double zmin;
 
429
   double zmax;
 
430
   char *element_type;
 
431
   unsigned char *buffer;
 
432
   int kmax;
 
433
   int lmax;
 
434
   long size;
 
435
   int bits_pixel;
 
436
   char *palette;
 
437
};
 
438
 
 
439
typedef struct s_PD_image PD_image;
 
440
 
 
441
/*--------------------------------------------------------------------------*/
 
442
/*                            PDBLIB VARIABLES                              */
 
443
/*--------------------------------------------------------------------------*/
 
444
 
 
445
extern jmp_buf          _lite_PD_close_err ;
 
446
extern jmp_buf          _lite_PD_print_err ;
 
447
extern jmp_buf          _lite_PD_read_err ;
 
448
extern jmp_buf          _lite_PD_trace_err ;
 
449
extern char             lite_PD_err[] ;
 
450
extern int              lite_PD_buffer_size ;
 
451
extern int              lite_FORMAT_FIELDS ;
 
452
extern data_standard    lite_IEEEA_STD ;
 
453
extern data_standard    lite_IEEEB_STD ;
 
454
extern data_standard    lite_INTELA_STD ;
 
455
extern data_standard    lite_CRAY_STD ;
 
456
extern data_standard    lite_VAX_STD ;
 
457
extern data_standard    lite_DEF_STD ;
 
458
extern data_standard    *lite_INT_STANDARD ;
 
459
extern data_alignment   lite_M68000_ALIGNMENT ;
 
460
extern data_alignment   lite_INTELA_ALIGNMENT ;
 
461
extern data_alignment   lite_UNICOS_ALIGNMENT ;
 
462
extern data_alignment   lite_SPARC_ALIGNMENT ;
 
463
extern data_alignment   lite_RS6000_ALIGNMENT ;
 
464
extern data_alignment   lite_MIPS_ALIGNMENT ;
 
465
extern data_alignment   lite_DEF_ALIGNMENT ;
 
466
extern data_alignment   *lite_INT_ALIGNMENT ;
 
467
extern ReaderFuncType   lite_pdb_rd_hook;
 
468
extern WriterFuncType   lite_pdb_wr_hook;
 
469
 
 
470
 
 
471
/*--------------------------------------------------------------------------*/
 
472
/*                            PDBLIB FUNCTIONS                              */
 
473
/*--------------------------------------------------------------------------*/
 
474
 
 
475
SILO_API extern int     lite_PD_cd (PDBfile*,char*);
 
476
SILO_API extern int     lite_PD_close (PDBfile*);
 
477
SILO_API extern int     lite_PD_convert (char**,char**,char*,char*,long,
 
478
                                         data_standard*,data_standard*,
 
479
                                         data_standard*,long*,long*,HASHTAB*,
 
480
                                         HASHTAB*,int,int);
 
481
SILO_API extern dimdes *lite_PD_copy_dims (dimdes*);
 
482
SILO_API extern memdes *lite_PD_copy_members (memdes*);
 
483
SILO_API extern syment *lite_PD_copy_syment (syment*);
 
484
SILO_API extern defstr *lite_PD_defncv (PDBfile*,char*,long,int);
 
485
SILO_API extern char *  lite_PD_dereference (char*);
 
486
SILO_API extern void    lite_PD_error (char*,int);
 
487
SILO_API extern byte *  lite_PD_get_attribute (PDBfile*,char*,char*);
 
488
SILO_API extern long    lite_PD_hyper_number (PDBfile*,char*,syment*);
 
489
SILO_API extern syment *lite_PD_inquire_entry (PDBfile*,char*,int,char*);
 
490
SILO_API extern char ** lite_PD_ls (PDBfile*,char*,char*,int*);
 
491
SILO_API extern PDBfile *lite_PD_open (char*,char*);
 
492
SILO_API extern char *  lite_PD_pwd (PDBfile*);
 
493
SILO_API extern int     lite_PD_read (PDBfile*,char*,byte*);
 
494
SILO_API extern int     lite_PD_read_alt (PDBfile*,char*,byte*,long*);
 
495
SILO_API extern int     lite_PD_read_as (PDBfile*,char*,char*,byte*);
 
496
SILO_API extern int     lite_PD_read_as_alt (PDBfile*,char*,char*,byte*,long*);
 
497
SILO_API extern defstr *lite_PD_typedef (PDBfile*,char*,char*);
 
498
extern int              _lite_PD_align (long,char*,HASHTAB*,int*);
 
499
extern void             _lite_PD_check_casts (HASHTAB*,char**,long);
 
500
extern void             _lite_PD_clr_table (HASHTAB*,FreeFuncType);
 
501
extern long             _lite_PD_comp_num (dimdes*);
 
502
extern int              _lite_PD_compare_std (data_standard*,data_standard*,
 
503
                                              data_alignment*,data_alignment*);
 
504
extern int              _lite_PD_convert (char**,char**,long,int,defstr*,
 
505
                                          defstr*,data_standard*,long*,long*);
 
506
extern void             _lite_PD_convert_ascii (char*,char*,long,int,int);
 
507
extern data_alignment * _lite_PD_copy_alignment (data_alignment*);
 
508
extern data_standard *  _lite_PD_copy_standard (data_standard*);
 
509
extern void             _lite_PD_d_install (char*,defstr*,HASHTAB*);
 
510
extern defstr *         _lite_PD_defstr_inst (char*,memdes*,int,int*,long*,
 
511
                                              HASHTAB*,HASHTAB*,
 
512
                                              data_alignment*,
 
513
                                              data_alignment*,int);
 
514
extern void             _lite_PD_e_install (char*,syment*,HASHTAB*);
 
515
extern syment *         _lite_PD_effective_ep (PDBfile*,char*,int,char*);
 
516
extern dimdes *         _lite_PD_ex_dims (char*,int,int);
 
517
extern long             _lite_PD_extract_field (char*,int,int,int,int*);
 
518
extern void             _lite_PD_fconvert (char**,char**,long,int,long*,int*,
 
519
                                           long*,int*,int,int,int);
 
520
extern char *           _lite_PD_fixname (PDBfile*,char*);
 
521
extern long             _lite_PD_hyper_number (PDBfile*,char*,long,dimdes*,
 
522
                                               long*);
 
523
extern int              _lite_PD_hyper_read (PDBfile*,char*,char*,syment*,
 
524
                                             byte*);
 
525
extern void             _lite_PD_iconvert (char**,char**,long,long,int,long,
 
526
                                           int,int);
 
527
extern int              _lite_PD_indexed_read_as (PDBfile*,char*,char*,byte*,
 
528
                                                  int,long*,syment*);
 
529
extern int              _lite_PD_indirection (char*);
 
530
extern void             _lite_PD_init_chrt (PDBfile*);
 
531
extern void             _lite_PD_init_dimind (dimind*,long,long,char*);
 
532
extern long             _lite_PD_lookup_size (char*,HASHTAB*);
 
533
extern defstr *         _lite_PD_lookup_type (char*,HASHTAB*);
 
534
extern char *           _lite_PD_member_base_type (char*);
 
535
extern long             _lite_PD_member_items (char*);
 
536
extern long             _lite_PD_member_location (char*,HASHTAB*,defstr*,
 
537
                                                  memdes**);
 
538
extern char *           _lite_PD_member_name (char*);
 
539
extern char *           _lite_PD_member_type (char*);
 
540
extern data_alignment * _lite_PD_mk_alignment (char*);
 
541
extern defstr *         _lite_PD_mk_defstr (char*,memdes*,long,int,int,int,
 
542
                                            int*,long*);
 
543
extern memdes *         _lite_PD_mk_descriptor (char*,int);
 
544
extern dimdes *         _lite_PD_mk_dimensions (long,long);
 
545
extern PDBfile *        _lite_PD_mk_pdb (char*);
 
546
extern data_standard *  _lite_PD_mk_standard (void);
 
547
extern syment *         _lite_PD_mk_syment (char*,long,long,symindir*,dimdes*);
 
548
extern int              _lite_PD_null_pointer (char*,int);
 
549
extern int              _lite_PD_pio_close (FILE*);
 
550
extern int              _lite_PD_pio_printf (FILE*,char*,...);
 
551
extern int              _lite_PD_pio_seek (FILE*,long,int);
 
552
extern int              _lite_PD_prim_typep (char*,HASHTAB*,int);
 
553
extern int              _lite_PD_rd_chrt (PDBfile*);
 
554
extern int              _lite_PD_rd_extras (PDBfile*);
 
555
extern int              _lite_PD_rd_format (PDBfile*);
 
556
extern int              _lite_PD_rd_itag (PDBfile*,PD_itag*);
 
557
extern void             _lite_PD_rd_prim_extras (PDBfile*,int,int,char*);
 
558
extern long             _lite_PD_rd_syment (PDBfile*,syment*,char*,byte*);
 
559
extern int              _lite_PD_rd_symt (PDBfile*);
 
560
extern char *           _lite_PD_rfgets (char*,int,FILE*);
 
561
extern void             _lite_PD_rl_alignment (data_alignment*);
 
562
extern void             _lite_PD_rl_defstr (defstr*);
 
563
extern void             _lite_PD_rl_descriptor (memdes*);
 
564
extern void             _lite_PD_rl_dimensions (dimdes*);
 
565
extern void             _lite_PD_rl_pdb (PDBfile*);
 
566
extern void             _lite_PD_rl_standard (data_standard*);
 
567
extern void             _lite_PD_rl_syment (syment*);
 
568
extern void             _lite_PD_rl_syment_d (syment*);
 
569
extern void             _lite_PD_setup_chart (HASHTAB*,data_standard*,
 
570
                                              data_standard*,data_alignment*,
 
571
                                              data_alignment*,int);
 
572
extern long             _lite_PD_skip_over (PDBfile*,long,int);
 
573
extern long             _lite_PD_str_size (memdes*,HASHTAB*);
 
574
extern int              _lite_PD_unp_bits (char*,char*,int,int,int,int,long,
 
575
                                           long);
 
576
 
 
577
/* added 26Feb08 as per request from Burl Hall */
 
578
SILO_API extern int     lite_PD_entry_number(syment*);
 
579
SILO_API extern long    lite_PD_get_file_length(PDBfile *file);
 
580
 
 
581
extern char            *lite_PD_SYMENT_S;
 
582
extern char            *lite_PD_DEFSTR_S;
 
583
 
 
584
#ifdef PDB_WRITE
 
585
SILO_API extern int     lite_PD_mkdir (PDBfile*,char*);
 
586
SILO_API extern int     lite_PD_write (PDBfile*,char*,char*,byte*);
 
587
SILO_API extern int     lite_PD_write_as (PDBfile*,char*,char*,char*,byte*);
 
588
SILO_API extern int     lite_PD_write_alt (PDBfile*,char*,char*,byte*,int,
 
589
                                           long*);
 
590
SILO_API extern int     lite_PD_write_as_alt (PDBfile*,char*,char*,char*,byte*,
 
591
                                              int,long*);
 
592
SILO_API extern PDBfile *lite_PD_create (char*);
 
593
extern int              _lite_PD_adj_dimensions (PDBfile*,char*,syment*);
 
594
extern int              _lite_PD_add_block (PDBfile*,syment*,dimdes*);
 
595
extern int              _lite_PD_hyper_write (PDBfile*,char*,syment*,byte*,
 
596
                                              char*);
 
597
extern void             _lite_PD_convert_attrtab (PDBfile*);
 
598
extern int              _lite_PD_wr_format (PDBfile*);
 
599
SILO_API extern defstr *lite_PD_defstr (PDBfile*,char*,...);
 
600
SILO_API extern int     lite_PD_cast (PDBfile*,char*,char*,char*);
 
601
extern int              _lite_PD_extend_file (PDBfile*,long);
 
602
extern long             _lite_PD_wr_syment (PDBfile*,char*,long,char*,char*);
 
603
extern long             _lite_PD_number_refd (byte*,char*,HASHTAB*);
 
604
extern int              _lite_PD_wr_itag (PDBfile*,long,char*,long,int);
 
605
extern void             _lite_PD_eod (PDBfile*);
 
606
SILO_API extern int     lite_PD_target (data_standard*,data_alignment*);
 
607
SILO_API extern int     lite_PD_flush (PDBfile*);
 
608
extern long             _lite_PD_wr_chrt (PDBfile*);
 
609
extern long             _lite_PD_wr_symt (PDBfile*);
 
610
extern int              _lite_PD_wr_extras (PDBfile*);
 
611
extern int              _lite_PD_rev_chrt (PDBfile*);
 
612
extern void             _lite_PD_wr_prim_extras (FILE*,HASHTAB*,int,int);
 
613
SILO_API extern syment  *lite_PD_defent_alt (PDBfile*,char*,char*,int,long*);
 
614
extern syment           *_lite_PD_defent (PDBfile*,char*,char*,long,dimdes*);
 
615
 
 
616
/* added 26Feb08 as per request from Burl Hall */
 
617
SILO_API extern int      lite_PD_append_alt(PDBfile*,char*,void*,int,long*);
 
618
SILO_API extern void     lite_PD_set_major_order(PDBfile*,int);
 
619
#endif /* PDB_WRITE */
 
620
   
 
621
#endif /* !_PDB_H */