Last change
on this file since f40a309 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
909 bytes
|
Rev | Line | |
---|
[3ae31e9] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | unlink.c -- unlink (delete) a file
|
---|
| 4 | Version 6 -- 1987-11-15 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #define DEBUGIT 0
|
---|
| 9 |
|
---|
| 10 | #include "biosdefs.h"
|
---|
| 11 | #include "stddefs.h"
|
---|
| 12 |
|
---|
| 13 | #if DEBUGIT
|
---|
| 14 | extern short fsdebug;
|
---|
| 15 |
|
---|
| 16 | extern int waitcr();
|
---|
| 17 | #endif
|
---|
| 18 |
|
---|
| 19 | extern int DelFile();
|
---|
| 20 |
|
---|
| 21 | /*
|
---|
| 22 | =============================================================================
|
---|
| 23 | unlink(name) -- delete file 'name'.
|
---|
| 24 | =============================================================================
|
---|
| 25 | */
|
---|
| 26 |
|
---|
| 27 | int
|
---|
| 28 | unlink(name)
|
---|
| 29 | char *name;
|
---|
| 30 | {
|
---|
| 31 | struct fcb delfcb;
|
---|
| 32 |
|
---|
| 33 | if (fcbinit(name, &delfcb))
|
---|
| 34 | return(FAILURE);
|
---|
| 35 |
|
---|
| 36 | #if DEBUGIT
|
---|
| 37 | if (fsdebug) {
|
---|
| 38 |
|
---|
| 39 | printf("unlink(%s): deletion FCB created\n", name);
|
---|
| 40 | SnapFCB(&delfcb);
|
---|
| 41 | waitcr();
|
---|
| 42 | }
|
---|
| 43 | #endif
|
---|
| 44 | return(DelFile(&delfcb));
|
---|
| 45 | }
|
---|
| 46 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.