Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

DOS services library

doschdir

dospwd

dosassign

Purpose

     Assigns one DOS Services drive to another.

Library

     DOS Services Library (libdos.a)

Syntax

     #include <dos.h>

     int dosassign (drive, todrive)
     char *drive, *todrive;

Description

     The  dosassign subroutine  causes all  references to  the
     drive specified by  the drive parameter to  use the drive
     specified  by  the  todrive  parameter.   The  drive  and
     todrive parameters  are strings  containing the  names of
     drives as  configured by  dosinit or  in a  user profile.
     The names  can be  in either  uppercase or  lowercase and
     must not include the colon.

     If the drive parameter is NULL, all assignments are reset
     to their initial state.

     Once  assigned, using  the drive  specified by  the drive
     parameter is  equivalent to using the  drive specified by
     the  todrive parameter.   However, the  dospwd subroutine
     does  not perform  this translation.   It returns  a path
     name that includes either the  drive name passed to it as
     a parameter or the drive name passed to the doschdir sub-
     routine.

     The  dosassign subroutine  does  not  change the  current
     drive.

Return Value

     Upon successful completion, a value of 0 is returned.  If
     the dosassign subroutine fails, a value of -1 is returned
     and doserrno is set to indicate the error.

Related Information

     In this  book:  "DOS services library,"  "doschdir," and
     "dospwd."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026