/*
----------------------------------------------------------------------------
--| BEGIN PROLOGUE
--|
--| CLASSIFICATION: UNCLASSIFIED
--|
--| FILE NAME:      badcoding.c
--|
--| ABSTRACT:
--|   This file contains the functions that do file 1 stuff.
--|   ??? I am really clueless about what to say ???
--|
--| HISTORY:
--|   CCCQ_NAME:
--|   CCCQ_VER: 10/20/2003 ws
--|
--| END PROLOGUE
----------------------------------------------------------------------------
*/

/* LE SV TOC-001 this is a real rocket scientist - will not compile here */
 LogSvEvent((int)1001); /*11/14/2003 23:55:36*/ 

#include "file-1.h"

/*
-----------------------------------------------------------------------------
--| NAME:   function_a
--|
--| ABSTRACT:
--|   function a does function stuff.
--| /* LE SV TOC-001 this is a real rocket scientist - will not compile here */
--|
--| RETURNS:
--|   NONE.
--|
----------------------------------------------------------------------------
*/

int A;
int B;
long C;
/* LE SV TOC-001 this is a real rocket scientist - will not compile here */
 LogSvEvent((int)1002); /*11/14/2003 23:55:36*/ 
long D;
double E;
double E;

static void function_a (void)
{

    // uncalled function
    
}

/*
-----------------------------------------------------------------------------
--| NAME:   function_b
--|
--| ABSTRACT:
--|   function b does function stuff.
--|
--| RETURNS:
--|   NONE.
--|
----------------------------------------------------------------------------
*/
static void function_b (void)
{
    variable = function_1 + function_2 + function_3;
    variable = function_b + function_c + function_d;
    
    if (veg)
	variable = orange;
    
/* LE SV TOC-002 this is paraphrase of req 2 */
 LogSvEvent((int)1003); /*11/14/2003 23:55:36*/ 
/* LE SV TOC-003 this is paraphrase of req 3 */
 LogSvEvent((int)1004); /*11/14/2003 23:55:36*/ 
    
    goto: this_is_really_bad // poor yourdon

    /* dead_code = a + b; */

    do forever // poor yourdon

    while(1) // poor yourdon
}

static void function_c (void)
{
// TBD - what do I do now


	switch (stuff)
	case one:
		/* LE S TOC-003 this is paraphrase of 003 - but bad encoding */
		/* L SV TOC-004 this is paraphrase of 004 - but bad encoding */
		/* LE TOC-005 this is paraphrase of 005 - but bad encoding */
		/* SV TOC-006 this is paraphrase of 006 - but bad encoding */
		/*  LE SV  r e q 7 a b o u t i t e m 7 s t u f f  AUTO COMMENT */            // too lazy to paraphrase req
 LogSvEvent((int)1005); /*11/14/2003 23:55:36*/ 
		run_this;
	break;
	case two:
		run_this;
	break;
	// missing default
	    
	switch (stuff)
	case one:
		run_this;
	break;
	case two:
		run_this;
	break;
	default:
	// I should call some routine but I don't know the name

	switch (stuff)
	case one:
		run_this; 
		// missing break
	case two:
		run_this;
	break;
	default:
		SwError;
		/* LE SV TOC-008 we really should log all error calls but NOT HERE */
  
	switch (stuff)
	case
	case // stacked case statements but only if there is a new line in between
	 
	case
	case
	case
		run_this;
	break;
	default:
		/* LE SV TOC-008 we really should log all error calls */
 LogSvEvent((int)1006); /*11/14/2003 23:55:36*/ 
	SwError;

    one_huge_line = A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A + A; 

	/* A = B + C; */ 
	// yes this is dead code

	/*
	A = B + C; 
	A = B + C;
	A = B + C; 
	*/ 
	// yes this is dead code block

	if ($stuff > $otherstuff) 
	/* LE SV TOC-008 we really should log all error calls */
	{
		A = B + C;
	}

	// type recast
	A = (int)B + C;
	A = (long)B + C;
	A = (float) B + C;

	A = B + C;
	A = B + C;
	A = B + C;

	send_buffer = (U16 *) malloc(size+1);
	A = B + C;
	A = B + C;

	rcv_buffer = (U16 *) alloc(size+1);
	A = B + C;
	A = B + C;

	FreePtr = HmiStringPtr;
	free(FreePtr);

	goto error;

	A = B + C;
	A = B + C;

#ifdef LAZY
	// this is not nice
	A = B + C;
	A = B + C;
#endif

	A = B + C;
	A = B + C;
	A = B + C;
	A = B + C;

	do
		A = B + C;
		A = B + C;
	while (A < C);

	A = B + C;
	A = B + C;
	A = B + C;
	A = B + C;
	A = B + C;
	A = B + C;
	A = B + C;
	A = B + C;

	while(1) {
		A = B + C;
		A = B + C;
		A = B + C;
		A = B + C;
	}

	A = 0x0001;
	A = 0x0002;
	A = 0x0003;
	A = 0x0004;
	A = 0x0006;
	A = 0x0007;
	A = 0x0008;
	A = 0x0009;

}

/*
-----------------------------------------------------------------------------
--| NAME:   function_c
--|
--| ABSTRACT:
--|   function b does function stuff.
--|
--| RETURNS:
--|   NONE.
--|
----------------------------------------------------------------------------
*/

static void function_c (void)
{
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
}

/*
-----------------------------------------------------------------------------
--| NAME:   function_d
--|
--| ABSTRACT:
--|   function b does function stuff.
--|
--| RETURNS:
--|   NONE.
--|
----------------------------------------------------------------------------
*/

static void function_d (void)
{
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
    this_func_is_way_too_big;
}