/* chdrive.c (rsxnt) -- Copyright (c) 1996-1997 Rainer Schnitker */

#include "rsxnt.h"

int __chdrive(char drive)
{
    char buf[4];
    buf[0] = drive;
    buf[1] = ':';
    buf[2] = 0;

    if (SetCurrentDirectory(buf) == FALSE)
      return _rsxnt_get_last_errno();
    else
      return 0;
}
