Skip to content

Commit

Permalink
Added the counterpart for FL_COMMAND (F_CONTROL). Added GTK Boxtype t…
Browse files Browse the repository at this point in the history
…o 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
  • Loading branch information
Matthias Melcher committed Sep 17, 2009
1 parent d631c33 commit 9ba790b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 3 additions & 1 deletion FL/Enumerations.H
Expand Up @@ -408,9 +408,11 @@ enum Fl_When { // Fl_Widget::when():
#define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed

#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
# 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__

/*@}*/ // group: Event States
Expand Down
5 changes: 4 additions & 1 deletion ide/Xcode3.1/FLTK.xcodeproj/project.pbxproj
Expand Up @@ -5846,13 +5846,16 @@
/* Begin PBXProject section */
C9A3E93C0DD6332D00486E4F /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
};
buildConfigurationList = C9A3E93F0DD6332D00486E4F /* Build configuration list for PBXProject "FLTK" */;
compatibilityVersion = "Xcode 3.0";
hasScannedForEncodings = 0;
mainGroup = C9A3E93A0DD6332D00486E4F;
productRefGroup = C9A3E9520DD6336500486E4F /* Products */;
projectDirPath = "";
projectRoot = "";
projectRoot = ../..;
targets = (
C97741FE0DD9D33B0047C1BF /* Demo */,
C9C873730DD7772000A9793F /* Fluid */,
Expand Down
12 changes: 6 additions & 6 deletions src/fl_utf.c
Expand Up @@ -138,19 +138,19 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
{
unsigned char c = *(unsigned char*)p;
if (c < 0x80) {
*len = 1;
if (len) *len = 1;
return c;
#if ERRORS_TO_CP1252
} else if (c < 0xa0) {
*len = 1;
if (len) *len = 1;
return cp1252[c-0x80];
#endif
} else if (c < 0xc2) {
goto FAIL;
}
if (p+1 >= end || (p[1]&0xc0) != 0x80) goto FAIL;
if (c < 0xe0) {
*len = 2;
if (len) *len = 2;
return
((p[0] & 0x1f) << 6) +
((p[1] & 0x3f));
Expand All @@ -171,7 +171,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
} else if (c < 0xf0) {
UTF8_3:
if (p+2 >= end || (p[2]&0xc0) != 0x80) goto FAIL;
*len = 3;
if (len) *len = 3;
return
((p[0] & 0x0f) << 12) +
((p[1] & 0x3f) << 6) +
Expand All @@ -182,7 +182,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
} else if (c < 0xf4) {
UTF8_4:
if (p+3 >= end || (p[2]&0xc0) != 0x80 || (p[3]&0xc0) != 0x80) goto FAIL;
*len = 4;
if (len) *len = 4;
#if STRICT_RFC3629
/* RFC 3629 says all codes ending in fffe or ffff are illegal: */
if ((p[1]&0xf)==0xf &&
Expand All @@ -199,7 +199,7 @@ unsigned fl_utf8decode(const char* p, const char* end, int* len)
goto UTF8_4;
} else {
FAIL:
*len = 1;
if (len) *len = 1;
#if ERRORS_TO_ISO8859_1
return c;
#else
Expand Down
2 changes: 2 additions & 0 deletions test/forms.cxx
Expand Up @@ -65,6 +65,8 @@ static VN_struct btypes[]=
{FL_OVAL3D_DOWNBOX,"oval3d downbox"},
{FL_PLASTIC_UP_BOX,"plastic upbox"},
{FL_PLASTIC_DOWN_BOX,"plastic downbox"},
{FL_GTK_UP_BOX,"GTK up box"},
{FL_GTK_ROUND_UP_BOX,"GTK round up box"},
/* sentinel */
{-1}
};
Expand Down

0 comments on commit 9ba790b

Please sign in to comment.