Added the counterpart for FL_COMMAND (F_CONTROL). Added GTK Boxtype to the Forms test. Made utf function more fail-safe. Testing SCM on Xcode (wish me luck)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
d631c334a2
commit
9ba790be3b
@ -408,9 +408,11 @@ enum Fl_When { // Fl_Widget::when():
|
|||||||
#define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed
|
#define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
# define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
|
# define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
|
||||||
|
# define FL_CONTROL FL_CTRL ///< An alias for FL_META on WIN32 and X11, or FL_META on MacOS X
|
||||||
#else
|
#else
|
||||||
# define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
|
# define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
|
||||||
|
# define FL_CONTROL FL_META ///< An alias for FL_META on WIN32 and X11, or FL_META on MacOS X
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
/*@}*/ // group: Event States
|
/*@}*/ // group: Event States
|
||||||
|
@ -5846,13 +5846,16 @@
|
|||||||
/* Begin PBXProject section */
|
/* Begin PBXProject section */
|
||||||
C9A3E93C0DD6332D00486E4F /* Project object */ = {
|
C9A3E93C0DD6332D00486E4F /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = YES;
|
||||||
|
};
|
||||||
buildConfigurationList = C9A3E93F0DD6332D00486E4F /* Build configuration list for PBXProject "FLTK" */;
|
buildConfigurationList = C9A3E93F0DD6332D00486E4F /* Build configuration list for PBXProject "FLTK" */;
|
||||||
compatibilityVersion = "Xcode 3.0";
|
compatibilityVersion = "Xcode 3.0";
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
mainGroup = C9A3E93A0DD6332D00486E4F;
|
mainGroup = C9A3E93A0DD6332D00486E4F;
|
||||||
productRefGroup = C9A3E9520DD6336500486E4F /* Products */;
|
productRefGroup = C9A3E9520DD6336500486E4F /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectRoot = "";
|
projectRoot = ../..;
|
||||||
targets = (
|
targets = (
|
||||||
C97741FE0DD9D33B0047C1BF /* Demo */,
|
C97741FE0DD9D33B0047C1BF /* Demo */,
|
||||||
C9C873730DD7772000A9793F /* Fluid */,
|
C9C873730DD7772000A9793F /* Fluid */,
|
||||||
|
12
src/fl_utf.c
12
src/fl_utf.c
@ -138,11 +138,11 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
|
|||||||
{
|
{
|
||||||
unsigned char c = *(unsigned char*)p;
|
unsigned char c = *(unsigned char*)p;
|
||||||
if (c < 0x80) {
|
if (c < 0x80) {
|
||||||
*len = 1;
|
if (len) *len = 1;
|
||||||
return c;
|
return c;
|
||||||
#if ERRORS_TO_CP1252
|
#if ERRORS_TO_CP1252
|
||||||
} else if (c < 0xa0) {
|
} else if (c < 0xa0) {
|
||||||
*len = 1;
|
if (len) *len = 1;
|
||||||
return cp1252[c-0x80];
|
return cp1252[c-0x80];
|
||||||
#endif
|
#endif
|
||||||
} else if (c < 0xc2) {
|
} else if (c < 0xc2) {
|
||||||
@ -150,7 +150,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
|
|||||||
}
|
}
|
||||||
if (p+1 >= end || (p[1]&0xc0) != 0x80) goto FAIL;
|
if (p+1 >= end || (p[1]&0xc0) != 0x80) goto FAIL;
|
||||||
if (c < 0xe0) {
|
if (c < 0xe0) {
|
||||||
*len = 2;
|
if (len) *len = 2;
|
||||||
return
|
return
|
||||||
((p[0] & 0x1f) << 6) +
|
((p[0] & 0x1f) << 6) +
|
||||||
((p[1] & 0x3f));
|
((p[1] & 0x3f));
|
||||||
@ -171,7 +171,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
|
|||||||
} else if (c < 0xf0) {
|
} else if (c < 0xf0) {
|
||||||
UTF8_3:
|
UTF8_3:
|
||||||
if (p+2 >= end || (p[2]&0xc0) != 0x80) goto FAIL;
|
if (p+2 >= end || (p[2]&0xc0) != 0x80) goto FAIL;
|
||||||
*len = 3;
|
if (len) *len = 3;
|
||||||
return
|
return
|
||||||
((p[0] & 0x0f) << 12) +
|
((p[0] & 0x0f) << 12) +
|
||||||
((p[1] & 0x3f) << 6) +
|
((p[1] & 0x3f) << 6) +
|
||||||
@ -182,7 +182,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
|
|||||||
} else if (c < 0xf4) {
|
} else if (c < 0xf4) {
|
||||||
UTF8_4:
|
UTF8_4:
|
||||||
if (p+3 >= end || (p[2]&0xc0) != 0x80 || (p[3]&0xc0) != 0x80) goto FAIL;
|
if (p+3 >= end || (p[2]&0xc0) != 0x80 || (p[3]&0xc0) != 0x80) goto FAIL;
|
||||||
*len = 4;
|
if (len) *len = 4;
|
||||||
#if STRICT_RFC3629
|
#if STRICT_RFC3629
|
||||||
/* RFC 3629 says all codes ending in fffe or ffff are illegal: */
|
/* RFC 3629 says all codes ending in fffe or ffff are illegal: */
|
||||||
if ((p[1]&0xf)==0xf &&
|
if ((p[1]&0xf)==0xf &&
|
||||||
@ -199,7 +199,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
|
|||||||
goto UTF8_4;
|
goto UTF8_4;
|
||||||
} else {
|
} else {
|
||||||
FAIL:
|
FAIL:
|
||||||
*len = 1;
|
if (len) *len = 1;
|
||||||
#if ERRORS_TO_ISO8859_1
|
#if ERRORS_TO_ISO8859_1
|
||||||
return c;
|
return c;
|
||||||
#else
|
#else
|
||||||
|
@ -65,6 +65,8 @@ static VN_struct btypes[]=
|
|||||||
{FL_OVAL3D_DOWNBOX,"oval3d downbox"},
|
{FL_OVAL3D_DOWNBOX,"oval3d downbox"},
|
||||||
{FL_PLASTIC_UP_BOX,"plastic upbox"},
|
{FL_PLASTIC_UP_BOX,"plastic upbox"},
|
||||||
{FL_PLASTIC_DOWN_BOX,"plastic downbox"},
|
{FL_PLASTIC_DOWN_BOX,"plastic downbox"},
|
||||||
|
{FL_GTK_UP_BOX,"GTK up box"},
|
||||||
|
{FL_GTK_ROUND_UP_BOX,"GTK round up box"},
|
||||||
/* sentinel */
|
/* sentinel */
|
||||||
{-1}
|
{-1}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user