Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
cif_conv.c File Reference
#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>
Include dependency graph for cif_conv.c:

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_genericcif_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 Documentation

#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.

#define HRECORDS   15 /* number of trailer record types */

Definition at line 2196 of file cif_conv.c.

Referenced by write_header().

#define ID_BUMP   500 /* amount to increment tbl size */

Definition at line 122 of file cif_conv.c.

Referenced by add_id(), and Cif_Make_Cifconv().

#define MEM_ERROR
Value:
{ \
        (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().

#define OUT_ERROR (   STR,
  FD,
  STATUS 
)
Value:
{ \
        (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().

#define URECORDS   54 /* number of unit record types */

Definition at line 2281 of file cif_conv.c.

Referenced by write_unit().

#define UTBUMP   100 /* Increment size for unit table */

Referenced by addunit().


Enumeration Type Documentation

enum Boolean
Enumerator:
False 
True 

Definition at line 70 of file cif_conv.c.


Function Documentation

static void add_id ( struct Id_tbl idtp,
long  id 
) [static]

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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 
)

Definition at line 972 of file cif_conv.c.

References _cif_version, Cif_Cifconv(), and CIF_SUB_VERSION_2.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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.

static int comp_file ( struct Cif_file **  p1,
struct Cif_file **  p2 
) [static]

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.

static int comp_loop ( struct Cif_loop **  p1,
struct Cif_loop **  p2 
) [static]

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.

static int comp_use ( struct Cif_use u1,
struct Cif_use u2 
) [static]

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]

Definition at line 643 of file cif_conv.c.

References buf.

Referenced by assertCanWriteDir().

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().

Here is the call graph for this function:

static long get_id ( struct Id_tbl idtp,
long  id 
) [static]

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().

Here is the call graph for this function:

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 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().

static void init_id ( struct Id_tbl idtp) [static]

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]

Definition at line 392 of file cif_conv.c.

References stat.

Referenced by cif_convert_to_cifconv().

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

static void remap_files ( void  ) [static]

Referenced by sortfile().

char* strdup ( const char *  s)
char* tempnam ( const char *  dir,
const char *  pfx 
)

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().

Here is the call graph for this function:

static int write_unit ( int  fd,
enum Boolean  markpos,
enum Boolean  merge_use 
) [static]

Variable Documentation

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().

enum Boolean canpos = False [static]

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().

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().

const int horder[HRECORDS] [static]
Initial value:
 {
        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 max_store_record = 0 [static]

Definition at line 1023 of file cif_conv.c.

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().

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.

enum Boolean Remap_id [static]

Definition at line 123 of file cif_conv.c.

Referenced by Cif_Make_Cifconv(), copy_units(), and sortfile().

struct Id_tbl sid [static]
char* tfile = NULL [static]

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().

const int uorder[URECORDS] [static]

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.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines