kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Fltk backward compatibility
* Code changes to maintain backward compatibility to fltk versions prior to 1.3.2 * revised fltk.m4 to test for MAJOR, MINOR & PATCH levelspull/1/head
rodzic
b168ea7e5b
commit
fe1e10a481
11
m4/fltk.m4
11
m4/fltk.m4
|
@ -18,7 +18,7 @@ AC_DEFUN([AC_FLDIGI_FLTK], [
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
HAVE_FLTK_API_VERSION=no
|
HAVE_FLTK_API_VERSION=no
|
||||||
FLTK_API_VERSION="`$FLTK_CONFIG --api-version`"
|
FLTK_API_VERSION="`$FLTK_CONFIG --version`"
|
||||||
if test $? -ne 0; then
|
if test $? -ne 0; then
|
||||||
AC_MSG_ERROR([$FLTK_CONFIG failed])
|
AC_MSG_ERROR([$FLTK_CONFIG failed])
|
||||||
fi
|
fi
|
||||||
|
@ -26,7 +26,13 @@ AC_DEFUN([AC_FLDIGI_FLTK], [
|
||||||
HAVE_FLTK_API_VERSION=yes
|
HAVE_FLTK_API_VERSION=yes
|
||||||
fi
|
fi
|
||||||
FLDIGI_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*}
|
FLDIGI_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*}
|
||||||
FLDIGI_FLTK_API_MINOR=${FLTK_API_VERSION#*.}; FLDIGI_FLTK_API_MINOR=${FLDIGI_FLTK_API_MINOR%%.*}
|
|
||||||
|
FLDIGI_FLTK_API_MINOR=${FLTK_API_VERSION#*.};
|
||||||
|
FLDIGI_FLTK_API_MINOR=${FLDIGI_FLTK_API_MINOR%%.*}
|
||||||
|
|
||||||
|
FLDIGI_FLTK_API_PATCH=${FLTK_API_VERSION#*.};
|
||||||
|
FLDIGI_FLTK_API_PATCH=${FLDIGI_FLTK_API_PATCH#*.};
|
||||||
|
|
||||||
if test "${HAVE_FLTK_API_VERSION}" = "no"; then
|
if test "${HAVE_FLTK_API_VERSION}" = "no"; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
*** The version of FLTK found on your system provides API version $FLTK_API_VERSION.
|
*** The version of FLTK found on your system provides API version $FLTK_API_VERSION.
|
||||||
|
@ -50,6 +56,7 @@ AC_DEFUN([AC_FLDIGI_FLTK], [
|
||||||
AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version])
|
AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version])
|
||||||
AC_DEFINE_UNQUOTED([FLDIGI_FLTK_API_MAJOR], [$FLDIGI_FLTK_API_MAJOR], [FLTK API major version])
|
AC_DEFINE_UNQUOTED([FLDIGI_FLTK_API_MAJOR], [$FLDIGI_FLTK_API_MAJOR], [FLTK API major version])
|
||||||
AC_DEFINE_UNQUOTED([FLDIGI_FLTK_API_MINOR], [$FLDIGI_FLTK_API_MINOR], [FLTK API minor version])
|
AC_DEFINE_UNQUOTED([FLDIGI_FLTK_API_MINOR], [$FLDIGI_FLTK_API_MINOR], [FLTK API minor version])
|
||||||
|
AC_DEFINE_UNQUOTED([FLDIGI_FLTK_API_PATCH], [$FLDIGI_FLTK_API_PATCH], [FLTK API patch])
|
||||||
|
|
||||||
AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer])
|
AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer])
|
||||||
AC_CHECK_PROG([FLUID], [fluid], [fluid])
|
AC_CHECK_PROG([FLUID], [fluid], [fluid])
|
||||||
|
|
|
@ -521,6 +521,8 @@ fldigi_SOURCES += \
|
||||||
widgets/picture.cxx \
|
widgets/picture.cxx \
|
||||||
widgets/progress.cxx \
|
widgets/progress.cxx \
|
||||||
widgets/psk_browser.cxx \
|
widgets/psk_browser.cxx \
|
||||||
|
widgets/missing_strings.c \
|
||||||
|
widgets/missing_strings.h \
|
||||||
wwv/analysis.cxx \
|
wwv/analysis.cxx \
|
||||||
wwv/wwv.cxx \
|
wwv/wwv.cxx \
|
||||||
logbook/xmlrpc_log.cxx \
|
logbook/xmlrpc_log.cxx \
|
||||||
|
|
|
@ -72,11 +72,11 @@ void initViewer()
|
||||||
mainViewer->usb = usb;
|
mainViewer->usb = usb;
|
||||||
mainViewer->rfc = rfc;
|
mainViewer->rfc = rfc;
|
||||||
mainViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
|
mainViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
|
||||||
mainViewer->HighLight_1(progdefaults.bwsrHiLight1);
|
mainViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
|
||||||
mainViewer->HighLight_2(progdefaults.bwsrHiLight2);
|
mainViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
|
||||||
mainViewer->SelectColor(progdefaults.bwsrSelect);
|
mainViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
|
||||||
mainViewer->Background1(progdefaults.bwsrBackgnd1);
|
mainViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
|
||||||
mainViewer->Background2(progdefaults.bwsrBackgnd2);
|
mainViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
|
||||||
mainViewer->makecolors();
|
mainViewer->makecolors();
|
||||||
mainViewer->clear();
|
mainViewer->clear();
|
||||||
if (active_modem->get_mode() == MODE_RTTY) {
|
if (active_modem->get_mode() == MODE_RTTY) {
|
||||||
|
@ -91,11 +91,11 @@ void initViewer()
|
||||||
brwsViewer->usb = usb;
|
brwsViewer->usb = usb;
|
||||||
brwsViewer->rfc = rfc;
|
brwsViewer->rfc = rfc;
|
||||||
brwsViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
|
brwsViewer->setfont(progdefaults.ViewerFontnbr, progdefaults.ViewerFontsize);
|
||||||
brwsViewer->HighLight_1(progdefaults.bwsrHiLight1);
|
brwsViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
|
||||||
brwsViewer->HighLight_2(progdefaults.bwsrHiLight2);
|
brwsViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
|
||||||
brwsViewer->SelectColor(progdefaults.bwsrSelect);
|
brwsViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
|
||||||
brwsViewer->Background1(progdefaults.bwsrBackgnd1);
|
brwsViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
|
||||||
brwsViewer->Background2(progdefaults.bwsrBackgnd2);
|
brwsViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
|
||||||
brwsViewer->makecolors();
|
brwsViewer->makecolors();
|
||||||
brwsViewer->clear();
|
brwsViewer->clear();
|
||||||
dlgViewer->size(dlgViewer->w(), dlgViewer->h() - brwsViewer->h() +
|
dlgViewer->size(dlgViewer->w(), dlgViewer->h() - brwsViewer->h() +
|
||||||
|
@ -158,11 +158,11 @@ void viewer_redraw()
|
||||||
if (mainViewer) {
|
if (mainViewer) {
|
||||||
mainViewer->usb = usb;
|
mainViewer->usb = usb;
|
||||||
mainViewer->rfc = rfc;
|
mainViewer->rfc = rfc;
|
||||||
mainViewer->HighLight_1(progdefaults.bwsrHiLight1);
|
mainViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
|
||||||
mainViewer->HighLight_2(progdefaults.bwsrHiLight2);
|
mainViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
|
||||||
mainViewer->SelectColor(progdefaults.bwsrSelect);
|
mainViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
|
||||||
mainViewer->Background1(progdefaults.bwsrBackgnd1);
|
mainViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
|
||||||
mainViewer->Background2(progdefaults.bwsrBackgnd2);
|
mainViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
|
||||||
mainViewer->makecolors();
|
mainViewer->makecolors();
|
||||||
mainViewer->resize(mainViewer->x(), mainViewer->y(), mainViewer->w(), mainViewer->h());
|
mainViewer->resize(mainViewer->x(), mainViewer->y(), mainViewer->w(), mainViewer->h());
|
||||||
}
|
}
|
||||||
|
@ -171,11 +171,11 @@ void viewer_redraw()
|
||||||
brwsViewer->rfc = rfc;
|
brwsViewer->rfc = rfc;
|
||||||
brwsViewer->resize(
|
brwsViewer->resize(
|
||||||
brwsViewer->x(), brwsViewer->y(), brwsViewer->w(), brwsViewer->h());
|
brwsViewer->x(), brwsViewer->y(), brwsViewer->w(), brwsViewer->h());
|
||||||
brwsViewer->HighLight_1(progdefaults.bwsrHiLight1);
|
brwsViewer->HighLight_1((Fl_Color)progdefaults.bwsrHiLight1);
|
||||||
brwsViewer->HighLight_2(progdefaults.bwsrHiLight2);
|
brwsViewer->HighLight_2((Fl_Color)progdefaults.bwsrHiLight2);
|
||||||
brwsViewer->SelectColor(progdefaults.bwsrSelect);
|
brwsViewer->SelectColor((Fl_Color)progdefaults.bwsrSelect);
|
||||||
brwsViewer->Background1(progdefaults.bwsrBackgnd1);
|
brwsViewer->Background1((Fl_Color)progdefaults.bwsrBackgnd1);
|
||||||
brwsViewer->Background2(progdefaults.bwsrBackgnd2);
|
brwsViewer->Background2((Fl_Color)progdefaults.bwsrBackgnd2);
|
||||||
brwsViewer->makecolors();
|
brwsViewer->makecolors();
|
||||||
dlgViewer->redraw();
|
dlgViewer->redraw();
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@ static void cb_bwsrSldrSelColor(Fl_Button* o, void*) {
|
||||||
Fl_Button *bwsrHiLite_1_color=(Fl_Button *)0;
|
Fl_Button *bwsrHiLite_1_color=(Fl_Button *)0;
|
||||||
|
|
||||||
static void cb_bwsrHiLite_1_color(Fl_Button*, void*) {
|
static void cb_bwsrHiLite_1_color(Fl_Button*, void*) {
|
||||||
progdefaults.bwsrHiLight1 = fl_show_colormap(progdefaults.bwsrHiLight1);
|
progdefaults.bwsrHiLight1 = fl_show_colormap((Fl_Color)progdefaults.bwsrHiLight1);
|
||||||
bwsrHiLite_1_color->color(progdefaults.bwsrHiLight1);
|
bwsrHiLite_1_color->color(progdefaults.bwsrHiLight1);
|
||||||
viewer_redraw();
|
viewer_redraw();
|
||||||
progdefaults.changed = true;
|
progdefaults.changed = true;
|
||||||
|
@ -245,7 +245,7 @@ progdefaults.changed = true;
|
||||||
Fl_Button *bwsrHiLite_2_color=(Fl_Button *)0;
|
Fl_Button *bwsrHiLite_2_color=(Fl_Button *)0;
|
||||||
|
|
||||||
static void cb_bwsrHiLite_2_color(Fl_Button*, void*) {
|
static void cb_bwsrHiLite_2_color(Fl_Button*, void*) {
|
||||||
progdefaults.bwsrHiLight2 = fl_show_colormap(progdefaults.bwsrHiLight2);
|
progdefaults.bwsrHiLight2 = fl_show_colormap((Fl_Color)progdefaults.bwsrHiLight2);
|
||||||
bwsrHiLite_2_color->color(progdefaults.bwsrHiLight2);
|
bwsrHiLite_2_color->color(progdefaults.bwsrHiLight2);
|
||||||
viewer_redraw();
|
viewer_redraw();
|
||||||
progdefaults.changed = true;
|
progdefaults.changed = true;
|
||||||
|
@ -254,7 +254,7 @@ progdefaults.changed = true;
|
||||||
Fl_Button *bwsrHiLite_even_lines=(Fl_Button *)0;
|
Fl_Button *bwsrHiLite_even_lines=(Fl_Button *)0;
|
||||||
|
|
||||||
static void cb_bwsrHiLite_even_lines(Fl_Button*, void*) {
|
static void cb_bwsrHiLite_even_lines(Fl_Button*, void*) {
|
||||||
progdefaults.bwsrBackgnd2 = fl_show_colormap(progdefaults.bwsrBackgnd2);
|
progdefaults.bwsrBackgnd2 = fl_show_colormap((Fl_Color)progdefaults.bwsrBackgnd2);
|
||||||
bwsrHiLite_even_lines->color(progdefaults.bwsrBackgnd2);
|
bwsrHiLite_even_lines->color(progdefaults.bwsrBackgnd2);
|
||||||
viewer_redraw();
|
viewer_redraw();
|
||||||
progdefaults.changed = true;;
|
progdefaults.changed = true;;
|
||||||
|
@ -263,7 +263,7 @@ progdefaults.changed = true;;
|
||||||
Fl_Button *bwsrHiLite_odd_lines=(Fl_Button *)0;
|
Fl_Button *bwsrHiLite_odd_lines=(Fl_Button *)0;
|
||||||
|
|
||||||
static void cb_bwsrHiLite_odd_lines(Fl_Button*, void*) {
|
static void cb_bwsrHiLite_odd_lines(Fl_Button*, void*) {
|
||||||
progdefaults.bwsrBackgnd1 = fl_show_colormap(progdefaults.bwsrBackgnd1);
|
progdefaults.bwsrBackgnd1 = fl_show_colormap((Fl_Color)progdefaults.bwsrBackgnd1);
|
||||||
bwsrHiLite_odd_lines->color(progdefaults.bwsrBackgnd1);
|
bwsrHiLite_odd_lines->color(progdefaults.bwsrBackgnd1);
|
||||||
viewer_redraw();
|
viewer_redraw();
|
||||||
progdefaults.changed = true;
|
progdefaults.changed = true;
|
||||||
|
@ -272,7 +272,7 @@ progdefaults.changed = true;
|
||||||
Fl_Button *bwsrHiLite_select=(Fl_Button *)0;
|
Fl_Button *bwsrHiLite_select=(Fl_Button *)0;
|
||||||
|
|
||||||
static void cb_bwsrHiLite_select(Fl_Button*, void*) {
|
static void cb_bwsrHiLite_select(Fl_Button*, void*) {
|
||||||
progdefaults.bwsrSelect = fl_show_colormap(progdefaults.bwsrSelect);
|
progdefaults.bwsrSelect = fl_show_colormap((Fl_Color)progdefaults.bwsrSelect);
|
||||||
bwsrHiLite_select->color(progdefaults.bwsrSelect);
|
bwsrHiLite_select->color(progdefaults.bwsrSelect);
|
||||||
viewer_redraw();
|
viewer_redraw();
|
||||||
progdefaults.changed = true;
|
progdefaults.changed = true;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include "Fl_Text_Buffer_mod.H"
|
#include "Fl_Text_Buffer_mod.H"
|
||||||
|
|
||||||
|
#include "missing_strings.h"
|
||||||
|
|
||||||
#define PREFERRED_GAP_SIZE 1024
|
#define PREFERRED_GAP_SIZE 1024
|
||||||
/* Initial size for the buffer gap (empty space
|
/* Initial size for the buffer gap (empty space
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
#include "Fl_Text_Display_mod.H"
|
#include "Fl_Text_Display_mod.H"
|
||||||
#include <FL/Fl_Window.H>
|
#include <FL/Fl_Window.H>
|
||||||
|
|
||||||
|
#include "missing_strings.h"
|
||||||
|
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "Fl_Text_Editor_mod.H"
|
#include "Fl_Text_Editor_mod.H"
|
||||||
#include <FL/fl_ask.H>
|
#include <FL/fl_ask.H>
|
||||||
|
|
||||||
|
#include "missing_strings.h"
|
||||||
|
|
||||||
Fl_Text_Editor_mod::Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l)
|
Fl_Text_Editor_mod::Fl_Text_Editor_mod(int X, int Y, int W, int H, const char* l)
|
||||||
: Fl_Text_Display_mod(X, Y, W, H, l) {
|
: Fl_Text_Display_mod(X, Y, W, H, l) {
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
/*
|
||||||
|
* "$Id: flstring.c 4288 2005-04-16 00:13:17Z mike $"
|
||||||
|
*
|
||||||
|
* missing BSD string functions for the Fast Light Tool Kit (FLTK).
|
||||||
|
* version < 1.3.2
|
||||||
|
*
|
||||||
|
* Copyright 1998-2005 by Bill Spitzak and others.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
* USA.
|
||||||
|
*
|
||||||
|
* Please report all bugs and problems on the following page:
|
||||||
|
*
|
||||||
|
* http://www.fltk.org/str.php
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "missing_strings.h"
|
||||||
|
|
||||||
|
// versions of FLTK < 1.3.2 do not contain fl_string
|
||||||
|
#if (FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR < 3 ) || \
|
||||||
|
(FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR == 3 && FLDIGI_FLTK_API_PATCH < 1)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'fl_strlcat()' - Safely concatenate two strings.
|
||||||
|
*/
|
||||||
|
|
||||||
|
size_t /* O - Length of string */
|
||||||
|
fl_strlcat(char *dst, /* O - Destination string */
|
||||||
|
const char *src, /* I - Source string */
|
||||||
|
size_t size) { /* I - Size of destination string buffer */
|
||||||
|
size_t srclen; /* Length of source string */
|
||||||
|
size_t dstlen; /* Length of destination string */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Figure out how much room is left...
|
||||||
|
*/
|
||||||
|
|
||||||
|
dstlen = strlen(dst);
|
||||||
|
size -= dstlen + 1;
|
||||||
|
|
||||||
|
if (!size) return (dstlen); /* No room, return immediately... */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Figure out how much room is needed...
|
||||||
|
*/
|
||||||
|
|
||||||
|
srclen = strlen(src);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy the appropriate amount...
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (srclen > size) srclen = size;
|
||||||
|
|
||||||
|
memcpy(dst + dstlen, src, srclen);
|
||||||
|
dst[dstlen + srclen] = '\0';
|
||||||
|
|
||||||
|
return (dstlen + srclen);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'fl_strlcpy()' - Safely copy two strings.
|
||||||
|
*/
|
||||||
|
|
||||||
|
size_t /* O - Length of string */
|
||||||
|
fl_strlcpy(char *dst, /* O - Destination string */
|
||||||
|
const char *src, /* I - Source string */
|
||||||
|
size_t size) { /* I - Size of destination string buffer */
|
||||||
|
size_t srclen; /* Length of source string */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Figure out how much room is needed...
|
||||||
|
*/
|
||||||
|
|
||||||
|
size --;
|
||||||
|
|
||||||
|
srclen = strlen(src);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy the appropriate amount...
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (srclen > size) srclen = size;
|
||||||
|
|
||||||
|
memcpy(dst, src, srclen);
|
||||||
|
dst[srclen] = '\0';
|
||||||
|
|
||||||
|
return (srclen);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,120 @@
|
||||||
|
/*
|
||||||
|
* "$Id: flstring.h 4660 2005-11-27 14:45:48Z mike $"
|
||||||
|
*
|
||||||
|
* Common string header file for the Fast Light Tool Kit (FLTK).
|
||||||
|
* versions < 1.3.x
|
||||||
|
*
|
||||||
|
* Copyright 1998-2005 by Bill Spitzak and others.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Library General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Library General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
* USA.
|
||||||
|
*
|
||||||
|
* Please report all bugs and problems on the following page:
|
||||||
|
*
|
||||||
|
* http://www.fltk.org/str.php
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef flstring_h
|
||||||
|
# define flstring_h
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
// versions of FLTK < 1.3.2 do not contain fl_string
|
||||||
|
#if (FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR < 3 ) || \
|
||||||
|
(FLDIGI_FLTK_API_MAJOR == 1 && FLDIGI_FLTK_API_MINOR == 3 && FLDIGI_FLTK_API_PATCH < 1)
|
||||||
|
|
||||||
|
# include <FL/Fl_Export.H>
|
||||||
|
# include <config.h>
|
||||||
|
# include <stdio.h>
|
||||||
|
# include <stdarg.h>
|
||||||
|
# include <string.h>
|
||||||
|
|
||||||
|
# ifdef HAVE_STRINGS_H
|
||||||
|
# include <strings.h>
|
||||||
|
# endif /* HAVE_STRINGS_H */
|
||||||
|
|
||||||
|
# include <ctype.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Apparently Unixware defines "index" to strchr (!) rather than
|
||||||
|
* providing a proper entry point or not providing the (obsolete)
|
||||||
|
* BSD function. Make sure index is not defined...
|
||||||
|
*/
|
||||||
|
|
||||||
|
# ifdef index
|
||||||
|
# undef index
|
||||||
|
# endif /* index */
|
||||||
|
|
||||||
|
# if defined(WIN32) && !defined(__CYGWIN__)
|
||||||
|
# define strcasecmp(s,t) _stricmp((s), (t))
|
||||||
|
# define strncasecmp(s,t,n) _strnicmp((s), (t), (n))
|
||||||
|
// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
|
||||||
|
// on Windows, which is supposed to be POSIX compliant... Some of these functions
|
||||||
|
// are also defined in ISO C99...
|
||||||
|
# define strdup _strdup
|
||||||
|
# define unlink _unlink
|
||||||
|
# elif defined(__EMX__)
|
||||||
|
# define strcasecmp(s,t) stricmp((s), (t))
|
||||||
|
# define strncasecmp(s,t,n) strnicmp((s), (t), (n))
|
||||||
|
# endif /* WIN32 */
|
||||||
|
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
# endif /* __cplusplus */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MetroWerks' CodeWarrior put thes "non-standard" functions in
|
||||||
|
* <extras.h> which unfortunatly does not play well otherwise
|
||||||
|
* when included - to be resolved...
|
||||||
|
*/
|
||||||
|
|
||||||
|
# if defined(__APPLE__) && defined(__MWERKS__) && defined(_MSL_USING_MW_C_HEADERS)
|
||||||
|
int strcasecmp(const char*,const char*);
|
||||||
|
int strncasecmp(const char*,const char*,int);
|
||||||
|
char *strdup(const char*);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...);
|
||||||
|
# if !HAVE_SNPRINTF
|
||||||
|
# define snprintf fl_snprintf
|
||||||
|
# endif /* !HAVE_SNPRINTF */
|
||||||
|
|
||||||
|
FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap);
|
||||||
|
# if !HAVE_VSNPRINTF
|
||||||
|
# define vsnprintf fl_vsnprintf
|
||||||
|
# endif /* !HAVE_VSNPRINTF */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* strlcpy() and strlcat() are some really useful BSD string functions
|
||||||
|
* that work the way strncpy() and strncat() *should* have worked.
|
||||||
|
*/
|
||||||
|
|
||||||
|
FL_EXPORT extern size_t fl_strlcat(char *, const char *, size_t);
|
||||||
|
# if !HAVE_STRLCAT
|
||||||
|
# define strlcat fl_strlcat
|
||||||
|
# endif /* !HAVE_STRLCAT */
|
||||||
|
|
||||||
|
FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t);
|
||||||
|
# if !HAVE_STRLCPY
|
||||||
|
# define strlcpy fl_strlcpy
|
||||||
|
# endif /* !HAVE_STRLCPY */
|
||||||
|
|
||||||
|
# ifdef __cplusplus
|
||||||
|
}
|
||||||
|
# endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* < FLTK < 1.3.0 */
|
||||||
|
|
||||||
|
#endif /* !flstring_h */
|
|
@ -69,8 +69,8 @@ pskBrowser::pskBrowser(int x, int y, int w, int h, const char *l)
|
||||||
HiLite_1 = FL_RED;
|
HiLite_1 = FL_RED;
|
||||||
HiLite_2 = FL_GREEN;
|
HiLite_2 = FL_GREEN;
|
||||||
BkSelect = FL_BLUE;
|
BkSelect = FL_BLUE;
|
||||||
Backgnd1 = 55;
|
Backgnd1 = (Fl_Color)55;
|
||||||
Backgnd2 = 53;
|
Backgnd2 = (Fl_Color)53;
|
||||||
makecolors();
|
makecolors();
|
||||||
cdistiller = reinterpret_cast<CharsetDistiller*>(operator new(MAXCHANNELS*sizeof(CharsetDistiller)));
|
cdistiller = reinterpret_cast<CharsetDistiller*>(operator new(MAXCHANNELS*sizeof(CharsetDistiller)));
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue