Exemple #1
0

/*****************************************************************************/
/*                                   Data                                    */
/*****************************************************************************/



unsigned char AddSource         = 0;    /* Add source lines as comments */
unsigned char DebugInfo         = 0;    /* Add debug info to the obj */
unsigned char PreprocessOnly    = 0;    /* Just preprocess the input */
unsigned char DebugOptOutput    = 0;    /* Output debug stuff */
unsigned      RegisterSpace     = 6;    /* Space available for register vars */

/* Stackable options */
IntStack WritableStrings    = INTSTACK(0);  /* Literal strings are r/w */
IntStack LocalStrings       = INTSTACK(0);  /* Emit string literals immediately */
IntStack InlineStdFuncs     = INTSTACK(0);  /* Inline some known functions */
IntStack EnableRegVars      = INTSTACK(0);  /* Enable register variables */
IntStack AllowRegVarAddr    = INTSTACK(0);  /* Allow taking addresses of register vars */
IntStack RegVarsToCallStack = INTSTACK(0);  /* Save reg variables on call stack */
IntStack StaticLocals       = INTSTACK(0);  /* Make local variables static */
IntStack SignedChars        = INTSTACK(0);  /* Make characters signed by default */
IntStack CheckStack         = INTSTACK(0);  /* Generate stack overflow checks */
IntStack Optimize           = INTSTACK(0);  /* Optimize flag */
IntStack CodeSizeFactor     = INTSTACK(100);/* Size factor for generated code */
IntStack DataAlignment      = INTSTACK(1);  /* Alignment for data */

/* File names */
StrBuf DepName     = STATIC_STRBUF_INITIALIZER; /* Name of dependencies file */
StrBuf FullDepName = STATIC_STRBUF_INITIALIZER; /* Name of full dependencies file */
Exemple #2
0
#include <string.h>

/* cc65 */
#include "standard.h"



/*****************************************************************************/
/*	      	  		     Data				     */
/*****************************************************************************/



/* Current language standard, will be set to STD_DEFAULT on startup */
IntStack Standard           = INTSTACK(STD_UNKNOWN);

/* Table mapping names to standards, sorted by standard. */
static const char* StdNames[STD_COUNT] = {
    "c89", "c99", "cc65"
};



/*****************************************************************************/
/*	      	  		     Code				     */
/*****************************************************************************/



standard_t FindStandard (const char* Name)