mbkunlink(3)

mbkunlink3

Delete a file in the work_libp.

Synopsys

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

Parameters

name

Name of the file to be deleted

extension

Extension to the file name

Overview

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

Return value

mbkunlink returns :

-1

on failure, ie the file is not in the MBK_WORK_LIB path.

0

on success.

Examples

#include "mut.h"
#include "mph.h"
void update_work_lib(name)
char ∗name;
{
char *path;
	if (incatalogdelete(name))
		if (mbkunlink(name, "cp"))
			fprintf(stdout, "The file %s.cp was not in the work lib0,
						name);
}

Releases

4 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–8
  2. 9–10

From alliance 5.1.1-3 in Debian 10 (Buster). Parsed by carta from the page's man source.