Changeset 1151 for trunk


Ignore:
Timestamp:
04/24/11 01:14:44 (2 years ago)
Author:
reyalP
Message:

increase size of buffer for readder on dryos R39 (and later) cams

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/stdlib.h

    r1122 r1151  
    214214#endif 
    215215 
     216// NOTE this is NOT the actual structure returned by dryos opendir! 
    216217typedef struct { 
    217     unsigned int        fd; 
     218    unsigned int        fd; // first member is an fd from Open in dryos 
    218219    unsigned int        loc; 
    219220    struct dirent       dir; 
  • trunk/platform/generic/wrappers.c

    r1144 r1151  
    370370    return _readdir(d); 
    371371#else 
    372 // for DRYOS cameras  A650, A720  do something with this!  - sizeof(de[]) must be >= sizeof(struct dirent): 'static char de[40];' 
    373   static char de[40] = "";      // (philmoz 15/4/2011) Must initialize this variable or GCC 4.4.0 will generate bad code and the File Browser will crash. 
    374                             // (reyalp) - whaaaaaaaaaa ? 
    375   _ReadFastDir(d, &de); 
    376   return de[0]? &de : (void*)0; 
     372// TODO this makes a single static buffer for all directory handles. 
     373// This means you can only use one at a time, unless you memcpy! 
     374#ifdef CAM_DRYOS_2_3_R39 
     375  static char de[64]; 
     376#else 
     377  static char de[40]; 
     378#endif 
     379 
     380  _ReadFastDir(d, de); 
     381  return de[0]? de : (void*)0; 
    377382#endif 
    378383} 
Note: See TracChangeset for help on using the changeset viewer.