- In Fluid, declarations starting with the keyword

'typedef', 'class', or 'struct' are now treated
          correctly if inside a class (STR #1283)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-05-28 15:59:29 +00:00
parent 84ac69cd27
commit d814fce94d
2 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,8 @@
CHANGES IN FLTK 1.1.8
- In Fluid, declarations starting with the keyword
'typedef', 'class', or 'struct' are now treated
correctly if inside a class (STR #1283)
- Tabs now show the correct tooltip (STR #1282)
- Included fltk.spec in configure.in (STR #1274)
- Fixed insufficiently invalidated cache

View File

@ -574,6 +574,17 @@ Fl_Decl_Type Fl_Decl_type;
void Fl_Decl_Type::write_code1() {
const char* c = name();
if (!c) return;
// handle a few keywords differently if inside a class
if (is_in_class() && (
!strncmp(c,"class",5) && isspace(c[5])
|| !strncmp(c,"typedef",7) && isspace(c[7])
|| !strncmp(c,"FL_EXPORT",9) && isspace(c[9])
|| !strncmp(c,"struct",6) && isspace(c[6])
) ) {
write_public(public_);
write_h(" %s\n", c);
return;
}
// handle putting #include, extern, using or typedef into decl:
if (!isalpha(*c) && *c != '~'
|| !strncmp(c,"extern",6) && isspace(c[6])