home *** CD-ROM | disk | FTP | other *** search
- /* da_special - open special file names
-
- Copyright (c) 1985 by JMI Software Consultants, Inc.
- */
- #include "acom.h"
- #include "host.h"
- #include "adl.h"
-
- INT da_special(name, isoutput)
- TEXT *name;
- BOOL isoutput;
- {
- IMPORT struct adm_var avar;
- TEXT buf[6];
- INT n;
-
- for (n = 0; n < 5 && name[n]; ++n)
- buf[n] = tolower(name[n]);
- buf[n] = NULLCH;
- if (strcmp(buf, "scrn:") == 0)
- return(open("CON", D_OPEN, S_IWRITE));
- if (strcmp(buf, "kybd:") == 0)
- return(open("CON", D_OPEN, S_IWRITE));
- else if (strcmp(buf, "lpt1:") == 0)
- return(open("LPT1", D_OPEN, S_IWRITE));
- else if (strcmp(buf, "lpt2:") == 0)
- return(open("LPT2", D_OPEN, S_IWRITE));
- else if (strcmp(buf, "lpt3:") == 0)
- return(open("LPT3", D_OPEN, S_IWRITE));
- else if (strcmp(buf, "com1:") == 0)
- return(open("AUX", D_OPEN, S_IWRITE));
- else if (strcmp(buf, "com2:") == 0)
- return(open("AUX", D_OPEN, S_IWRITE));
- return (-1);
- }