1.3 Paths and Filenames

Many library routines take strings representing paths and filenames as arguments. If you plan to transport your programs to the UNIX (or XENIX) operating system, you should remember that UNIX uses path-name and filename conventions that are different from those used by DOS. If you do not plan to transport your programs to UNIX, you can skip this section.

Case Sensitivity

The DOS operating system is not case sensitive (it does not distinguish between uppercase and lowercase letters). Thus, SAMPLE.C and Sample.C refer to the same file. However, the UNIX operating system is case sensitive. In UNIX, SAMPLE.C and Sample.C refer to different files. To transport programs to UNIX, choose path names and filenames that work correctly in UNIX, since either case works in DOS. For instance, the following directives are identical in DOS, but only the second works in UNIX:

#include <STDIO.H>

#include <stdio.h>

Subdirectory Conventions

Under UNIX, certain header files are normally placed in a subdirectory named SYS. Microsoft C follows this convention to ease the process of transporting programs to UNIX. If you do not plan to transport your programs, you can place the SYS header files elsewhere.

Path-Name Delimiters

UNIX uses the slash (/) in path names, while DOS uses the backslash (\). To transport programs to UNIX, it is advantageous to use path-name delimiters that are compatible with UNIX whenever possible.