Delete unused code

pull/2/head
Stelios Bounanos 2010-03-01 12:56:30 +00:00
rodzic 2e78ec6bb0
commit a9b976a7b6
5 zmienionych plików z 1 dodań i 250 usunięć

Wyświetl plik

@ -261,8 +261,6 @@ fldigi_SOURCES += \
globals/globals.cxx \
include/htmlstrings.h \
include/arq_io.h \
include/Combo_Box.h \
include/Combo_List.h \
include/confdialog.h \
include/FTextView.h \
include/FTextRXTX.h \

Wyświetl plik

@ -2,7 +2,7 @@
// mingw.c
//
// The following routines were copied from git-1.6.1.2/compat/mingw.c:
// git_vsnprintf git_snprintf sleep mingw_getcwd mingw_getenv mingw_rename
// sleep mingw_getcwd mingw_getenv mingw_rename
//
// The uname routine was adapted from libgw32c 0.4.
//
@ -34,63 +34,6 @@
/* default mode for stdin, stdout and stderr */
unsigned int _CRT_fmode = _O_BINARY;
/******************************************************************************/
#if SNPRINTF_RETURNS_BOGUS
/*
* The size parameter specifies the available space, i.e. includes
* the trailing NUL byte; but Windows's vsnprintf expects the
* number of characters to write without the trailing NUL.
*/
#define SNPRINTF_SIZE_CORR 1
#undef vsnprintf
int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap)
{
char *s;
int ret = -1;
if (maxsize > 0) {
ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap);
if (ret == maxsize-1)
ret = -1;
/* Windows does not NUL-terminate if result fills buffer */
str[maxsize-1] = 0;
}
if (ret != -1)
return ret;
s = NULL;
if (maxsize < 128)
maxsize = 128;
while (ret == -1) {
maxsize *= 4;
str = realloc(s, maxsize);
if (! str)
break;
s = str;
ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap);
if (ret == maxsize-1)
ret = -1;
}
free(s);
return ret;
}
int git_snprintf(char *str, size_t maxsize, const char *format, ...)
{
va_list ap;
int ret;
va_start(ap, format);
ret = git_vsnprintf(str, maxsize, format, ap);
va_end(ap);
return ret;
}
#endif /* SNPRINTF_RETURNS_BOGUS */
unsigned sleep(unsigned seconds)
{
Sleep(seconds*1000);

Wyświetl plik

@ -1,116 +0,0 @@
// $Id: Combo_Box.h,v 1.12 2004/03/24 02:49:00 jbryan Exp $
/***************************************************************
* FLU - FLTK Utility Widgets
* Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
*
* This file and its content is protected by a software license.
* You should have received a copy of this license with this file.
* If not, please contact the Ohio Supercomputer Center immediately:
* Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
*
***************************************************************/
#ifndef _COMBO_BOX_H
#define _COMBO_BOX_H
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Group.H>
//! This is a generic base class for implementing widgets with combo-box-like behavior (i.e. a pulldown menu where the "input" area is editable
class Combo_Box : public Fl_Group
{
public:
//! Normal FLTK widget constructor
Combo_Box( int x, int y, int w, int h, const char *l = 0 );
//! Default destructor
~Combo_Box();
//! Get whether the input field can be edited. Default is \c true
inline bool editable() const
{ return (int)(!input.readonly()); }
//! Set whether the input field can be edited.
inline void editable( bool b )
{ input.readonly( (int)(!b) ); }
//! Get the string in the input field
inline const char* value() const
{ return input.value(); }
//! Set the string in the input field and the value of the popup box.
void value( const char *v );
//! Set the height of the popup box
inline void pop_height( int h )
{ popHeight = h; }
//! Get the height of the popup box
inline int pop_height()
{ return popHeight; }
//! Override of Fl_Group::handle()
int handle( int );
//! Override of Fl_Group::resize()
void resize( int X, int Y, int W, int H );
//! Set the function that will be called when the input area is interacted with
inline void input_callback( void (*cb)(Fl_Widget*,void*), void* cbd = NULL )
{ _inputCB = cb; _inputCBD = cbd; }
//! Publicly exposed input widget
Fl_Input input;
protected:
void (*_inputCB)(Fl_Widget*,void*);
void* _inputCBD;
virtual bool _value( const char *v ) = 0;
virtual const char* _next() = 0;
virtual const char* _previous() = 0;
virtual void _hilight( int x, int y ) = 0;
void draw();
void selected( const char *v );
void set_combo_widget( Fl_Widget *w );
uchar _valbox;
bool _pushed, _popped;
Fl_Widget *_cbox;
int popHeight;
static void input_cb( Fl_Widget*, void* v );
class Popup : public Fl_Double_Window
{
public:
Popup( Combo_Box *b, Fl_Widget *c, int H );
~Popup();
int handle( int event );
protected:
Combo_Box *combo;
bool dragging;
const char* selected;
};
friend class Popup;
};
#endif

Wyświetl plik

@ -1,51 +0,0 @@
// $Id: Combo_List.h,v 1.6 2004/03/24 02:49:00 jbryan Exp $
/***************************************************************
* FLU - FLTK Utility Widgets
* Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
*
* This file and its content is protected by a software license.
* You should have received a copy of this license with this file.
* If not, please contact the Ohio Supercomputer Center immediately:
* Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
*
***************************************************************/
#ifndef _COMBO_LIST_H
#define _COMBO_LIST_H
#include <FL/Fl_Hold_Browser.H>
#include "Combo_Box.h"
//! Just like the Fl_Choice widget except the input area is editable
class Combo_List : public Combo_Box
{
public:
//! Normal FLTK widget constructor
Combo_List( int x, int y, int w, int h, const char *l = 0 );
//! Default destructor
~Combo_List();
//! Publicly exposed list widget (instance of Fl_Hold_Browser)
Fl_Hold_Browser list;
protected:
bool _value( const char *v );
const char* _next();
const char* _previous();
void _hilight( int x, int y );
inline static void _cb( Fl_Widget *w, void *arg )
{ ((Combo_List*)arg)->cb(); }
void cb();
};
#endif

Wyświetl plik

@ -33,27 +33,4 @@
#include "compat/mingw.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(__WOE32__) && (!defined(__GNUC__) || __GNUC__ < 4)
# define SNPRINTF_RETURNS_BOGUS 1
#else
# define SNPRINTF_RETURNS_BOGUS 0
#endif
#if SNPRINTF_RETURNS_BOGUS
#define snprintf git_snprintf
extern int git_snprintf(char *str, size_t maxsize,
const char *format, ...);
#define vsnprintf git_vsnprintf
extern int git_vsnprintf(char *str, size_t maxsize,
const char *format, va_list ap);
#endif
#ifdef __cplusplus
}
#endif
#endif // MINGW32_H