rename.c 268 B

12345678910
  1. #include <stdio.h>
  2. #include <vat.h>
  3. __ATTR_LIB_C__ short rename(const char *old, const char *new)
  4. {
  5. char sym[100],*sptrold=sym,*sptrnew;
  6. *sptrold=0; while((*++sptrold=*old++));
  7. sptrnew=sptrold; while((*++sptrnew=*new++));
  8. return SymMove(sptrold,sptrnew)-1;
  9. }