<commit_before>/* bzflag
 * Copyright (c) 1993 - 2005 <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 "CursesMenu.h"

/* system implementation headers */
#include <sstream>

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


CursesMenuItem::CursesMenuItem(const std::string& str) : text(str) {

}


CursesMenuItem::~CursesMenuItem() {

}


void CursesMenuItem::showItem(WINDOW* menuWin, int line, int col, int width,
			      bool selected) {
  /* just print the text of the item centered between col and col+width
     if this item is selected, use reverse video */
  wmove(menuWin, line, col);
  if (selected)
    wattron(menuWin, A_REVERSE);
  for (unsigned int i = 0; i < (width - text.size()) / 2; ++i)<commit_msg>fix bzadmin (curses) complaints with sstream<commit_after>/* bzflag
 * Copyright (c) 1993 - 2005 <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.
 */

/* Dev-C++ builds successfully if sstream is included before CursesMenu.h */ 
#ifdef _DEVCPP
#	include <sstream>
#endif

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

/* system implementation headers */
#include <sstream>

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


CursesMenuItem::CursesMenuItem(const std::string& str) : text(str) {

}


CursesMenuItem::~CursesMenuItem() {

}


void CursesMenuItem::showItem(WINDOW* menuWin, int line, int col, int width,
			      bool selected) {
  /* just print the text of the item centered between col and col+width
     if this item is selected, use reverse video */
  wmove(menuWin, line, col);
  if (selected)
    wattron(menuWin, A_REVERSE);
  for (unsigned int i = 0; i < (width - text.size()) / 2; ++i)
{'fraction_non_alphanumeric': 0.10536858974358974, 'fraction_numerical': 0.008012820512820512, 'mean_word_length': 4.064908722109534, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, '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': '5294411', 'n_tokens_mistral': 772, 'n_tokens_neox': 743, 'n_words': 288}