fixed compile error on 32-bit architectures
This commit is contained in:
parent
8c7c2fc7a2
commit
fea7624124
|
@ -10,6 +10,7 @@
|
||||||
*.gcda
|
*.gcda
|
||||||
_configs.sed
|
_configs.sed
|
||||||
config.guess
|
config.guess
|
||||||
|
config.h.in~
|
||||||
config.h
|
config.h
|
||||||
config.log
|
config.log
|
||||||
config.lt
|
config.lt
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
2015-09-18 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* fixed compile error on 32-bit architectures
|
||||||
|
|
||||||
2015-08-08 Markus Gans <guru.mail@muenster.de>
|
2015-08-08 Markus Gans <guru.mail@muenster.de>
|
||||||
* Bug fix in FDialog (use GlobalPos to move)
|
* Bug fix in FDialog (use GlobalPos to move)
|
||||||
* Don't check mouse click position on titlebar again
|
* Don't check mouse click position on titlebar again
|
||||||
|
|
|
@ -1406,7 +1406,7 @@ Optional Features:
|
||||||
--disable-dependency-tracking
|
--disable-dependency-tracking
|
||||||
speeds up one-time build
|
speeds up one-time build
|
||||||
--enable-shared[=PKGS] build shared libraries [default=yes]
|
--enable-shared[=PKGS] build shared libraries [default=yes]
|
||||||
--enable-static[=PKGS] build static libraries [default=no]
|
--enable-static[=PKGS] build static libraries [default=yes]
|
||||||
--enable-fast-install[=PKGS]
|
--enable-fast-install[=PKGS]
|
||||||
optimize for fast installation [default=yes]
|
optimize for fast installation [default=yes]
|
||||||
--disable-libtool-lock avoid locking (might break parallel builds)
|
--disable-libtool-lock avoid locking (might break parallel builds)
|
||||||
|
@ -4869,7 +4869,7 @@ if test "${enable_static+set}" = set; then :
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
enable_static=no
|
enable_static=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -16845,7 +16845,7 @@ $lt_cl_success || as_fn_exit 1
|
||||||
|
|
||||||
### This defines the version number of the installed .so files
|
### This defines the version number of the installed .so files
|
||||||
### using libtool's versioning system.
|
### using libtool's versioning system.
|
||||||
SO_VERSION="0:0:0"
|
SO_VERSION="0:1:0"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,15 +39,15 @@ AC_SEARCH_LIBS([tgetent], [termcap tinfo curses ncurses])
|
||||||
AC_SEARCH_LIBS([tparm], [termcap tinfo curses ncurses])
|
AC_SEARCH_LIBS([tparm], [termcap tinfo curses ncurses])
|
||||||
|
|
||||||
# Checks for libtool
|
# Checks for libtool
|
||||||
AM_ENABLE_SHARED
|
AC_ENABLE_SHARED
|
||||||
AM_DISABLE_STATIC
|
AC_ENABLE_STATIC
|
||||||
LT_INIT([dlopen])
|
LT_INIT([dlopen])
|
||||||
LT_LANG([C++])
|
LT_LANG([C++])
|
||||||
LT_OUTPUT
|
LT_OUTPUT
|
||||||
|
|
||||||
### This defines the version number of the installed .so files
|
### This defines the version number of the installed .so files
|
||||||
### using libtool's versioning system.
|
### using libtool's versioning system.
|
||||||
AC_SUBST(SO_VERSION, ["0:0:0"])
|
AC_SUBST(SO_VERSION, ["0:1:0"])
|
||||||
|
|
||||||
AC_SUBST([LIBTOOL_DEPS])
|
AC_SUBST([LIBTOOL_DEPS])
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef _SRC_FCONFIG_H
|
#ifndef _SRC_FCONFIG_H
|
||||||
#define _SRC_FCONFIG_H 1
|
#define _SRC_FCONFIG_H 1
|
||||||
|
|
||||||
/* src/fconfig.h. Generated automatically at end of configure. */
|
/* src/fconfig.h. Generated automatically at end of configure. */
|
||||||
/* config.h. Generated from config.h.in by configure. */
|
/* config.h. Generated from config.h.in by configure. */
|
||||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
@ -171,6 +171,6 @@
|
||||||
#ifndef F_VERSION
|
#ifndef F_VERSION
|
||||||
#define F_VERSION "0.1.1"
|
#define F_VERSION "0.1.1"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* once: _SRC_FCONFIG_H */
|
/* once: _SRC_FCONFIG_H */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -109,7 +109,7 @@ void FMenu::menu_dimension()
|
||||||
|
|
||||||
if ( item_text.includes(L'&') ) // item has a hotkey '&'
|
if ( item_text.includes(L'&') ) // item has a hotkey '&'
|
||||||
len--;
|
len--;
|
||||||
|
|
||||||
if ( len > maxItemWidth )
|
if ( len > maxItemWidth )
|
||||||
maxItemWidth = len;
|
maxItemWidth = len;
|
||||||
++iter;
|
++iter;
|
||||||
|
@ -179,7 +179,7 @@ void FMenu::draw()
|
||||||
drawBorder();
|
drawBorder();
|
||||||
|
|
||||||
drawItems();
|
drawItems();
|
||||||
|
|
||||||
setUpdateVTerm(true);
|
setUpdateVTerm(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,9 @@ void FMenuItem::init (FWidget* parent)
|
||||||
{
|
{
|
||||||
setSuperMenu( dynamic_cast<FMenuList*>(parent) );
|
setSuperMenu( dynamic_cast<FMenuList*>(parent) );
|
||||||
superMenu()->insert(this);
|
superMenu()->insert(this);
|
||||||
|
|
||||||
//addAccelerator (item->getKey(), item);
|
//addAccelerator (item->getKey(), item);
|
||||||
|
|
||||||
this->addCallback
|
this->addCallback
|
||||||
(
|
(
|
||||||
"activate",
|
"activate",
|
||||||
|
@ -77,9 +77,9 @@ void FMenuItem::init (FWidget* parent)
|
||||||
{
|
{
|
||||||
setSuperMenu( dynamic_cast<FMenuList*>(parent) );
|
setSuperMenu( dynamic_cast<FMenuList*>(parent) );
|
||||||
superMenu()->insert(this);
|
superMenu()->insert(this);
|
||||||
|
|
||||||
//addAccelerator (item->getKey(), item);
|
//addAccelerator (item->getKey(), item);
|
||||||
|
|
||||||
this->addCallback
|
this->addCallback
|
||||||
(
|
(
|
||||||
"activate",
|
"activate",
|
||||||
|
|
|
@ -792,13 +792,21 @@ const FString operator + (const wchar_t c, const std::wstring& s)
|
||||||
return (tmp);
|
return (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
wchar_t& FString::operator [] (int pos)
|
||||||
|
{
|
||||||
|
FString& s = *this;
|
||||||
|
assert ( (pos >= 0) && "Invalid index position!" );
|
||||||
|
return s[uInt(pos)];
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
wchar_t& FString::operator [] (uInt pos)
|
wchar_t& FString::operator [] (uInt pos)
|
||||||
{
|
{
|
||||||
assert ( (pos < length) && "Invalid index position!" );
|
assert ( (pos < length) && "Invalid index position!" );
|
||||||
if (pos >= length)
|
if (pos >= length)
|
||||||
throw std::out_of_range("");
|
throw std::out_of_range("");
|
||||||
return (string[pos]);
|
return string[pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -200,8 +200,9 @@ class FString
|
||||||
friend const FString operator + (const char, const FString&);
|
friend const FString operator + (const char, const FString&);
|
||||||
friend const FString operator + (const wchar_t, const std::wstring&);
|
friend const FString operator + (const wchar_t, const std::wstring&);
|
||||||
|
|
||||||
|
wchar_t& operator [] (int);
|
||||||
wchar_t& operator [] (uInt);
|
wchar_t& operator [] (uInt);
|
||||||
const FString operator () (uInt, uInt);
|
const FString operator () (uInt, uInt);
|
||||||
|
|
||||||
bool operator < (const FString&) const;
|
bool operator < (const FString&) const;
|
||||||
bool operator <= (const FString&) const;
|
bool operator <= (const FString&) const;
|
||||||
|
|
|
@ -173,8 +173,15 @@ int main (int, char**)
|
||||||
<< num3 << " (long double)" << std::endl;
|
<< num3 << " (long double)" << std::endl;
|
||||||
|
|
||||||
FString fnum1, fnum2;
|
FString fnum1, fnum2;
|
||||||
|
#if defined(__LP64__) || defined(_LP64)
|
||||||
|
// 64-bit architecture
|
||||||
fnum1.setFormatedNumber(0xffffffffffffffff, '\'');
|
fnum1.setFormatedNumber(0xffffffffffffffff, '\'');
|
||||||
fnum2.setFormatedNumber(-9223372036854775807);
|
fnum2.setFormatedNumber(-9223372036854775807);
|
||||||
|
#else
|
||||||
|
// 32-bit architecture
|
||||||
|
fnum1.setFormatedNumber(0xffffffff, '\'');
|
||||||
|
fnum2.setFormatedNumber(-2147483647);
|
||||||
|
#endif
|
||||||
std::cout << "setFormatedNumber: "
|
std::cout << "setFormatedNumber: "
|
||||||
<< fnum1 << " (unsigned)" << std::endl;
|
<< fnum1 << " (unsigned)" << std::endl;
|
||||||
std::cout << "setFormatedNumber: "
|
std::cout << "setFormatedNumber: "
|
||||||
|
|
Loading…
Reference in New Issue