http://www.ousob.com --- Legacy Redefined #include <dos.h> #include <extend50.h> CLIPPER b_attrib() { int success = 0, retVal = 0; int mode = _parni(2); if( ISCHAR(1) || ISNUM(2) ){ _retl(0); return; } switch(mode){ case 1 : success = _dos_setfileattr(_parc(1), _A_NORMAL); if( success == 0 ){ retVal = 1; } break; case 2 : success = _dos_setfileattr(_parc(1), _A_RDONLY); if( success == 0 ){ retVal = 1; } break; case 3 : success = _dos_setfileattr(_parc(1), _A_HIDDEN); if( success == 0 ){ retVal = 1; } break; case 4 : success = _dos_setfileattr(_parc(1), _A_SYSTEM); if( success == 0 ){ retVal = 1; } break; case 5 : success = _dos_setfileattr(_parc(1), _A_VOLID); if( success == 0 ){ retVal = 1; } break; case 6 : success = _dos_setfileattr(_parc(1), _A_SUBDIR); if( success == 0 ){ retVal = 1; } break; default : retVal = 0; break; } _retl(retVal); }