mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 08:06:35 +08:00
Default argument patch from Fabien Constantini.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2207 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
CHANGES IN FLTK 1.1.0rc2
|
CHANGES IN FLTK 1.1.0rc2
|
||||||
|
|
||||||
- Portability fixes.
|
- Portability fixes.
|
||||||
|
- FLUID now properly handles default argument parameters
|
||||||
|
properly.
|
||||||
- Fixed WM_PAINT handling under WIN32 - didn't validate
|
- Fixed WM_PAINT handling under WIN32 - didn't validate
|
||||||
the correct region that was drawn.
|
the correct region that was drawn.
|
||||||
- Fl_Multiline_Output would insert the enter key.
|
- Fl_Multiline_Output would insert the enter key.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.4 2002/05/04 05:28:11 easysw Exp $"
|
// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.5 2002/05/12 01:02:17 easysw Exp $"
|
||||||
//
|
//
|
||||||
// C function type code for the Fast Light Tool Kit (FLTK).
|
// C function type code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -257,7 +257,29 @@ void Fl_Function_Type::write_code1() {
|
|||||||
*sptr = '\0';
|
*sptr = '\0';
|
||||||
|
|
||||||
write_h("%s;\n", s);
|
write_h("%s;\n", s);
|
||||||
write_c("%s::%s {\n", k, name());
|
// skip all function default param. init in body:
|
||||||
|
int skips=0;
|
||||||
|
int nc=0,level=0;
|
||||||
|
for (sptr=s,nptr=(char*)name(); *nptr; nc++,nptr++) {
|
||||||
|
if (!skips && *nptr=='(') level++;
|
||||||
|
else if (!skips && *nptr==')') level--;
|
||||||
|
|
||||||
|
if ( *nptr=='"' && !(nc && *(nptr-1)=='\\') )
|
||||||
|
skips = skips ? 0 : 1;
|
||||||
|
if(!skips && level==1 && *nptr =='=' &&
|
||||||
|
!(nc && *(nptr-1)=='\'') ) // ignore '=' case
|
||||||
|
while(*++nptr && (skips || *(nptr-1)=='\'' ||
|
||||||
|
(*nptr!=',' && (*nptr!=')' || level!=1) ))) {
|
||||||
|
if ( *nptr=='"' && *(nptr-1)!='\\' )
|
||||||
|
skips = skips ? 0 : 1;
|
||||||
|
if (!skips && *nptr=='(') level++;
|
||||||
|
else if (!skips && *nptr==')') level--;
|
||||||
|
}
|
||||||
|
*sptr++ = *nptr;
|
||||||
|
}
|
||||||
|
*sptr = '\0';
|
||||||
|
|
||||||
|
write_c("%s::%s {\n", k, s);
|
||||||
} else {
|
} else {
|
||||||
if (public_) {
|
if (public_) {
|
||||||
if (cdecl_)
|
if (cdecl_)
|
||||||
@@ -680,5 +702,5 @@ void Fl_Class_Type::write_code2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.4 2002/05/04 05:28:11 easysw Exp $".
|
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.5 2002/05/12 01:02:17 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user