Last change
on this file since 9519422 was 7258c6a, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Use standard integer types.
|
-
Property mode
set to
100644
|
File size:
882 bytes
|
Rev | Line | |
---|
[f40a309] | 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 |
|
---|
[7258c6a] | 19 | extern int16_t DelFile(struct fcb *fcp);
|
---|
[f40a309] | 20 |
|
---|
| 21 | /*
|
---|
| 22 | =============================================================================
|
---|
| 23 | unlink(name) -- delete file 'name'.
|
---|
| 24 | =============================================================================
|
---|
| 25 | */
|
---|
| 26 |
|
---|
[7258c6a] | 27 | int16_t unlink(int8_t *name)
|
---|
[f40a309] | 28 | {
|
---|
| 29 | struct fcb delfcb;
|
---|
| 30 |
|
---|
| 31 | if (fcbinit(name, &delfcb))
|
---|
| 32 | return(FAILURE);
|
---|
| 33 |
|
---|
| 34 | #if DEBUGIT
|
---|
| 35 | if (fsdebug) {
|
---|
| 36 |
|
---|
| 37 | printf("unlink(%s): deletion FCB created\n", name);
|
---|
| 38 | SnapFCB(&delfcb);
|
---|
| 39 | waitcr();
|
---|
| 40 | }
|
---|
| 41 | #endif
|
---|
| 42 | return(DelFile(&delfcb));
|
---|
| 43 | }
|
---|
| 44 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.