Commit cedcf32f authored by Bednárek David RNDr. Ph.D.'s avatar Bednárek David RNDr. Ph.D.
Browse files

fmwk: corrected enum definition locations

LF enforced on output files
gold files updated
parent 196fadba
......@@ -69,14 +69,14 @@ namespace cecko {
if (!covname.empty())
{
std::ofstream covf(covname);
std::ofstream covf(covname, std::ios_base::binary); // enforce LF delimiters
cd_.for_each([&covf](auto&& name, auto&& cc) {
covf << std::setw(5) << cc.get() << "\t" << name << std::endl;
});
}
if (!covlinename.empty())
{
std::ofstream covf(covlinename);
std::ofstream covf(covlinename, std::ios_base::binary); // enforce LF delimiters
std::ifstream inf(input_fname);
loc_t infline = 0;
cd_.for_each_line([&covf, &inf, &infline](auto&& line, auto&& lcd) {
......@@ -158,7 +158,7 @@ namespace cecko {
return false;
{
auto outname = get_val();
outp_owner_ = std::make_unique<std::ofstream>(outname);
outp_owner_ = std::make_unique<std::ofstream>(outname, std::ios_base::binary); // enforce LF delimiters
if (!outp_owner_->good())
{
outp_owner_.reset();
......@@ -195,7 +195,7 @@ namespace cecko {
if (!aname.empty())
{
std::ofstream af(aname);
std::ofstream af(aname, std::ios_base::binary); // enforce LF delimiters
if (!af.good())
{
std::cout << "Cannot open output file \"" << aname << "\"" << std::endl;
......
......@@ -535,28 +535,28 @@ namespace cecko {
CKEnumTypeObs CKContext::declare_enum_type(const CIName& n, loc_t loc)
{
CKEnumTypeObs tp;
if (!!loctable_)
{
tp = loctable_->declare_enum_type(n, get_int_type(), loc);
return loctable_->declare_enum_type(n, get_int_type(), loc);
}
else
{
tp = globtable_->declare_enum_type(n, get_int_type(), loc);
return globtable_->declare_enum_type(n, get_int_type(), loc);
}
tp->set_def_loc(loc); // !!! DUPLICITE DEFINITION ???
return tp;
}
CKEnumTypeObs CKContext::define_enum_type_open(const CIName& n, loc_t loc)
{
CKEnumTypeObs tp;
if (!!loctable_)
{
return loctable_->declare_enum_type_here(n, get_int_type(), loc);
tp = loctable_->declare_enum_type_here(n, get_int_type(), loc);
}
else
{
return globtable_->declare_enum_type_here(n, get_int_type(), loc);
tp = globtable_->declare_enum_type_here(n, get_int_type(), loc);
}
tp->set_def_loc(loc); // !!! DUPLICITE DEFINITION ???
return tp;
}
void CKContext::define_enum_type_close(CKEnumTypeObs type, CKConstantObsVector items)
{
......
========== tables ==========
// --- GLOBAL TYPEDEFS ---
struct Str{
const char*key;
struct Str*next;
struct Str_5{
const char*key_6;
struct Str_5*next_7;
};
typedef struct _file_s FILE;
typedef struct _file_s_0 FILE_0;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
void fibtest();
const char*front(struct Str**);
struct Str*get_str();
int main(int,char**);
void*memset(void*,int,int);
void pointerarithmeticstest();
void pop_front(struct Str**);
int printf(const char*,...);
void push_front(struct Str**,const char*);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
void argreverttest_101(int,char**);
_Bool empty_32(struct Str_5**);
int fib_3(int);
void fibtest_123();
const char*front_37(struct Str_5**);
struct Str_5*get_str_15();
int main_140(int,char**);
void*memset_0(void*,int,int);
void pointerarithmeticstest_81();
void pop_front_42(struct Str_5**);
int printf_0(const char*,...);
void push_front_23(struct Str_5**,const char*);
int scanf_0(const char*,...);
int sprintf_0(char*,const char*,...);
int sscanf_0(const char*,const char*,...);
void stringtest_59();
_Bool test_135();
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
struct Str*root;
_Bool status;
struct Str_5 array_12[1000];
int array_end_13;
struct Str_5*root_10;
_Bool status_133;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
void argreverttest_101(int argc_101,char**argv_101){
int i_104;
const char*z_103;
{
}
{
}
}
_Bool empty(struct Str**rootp){
_Bool empty_32(struct Str_5**rootp_32){
}
int fib(int x){
int s;
int fib_3(int x_47){
int s_49;
{
}
}
void fibtest(void){
int n;
int s;
void fibtest_123(void){
int n_125;
int s_126;
}
const char*front(struct Str**rootp){
const char*front_37(struct Str_5**rootp_37){
}
struct Str*get_str(void){
struct Str*p;
struct Str_5*get_str_15(void){
struct Str_5*p_17;
}
int main(int argc,char**argv){
int main_140(int argc_140,char**argv_140){
{
}
}
void pointerarithmeticstest(void){
char arr[27];
char ch;
char*e;
char*p;
void pointerarithmeticstest_81(void){
char arr_83[27];
char ch_86;
char*e_85;
char*p_84;
{
}
}
void pop_front(struct Str**rootp){
void pop_front_42(struct Str_5**rootp_42){
}
void push_front(struct Str**rootp,const char*key){
struct Str*p;
void push_front_23(struct Str_5**rootp_23,const char*key_23){
struct Str_5*p_25;
}
void stringtest(void){
char arr[100];
int i;
char t[40];
void stringtest_59(void){
char arr_61[100];
int i_62;
char t_63[40];
}
_Bool test(void){
_Bool test_135(void){
}
========== cecko3 done ==========
========== tables ==========
// --- GLOBAL TYPEDEFS ---
enum En{
ALPHA=0,
BETA=729,
GAMMA=730
enum En_9{
ALPHA_10=0,
BETA_11=729,
GAMMA_12=730
};
struct Str{
const char*key;
struct Str*next;
struct Str_35{
const char*key_36;
struct Str_35*next_37;
};
typedef struct _file_s FILE;
typedef enum En ent;
typedef struct Str*str_ptr;
typedef struct _file_s_0 FILE_0;
typedef enum En_9 ent_5;
typedef struct Str_35*str_ptr_33;
// --- FUNCTION DECLARATIONS ---
void argreverttest(int,char**);
_Bool empty(struct Str**);
int fib(int);
void fibtest();
const char*front(struct Str**);
struct Str*get_str();
int main(int,char**);
void*memset(void*,int,int);
void pointerarithmeticstest();
void pop_front(struct Str**);
int printf(const char*,...);
void push_front(struct Str**,const char*);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
void stringtest();
_Bool test();
void test_enum();
enum En test_enum_internal(enum En);
void argreverttest_133(int,char**);
_Bool empty_62(struct Str_35**);
int fib_31(int);
void fibtest_155();
const char*front_67(struct Str_35**);
struct Str_35*get_str_45();
int main_172(int,char**);
void*memset_0(void*,int,int);
void pointerarithmeticstest_111();
void pop_front_72(struct Str_35**);
int printf_0(const char*,...);
void push_front_53(struct Str_35**,const char*);
int scanf_0(const char*,...);
int sprintf_0(char*,const char*,...);
int sscanf_0(const char*,const char*,...);
void stringtest_89();
_Bool test_167();
void test_enum_23();
enum En_9 test_enum_internal_15(enum En_9);
// --- GLOBAL VARIABLES ---
struct Str array[1000];
int array_end;
enum En my_var;
struct _file_s*myout;
struct Str*root;
_Bool status;
struct Str_35 array_42[1000];
int array_end_43;
enum En_9 my_var_7;
struct _file_s_0*myout_3;
struct Str_35*root_40;
_Bool status_165;
// --- FUNCTION DEFINITIONS ---
void argreverttest(int argc,char**argv){
int i;
const char*z;
void argreverttest_133(int argc_133,char**argv_133){
int i_136;
const char*z_135;
{
}
{
}
}
_Bool empty(struct Str**rootp){
_Bool empty_62(struct Str_35**rootp_62){
}
int fib(int x){
int s;
int fib_31(int x_77){
int s_79;
{
}
}
void fibtest(void){
int n;
int s;
void fibtest_155(void){
int n_157;
int s_158;
}
const char*front(struct Str**rootp){
const char*front_67(struct Str_35**rootp_67){
}
struct Str*get_str(void){
struct Str*p;
struct Str_35*get_str_45(void){
struct Str_35*p_47;
}
int main(int argc,char**argv){
int main_172(int argc_172,char**argv_172){
{
}
}
void pointerarithmeticstest(void){
char arr[27];
char ch;
char*e;
char*p;
void pointerarithmeticstest_111(void){
char arr_113[27];
char ch_116;
char*e_115;
char*p_114;
{
int locvar;
int locvar_123;
}
}
void pop_front(struct Str**rootp){
void pop_front_72(struct Str_35**rootp_72){
}
void push_front(struct Str**rootp,const char*key){
struct Str*p;
void push_front_53(struct Str_35**rootp_53,const char*key_53){
struct Str_35*p_55;
}
void stringtest(void){
char arr[100];
int i;
char t[40];
void stringtest_89(void){
char arr_91[100];
int i_92;
char t_93[40];
}
_Bool test(void){
_Bool test_167(void){
}
void test_enum(void){
enum En x;
void test_enum_23(void){
enum En_9 x_25;
}
enum En test_enum_internal(enum En arg){
enum En tmp;
enum En_9 test_enum_internal_15(enum En_9 arg_15){
enum En_9 tmp_17;
}
========== cecko3 done ==========
========== tables ==========
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
typedef struct _file_s_0 FILE_0;
// --- FUNCTION DECLARATIONS ---
int main(int,char**);
void*memset(void*,int,int);
int printf(const char*,...);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
int main_3(int,char**);
void*memset_0(void*,int,int);
int printf_0(const char*,...);
int scanf_0(const char*,...);
int sprintf_0(char*,const char*,...);
int sscanf_0(const char*,const char*,...);
// --- GLOBAL VARIABLES ---
// --- FUNCTION DEFINITIONS ---
int main(int argc,char**argv){
int arr[42];
int darr[4][2];
int i;
int j;
int main_3(int argc_3,char**argv_3){
int arr_5[42];
int darr_9[4][2];
int i_7;
int j_7;
}
========== cecko3 done ==========
========== tables ==========
// --- GLOBAL TYPEDEFS ---
enum days{
MON=0,
TUE=1,
WED=2,
THU=3,
WRI=4,
SAT=15,
SUN=16
enum days_3{
MON_3=0,
TUE_3=1,
WED_3=2,
THU_3=3,
WRI_3=4,
SAT_3=15,
SUN_3=16
};
typedef struct _file_s FILE;
typedef struct _file_s_0 FILE_0;
// --- FUNCTION DECLARATIONS ---
int main(int,char**);
void*memset(void*,int,int);
int printf(const char*,...);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
int main_5(int,char**);
void*memset_0(void*,int,int);
int printf_0(const char*,...);
int scanf_0(const char*,...);
int sprintf_0(char*,const char*,...);
int sscanf_0(const char*,const char*,...);
// --- GLOBAL VARIABLES ---
// --- FUNCTION DEFINITIONS ---
int main(int argc,char**argv){
enum rgb{
RED=0,
GREEN=1,
BLUE=2
int main_5(int argc_5,char**argv_5){
enum rgb_9{
RED_9=0,
GREEN_9=1,
BLUE_9=2
};
enum rgb color;
enum days day;
enum rgb_9 color_9;
enum days_3 day_7;
}
========== cecko3 done ==========
========== tables ==========
// --- GLOBAL TYPEDEFS ---
struct mighty_str{
char c;
int x;
int y;
struct mighty_str_3{
char c_4;
int x_5;
int y_5;
};
typedef struct _file_s FILE;
typedef struct _file_s_0 FILE_0;
// --- FUNCTION DECLARATIONS ---
int main(int,char**);
void*memset(void*,int,int);
int printf(const char*,...);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
int main_11(int,char**);
void*memset_0(void*,int,int);
int printf_0(const char*,...);
int scanf_0(const char*,...);
int sprintf_0(char*,const char*,...);
int sscanf_0(const char*,const char*,...);
// --- GLOBAL VARIABLES ---
int x;
int x_8;
// --- FUNCTION DEFINITIONS ---
int main(int argc,char**argv){
struct god_str{
struct mighty_str ims_;
int main_11(int argc_11,char**argv_11){
struct god_str_20{
struct mighty_str_3 ims__21;
};
struct god_str gs;
struct mighty_str ms;
struct mighty_str_23{
char u_24;
};
struct god_str_20 gs_22;
struct mighty_str_3 ms_13;
{
struct mighty_str*ps;
struct mighty_str_3*ps_16;
}
{
struct god_str*ps;
struct mighty_str_23*ms_28;
struct god_str_20*ps_27;
}
}
========== cecko3 done ==========
========== tables ==========
// --- GLOBAL TYPEDEFS ---
typedef struct _file_s FILE;
typedef enum En ent;
typedef struct Str*str_ptr;
typedef struct _file_s_0 FILE_0;
typedef enum En_0 ent_5;
typedef struct Str_0*str_ptr_7;
// --- FUNCTION DECLARATIONS ---
int main(int,char**);
void*memset(void*,int,int);
int printf(const char*,...);
int scanf(const char*,...);
int sprintf(char*,const char*,...);
int sscanf(const char*,const char*,...);
int main_9(int,char**);
void*memset_0(void*,int,int);
int printf_0(const char*,...);
int scanf_0(const char*,...);
int sprintf_0(char*,const char*,...);
int sscanf_0(const char*,const char*,...);
// --- GLOBAL VARIABLES ---
// --- FUNCTION DEFINITIONS ---
int main(int argc,char**argv){
enum En*e;
struct _file_s*myout;
struct Str*p;
int main_9(int argc_9,char**argv_9){
enum En_0*e_13;
struct _file_s_0*myout_11;
struct Str_0*p_12;
}
========== cecko3 done ==========
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment