1MBKUNLINK(3)                 MBK UTILITY FUNCTIONS                MBKUNLINK(3)
2
3
4

NAME

6       mbkunlink - delete a file in the WORK_LIBP.
7

SYNOPSIS

9       #include "mut.h"
10       FILE ∗mbkunlink(name, extension)
11       char ∗name, ∗extension;
12

PARAMETERS

14       name                Name of the file to be deleted
15
16       extension           Extension to the file name
17

DESCRIPTION

19       mbkunlink  deletes  a file, searching it in the path specified with the
20       environment variable MBK_WORK_LIB(1).  Its main issue is to enable sim‐
21       ple  file deletion for any program that works with mbk path environment
22       variables.
23       The file to be erased is called name.extension,  if  extension  is  not
24       NULL,  else  it is name. If extension is the empty string, "", then the
25       file name will be name. .
26

RETURN VALUE

28       mbkunlink returns :
29
30       -1                  on failure, ie the file is not in the  MBK_WORK_LIB
31                           path.
32
33       0                   on success.
34

EXAMPLE

36       #include "mut.h"
37       #include "mph.h"
38       void update_work_lib(name)
39       char ∗name;
40       {
41       char *path;
42          if (incatalogdelete(name))
43             if (mbkunlink(name, "cp"))
44                fprintf(stdout, "The file %s.cp was not in the work lib0,
45                         name);
46       }
47

SEE ALSO

49       mbk(1), MBK_WORK_LIB(1), unlink(3).
50
51
52
53
54
55
56ASIM/LIP6                       October 1, 1997                   MBKUNLINK(3)
Impressum