~ubuntu-branches/ubuntu/karmic/fltk1.1/karmic

« back to all changes in this revision

Viewing changes to fluid/Fl_Function_Type.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-05-22 13:57:06 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050522135706-mchag24yf42lu7bu
Tags: 1.1.6-5
* Revert previous change, which seems to have been ineffective for some
  reason, in favor of commenting out the problematic Makefile rule
  altogether.  (Closes: #310151.)
* debian/control: Go back to specifying the URL as part of the
  description rather than via a non-standard field that doesn't seem to
  have caught on.  (Closes: #310240.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.15 2004/04/11 04:38:55 easysw Exp $"
 
2
// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.16 2004/11/20 16:19:04 easysw Exp $"
3
3
//
4
4
// C function type code for the Fast Light Tool Kit (FLTK).
5
5
//
291
291
          write_h("%s%s %s;\n", rtype, star, name());
292
292
      }
293
293
      else write_c("static ");
294
 
      write_c("%s%s %s {\n", rtype, star, name());
 
294
 
 
295
      // write everything but the default parameters (if any)
 
296
      char s[1024], *sptr;
 
297
      char *nptr;
 
298
      int skips=0,skipc=0;
 
299
      int nc=0,plevel=0;
 
300
      for (sptr=s,nptr=(char*)name(); *nptr; nc++,nptr++) {
 
301
        if (!skips && *nptr=='(') plevel++;
 
302
        else if (!skips && *nptr==')') plevel--;
 
303
        if ( *nptr=='"' &&  !(nc &&  *(nptr-1)=='\\') ) 
 
304
          skips = skips ? 0 : 1;
 
305
        else if(!skips && *nptr=='\'' &&  !(nc &&  *(nptr-1)=='\\'))
 
306
          skipc = skipc ? 0 : 1;
 
307
        if(!skips && !skipc && plevel==1 && *nptr =='=' && 
 
308
           !(nc && *(nptr-1)=='\'') ) // ignore '=' case 
 
309
          while(*++nptr  && (skips || skipc || (*nptr!=',' && *nptr!=')' || plevel!=1) )) {
 
310
            if ( *nptr=='"' &&  *(nptr-1)!='\\' ) 
 
311
              skips = skips ? 0 : 1;
 
312
            else if(!skips && *nptr=='\'' &&  *(nptr-1)!='\\')
 
313
              skipc = skipc ? 0 : 1;
 
314
            if (!skips && !skipc && *nptr=='(') plevel++;
 
315
            else if (!skips && *nptr==')') plevel--;
 
316
          }
 
317
 
 
318
        if (sptr < (s + sizeof(s) - 1)) *sptr++ = *nptr;
 
319
      }
 
320
      *sptr = '\0';
 
321
 
 
322
      write_c("%s%s %s {\n", rtype, star, s);
295
323
    }
296
324
  }
297
325
  if (havewidgets) write_c("  %s* w;\n",subclassname(child));
761
789
}
762
790
 
763
791
//
764
 
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.15 2004/04/11 04:38:55 easysw Exp $".
 
792
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.16 2004/11/20 16:19:04 easysw Exp $".
765
793
//