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
RevLine 
[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
[6262b5c]10#include "all.h"
[f40a309]11
12#if DEBUGIT
13extern short fsdebug;
14
15extern int waitcr();
16#endif
17
[7258c6a]18extern int16_t DelFile(struct fcb *fcp);
[f40a309]19
[e225e77]20extern int16_t fcbinit(int8_t *name, struct fcb *fcp);
21
[f40a309]22/*
23 =============================================================================
24 unlink(name) -- delete file 'name'.
25 =============================================================================
26*/
27
[7258c6a]28int16_t unlink(int8_t *name)
[f40a309]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
[6262b5c]46
Note: See TracBrowser for help on using the repository browser.