<commit_before>// cc_lang.cc            see license.txt for copyright and terms of use
// code for cc_lang.h

#include "cc_lang.h"     // this module

#include <string.h>      // memset


void CCLang::ANSI_C()
{
  // just in case I forget to initialize something....
  memset(this, 0, sizeof(*this));

  tagsAreTypes = false;
  recognizeCppKeywords = false;
  implicitFuncVariable = false;
  gccFuncBehavior = GFB_none;
  noInnerClasses = true;
  uninitializedGlobalDataIsCommon = true;
  emptyParamsMeansPureVarargFunc = false;
  complainUponBadDeref = true;
  strictArraySizeRequirements = false;
  allowOverloading = false;
  compoundSelfName = false;
  allowCallToUndeclFunc = false;
  allow_KR_ParamOmit = false;
  allowImplicitInt = true;
  allowDynamicallySizedArrays = false;
  allowIncompleteEnums = false;
  declareGNUBuiltins = false;

  isCplusplus = false;
  isC99 = false;
}

void CCLang::KandR_C()
{
  ANSI_C();

  emptyParamsMeansPureVarargFunc = true;
  allowCallToUndeclFunc = true;
  allow_KR_ParamOmit = true;
  allowImplicitInt = true;
}

void CCLang::ANSI_C99()
{
  ANSI_C();

  implicitFuncVariable = true;
  allowImplicitInt = false;
  isC99 = true;
}

void CCLang::GNU_C()
{
  ANSI_C99();

  allowImplicitInt = true;
  gccFuncBehavior = GFB_string;
  allowDynamicallySizedArrays = true;
  declareGNUBuiltins = true;

  // I'm just guessing this is GNU only.... yep:
  // http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Incomplete-Enums.html
  allowIncompleteEnums = true;
}

void CCLang::GNU_KandR_C()
{
  KandR_C();<commit_msg>I guess K&R is GNU K&R<commit_after>// cc_lang.cc            see license.txt for copyright and terms of use
// code for cc_lang.h

#include "cc_lang.h"     // this module

#include <string.h>      // memset


void CCLang::ANSI_C()
{
  // just in case I forget to initialize something....
  memset(this, 0, sizeof(*this));

  tagsAreTypes = false;
  recognizeCppKeywords = false;
  implicitFuncVariable = false;
  gccFuncBehavior = GFB_none;
  noInnerClasses = true;
  uninitializedGlobalDataIsCommon = true;
  emptyParamsMeansPureVarargFunc = false;
  complainUponBadDeref = true;
  strictArraySizeRequirements = false;
  allowOverloading = false;
  compoundSelfName = false;
  allowCallToUndeclFunc = false;
  allow_KR_ParamOmit = false;
  allowImplicitInt = true;
  allowDynamicallySizedArrays = false;
  allowIncompleteEnums = false;
  declareGNUBuiltins = false;

  isCplusplus = false;
  isC99 = false;
}

void CCLang::KandR_C()
{
  ANSI_C();

  emptyParamsMeansPureVarargFunc = true;
  allowCallToUndeclFunc = true;
  allow_KR_ParamOmit = true;
  allowImplicitInt = true;
  
  // our K&R is really GNU K&R ...
  declareGNUBuiltins = true;
}

void CCLang::ANSI_C99()
{
  ANSI_C();

  implicitFuncVariable = true;
  allowImplicitInt = false;
  isC99 = true;
}

void CCLang::GNU_C()
{
  ANSI_C99();

  allowImplicitInt = true;
  gccFuncBehavior = GFB_string;
  allowDynamicallySizedArrays = true;
  declareGNUBuiltins = true;

  // I'm just guessing this is GNU only.... yep:
  // http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Incomplete-Enums.html
  allowIncompleteEnums = true;
}

void CCLang::GNU_KandR_C()
{
  KandR_C();
{'fraction_non_alphanumeric': 0.1056782334384858, 'fraction_numerical': 0.00694006309148265, 'mean_word_length': 3.8560490045941807, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '456019', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1144, 'n_words': 244}