00001
00015 #ifndef ADF_INTERNALS_INCLUDE
00016 #define ADF_INTERNALS_INCLUDE
00017 #include "ADF.h"
00018 #include <ctype.h>
00019
00020
00021
00022
00023
00024
00025 #define LIST_CHUNK 8
00026 #define LIST_CHUNK_GROW_FACTOR 1.5
00027
00029 #ifndef DISK_BLOCK_SIZE
00030 #define DISK_BLOCK_SIZE 4096
00031 #endif
00032 #define MAXIMUM_FILES 0x3fff
00033 #define MAXIMUM_32_BITS (4294967295U)
00034
00035 #define BLANK_FILE_BLOCK 0
00036 #define BLANK_BLOCK_OFFSET DISK_BLOCK_SIZE
00037
00039 #define FILE_HEADER_SIZE 186
00040 #define FREE_CHUNK_TABLE_SIZE 80
00041 #define FREE_CHUNK_ENTRY_SIZE 32
00042 #define NODE_HEADER_SIZE 246
00043 #define DISK_POINTER_SIZE 12
00044 #define TAG_SIZE 4
00045 #define WHAT_STRING_SIZE 32
00046 #define DATE_TIME_SIZE 28
00047
00048
00049
00050
00051
00052 #define SMALLEST_CHUNK_SIZE NODE_HEADER_SIZE
00053 #define SMALL_CHUNK_MAXIMUM 1024
00054 #define MEDIUM_CHUNK_MAXIMUM DISK_BLOCK_SIZE
00055
00056 #define FREE_CHUNKS_BLOCK 0
00057 #define FREE_CHUNKS_OFFSET FILE_HEADER_SIZE
00058 #define ROOT_NODE_BLOCK 0
00059 #define ROOT_NODE_OFFSET (FREE_CHUNKS_OFFSET + FREE_CHUNK_TABLE_SIZE)
00060
00061 #define ROOT_NODE_NAME "ADF MotherNode"
00062 #define ROOT_NODE_LABEL "Root Node of ADF File"
00063
00065 #define UNDEFINED_FORMAT 0
00066 #define IEEE_BIG_32_FORMAT 1
00067 #define IEEE_LITTLE_32_FORMAT 2
00068 #define IEEE_BIG_64_FORMAT 3
00069 #define IEEE_LITTLE_64_FORMAT 4
00070 #define CRAY_FORMAT 5
00071 #define NATIVE_FORMAT 99
00072
00073 #define UNDEFINED_FORMAT_CHAR 'U'
00074 #define IEEE_BIG_FORMAT_CHAR 'B'
00075 #define IEEE_LITTLE_FORMAT_CHAR 'L'
00076 #define CRAY_FORMAT_CHAR 'C'
00077 #define NATIVE_FORMAT_CHAR 'N'
00078 #define OS_64_BIT 'B'
00079 #define OS_32_BIT 'L'
00080
00081 #define IEEE_BIG_32_FORMAT_STRING "IEEE_BIG_32"
00082 #define IEEE_LITTLE_32_FORMAT_STRING "IEEE_LITTLE_32"
00083 #define IEEE_BIG_64_FORMAT_STRING "IEEE_BIG_64"
00084 #define IEEE_LITTLE_64_FORMAT_STRING "IEEE_LITTLE_64"
00085 #define CRAY_FORMAT_STRING "CRAY"
00086 #define NATIVE_FORMAT_STRING "NATIVE"
00087
00088 #ifndef FALSE
00089 #define FALSE (0)
00090 #endif
00091
00092 #ifndef TRUE
00093 #define TRUE (-1)
00094 #endif
00095
00096
00097
00098
00101 #define TO_UPPER( c ) ((islower(c))?(toupper(c)):(c))
00102
00103 #define MIN(a,b) (((a)<(b))?(a):(b))
00104 #define MAX(a,b) (((a)>(b))?(a):(b))
00105
00106
00107
00108
00112
00113 struct DISK_POINTER {
00114 unsigned long block ;
00115 unsigned long offset ;
00116 } ;
00117
00118
00119 struct FILE_HEADER {
00120 char what [WHAT_STRING_SIZE] ;
00121 char tag0 [TAG_SIZE] ;
00122 char creation_date [DATE_TIME_SIZE] ;
00123 char tag1 [TAG_SIZE] ;
00124 char modification_date [DATE_TIME_SIZE] ;
00125 char tag2 [TAG_SIZE] ;
00126 char numeric_format ;
00127 char os_size ;
00128 char tag3 [TAG_SIZE] ;
00129 unsigned int sizeof_char ;
00130 unsigned int sizeof_short ;
00131 unsigned int sizeof_int ;
00132 unsigned int sizeof_long ;
00133 unsigned int sizeof_float ;
00134 unsigned int sizeof_double ;
00135 unsigned int sizeof_char_p ;
00136 unsigned int sizeof_short_p ;
00137 unsigned int sizeof_int_p ;
00138 unsigned int sizeof_long_p ;
00139 unsigned int sizeof_float_p ;
00140 unsigned int sizeof_double_p ;
00141 char tag4 [TAG_SIZE] ;
00142 struct DISK_POINTER root_node ;
00143 struct DISK_POINTER end_of_file ;
00144 struct DISK_POINTER free_chunks ;
00145 struct DISK_POINTER extra ;
00146 char tag5 [TAG_SIZE] ;
00147 } ;
00148
00149
00150 struct FREE_CHUNK_TABLE {
00151 char start_tag [TAG_SIZE] ;
00152 struct DISK_POINTER small_first_block ;
00153 struct DISK_POINTER small_last_block ;
00154 struct DISK_POINTER medium_first_block ;
00155 struct DISK_POINTER medium_last_block ;
00156 struct DISK_POINTER large_first_block ;
00157 struct DISK_POINTER large_last_block ;
00158 char end_tag [TAG_SIZE] ;
00159 } ;
00160
00161
00162 struct FREE_CHUNK {
00163 char start_tag [TAG_SIZE] ;
00164 struct DISK_POINTER end_of_chunk_tag ;
00165 struct DISK_POINTER next_chunk ;
00166 char end_tag [TAG_SIZE] ;
00167 } ;
00168
00169
00170 struct NODE_HEADER {
00171 char node_start_tag [TAG_SIZE] ;
00172 char name [ADF_NAME_LENGTH] ;
00173 char label [ADF_LABEL_LENGTH] ;
00174 unsigned int num_sub_nodes ;
00175 unsigned int entries_for_sub_nodes ;
00176 struct DISK_POINTER sub_node_table ;
00177 char data_type [ADF_DATA_TYPE_LENGTH] ;
00178 unsigned int number_of_dimensions ;
00179 unsigned int dimension_values [ADF_MAX_DIMENSIONS] ;
00180 unsigned int number_of_data_chunks ;
00181 struct DISK_POINTER data_chunks ;
00182 char node_end_tag [TAG_SIZE] ;
00183 } ;
00184
00185
00186
00187 struct DATA_CHUNK_TABLE_ENTRY {
00188 struct DISK_POINTER start ;
00189 struct DISK_POINTER end ;
00190 } ;
00191
00192
00193
00194 struct SUB_NODE_TABLE_ENTRY {
00195 char child_name[ ADF_NAME_LENGTH ] ;
00196 struct DISK_POINTER child_location ;
00197 } ;
00198
00199
00200 struct TOKENIZED_DATA_TYPE {
00201 char type[2] ;
00202 int file_type_size ;
00203 int machine_type_size ;
00204 unsigned long length ;
00205 } ;
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227 typedef struct {
00228 int in_use;
00229 int nlinks;
00230 unsigned int *links;
00231 char *file_name;
00232 char open_mode[10];
00233 char version_update[WHAT_STRING_SIZE+1];
00234 char format;
00235 char os_size;
00236 char link_separator;
00237 #ifdef USE_STREAM_IO
00238 FILE *file;
00239 #else
00240 int file;
00241 #endif
00242 } ADF_FILE;
00243
00244 extern ADF_FILE *ADF_file;
00245 extern int maximum_files;
00246
00247
00248
00249
00250
00251
00252
00253
00254 #if defined (__cplusplus)
00255 extern "C" {
00256 #endif
00257
00258 extern void ADFI_Abort(
00259 const int error_code ) ;
00260
00261 extern void ADFI_ASCII_Hex_2_unsigned_int(
00262 const unsigned int minimum,
00263 const unsigned int maximum,
00264 const unsigned int string_length,
00265 const char string[],
00266 unsigned int *number,
00267 int *error_return ) ;
00268
00269 extern void ADFI_add_2_sub_node_table(
00270 const int file_index,
00271 const struct DISK_POINTER *parent,
00272 const struct DISK_POINTER *child,
00273 int *error_return ) ;
00274
00275 extern void ADFI_adjust_disk_pointer(
00276 struct DISK_POINTER *block_offset,
00277 int *error_return ) ;
00278
00279 extern void ADFI_big_endian_to_cray(
00280 const char from_format,
00281 const char from_os_size,
00282 const char to_format,
00283 const char to_os_size,
00284 const char data_type[2],
00285 const unsigned long delta_from_bytes,
00286 const unsigned long delta_to_bytes,
00287 const unsigned char *from_data,
00288 unsigned char *to_data,
00289 int *error_return );
00290
00291 extern void ADFI_big_little_endian_swap(
00292 const char from_format,
00293 const char from_os_size,
00294 const char to_format,
00295 const char to_os_size,
00296 const char data_type[2],
00297 const unsigned long delta_from_bytes,
00298 const unsigned long delta_to_bytes,
00299 const unsigned char *from_data,
00300 unsigned char *to_data,
00301 int *error_return );
00302
00303 extern void ADFI_big_endian_32_swap_64(
00304 const char from_format,
00305 const char from_os_size,
00306 const char to_format,
00307 const char to_os_size,
00308 const char data_type[2],
00309 const unsigned long delta_from_bytes,
00310 const unsigned long delta_to_bytes,
00311 const unsigned char *from_data,
00312 unsigned char *to_data,
00313 int *error_return );
00314
00315 extern void ADFI_blank_fill_string(
00316 char *str,
00317 const int length ) ;
00318
00319 extern void ADFI_chase_link(
00320 const double ID,
00321 double *LID,
00322 unsigned int *file_index,
00323 struct DISK_POINTER *block_offset,
00324 struct NODE_HEADER *node_header,
00325 int *error_return ) ;
00326
00327 extern void ADFI_check_4_child_name(
00328 const int file_index,
00329 const struct DISK_POINTER *parent,
00330 const char *name,
00331 int *found,
00332 struct DISK_POINTER *sub_node_entry_location,
00333 struct SUB_NODE_TABLE_ENTRY *sub_node_entry,
00334 int *error_return ) ;
00335
00336 extern void ADFI_check_string_length(
00337 const char *str,
00338 const int max_length,
00339 int *error_return ) ;
00340
00341 extern void ADFI_close_file(
00342 const int top_file_index,
00343 int *error_return ) ;
00344
00345 extern void ADFI_compare_node_names(
00346 const char *name,
00347 const char *new_name,
00348 int *names_match,
00349 int *error_return ) ;
00350
00351 extern void ADFI_convert_number_format(
00352 const char from_format,
00353 const char from_os_size,
00354 const char to_format,
00355 const char to_os_size,
00356 const int convert_dir,
00357 const struct TOKENIZED_DATA_TYPE *tokenized_data_type,
00358 const unsigned int length,
00359 unsigned char *from_data,
00360 unsigned char *to_data,
00361 int *error_return ) ;
00362
00363 extern void ADFI_count_total_array_points(
00364 const unsigned int ndim,
00365 const unsigned int dims[],
00366 const int dim_start[],
00367 const int dim_end[],
00368 const int dim_stride[],
00369 unsigned long *total_points,
00370 unsigned long *starting_offset,
00371 int *error_return ) ;
00372
00373 extern void ADFI_cray_to_big_endian(
00374 const char from_format,
00375 const char from_os_size,
00376 const char to_format,
00377 const char to_os_size,
00378 const char data_type[2],
00379 const unsigned long delta_from_bytes,
00380 const unsigned long delta_to_bytes,
00381 const unsigned char *from_data,
00382 unsigned char *to_data,
00383 int *error_return );
00384
00385 extern void ADFI_cray_to_little_endian(
00386 const char from_format,
00387 const char from_os_size,
00388 const char to_format,
00389 const char to_os_size,
00390 const char data_type[2],
00391 const unsigned long delta_from_bytes,
00392 const unsigned long delta_to_bytes,
00393 const unsigned char *from_data,
00394 unsigned char *to_data,
00395 int *error_return );
00396
00397 extern void ADFI_delete_data(
00398 const int file_index,
00399 const struct NODE_HEADER *node_header,
00400 int *error_return ) ;
00401
00402 extern void ADFI_delete_from_sub_node_table(
00403 const int file_index,
00404 const struct DISK_POINTER *parent,
00405 const struct DISK_POINTER *child,
00406 int *error_return ) ;
00407
00408 extern void ADFI_delete_sub_node_table(
00409 const int file_index,
00410 const struct DISK_POINTER *block_offset,
00411 const unsigned int size_sub_node_table,
00412 int *error_return ) ;
00413
00414 extern void ADFI_disk_pointer_2_ASCII_Hex(
00415 const struct DISK_POINTER *block_offset,
00416 char block[8],
00417 char offset[4],
00418 int *error_return ) ;
00419
00420 extern void ADFI_disk_pointer_from_ASCII_Hex(
00421 const char block[8],
00422 const char offset[4],
00423 struct DISK_POINTER *block_offset,
00424 int *error_return ) ;
00425
00426 extern void ADFI_evaluate_datatype(
00427 const int file_index,
00428 const char data_type[],
00429 int *bytes_file,
00430 int *bytes_machine,
00431 struct TOKENIZED_DATA_TYPE *tokenized_data_type,
00432 char *file_format,
00433 char *machine_format,
00434 int *error_return ) ;
00435
00436 extern void ADFI_figure_machine_format(
00437 const char *format,
00438 char *machine_format,
00439 char *format_to_use,
00440 char *os_to_use,
00441 int *error_return ) ;
00442
00443 extern void ADFI_file_and_machine_compare(
00444 const int file_index,
00445 const struct TOKENIZED_DATA_TYPE *tokenized_data_type,
00446 int *compare,
00447 int *error_return ) ;
00448
00449 extern void ADFI_file_block_offset_2_ID(
00450 const int file_index,
00451 const unsigned long file_block,
00452 const unsigned long block_offset,
00453 double *ID,
00454 int *error_return ) ;
00455
00456 extern void ADFI_file_free(
00457 const int file_index,
00458 const struct DISK_POINTER *block_offset,
00459 const long number_of_bytes,
00460 int *error_return ) ;
00461
00462 extern void ADFI_file_malloc(
00463 const int file_index,
00464 const long size_bytes,
00465 struct DISK_POINTER *block_offset,
00466 int *error_return ) ;
00467
00468 extern void ADFI_fill_initial_file_header(
00469 const char format,
00470 const char os_size,
00471 const char *what_string,
00472 struct FILE_HEADER *file_header,
00473 int *error_return ) ;
00474
00475 extern void ADFI_fill_initial_free_chunk_table(
00476 struct FREE_CHUNK_TABLE *free_chunk_table,
00477 int *error_return ) ;
00478
00479 extern void ADFI_fill_initial_node_header(
00480 struct NODE_HEADER *node_header,
00481 int *error_return ) ;
00482
00483 extern void ADFI_fseek_file(
00484 const unsigned int file_index,
00485 const unsigned long file_block,
00486 const unsigned long block_offset,
00487 int *error_return ) ;
00488
00489 extern void ADFI_get_current_date(
00490 char date[] ) ;
00491
00492 extern void ADFI_get_direct_children_ids(
00493 const unsigned int file_index,
00494 const struct DISK_POINTER *node_block_offset,
00495 int *num_ids,
00496 double **ids,
00497 int *error_return ) ;
00498
00499 extern void ADFI_get_file_index_from_name(
00500 const char *file_name,
00501 int *found,
00502 unsigned int *file_index,
00503 double *ID,
00504 int *error_return ) ;
00505
00506 extern void ADFI_ID_2_file_block_offset(
00507 const double ID,
00508 unsigned int *file_index,
00509 unsigned long *file_block,
00510 unsigned long *block_offset,
00511 int *error_return ) ;
00512
00513 extern void ADFI_increment_array(
00514 const unsigned int ndim,
00515 const unsigned int dims[],
00516 const int dim_start[],
00517 const int dim_end[],
00518 const int dim_stride[],
00519 int current_position[],
00520 unsigned long *element_offset,
00521 int *error_return ) ;
00522
00523 extern void ADFI_is_block_in_core() ;
00524
00525 extern void ADFI_little_endian_to_cray(
00526 const char from_format,
00527 const char from_os_size,
00528 const char to_format,
00529 const char to_os_size,
00530 const char data_type[2],
00531 const unsigned long delta_from_bytes,
00532 const unsigned long delta_to_bytes,
00533 const unsigned char *from_data,
00534 unsigned char *to_data,
00535 int *error_return );
00536
00537 extern void ADFI_little_endian_32_swap_64(
00538 const char from_format,
00539 const char from_os_size,
00540 const char to_format,
00541 const char to_os_size,
00542 const char data_type[2],
00543 const unsigned long delta_from_bytes,
00544 const unsigned long delta_to_bytes,
00545 const unsigned char *from_data,
00546 unsigned char *to_data,
00547 int *error_return );
00548
00549 extern void ADFI_open_file(
00550 const char *file,
00551 const char *status,
00552 unsigned int *file_index,
00553 int *error_return ) ;
00554
00555 extern void ADFI_read_chunk_length(
00556 const unsigned int file_index,
00557 const struct DISK_POINTER *block_offset,
00558 char tag[4],
00559 struct DISK_POINTER *end_of_chunk_tag,
00560 int *error_return ) ;
00561
00562 extern void ADFI_read_data_chunk(
00563 const unsigned int file_index,
00564 const struct DISK_POINTER *block_offset,
00565 struct TOKENIZED_DATA_TYPE *tokenized_data_type,
00566 const int data_size,
00567 const long chunk_bytes,
00568 const long start_offset,
00569 const long total_bytes,
00570 char *data,
00571 int *error_return ) ;
00572
00573 extern void ADFI_read_data_chunk_table(
00574 const unsigned int file_index,
00575 const struct DISK_POINTER *block_offset,
00576 struct DATA_CHUNK_TABLE_ENTRY data_chunk_table[],
00577 int *error_return ) ;
00578
00579 extern void ADFI_read_data_translated(
00580 const unsigned int file_index,
00581 const unsigned long file_block,
00582 const unsigned long block_offset,
00583 const struct TOKENIZED_DATA_TYPE *tokenized_data_type,
00584 const int data_size,
00585 const long total_bytes,
00586 char *data,
00587 int *error_return ) ;
00588
00589 extern void ADFI_read_disk_block() ;
00590
00591 extern void ADFI_read_disk_pointer_from_disk(
00592 const unsigned int file_index,
00593 const unsigned long file_block,
00594 const unsigned long block_offset,
00595 struct DISK_POINTER *block_and_offset,
00596 int *error_return ) ;
00597
00598 extern void ADFI_read_file(
00599 const unsigned int file_index,
00600 const unsigned long file_block,
00601 const unsigned long block_offset,
00602 const unsigned int data_length,
00603 char *data,
00604 int *error_return ) ;
00605
00606 extern void ADFI_read_file_header(
00607 const unsigned int file_index,
00608 struct FILE_HEADER *file_header,
00609 int *error_return ) ;
00610
00611 extern void ADFI_read_free_chunk(
00612 const unsigned int file_index,
00613 const struct DISK_POINTER *block_offset,
00614 struct FREE_CHUNK *free_chunk,
00615 int *error_return ) ;
00616
00617 extern void ADFI_read_free_chunk_table(
00618 const unsigned int file_index,
00619 struct FREE_CHUNK_TABLE *free_chunk_table,
00620 int *error_return ) ;
00621
00622 extern void ADFI_read_node_header(
00623 const unsigned int file_index,
00624 const struct DISK_POINTER *block_offset,
00625 struct NODE_HEADER *node_header,
00626 int *error_return ) ;
00627
00628 extern void ADFI_read_sub_node_table(
00629 const unsigned int file_index,
00630 const struct DISK_POINTER *block_offset,
00631 struct SUB_NODE_TABLE_ENTRY sub_node_table[],
00632 int *error_return ) ;
00633
00634 extern void ADFI_read_sub_node_table_entry(
00635 const unsigned int file_index,
00636 const struct DISK_POINTER *block_offset,
00637 struct SUB_NODE_TABLE_ENTRY *sub_node_table_entry,
00638 int *error_return ) ;
00639
00640 extern void ADFI_remember_file_format(
00641 const int file_index,
00642 const char numeric_format,
00643 const char os_size,
00644 int *error_return ) ;
00645
00646 extern void ADFI_remember_version_update(
00647 const int file_index,
00648 const char *what_string,
00649 int *error_return ) ;
00650
00651 extern void ADFI_set_blank_disk_pointer(
00652 struct DISK_POINTER *block_offset) ;
00653
00654 extern int ADFI_stridx_c(
00655 const char *str1,
00656 const char *str2 ) ;
00657
00658 extern void ADFI_string_2_C_string(
00659 const char *string,
00660 const int string_length,
00661 char *c_string,
00662 int *error_return ) ;
00663
00664 extern char *ADFI_strtok(
00665 char *string,
00666 char **string_pos,
00667 char *token ) ;
00668
00669 extern void ADFI_unsigned_int_2_ASCII_Hex(
00670 const unsigned int number,
00671 const unsigned int minimum,
00672 const unsigned int maximum,
00673 const unsigned int string_length,
00674 char string[],
00675 int *error_return ) ;
00676
00677 extern void ADFI_write_data_chunk(
00678 const unsigned int file_index,
00679 const struct DISK_POINTER *block_offset,
00680 const struct TOKENIZED_DATA_TYPE *tokenized_data_type,
00681 const int data_size,
00682 const long chunk_bytes,
00683 const long start_offset,
00684 const long total_bytes,
00685 const char *data,
00686 int *error_return ) ;
00687
00688 extern void ADFI_write_data_chunk_table(
00689 const unsigned int file_index,
00690 const struct DISK_POINTER *block_offset,
00691 const int number_of_data_chunks,
00692 struct DATA_CHUNK_TABLE_ENTRY data_chunk_table[],
00693 int *error_return ) ;
00694
00695 extern void ADFI_write_data_translated(
00696 const unsigned int file_index,
00697 const unsigned long file_block,
00698 const unsigned long block_offset,
00699 const struct TOKENIZED_DATA_TYPE *tokenized_data_type,
00700 const int data_size,
00701 const long total_bytes,
00702 const char *data,
00703 int *error_return ) ;
00704
00705 extern void ADFI_write_disk_block() ;
00706
00707 extern void ADFI_write_disk_pointer_2_disk(
00708 const unsigned int file_index,
00709 const unsigned long file_block,
00710 const unsigned long block_offset,
00711 const struct DISK_POINTER *block_and_offset,
00712 int *error_return ) ;
00713
00714 extern void ADFI_write_file(
00715 const unsigned int file_index,
00716 const unsigned long file_block,
00717 const unsigned long block_offset,
00718 const unsigned int data_length,
00719 const char *data,
00720 int *error_return ) ;
00721
00722 extern void ADFI_write_file_header(
00723 const int file_index,
00724 const struct FILE_HEADER *file_header,
00725 int *error_return ) ;
00726
00727 extern void ADFI_write_free_chunk(
00728 const int file_index,
00729 const struct DISK_POINTER *block_offset,
00730 const struct FREE_CHUNK *free_chunk,
00731 int *error_return ) ;
00732
00733 extern void ADFI_write_free_chunk_table(
00734 const int file_index,
00735 const struct FREE_CHUNK_TABLE *free_chunk_table,
00736 int *error_return ) ;
00737
00738 extern void ADFI_write_modification_date(
00739 const int file_index,
00740 int *error_return ) ;
00741
00742 extern void ADFI_write_node_header(
00743 const int file_index,
00744 const struct DISK_POINTER *block_offset,
00745 const struct NODE_HEADER *node_header,
00746 int *error_return ) ;
00747
00748 extern void ADFI_write_sub_node_table(
00749 const unsigned int file_index,
00750 const struct DISK_POINTER *block_offset,
00751 const int number_of_sub_nodes,
00752 struct SUB_NODE_TABLE_ENTRY sub_node_table[],
00753 int *error_return ) ;
00754
00755 extern void ADFI_write_sub_node_table_entry(
00756 const unsigned int file_index,
00757 const struct DISK_POINTER *block_offset,
00758 struct SUB_NODE_TABLE_ENTRY *sub_node_table_entry,
00759 int *error_return ) ;
00760
00761 extern void ADFI_flush_buffers(
00762 const unsigned int file_index,
00763 int flush_mode,
00764 int *error_return ) ;
00765
00766 extern void ADFI_fflush_file(
00767 const unsigned int file_index,
00768 int *error_return ) ;
00769
00770 extern int ADFI_stack_control(
00771 const unsigned int file_index,
00772 const unsigned long file_block,
00773 const unsigned long block_offset,
00774 const int stack_mode, const int stack_type,
00775 const unsigned long data_length,
00776 char *stack_data ) ;
00777
00778
00779
00780
00781
00782 #include "ADF_fbind.h"
00783
00784 extern void FNAME(adfcna2,ADFCNA2)(
00785 const Fdouble *PID,
00786 const Fint *istart,
00787 const Fint *imaxnum,
00788 const Fint *idim,
00789 const Fint *name_length,
00790 Fint *inum_ret,
00791 Fchar names,
00792 Fint *error_return ) ;
00793
00794 extern void FNAME(adfcid2,ADFCID2)(
00795 const Fdouble *PID,
00796 const Fint *istart,
00797 const Fint *imaxnum,
00798 Fint *inum_ret,
00799 Fdouble *cIDs,
00800 Fint *error_return ) ;
00801
00802 extern void FNAME(adfcre2,ADFCRE2)(
00803 const Fdouble *PID,
00804 const Fchar name,
00805 const Fint *name_length,
00806 Fdouble *ID,
00807 Fint *error_return ) ;
00808
00809 extern void FNAME(adfdcl2,ADFDCL2)(
00810 const Fdouble *Root_ID,
00811 Fint *error_return ) ;
00812
00813 extern void FNAME(adfdde2,ADFDDE2)(
00814 const Fchar filename,
00815 const Fint *name_length,
00816 Fint *error_return ) ;
00817
00818 extern void FNAME(adfdgc2,ADFDGC2)(
00819 const Fdouble *ID,
00820 Fint *error_return ) ;
00821
00822 extern void FNAME(adfdgf2,ADFDGF2)(
00823 const Fdouble *Root_ID,
00824 Fchar format,
00825 const Fint *format_length,
00826 Fint *error_return ) ;
00827
00828 extern void FNAME(adfdop2,ADFDOP2)(
00829 const Fchar filename,
00830 const Fint *filename_length,
00831 Fchar status_in,
00832 const Fint *status_length,
00833 const Fchar format,
00834 const Fint *format_length,
00835 Fdouble *Root_ID,
00836 Fint *error_return ) ;
00837
00838 extern void FNAME(adfdsf2,ADFDSF2)(
00839 const Fdouble *Root_ID,
00840 const Fchar format,
00841 const Fint *format_length,
00842 Fint *error_return ) ;
00843
00844 extern void FNAME(adfdve2,ADFDVE2)(
00845 const Fdouble *Root_ID,
00846 Fchar version,
00847 Fchar creation_date,
00848 Fchar modification_date,
00849 const Fint *v_length,
00850 const Fint *c_length,
00851 const Fint *m_length,
00852 Fint *error_return ) ;
00853
00854 extern void FNAME(adfdel2,ADFDEL2)(
00855 const Fdouble *PID,
00856 const Fdouble *ID,
00857 Fint *error_return ) ;
00858
00859 extern void FNAME(adferr2,ADFERR2)(
00860 const Fint *error_return_input,
00861 Fchar error_string,
00862 const Fint *str_length ) ;
00863
00864 extern void FNAME(adfftd2,ADFFTD2)(
00865 const Fdouble *ID,
00866 Fint *error_return ) ;
00867
00868 extern void FNAME(adfgdt2,ADFGDT2)(
00869 const Fdouble *ID,
00870 Fchar data_type,
00871 const Fint *data_type_length,
00872 Fint *error_return ) ;
00873
00874 extern void FNAME(adfgdv2,ADFGDV2)(
00875 const Fdouble *ID,
00876 Fint dim_vals[],
00877 Fint *error_return ) ;
00878
00879 extern void FNAME(adfges2,ADFGES2)(
00880 Fint *error_state,
00881 Fint *error_return ) ;
00882
00883 extern void FNAME(adfglb2,ADFGLB2)(
00884 const Fdouble *ID,
00885 Fchar label,
00886 const Fint *label_length,
00887 Fint *error_return ) ;
00888
00889 extern void FNAME(adfglk2,ADFGLK2)(
00890 const Fdouble *ID,
00891 Fchar filename,
00892 const Fint *filename_length,
00893 Fchar link_path,
00894 const Fint *link_path_length,
00895 Fint *error_return ) ;
00896
00897 extern void FNAME(adfgna2,ADFGNA2)(
00898 const Fdouble *ID,
00899 Fchar name,
00900 const Fint *name_length,
00901 Fint *error_return ) ;
00902
00903 extern void FNAME(adfgni2,ADFGNI2)(
00904 const Fdouble *PID,
00905 const Fchar name,
00906 const Fint *name_length,
00907 Fdouble *ID,
00908 Fint *error_return ) ;
00909
00910 extern void FNAME(adfgnd2,ADFGND2)(
00911 const Fdouble *ID,
00912 Fint *num_dims,
00913 Fint *error_return ) ;
00914
00915 extern void FNAME(adfgri2,ADFGRI2)(
00916 const Fdouble *ID,
00917 Fdouble *Root_ID,
00918 Fint *error_return ) ;
00919
00920 extern void FNAME(adfisl2,ADFISL2)(
00921 const Fdouble *ID,
00922 Fint *link_path_length,
00923 Fint *error_return ) ;
00924
00925 extern void FNAME(adflve2,ADFLVE2)(
00926 Fchar version,
00927 const Fint *version_length,
00928 Fint *error_return ) ;
00929
00930 extern void FNAME(adflin2,ADFLIN2)(
00931 const Fdouble *PID,
00932 const Fchar name,
00933 const Fchar file,
00934 const Fchar name_in_file,
00935 const Fint *name_length,
00936 const Fint *file_length,
00937 const Fint *nfile_length,
00938 Fdouble *ID,
00939 Fint *error_return ) ;
00940
00941 extern void FNAME(adfmov2,ADFMOV2)(
00942 const Fdouble *PID,
00943 const Fdouble *ID,
00944 const Fdouble *NPID,
00945 Fint *error_return ) ;
00946
00947 extern void FNAME(adfncl2,ADFNCL2)(
00948 const Fdouble *ID,
00949 Fint *num_children,
00950 Fint *error_return ) ;
00951
00952 extern void FNAME(adfpdi2,ADFPDI2)(
00953 const Fdouble *ID,
00954 const Fchar data_type,
00955 const Fint *data_type_length,
00956 const Fint *dims,
00957 const Fint dim_vals[],
00958 Fint *error_return ) ;
00959
00960 extern void FNAME(adfpna2,ADFPNA2)(
00961 const Fdouble *PID,
00962 const Fdouble *ID,
00963 const Fchar name,
00964 const Fint *name_length,
00965 Fint *error_return ) ;
00966
00967 extern void FNAME(adfrall,ADFRALL)(
00968 const Fdouble *ID,
00969 Fchar data,
00970 Fint *error_return ) ;
00971
00972 extern void FNAME(adfrblk,ADFRBLK)(
00973 const Fdouble *ID,
00974 const int *b_start,
00975 const int *b_end,
00976 Fchar data,
00977 Fint *error_return ) ;
00978
00979 extern void FNAME(adfread,ADFREAD)(
00980 const Fdouble *ID,
00981 const Fint s_start[],
00982 const Fint s_end[],
00983 const Fint s_stride[],
00984 const Fint *m_num_dims,
00985 const Fint m_dims[],
00986 const Fint m_start[],
00987 const Fint m_end[],
00988 const Fint m_stride[],
00989 Fchar data,
00990 Fint *error_return ) ;
00991
00992 extern void FNAME(adfses2,ADFSES2)(
00993 const Fint *error_state,
00994 Fint *error_return ) ;
00995
00996 extern void FNAME(adfslb2,ADFSLB2)(
00997 const Fdouble *ID,
00998 const Fchar label,
00999 const Fint *label_length,
01000 Fint *error_return ) ;
01001
01002 extern void FNAME(adfwall,ADFWALL)(
01003 const Fdouble *ID,
01004 const Fchar data,
01005 Fint *error_return ) ;
01006
01007 extern void FNAME(adfwblk,ADFWBLK)(
01008 const Fdouble *ID,
01009 const int *b_start,
01010 const int *b_end,
01011 Fchar data,
01012 Fint *error_return ) ;
01013
01014 extern void FNAME(adfwrit,ADFWRIT)(
01015 const Fdouble *ID,
01016 const Fint s_start[],
01017 const Fint s_end[],
01018 const Fint s_stride[],
01019 const Fint *m_num_dims,
01020 const Fint m_dims[],
01021 const Fint m_start[],
01022 const Fint m_end[],
01023 const Fint m_stride[],
01024 const Fchar data,
01025 Fint *error_return ) ;
01026
01027
01028
01029 #if defined (__cplusplus)
01030 }
01031 #endif
01032
01033 #endif