#include <cif.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include <stdlib.h>#include <sys/types.h>#include <sys/stat.h>#include "cif_int.h"#include "unitrecord.h"

Go to the source code of this file.
Data Types | |
| type | unit_list |
| type | record |
| type | mod_struct |
Defines | |
| #define | const |
| #define | CIF_VERSION 3 |
| #define | CIF_NOT 0 |
| #define | CIF_ASCII 1 |
| #define | CIF_BINARY 2 |
| #define | MODID_BUMP 10 |
Functions/Subroutines | |
| static void | save_record (struct record *, struct Cif_generic *, int, long) |
| static void | print_records (struct record *, struct record *) |
| static void | print_header_records (struct record *) |
| static int | get_id (struct Cif_generic *) |
| static int | get_line (struct Cif_generic *) |
| static int | get_cpos (struct Cif_generic *) |
| static int | get_fid (struct Cif_generic *) |
| static int | get_scope (struct Cif_generic *) |
| static int | get_type (struct Cif_generic *) |
| static int | get_adjusted_scope (struct Cif_generic *) |
| int | Cif_CifStatus () |
| static int | later_date (char *file_1, char *file_2) |
| static int | cif_next_entry (int cifd, long *cifpos, struct Cif_generic **cif_record) |
| char * | Cif_Filename (int cifd) |
| static int | lines_type (char *cif_name) |
| static char * | cif_concat (char *str1, char *str2) |
| char * | cif_basename (char *name) |
| static char * | cif_dirname (char *name) |
| int | cif_VerifyCanWrite (char *file) |
| static char * | Cif_Make_Lines (char *infile, char *outfile) |
| static char * | cif_convert_to_lines (char *filename, int keep, int *tmp_cif) |
| int | Cif_Lines (char *filename, char *optype, int *rtypes, int version, int keep) |
| int | Cif_Lines_V2_1 (char *filename, char *optype, int *rtypes, int version, int keep, int sub_version) |
| int | Cif_Lines_V3_1 (char *filename, char *optype, int *rtypes, int version, int keep, int sub_version) |
| static int | comp_id (struct Cif_generic **r1, struct Cif_generic **r2) |
| static int | comp_scope (struct Cif_generic **r1, struct Cif_generic **r2) |
| static int | comp_rtype (struct Cif_generic **r1, struct Cif_generic **r2) |
| static void | print_include_records (struct record *w, struct record *n, int start, int current, int *pscope_index) |
Variables | |
| static struct record | ul |
| static struct record | wl |
| static struct record | nl |
| static struct mod_struct * | modids = (struct mod_struct *) NULL |
| static int | modid_max = 0 |
| static int | modid_current = 0 |
| static int | outfd |
| static char * | outfile = "-" |
| static int | global_srcfid = 0 |
| static int | global_last_scope = -1 |
| static int | global_scope_found = 0 |
| static int | global_cif_status = 0 |
| static int | last_inc = 0 |
| #define CIF_ASCII 1 |
Definition at line 161 of file cif_lines.c.
| #define CIF_BINARY 2 |
Definition at line 162 of file cif_lines.c.
| #define CIF_NOT 0 |
Definition at line 160 of file cif_lines.c.
| #define CIF_VERSION 3 |
Definition at line 142 of file cif_lines.c.
| #define const |
Definition at line 139 of file cif_lines.c.
| #define MODID_BUMP 10 |
| char* cif_basename | ( | char * | name | ) |
Definition at line 395 of file cif_lines.c.
References NULL, and strrchr().
Referenced by cif_convert_to_cifconv(), and cif_convert_to_lines().
| int Cif_CifStatus | ( | ) |
| static char* cif_concat | ( | char * | str1, | |
| char * | str2 | |||
| ) | [static] |
Definition at line 364 of file cif_lines.c.
References exit(), fprintf(), malloc, NULL, sprintf(), strlen(), and void.
Referenced by cif_VerifyCanWrite().
| static char* cif_convert_to_lines | ( | char * | filename, | |
| int | keep, | |||
| int * | tmp_cif | |||
| ) | [static] |
Definition at line 705 of file cif_lines.c.
References access, cif_basename(), Cif_Make_Lines(), cif_VerifyCanWrite(), free(), getenv(), later_date(), lines_type(), malloc, mktemp, NULL, R_OK, sprintf(), strdup, strlen(), tmpdir, and void.
Referenced by Cif_Lines().
| static char* cif_dirname | ( | char * | name | ) | [static] |
| char* Cif_Filename | ( | int | cifd | ) |
Definition at line 306 of file cif_lines.c.
References _Cif_filetbl, CIF_FT_SIZE, filename, NOT_A_CIF, and NULL.
| int Cif_Lines | ( | char * | filename, | |
| char * | optype, | |||
| int * | rtypes, | |||
| int | version, | |||
| int | keep | |||
| ) |
Definition at line 841 of file cif_lines.c.
References _Cif_filetbl, _cif_version, cif_convert_to_lines(), CIF_NOTCIF, Cif_Open_V2(), Cif_Open_V3_1(), CIF_SUB_VERSION_3, free(), global_scope_found, global_srcfid, NULL, ret, _Cif_File_Tbl::tmp_cif, and void.
Referenced by Cif_Lines_V2_1(), and Cif_Lines_V3_1().
| int Cif_Lines_V2_1 | ( | char * | filename, | |
| char * | optype, | |||
| int * | rtypes, | |||
| int | version, | |||
| int | keep, | |||
| int | sub_version | |||
| ) |
Definition at line 918 of file cif_lines.c.
References _cif_version, Cif_Lines(), and CIF_SUB_VERSION_2.
| int Cif_Lines_V3_1 | ( | char * | filename, | |
| char * | optype, | |||
| int * | rtypes, | |||
| int | version, | |||
| int | keep, | |||
| int | sub_version | |||
| ) |
Definition at line 944 of file cif_lines.c.
References _cif_version, Cif_Lines(), and CIF_SUB_VERSION_3.
| static char* Cif_Make_Lines | ( | char * | infile, | |
| char * | outfile | |||
| ) | [static] |
Definition at line 518 of file cif_lines.c.
References Cif_Close(), CIF_ENDUNIT, CIF_EOF, Cif_Errstring(), Cif_Getpos(), Cif_Getrecord(), CIF_INCLUDE, CIF_MAXRECORD, CIF_MEM_FREE, CIF_MEM_KEEP, CIF_MEM_MANAGED, Cif_Memmode(), Cif_Open, Cif_Release(), CIF_SUMMARY, CIF_UNIT, CIF_USAGE, CIF_VERSION, CIFSUM, CIFUSAGE, mod_struct::direct, first, fprintf(), get_scope(), global_cif_status, global_last_scope, has_line, malloc, mod_struct::modid, MODID_BUMP, modid_current, modid_max, nl, NULL, outfd, print_header_records(), print_records(), realloc, save_record(), record::ul, ul, record::ulcur, record::ulmax, unit_record, void, and wl.
Referenced by cif_convert_to_lines().
| static int cif_next_entry | ( | int | cifd, | |
| long * | cifpos, | |||
| struct Cif_generic ** | cif_record | |||
| ) | [static] |
Definition at line 270 of file cif_lines.c.
References Cif_Errstring(), Cif_Getpos(), Cif_Getrecord(), Cif_Setpos(), fprintf(), and void.
| int cif_VerifyCanWrite | ( | char * | file | ) |
Definition at line 449 of file cif_lines.c.
References access, cif_concat(), cif_dirname(), dir, F_OK, fclose(), fd, fopen, free(), mode, NULL, S_ISDIR, stat::st_mode, stat, unlink, void, and W_OK.
Referenced by cif_convert_to_cifconv(), and cif_convert_to_lines().
| static int comp_id | ( | struct Cif_generic ** | r1, | |
| struct Cif_generic ** | r2 | |||
| ) | [static] |
Definition at line 998 of file cif_lines.c.
References get_cpos(), get_fid(), get_line(), get_scope(), and ret.
Referenced by print_records().
| static int comp_rtype | ( | struct Cif_generic ** | r1, | |
| struct Cif_generic ** | r2 | |||
| ) | [static] |
Definition at line 1052 of file cif_lines.c.
References CIF_FILE, CIF_SRCFILE, and CIFFILE.
Referenced by print_header_records().
| static int comp_scope | ( | struct Cif_generic ** | r1, | |
| struct Cif_generic ** | r2 | |||
| ) | [static] |
Definition at line 1035 of file cif_lines.c.
References get_adjusted_scope(), get_id(), get_type(), and ret.
Referenced by print_records().
| static int get_adjusted_scope | ( | struct Cif_generic * | rptr | ) | [static] |
Definition at line 2079 of file cif_lines.c.
References CIF_C_ENTRY, CIFCENTRY, global_last_scope, global_scope_found, and Cif_generic::rectype.
Referenced by comp_scope().
| static int get_cpos | ( | struct Cif_generic * | rptr | ) | [static] |
Definition at line 2153 of file cif_lines.c.
References CIF_CALLSITE, CIF_ENDUNIT, CIF_INCLUDE, CIF_MESSAGE, CIF_ND_MSG, CIF_STMT_TYPE, CIF_UNIT, CIF_USAGE, CIFCS, CIFENDU, CIFINC, CIFMSG, CIFNMSG, CIFSTMT, CIFUNIT, CIFUSAGE, global_scope_found, and Cif_generic::rectype.
Referenced by comp_id().
| static int get_fid | ( | struct Cif_generic * | rptr | ) | [static] |
Definition at line 1773 of file cif_lines.c.
References 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_INCLUDE, CIF_LABEL, CIF_LOOP, CIF_MESSAGE, CIF_NAMELIST, CIF_ND_MSG, CIF_OBJECT, CIF_STMT_TYPE, CIF_UNIT, CIF_USAGE, CIFCMSG, CIFCS, CIFENDU, CIFINC, CIFLOOP, CIFMSG, CIFNMSG, CIFSTMT, CIFUNIT, CIFUSAGE, global_scope_found, and Cif_generic::rectype.
Referenced by comp_id(), print_include_records(), and print_records().
| static int get_id | ( | struct Cif_generic * | rptr | ) | [static] |
Definition at line 1446 of file cif_lines.c.
References CIF_C_CONST, CIF_C_ENTRY, CIF_C_OBJECT, CIF_C_TAG, CIF_CALLSITE, CIF_COMBLK, CIF_CONST, CIF_ENTRY, CIF_LABEL, CIF_NAMELIST, CIF_OBJECT, CIF_USAGE, CIFCB, CIFCCON, CIFCENTRY, CIFCOBJ, CIFCON, CIFCS, CIFCTAG, CIFENTRY, CIFLABEL, CIFNL, CIFOBJ, CIFUSAGE, global_scope_found, and Cif_generic::rectype.
| static int get_line | ( | struct Cif_generic * | rptr | ) | [static] |
Definition at line 1573 of file cif_lines.c.
References 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_INCLUDE, CIF_LABEL, CIF_LOOP, CIF_MESSAGE, CIF_NAMELIST, CIF_ND_MSG, CIF_OBJECT, CIF_STMT_TYPE, CIF_UNIT, CIF_USAGE, CIFCMSG, CIFCS, CIFENDU, CIFINC, CIFLOOP, CIFMSG, CIFNMSG, CIFSTMT, CIFUNIT, CIFUSAGE, global_scope_found, and Cif_generic::rectype.
| static int get_scope | ( | struct Cif_generic * | rptr | ) | [static] |
Definition at line 1976 of file cif_lines.c.
References CIF_C_ENTRY, CIFCENTRY, global_last_scope, global_scope_found, and Cif_generic::rectype.
Referenced by Cif_Make_Lines(), comp_id(), print_include_records(), and print_records().
| static int get_type | ( | struct Cif_generic * | rptr | ) | [static] |
Definition at line 2049 of file cif_lines.c.
References CIF_ENTRY, and Cif_generic::rectype.
Referenced by comp_scope(), ipcp_callsite_param_print(), ipcp_propagate_stage(), and ipcp_redirect().
| static int later_date | ( | char * | file_1, | |
| char * | file_2 | |||
| ) | [static] |
| static int lines_type | ( | char * | cif_name | ) | [static] |
Definition at line 332 of file cif_lines.c.
References CIF_CIFHDR, Cif_Close(), CIF_FIRST_RECORD, CIF_FORM_LINES, CIF_FORM_SORTED, CIF_MEM_FREE, cif_next_entry(), Cif_Open, CIF_VERSION, CIFHDR, global_srcfid, and NULL.
Referenced by cif_convert_to_lines().
Definition at line 1417 of file cif_lines.c.
References CIF_CIFHDR, Cif_Errstring(), CIF_FORM_LINES, Cif_Putrecord(), CIFHDR, comp_rtype(), exit(), fprintf(), i, outfd, qsort(), Cif_generic::rectype, ret, unit_list::rptr, record::ul, record::ulcur, and void.
Referenced by Cif_Make_Lines().
| static void print_include_records | ( | struct record * | w, | |
| struct record * | n, | |||
| int | start, | |||
| int | current, | |||
| int * | pscope_index | |||
| ) | [static] |
Definition at line 1094 of file cif_lines.c.
References Cif_Errstring(), CIF_INCLUDE, Cif_Putrecord(), CIFGEN, CIFINC, mod_struct::direct, exit(), fprintf(), get_fid(), get_scope(), global_scope_found, mod, modid_current, NULL, outfd, ret, unit_list::rptr, record::ul, record::ulcur, and void.
Referenced by print_records().
Definition at line 1226 of file cif_lines.c.
References Cif_Errstring(), CIF_INCLUDE, Cif_Putrecord(), CIF_UNIT, CIF_USAGE, CIFGEN, CIFUSAGE, comp_id(), comp_scope(), mod_struct::direct, exit(), fprintf(), get_fid(), get_scope(), global_scope_found, global_srcfid, i, mod, modid_current, outfd, print_include_records(), qsort(), ret, unit_list::rptr, record::ul, record::ulcur, and void.
Referenced by Cif_Make_Lines().
| static void save_record | ( | struct record * | l, | |
| struct Cif_generic * | cif_record, | |||
| int | recno, | |||
| long | filepos | |||
| ) | [static] |
Definition at line 967 of file cif_lines.c.
References calloc(), unit_list::filepos, memset, NULL, realloc, unit_list::recno, unit_list::rptr, record::ul, record::ulcur, record::ulmax, and void.
Referenced by Cif_Make_Lines().
int global_cif_status = 0 [static] |
int global_last_scope = -1 [static] |
Definition at line 215 of file cif_lines.c.
Referenced by Cif_Make_Lines(), get_adjusted_scope(), and get_scope().
int global_scope_found = 0 [static] |
Definition at line 223 of file cif_lines.c.
Referenced by Cif_Lines(), get_adjusted_scope(), get_cpos(), get_fid(), get_id(), get_line(), get_scope(), print_include_records(), and print_records().
int global_srcfid = 0 [static] |
Definition at line 213 of file cif_lines.c.
Referenced by Cif_Lines(), lines_type(), and print_records().
int last_inc = 0 [static] |
Definition at line 1092 of file cif_lines.c.
int modid_current = 0 [static] |
Definition at line 192 of file cif_lines.c.
Referenced by Cif_Make_Lines(), print_include_records(), and print_records().
int modid_max = 0 [static] |
struct mod_struct* modids = (struct mod_struct *) NULL [static] |
Definition at line 190 of file cif_lines.c.
Definition at line 178 of file cif_lines.c.
Referenced by __attribute__(), Adjust_Opnd_Name(), c_parser_omp_clause_reduction(), choose_multiplier(), Cif_Make_Lines(), collect_ht_nodes(), cwh_expr_temp(), Process_Control_Opt(), and store_ctrl().
int outfd [static] |
Definition at line 210 of file cif_lines.c.
char* outfile = "-" [static] |
Definition at line 211 of file cif_lines.c.
Definition at line 176 of file cif_lines.c.
Definition at line 177 of file cif_lines.c.
Referenced by break_precolored_alias(), build_worklists(), calculate_dont_begin(), check_colors(), choose_spill_colors(), Cif_Make_Lines(), colorize_one_web(), combine(), compare_and_free_webs(), conservative(), detect_web_parts_to_rebuild(), dump_web_conflicts(), fei_where(), ffewhere_line_new(), insert_coalesced_conflicts(), ipa_methodlist_init(), ipcp_propagate_stage(), ok(), restore_conflicts_from_coalesce(), simplify(), spill_coalescing(), and try_recolor_web().
1.5.6