Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include <cif.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "unitrecord.h"
#include "cif_int.h"
#include <sys/types.h>
#include <sys/stat.h>
Go to the source code of this file.
Classes | |
struct | Id_tbl |
Defines | |
#define | CIF_VERSION 3 |
#define | CIFCONV_INVALID_RECORDS 2 |
#define | MEM_ERROR |
#define | OUT_ERROR(STR, FD, STATUS) |
#define | ID_BUMP 500 /* amount to increment tbl size */ |
#define | UTBUMP 100 /* Increment size for unit table */ |
#define | HRECORDS 15 /* number of trailer record types */ |
#define | URECORDS 54 /* number of unit record types */ |
Enumerations | |
enum | Boolean { False, True } |
Functions | |
char * | strdup (const char *s) |
char * | tempnam (const char *dir, const char *pfx) |
void | exit (int) |
static int | sortfile (struct Cif_generic *) |
static int | copy_units (void) |
static int | write_header (void) |
static int | get_srcfid (void) |
static int | write_unit (int, enum Boolean, enum Boolean) |
int | cif_VerifyCanWrite (char *file) |
static void | free_copied_blocks () |
static int | comp_callsite (struct Cif_callsite **, struct Cif_callsite **) |
static int | comp_comblk (struct Cif_comblk **, struct Cif_comblk **) |
static int | comp_const (struct Cif_const **, struct Cif_const **) |
static int | comp_entry (struct Cif_entry **, struct Cif_entry **) |
static int | comp_file (struct Cif_file **, struct Cif_file **) |
static int | comp_label (struct Cif_label **, struct Cif_label **) |
static int | comp_loop (struct Cif_loop **, struct Cif_loop **) |
static int | comp_message (struct Cif_message **, struct Cif_message **) |
static int | comp_namelist (struct Cif_namelist **, struct Cif_namelist **) |
static int | comp_object (struct Cif_object **, struct Cif_object **) |
static int | comp_stmt_type (struct Cif_stmt_type **, struct Cif_stmt_type **) |
static int | comp_usage (struct Cif_usage **, struct Cif_usage **) |
static int | comp_c_tag (struct Cif_c_tag **, struct Cif_c_tag **) |
static int | comp_c_message (struct Cif_c_message **, struct Cif_c_message **) |
static int | comp_c_const (struct Cif_c_const **, struct Cif_c_const **) |
static int | comp_c_entry (struct Cif_c_entry **, struct Cif_c_entry **) |
static int | comp_c_object (struct Cif_c_object **, struct Cif_c_object **) |
static int | comp_c_lint_directive (struct Cif_c_lint_directive **, struct Cif_c_lint_directive **) |
static int | comp_c_macro_def (struct Cif_c_macro_def **, struct Cif_c_macro_def **) |
static int | comp_c_macro_undef (struct Cif_c_macro_undef **, struct Cif_c_macro_undef **) |
static int | comp_c_macro_usage (struct Cif_c_macro_usage **, struct Cif_c_macro_usage **) |
static int | comp_c_entry_end (struct Cif_c_entry_end **, struct Cif_c_entry_end **) |
static int | comp_cdir (struct Cif_cdir **, struct Cif_cdir **) |
static int | comp_cdir_doshared (struct Cif_cdir_doshared **, struct Cif_cdir_doshared **) |
static int | comp_geometry (struct Cif_geometry **, struct Cif_geometry **) |
static int | comp_continuation (struct Cif_continuation **, struct Cif_continuation **) |
static int | comp_transform (struct Cif_transform **, struct Cif_transform **) |
static int | comp_f90_callsite (struct Cif_f90_callsite **, struct Cif_f90_callsite **) |
static int | comp_f90_comblk (struct Cif_f90_comblk **, struct Cif_f90_comblk **) |
static int | comp_f90_const (struct Cif_f90_const **, struct Cif_f90_const **) |
static int | comp_f90_entry (struct Cif_f90_entry **, struct Cif_f90_entry **) |
static int | comp_f90_loop (struct Cif_f90_loop **, struct Cif_f90_loop **) |
static int | comp_f90_derived_type (struct Cif_f90_derived_type **, struct Cif_f90_derived_type **) |
static int | comp_f90_label (struct Cif_f90_label **, struct Cif_f90_label **) |
static int | comp_f90_namelist (struct Cif_f90_namelist **, struct Cif_f90_namelist **) |
static int | comp_f90_object (struct Cif_f90_object **, struct Cif_f90_object **) |
static int | comp_f90_begin_scope (struct Cif_f90_begin_scope **, struct Cif_f90_begin_scope **) |
static int | comp_f90_end_scope (struct Cif_f90_end_scope **, struct Cif_f90_end_scope **) |
static int | comp_f90_scope_info (struct Cif_f90_scope_info **, struct Cif_f90_scope_info **) |
static int | comp_f90_use_module (struct Cif_f90_use_module **, struct Cif_f90_use_module **) |
static int | comp_f90_rename (struct Cif_f90_rename **, struct Cif_f90_rename **) |
static int | comp_f90_int_block (struct Cif_f90_int_block **, struct Cif_f90_int_block **) |
static int | comp_f90_vectorization (struct Cif_f90_vectorization **, struct Cif_f90_vectorization **) |
static int | comp_cc_type (struct Cif_cc_type **, struct Cif_cc_type **) |
static int | comp_cc_entry (struct Cif_cc_entry **, struct Cif_cc_entry **) |
static int | comp_cc_obj (struct Cif_cc_obj **, struct Cif_cc_obj **) |
static int | comp_cc_subtype (struct Cif_cc_subtype **, struct Cif_cc_subtype **) |
static int | comp_cc_enum (struct Cif_cc_enum **, struct Cif_cc_enum **) |
static int | comp_cc_expr (struct Cif_cc_expr **, struct Cif_cc_expr **) |
static int | comp_src_pos (struct Cif_src_pos **, struct Cif_src_pos **) |
static int | comp_orig_cmd (struct Cif_orig_cmd **, struct Cif_orig_cmd **) |
static void | addstruct (struct Cif_generic *) |
static void | addunit (struct Cif_generic *) |
static void | add_id (struct Id_tbl *, long) |
static int | comp_ids (long *, long *) |
static long | get_max_fid (void) |
static long | get_max_sid (void) |
static void | init_id (struct Id_tbl *) |
static void | makeudir (void) |
static void | remap_files (void) |
static void | remap_symbols (void) |
static int | later_date (char *file_1, char *file_2) |
static int | cif_next_entry (int cifd, long *cifpos, struct Cif_generic **cif_record) |
static int | cifconv_type (char *cif_name) |
static char * | Cif_Make_Cifconv (char *infile, char *outfile, int *rtypes) |
void | Cif_ConvDir (char *dir) |
static char * | concat (char *str1, char *str2) |
int | assertCanWriteDir (char *dir) |
static char * | cif_convert_to_cifconv (char *filename, int keep, int *tmp_cif, int *rtypes) |
int | Cif_Cifconv (char *filename, char *optype, int *rtypes, int version, int keep) |
int | Cif_Cifconv_V2_1 (char *filename, char *optype, int *rtypes, int version, int keep, int sub_version) |
int | Cif_Cifconv_V3_1 (char *filename, char *optype, int *rtypes, int version, int keep, int sub_version) |
static struct Cif_generic * | cif_copy_record (struct Cif_generic *cifp) |
static int | comp_use (struct Cif_use *u1, struct Cif_use *u2) |
static int | merge_usages (void) |
static long | get_id (struct Id_tbl *idtp, long id) |
Variables | |
static char | USMID [] = "@(#) libcif/cif_conv.c 30.22 12/08/96 14:42:46" |
static int | lang |
static int | cifconv_return_code = 0 |
static int | infd |
static int | outfd |
static int | tmpfd = -1 |
static char * | tfile = NULL |
static long | fdirpos |
static enum Boolean | canpos = False |
static int * | global_nuses = (int *) NULL |
static int | global_nuses_allocated = 0 |
static enum Boolean | Remap_id |
static struct Id_tbl | sid |
static enum Boolean | first_time = True |
struct { | |
struct Cif_generic ** aptr | |
int psize | |
int next | |
} | patbl [CIF_MAXRECORD] |
static char * | global_outfile |
static enum Boolean | global_error_report = False |
static const int | pabump [CIF_MAXRECORD] |
static int(* | qcompare [CIF_MAXRECORD])() |
static char * | cif_tt_dir = (char *) NULL |
static struct Cif_generic ** | record_store = (struct Cif_generic **) NULL |
static int | current_store_record = 0 |
static int | max_store_record = 0 |
static const int | horder [HRECORDS] |
static const int | uorder [URECORDS] |
#define CIF_VERSION 3 |
Definition at line 45 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), cifconv_type(), copy_units(), and sortfile().
#define CIFCONV_INVALID_RECORDS 2 |
Definition at line 89 of file cif_conv.c.
Definition at line 2196 of file cif_conv.c.
Referenced by write_header().
Definition at line 122 of file cif_conv.c.
Referenced by add_id(), and Cif_Make_Cifconv().
#define MEM_ERROR |
{ \ (void) fprintf (stderr, "libcif: %s\n", Cif_Errstring(CIF_NOMEM)); \ exit (1); \ }
Definition at line 93 of file cif_conv.c.
Referenced by add_id(), addstruct(), addunit(), Cif_Make_Cifconv(), makeudir(), merge_usages(), and sortfile().
{ \ (void) fprintf (stderr, "libcif: error %s file %s - %s\n", \ STR, (FD==outfd ? global_outfile : tfile), Cif_Errstring(STATUS)); \ exit (STATUS); \ }
Definition at line 98 of file cif_conv.c.
Referenced by copy_units(), sortfile(), write_header(), and write_unit().
Definition at line 2281 of file cif_conv.c.
Referenced by write_unit().
enum Boolean |
Definition at line 70 of file cif_conv.c.
Definition at line 2517 of file cif_conv.c.
References Id_tbl::cur, ID_BUMP, Id_tbl::max, MEM_ERROR, NULL, and Id_tbl::tbl.
Referenced by remap_symbols().
static void addstruct | ( | struct Cif_generic * | cifp | ) | [static] |
Definition at line 1288 of file cif_conv.c.
References aptr, CIF_LG_C, CIF_STMT_TYPE, CIFSTMT, lang, MEM_ERROR, NULL, pabump, patbl, psize, and Cif_generic::rectype.
Referenced by addunit(), copy_units(), makeudir(), and sortfile().
static void addunit | ( | struct Cif_generic * | unitp | ) | [static] |
Definition at line 1354 of file cif_conv.c.
References addstruct(), aptr, CIF_FILEDIR, CIFFDIR, CIFUNIT, MEM_ERROR, name, Cif_unittbl::name, Cif_unittbl::nlen, NULL, patbl, Cif_unittbl::unitpos, and UTBUMP.
Referenced by sortfile().
int assertCanWriteDir | ( | char * | dir | ) |
Definition at line 659 of file cif_conv.c.
References concat(), fd, free(), NULL, stat, and unlink.
Referenced by cif_convert_to_cifconv().
int Cif_Cifconv | ( | char * | filename, |
char * | optype, | ||
int * | rtypes, | ||
int | version, | ||
int | keep | ||
) |
Definition at line 879 of file cif_conv.c.
References _Cif_filetbl, _cif_version, cif_convert_to_cifconv(), cif_name, Cif_Open_V2(), Cif_Open_V3_1(), CIF_SUB_VERSION_3, cifconv_return_code, Id_tbl::cur, False, first_time, free(), global_error_report, Id_tbl::max, NULL, ret, sid, Id_tbl::tbl, _Cif_File_Tbl::tmp_cif, and True.
Referenced by Cif_Cifconv_V2_1(), Cif_Cifconv_V3_1(), and print_buffered_messages().
int Cif_Cifconv_V2_1 | ( | char * | filename, |
char * | optype, | ||
int * | rtypes, | ||
int | version, | ||
int | keep, | ||
int | sub_version | ||
) |
Definition at line 972 of file cif_conv.c.
References _cif_version, Cif_Cifconv(), and CIF_SUB_VERSION_2.
int Cif_Cifconv_V3_1 | ( | char * | filename, |
char * | optype, | ||
int * | rtypes, | ||
int | version, | ||
int | keep, | ||
int | sub_version | ||
) |
Definition at line 998 of file cif_conv.c.
References _cif_version, Cif_Cifconv(), and CIF_SUB_VERSION_3.
void Cif_ConvDir | ( | char * | dir | ) |
Definition at line 630 of file cif_conv.c.
static char* cif_convert_to_cifconv | ( | char * | filename, |
int | keep, | ||
int * | tmp_cif, | ||
int * | rtypes | ||
) | [static] |
Definition at line 691 of file cif_conv.c.
References access, assertCanWriteDir(), cif_basename(), Cif_Make_Cifconv(), cif_tt_dir, cif_VerifyCanWrite(), cifconv_type(), free(), getenv(), later_date(), mktemp, NULL, and strdup.
Referenced by Cif_Cifconv().
static struct Cif_generic* cif_copy_record | ( | struct Cif_generic * | cifp | ) | [static, read] |
Definition at line 1025 of file cif_conv.c.
References Cif_Duplicate(), and NULL.
Referenced by sortfile().
static char* Cif_Make_Cifconv | ( | char * | infile, |
char * | outfile, | ||
int * | rtypes | ||
) | [static] |
Definition at line 498 of file cif_conv.c.
References arg, CIF_CIFHDR, Cif_Close(), Cif_Errstring(), CIF_FORM_SORTED, Cif_Getrecord(), CIF_ID_NONCONTIG, CIF_MEM_FREE, CIF_MEM_KEEP, CIF_MEM_MANAGED, Cif_Memmode(), Cif_Open(), CIF_VERSION, cifconv_return_code, CIFHDR, exit(), False, fprintf(), free(), free_copied_blocks(), global_outfile, ID_BUMP, infd, infile, Id_tbl::max, MEM_ERROR, NULL, outfd, Remap_id, ret, sid, sortfile(), strdup, Id_tbl::tbl, tmpfd, True, and unlink.
Referenced by cif_convert_to_cifconv().
static int cif_next_entry | ( | int | cifd, |
long * | cifpos, | ||
struct Cif_generic ** | cif_record | ||
) | [static] |
Definition at line 413 of file cif_conv.c.
References Cif_Errstring(), Cif_Getpos(), Cif_Getrecord(), Cif_Setpos(), and fprintf().
Referenced by cifconv_type().
int cif_VerifyCanWrite | ( | char * | file | ) |
Definition at line 453 of file cif_lines.c.
References access, cif_concat(), cif_dirname(), fd, free(), NULL, stat, and unlink.
Referenced by cif_convert_to_cifconv(), and cif_convert_to_lines().
static int cifconv_type | ( | char * | cif_name | ) | [static] |
Definition at line 453 of file cif_conv.c.
References CIF_CIFHDR, Cif_Close(), CIF_FIRST_RECORD, CIF_FORM_CIFCONV, CIF_FORM_SORTED, CIF_MEM_FREE, cif_next_entry(), Cif_Open(), CIF_VERSION, CIFHDR, lang, and NULL.
Referenced by cif_convert_to_cifconv().
static int comp_c_const | ( | struct Cif_c_const ** | p1, |
struct Cif_c_const ** | p2 | ||
) | [static] |
Definition at line 1820 of file cif_conv.c.
static int comp_c_entry | ( | struct Cif_c_entry ** | p1, |
struct Cif_c_entry ** | p2 | ||
) | [static] |
Definition at line 1827 of file cif_conv.c.
static int comp_c_entry_end | ( | struct Cif_c_entry_end ** | p1, |
struct Cif_c_entry_end ** | p2 | ||
) | [static] |
Definition at line 1870 of file cif_conv.c.
static int comp_c_lint_directive | ( | struct Cif_c_lint_directive ** | p1, |
struct Cif_c_lint_directive ** | p2 | ||
) | [static] |
Definition at line 1841 of file cif_conv.c.
static int comp_c_macro_def | ( | struct Cif_c_macro_def ** | p1, |
struct Cif_c_macro_def ** | p2 | ||
) | [static] |
Definition at line 1848 of file cif_conv.c.
static int comp_c_macro_undef | ( | struct Cif_c_macro_undef ** | p1, |
struct Cif_c_macro_undef ** | p2 | ||
) | [static] |
Definition at line 1855 of file cif_conv.c.
static int comp_c_macro_usage | ( | struct Cif_c_macro_usage ** | p1, |
struct Cif_c_macro_usage ** | p2 | ||
) | [static] |
Definition at line 1863 of file cif_conv.c.
static int comp_c_message | ( | struct Cif_c_message ** | p1, |
struct Cif_c_message ** | p2 | ||
) | [static] |
Definition at line 1808 of file cif_conv.c.
References ret.
static int comp_c_object | ( | struct Cif_c_object ** | p1, |
struct Cif_c_object ** | p2 | ||
) | [static] |
Definition at line 1834 of file cif_conv.c.
static int comp_c_tag | ( | struct Cif_c_tag ** | p1, |
struct Cif_c_tag ** | p2 | ||
) | [static] |
Definition at line 1801 of file cif_conv.c.
static int comp_callsite | ( | struct Cif_callsite ** | p1, |
struct Cif_callsite ** | p2 | ||
) | [static] |
Definition at line 1457 of file cif_conv.c.
References ret.
static int comp_cc_entry | ( | struct Cif_cc_entry ** | p1, |
struct Cif_cc_entry ** | p2 | ||
) | [static] |
Definition at line 1884 of file cif_conv.c.
static int comp_cc_enum | ( | struct Cif_cc_enum ** | p1, |
struct Cif_cc_enum ** | p2 | ||
) | [static] |
Definition at line 1905 of file cif_conv.c.
static int comp_cc_expr | ( | struct Cif_cc_expr ** | p1, |
struct Cif_cc_expr ** | p2 | ||
) | [static] |
Definition at line 1912 of file cif_conv.c.
static int comp_cc_obj | ( | struct Cif_cc_obj ** | p1, |
struct Cif_cc_obj ** | p2 | ||
) | [static] |
Definition at line 1891 of file cif_conv.c.
static int comp_cc_subtype | ( | struct Cif_cc_subtype ** | p1, |
struct Cif_cc_subtype ** | p2 | ||
) | [static] |
Definition at line 1898 of file cif_conv.c.
static int comp_cc_type | ( | struct Cif_cc_type ** | p1, |
struct Cif_cc_type ** | p2 | ||
) | [static] |
Definition at line 1877 of file cif_conv.c.
static int comp_cdir | ( | struct Cif_cdir ** | p1, |
struct Cif_cdir ** | p2 | ||
) | [static] |
Definition at line 1737 of file cif_conv.c.
References ret.
static int comp_cdir_doshared | ( | struct Cif_cdir_doshared ** | p1, |
struct Cif_cdir_doshared ** | p2 | ||
) | [static] |
Definition at line 1751 of file cif_conv.c.
References ret.
static int comp_comblk | ( | struct Cif_comblk ** | p1, |
struct Cif_comblk ** | p2 | ||
) | [static] |
Definition at line 1473 of file cif_conv.c.
static int comp_const | ( | struct Cif_const ** | p1, |
struct Cif_const ** | p2 | ||
) | [static] |
Definition at line 1480 of file cif_conv.c.
static int comp_continuation | ( | struct Cif_continuation ** | p1, |
struct Cif_continuation ** | p2 | ||
) | [static] |
Definition at line 1774 of file cif_conv.c.
References ret.
static int comp_entry | ( | struct Cif_entry ** | p1, |
struct Cif_entry ** | p2 | ||
) | [static] |
Definition at line 1487 of file cif_conv.c.
static int comp_f90_begin_scope | ( | struct Cif_f90_begin_scope ** | p1, |
struct Cif_f90_begin_scope ** | p2 | ||
) | [static] |
Definition at line 1686 of file cif_conv.c.
static int comp_f90_callsite | ( | struct Cif_f90_callsite ** | p1, |
struct Cif_f90_callsite ** | p2 | ||
) | [static] |
Definition at line 1606 of file cif_conv.c.
References ret.
static int comp_f90_comblk | ( | struct Cif_f90_comblk ** | p1, |
struct Cif_f90_comblk ** | p2 | ||
) | [static] |
Definition at line 1622 of file cif_conv.c.
static int comp_f90_const | ( | struct Cif_f90_const ** | p1, |
struct Cif_f90_const ** | p2 | ||
) | [static] |
Definition at line 1629 of file cif_conv.c.
static int comp_f90_derived_type | ( | struct Cif_f90_derived_type ** | p1, |
struct Cif_f90_derived_type ** | p2 | ||
) | [static] |
Definition at line 1679 of file cif_conv.c.
static int comp_f90_end_scope | ( | struct Cif_f90_end_scope ** | p1, |
struct Cif_f90_end_scope ** | p2 | ||
) | [static] |
Definition at line 1693 of file cif_conv.c.
static int comp_f90_entry | ( | struct Cif_f90_entry ** | p1, |
struct Cif_f90_entry ** | p2 | ||
) | [static] |
Definition at line 1636 of file cif_conv.c.
static int comp_f90_int_block | ( | struct Cif_f90_int_block ** | p1, |
struct Cif_f90_int_block ** | p2 | ||
) | [static] |
Definition at line 1707 of file cif_conv.c.
static int comp_f90_label | ( | struct Cif_f90_label ** | p1, |
struct Cif_f90_label ** | p2 | ||
) | [static] |
Definition at line 1644 of file cif_conv.c.
static int comp_f90_loop | ( | struct Cif_f90_loop ** | p1, |
struct Cif_f90_loop ** | p2 | ||
) | [static] |
Definition at line 1651 of file cif_conv.c.
References ret.
static int comp_f90_namelist | ( | struct Cif_f90_namelist ** | p1, |
struct Cif_f90_namelist ** | p2 | ||
) | [static] |
Definition at line 1665 of file cif_conv.c.
static int comp_f90_object | ( | struct Cif_f90_object ** | p1, |
struct Cif_f90_object ** | p2 | ||
) | [static] |
Definition at line 1672 of file cif_conv.c.
static int comp_f90_rename | ( | struct Cif_f90_rename ** | p1, |
struct Cif_f90_rename ** | p2 | ||
) | [static] |
Definition at line 1721 of file cif_conv.c.
static int comp_f90_scope_info | ( | struct Cif_f90_scope_info ** | p1, |
struct Cif_f90_scope_info ** | p2 | ||
) | [static] |
Definition at line 1700 of file cif_conv.c.
static int comp_f90_use_module | ( | struct Cif_f90_use_module ** | p1, |
struct Cif_f90_use_module ** | p2 | ||
) | [static] |
Definition at line 1714 of file cif_conv.c.
static int comp_f90_vectorization | ( | struct Cif_f90_vectorization ** | p1, |
struct Cif_f90_vectorization ** | p2 | ||
) | [static] |
Definition at line 1728 of file cif_conv.c.
Definition at line 1494 of file cif_conv.c.
static int comp_geometry | ( | struct Cif_geometry ** | p1, |
struct Cif_geometry ** | p2 | ||
) | [static] |
Definition at line 1766 of file cif_conv.c.
static int comp_ids | ( | long * | id1, |
long * | id2 | ||
) | [static] |
Definition at line 2535 of file cif_conv.c.
Referenced by remap_symbols().
static int comp_label | ( | struct Cif_label ** | p1, |
struct Cif_label ** | p2 | ||
) | [static] |
Definition at line 1501 of file cif_conv.c.
Definition at line 1508 of file cif_conv.c.
References ret.
static int comp_message | ( | struct Cif_message ** | p1, |
struct Cif_message ** | p2 | ||
) | [static] |
Definition at line 1522 of file cif_conv.c.
References ret.
static int comp_namelist | ( | struct Cif_namelist ** | p1, |
struct Cif_namelist ** | p2 | ||
) | [static] |
Definition at line 1536 of file cif_conv.c.
static int comp_object | ( | struct Cif_object ** | p1, |
struct Cif_object ** | p2 | ||
) | [static] |
Definition at line 1543 of file cif_conv.c.
static int comp_orig_cmd | ( | struct Cif_orig_cmd ** | p1, |
struct Cif_orig_cmd ** | p2 | ||
) | [static] |
Definition at line 1933 of file cif_conv.c.
static int comp_src_pos | ( | struct Cif_src_pos ** | p1, |
struct Cif_src_pos ** | p2 | ||
) | [static] |
Definition at line 1919 of file cif_conv.c.
References ret.
static int comp_stmt_type | ( | struct Cif_stmt_type ** | p1, |
struct Cif_stmt_type ** | p2 | ||
) | [static] |
Definition at line 1550 of file cif_conv.c.
References _cif_version, CIF_LG_F90, lang, and ret.
static int comp_transform | ( | struct Cif_transform ** | p1, |
struct Cif_transform ** | p2 | ||
) | [static] |
Definition at line 1788 of file cif_conv.c.
References ret.
static int comp_usage | ( | struct Cif_usage ** | p1, |
struct Cif_usage ** | p2 | ||
) | [static] |
Definition at line 1578 of file cif_conv.c.
References ret.
Definition at line 2048 of file cif_conv.c.
References Cif_use::cpos, Cif_use::fid, Cif_use::line, and ret.
Referenced by merge_usages().
static char* concat | ( | char * | str1, |
char * | str2 | ||
) | [static] |
static int copy_units | ( | void | ) | [static] |
Definition at line 1948 of file cif_conv.c.
References addstruct(), canpos, Cif_Close(), CIF_ENDUNIT, CIF_EOF, Cif_Errstring(), CIF_FILEDIR, Cif_Getrecord(), CIF_MAXRECORD, CIF_MEM_KEEP, CIF_MEM_MANAGED, Cif_Memmode(), Cif_Open(), Cif_Release(), CIF_UNIT, CIF_UNITDIR, CIF_VERSION, CIFFDIR, CIFUDIR, False, fprintf(), get_max_sid(), NULL, OUT_ERROR, outfd, patbl, Remap_id, remap_symbols(), sid, tfile, tmpfd, True, unit_record, unlink, and write_unit().
Referenced by sortfile().
void exit | ( | int | ) |
Referenced by ___MAIN__(), _END(), _lerror(), Adjust_Operand(), advance_to_next_stream_buffer(), c_qwmultu(), catch_signal(), cif_concat(), cif_dirname(), Cif_Make_Cifconv(), command_line(), cwh_dst_mk_const(), DaVinci::DaVinci(), Diag_Fatal(), Diag_Fatal_Srcpos(), Diag_User_Fatal(), dotest128_1(), dotest128_2(), dotest128_i(), dotest128_r(), dotest32_1s(), dotest32_2(), dotest32_2c(), dotest64_1(), dotest64_1s(), dotest64_2(), dotest64_2c(), dotest64_c(), dotest64_i(), dotest64_i2(), DST_dump_info(), Em_Dwarf_Prepare_Output(), Em_Dwarf_Symbolic_Relocs_To_Elf(), Em_Dwarf_Write_Scns(), Emit_Bundle_Packing(), ErrMsg_Report_Nonuser(), ErrMsg_Report_User(), exit_compiler(), Fail_FmtAssertion(), ANL_DIAGNOSTICS::Fatal(), Fatal_Error(), RES_WORD::Find_Word_Allocate_Field(), Hazard_ISA(), Instruction_Exec_Unit_Group(), Instruction_Group(), ir_b2a(), ir_error(), ir_prof_error(), ir_sel(), ISA_Bundle_Pack_Create(), ISA_Decode_End(), ISA_Enum_Opnd_Type_Create(), ISA_Lit_Opnd_Type_Create(), ISA_Operands_End(), ISA_Pack_End(), ISA_Print_End(), ISA_Reg_Opnd_Type_Create(), ISA_Subset_End(), load_so(), main(), Map_Arg(), Mask(), Mask64(), MDgrow(), MDstrcpy(), Name(), narcar_(), nchara_(), Next_Word(), nretca_(), ntabca_(), ntabch_(), Operand(), order_pseudos(), TOP_SCHED_INFO_MAP::Output(), Pack_Slot(), Pack_Template(), print_header_records(), print_include_records(), print_records(), PRINTMSG(), Process_Command_Line(), Quit_Callback(), Relocatable(), Require(), Result(), RiceWhirl2f(), s_abort(), s_paus(), s_stop(), setup_new_section_for_dwarf(), sigdie(), SignedBitRange(), Slot(), Stop(), sysfatal(), Terminate(), Transitions(), translate_reloc32(), translate_reloc64(), UnsignedBitRange(), usage(), and verify_machine_to_pseudo().
static void free_copied_blocks | ( | ) | [static] |
Definition at line 1047 of file cif_conv.c.
References Cif_Free(), and current_store_record.
Referenced by Cif_Make_Cifconv().
Definition at line 2549 of file cif_conv.c.
References Id_tbl::cur, fprintf(), global_error_report, global_outfile, Id_tbl::tbl, and True.
Referenced by remap_symbols().
static long get_max_fid | ( | void | ) | [static] |
Definition at line 3479 of file cif_conv.c.
References CIF_FILE, CIFFILE, and patbl.
Referenced by sortfile().
static long get_max_sid | ( | void | ) | [static] |
Definition at line 3291 of file cif_conv.c.
References CIF_C_CONST, CIF_C_ENTRY, CIF_C_OBJECT, CIF_C_TAG, CIF_COMBLK, CIF_CONST, CIF_ENTRY, CIF_LABEL, CIF_NAMELIST, CIF_OBJECT, CIFCB, CIFCCON, CIFCENTRY, CIFCOBJ, CIFCON, CIFCTAG, CIFENTRY, CIFLABEL, CIFNL, CIFOBJ, patbl, and sid.
Referenced by copy_units(), and sortfile().
static int get_srcfid | ( | void | ) | [static] |
Definition at line 2259 of file cif_conv.c.
References CIF_SRCFILE, CIFSRC, patbl, and sp.
Referenced by write_header().
Definition at line 2505 of file cif_conv.c.
References Id_tbl::cur, and Id_tbl::tbl.
Referenced by remap_symbols().
static int later_date | ( | char * | file_1, |
char * | file_2 | ||
) | [static] |
static void makeudir | ( | void | ) | [static] |
Definition at line 2011 of file cif_conv.c.
References addstruct(), CIF_MAXRECORD, CIF_UNITDIR, CIFGEN, MEM_ERROR, Cif_unitdir::nsections, NULL, Cif_urectbl::rectype, Cif_unitdir::rectype, unit_record, and Cif_unitdir::ur.
Referenced by sortfile().
static int merge_usages | ( | void | ) | [static] |
Definition at line 2062 of file cif_conv.c.
References aptr, CIF_UNITDIR, CIF_USAGE, CIFUDIR, comp_use(), global_nuses, global_nuses_allocated, MEM_ERROR, Cif_urectbl::nrecords, NULL, Cif_usage::nuses, patbl, Cif_usage::symid, and Cif_usage::use.
Referenced by write_unit().
static void remap_files | ( | void | ) | [static] |
Referenced by sortfile().
static void remap_symbols | ( | void | ) | [static] |
Definition at line 2603 of file cif_conv.c.
References add_id(), CIF_C_CONST, CIF_C_ENTRY, CIF_C_MESSAGE, CIF_C_OBJECT, CIF_C_TAG, CIF_CALLSITE, CIF_COMBLK, CIF_CONST, CIF_ENDUNIT, CIF_ENTRY, CIF_LABEL, CIF_LOOP, CIF_MESSAGE, CIF_NAMELIST, CIF_OBJECT, CIF_SC_COMMON, CIF_SC_EQUIV, CIF_STMT_TYPE, CIF_UNIT, CIF_USAGE, CIFCB, CIFCCON, CIFCENTRY, CIFCMSG, CIFCOBJ, CIFCON, CIFCS, CIFCTAG, CIFENDU, CIFENTRY, CIFLABEL, CIFLOOP, CIFMSG, CIFNL, CIFOBJ, CIFSTMT, CIFUNIT, CIFUSAGE, comp_ids(), Id_tbl::cur, Cif_use::fid, get_id(), init_id(), patbl, sid, sp, and Id_tbl::tbl.
Referenced by copy_units(), and sortfile().
static int sortfile | ( | struct Cif_generic * | cifp | ) | [static] |
Definition at line 1065 of file cif_conv.c.
References addstruct(), addunit(), aptr, canpos, cif_copy_record(), CIF_ENDUNIT, CIF_EOF, Cif_Errstring(), CIF_FILE, CIF_FILEDIR, CIF_FORM_CIFCONV, CIF_FORM_SORTED, Cif_Getpos(), Cif_Getrecord(), CIF_INCLUDE, CIF_MAXRECORD, CIF_MEM_KEEP, Cif_Open(), Cif_Putrecord(), Cif_Release(), Cif_Setpos(), CIF_UNIT, CIF_UNITDIR, CIF_VERSION, CIFFDIR, CIFHDR, CIFUDIR, copy_units(), False, fdirpos, fprintf(), free(), get_max_fid(), get_max_sid(), infd, makeudir(), MEM_ERROR, Cif_urectbl::nrecords, NULL, OUT_ERROR, outfd, patbl, remap_files(), Remap_id, remap_symbols(), sid, tempnam(), tfile, tmpfd, True, unit_record, write_header(), and write_unit().
Referenced by Cif_Make_Cifconv().
Referenced by sortfile().
static int write_header | ( | void | ) | [static] |
Definition at line 2215 of file cif_conv.c.
References canpos, CIF_CIFHDR, CIF_FILE, CIF_FILEDIR, CIF_FORM_CIFCONV, Cif_Getpos(), Cif_Putrecord(), CIFHDR, fdirpos, get_srcfid(), HRECORDS, next, OUT_ERROR, outfd, patbl, qcompare, sp, and True.
Referenced by sortfile().
static int write_unit | ( | int | fd, |
enum Boolean | markpos, | ||
enum Boolean | merge_use | ||
) | [static] |
Definition at line 2339 of file cif_conv.c.
References aptr, CIF_FILEDIR, Cif_Getpos(), CIF_LG_C, CIF_MAXRECORD, Cif_Putrecord(), Cif_Setpos(), CIF_STMT_TYPE, CIF_UNIT, CIF_UNITDIR, CIF_USAGE, CIFFDIR, CIFSTMT, CIFUDIR, CIFUNIT, free(), global_nuses, lang, merge_usages(), name, next, NULL, OUT_ERROR, patbl, qcompare, Cif_urectbl::recpos, sp, unit_record, URECORDS, and Cif_usage::use.
Referenced by copy_units(), and sortfile().
struct Cif_generic** aptr |
Definition at line 143 of file cif_conv.c.
Referenced by addstruct(), addunit(), llist(), merge_usages(), sortfile(), strlist(), and write_unit().
Definition at line 110 of file cif_conv.c.
Referenced by copy_units(), sortfile(), and write_header().
char* cif_tt_dir = (char *) NULL [static] |
Definition at line 624 of file cif_conv.c.
Referenced by cif_convert_to_cifconv().
int cifconv_return_code = 0 [static] |
Definition at line 85 of file cif_conv.c.
Referenced by Cif_Cifconv(), and Cif_Make_Cifconv().
int current_store_record = 0 [static] |
Definition at line 1022 of file cif_conv.c.
Referenced by free_copied_blocks().
long fdirpos [static] |
Definition at line 109 of file cif_conv.c.
Referenced by sortfile(), and write_header().
enum Boolean first_time = True [static] |
Definition at line 134 of file cif_conv.c.
Referenced by Cif_Cifconv().
enum Boolean global_error_report = False [static] |
Definition at line 157 of file cif_conv.c.
Referenced by Cif_Cifconv(), and get_id().
int* global_nuses = (int *) NULL [static] |
Definition at line 111 of file cif_conv.c.
Referenced by merge_usages(), and write_unit().
int global_nuses_allocated = 0 [static] |
Definition at line 112 of file cif_conv.c.
Referenced by merge_usages().
char* global_outfile [static] |
Definition at line 148 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), and get_id().
{ CIF_CIFHDR, CIF_FILEDIR, CIF_SRCFILE, CIF_FILE, CIF_INCLUDE, CIF_SRC_POS, CIF_ORIG_CMD, CIF_EDOPTS, CIF_MACH_CHAR, CIF_MISC_OPTS, CIF_F90_MISC_OPTS, CIF_OPT_OPTS, CIF_F90_OPT_OPTS, CIF_C_OPTS, CIF_SUMMARY }
Definition at line 2197 of file cif_conv.c.
int infd [static] |
Definition at line 105 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), and sortfile().
int lang [static] |
Definition at line 79 of file cif_conv.c.
Referenced by _Cif_binread(), addstruct(), ascii_cifhdr(), ascii_file(), ascii_mach_char(), ascii_usage(), cifconv_type(), comp_stmt_type(), and write_unit().
int max_store_record = 0 [static] |
Definition at line 1023 of file cif_conv.c.
int next |
Definition at line 145 of file cif_conv.c.
Referenced by ANL_PRAGMA_ATTRIBUTE::_Write_Pragma(), ANL_PRAGMA_ATTRIBUTE::_Write_Pragma_Arguments(), Append_Clause_Expressions(), Append_Pragma_Clauses(), Append_Reduction_Clause(), DEBUG_Init_Config(), Delete_Dist_Reshape_Pragmas(), DST_get_ordinal_num(), free_buffer_list(), ANL_FUNC_ENTRY::Get_Pragma_Srcpos_Range(), Get_Struct_Parameter_Location(), Get_Vararg_Parameter_Location(), IPA_WN_DELETE_Tree(), ISA_Hazards_End(), LNO_Init_Config(), Max_Arg_Area_Bytes(), MDparseline(), MEM_POOL_FREE(), MEM_POOL_Pop_P(), New_Fld_Path_Info(), ANL_PRAGMA_CONSTRUCT::Next_Stmt(), ANL_PRAGMA_ATTRIBUTE::Next_Stmt(), Restore_Skips(), ANL_VAR::Set_Name_Alias(), TY2F_List_Common_Flds(), WN2C_pragma(), WN2C_process_pragma(), WN2F_pragma(), WN2F_process_pragma(), WN_Create_Generic(), WN_DELETE_Tree(), WN_next(), WN_Simplify_Tree(), write_header(), and write_unit().
int outfd [static] |
Definition at line 106 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), copy_units(), sortfile(), and write_header().
const int pabump[CIF_MAXRECORD] [static] |
Definition at line 160 of file cif_conv.c.
Referenced by addstruct().
struct { ... } patbl[CIF_MAXRECORD] [static] |
Referenced by addstruct(), addunit(), copy_units(), get_max_fid(), get_max_sid(), get_srcfid(), merge_usages(), remap_symbols(), sortfile(), write_header(), and write_unit().
int psize |
Definition at line 144 of file cif_conv.c.
Referenced by addstruct(), and Get_Parameter_Location().
int(* qcompare[CIF_MAXRECORD])() [static] |
Definition at line 297 of file cif_conv.c.
Referenced by write_header(), and write_unit().
struct Cif_generic** record_store = (struct Cif_generic **) NULL [static] |
Definition at line 1021 of file cif_conv.c.
Definition at line 123 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), copy_units(), and sortfile().
Definition at line 129 of file cif_conv.c.
Referenced by Cif_Cifconv(), Cif_Make_Cifconv(), copy_units(), get_max_sid(), remap_symbols(), and sortfile().
Definition at line 108 of file cif_conv.c.
Referenced by copy_units(), and sortfile().
int tmpfd = -1 [static] |
Definition at line 107 of file cif_conv.c.
Referenced by Cif_Make_Cifconv(), copy_units(), and sortfile().
Definition at line 2282 of file cif_conv.c.
char USMID[] = "@(#) libcif/cif_conv.c 30.22 12/08/96 14:42:46" [static] |
Definition at line 37 of file cif_conv.c.