source: buchla-68k/orig/DOC/BASENAME.TXT

Last change on this file was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 607 bytes
Line 
1basename.c -- Extract base name from a path
2
3Version 3 -- 1987-02-10 -- D.N. Lynx Crowe
4
5Extracts the base name of a file from a path.
6
7 char *
8 basename(s)
9 char *s;
10
11Can be used with MSDOS, PCDOS, GEMDOS, or Unix(tm) with suitable
12defines for SWITCHAR and DRIVES, as follows:
13
14 For Unix(tm):
15 SWITCHAR '/'
16 DRIVES FALSE
17
18 For MSDOS or PCDOS:
19 SWITCHAR swchar() function to get DOS SWITCHAR
20 DRIVES (c == ':')
21
22 For GEMDOS:
23 SWITCHAR '\\'
24 DRIVES (c == ':')
25
26 Define TESTER to get a test program and edit the array of test cases
27 for the system you're compiling for.
Note: See TracBrowser for help on using the repository browser.