source: buchla-68k/libcio/unlink.c@ 6262b5c

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

Added include files for global functions and variables.

  • Property mode set to 100644
File size: 913 bytes
Line 
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 "all.h"
11
12#if DEBUGIT
13extern short fsdebug;
14
15extern int waitcr();
16#endif
17
18extern int16_t DelFile(struct fcb *fcp);
19
20extern int16_t fcbinit(int8_t *name, struct fcb *fcp);
21
22/*
23 =============================================================================
24 unlink(name) -- delete file 'name'.
25 =============================================================================
26*/
27
28int16_t unlink(int8_t *name)
29{
30 struct fcb delfcb;
31
32 if (fcbinit(name, &delfcb))
33 return(FAILURE);
34
35#if DEBUGIT
36 if (fsdebug) {
37
38 printf("unlink(%s): deletion FCB created\n", name);
39 SnapFCB(&delfcb);
40 waitcr();
41 }
42#endif
43 return(DelFile(&delfcb));
44}
45
46
Note: See TracBrowser for help on using the repository browser.