<commit_before>/* bzflag
 * Copyright (c) 1993 - 2007 <NAME>
 *
 * This package is free software;  you can redistribute it and/or
 * modify it under the terms of the license found in the file
 * named COPYING that should have accompanied this file.
 *
 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/* interface header */
#include "NewVersionMenu.h"

/* system headers */
#include <stdio.h>
#ifdef WIN32
#include <direct.h>
#include <process.h>
#include <errno.h>
#endif

/* common implementation headers */
#include "FontManager.h"
#include "StateDatabase.h"
#include "DirectoryNames.h"
#include "TextUtils.h"

/* local implementation headers */
#include "MainMenu.h"
#include "HUDDialogStack.h"
#include "HUDui.h"
#include "HUDuiLabel.h"
#include "CommandsStandard.h"

/* as platforms get added to the automatic upgrade system, update this */
#if defined(WIN32)
  #define AUTOUPGRADE 1
#else
  #define AUTOUPGRADE 0
#endif

NewVersionMenu::NewVersionMenu(std::string announce, std::string url, std::string date) :
cURLManager(), byteTransferred(0)
{
#if AUTOUPGRADE
  // prep for possible download
  setURL(url);
  long timeout = 15;
  if (BZDB.isSet("httpTimeout")) {
    timeout = (long)BZDB.eval("httpTimeout");
  }
  setTimeout(timeout);
#endif
<commit_msg>testing FTW.  unbreak automatic upgrade on non-windows platforms.<commit_after>/* bzflag
 * Copyright (c) 1993 - 2007 <NAME>
 *
 * This package is free software;  you can redistribute it and/or
 * modify it under the terms of the license found in the file
 * named COPYING that should have accompanied this file.
 *
 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/* interface header */
#include "NewVersionMenu.h"

/* system headers */
#include <stdio.h>
#ifdef WIN32
#include <direct.h>
#include <process.h>
#include <errno.h>
#endif

/* common implementation headers */
#include "FontManager.h"
#include "StateDatabase.h"
#include "DirectoryNames.h"
#include "TextUtils.h"

/* local implementation headers */
#include "MainMenu.h"
#include "HUDDialogStack.h"
#include "HUDui.h"
#include "HUDuiLabel.h"
#include "CommandsStandard.h"

/* as platforms get added to the automatic upgrade system, update this */
#if defined(WIN32)
  #define AUTOUPGRADE 1
#else
  #undef AUTOUPGRADE
#endif

NewVersionMenu::NewVersionMenu(std::string announce, std::string url, std::string date) :
cURLManager(), byteTransferred(0)
{
#ifdef AUTOUPGRADE
  // prep for possible download
  setURL(url);
  long timeout = 15;
  if (BZDB.isSet("httpTimeout")) {
    timeout = (long)BZDB.eval("httpTimeout");
  }
  setTimeout(timeout);
#endif

{'fraction_non_alphanumeric': 0.11628709454796411, 'fraction_numerical': 0.011387163561076604, 'mean_word_length': 4.695481335952849, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1183474', 'n_tokens_mistral': 924, 'n_tokens_neox': 888, 'n_words': 306}