ftp.nice.ch/pub/next/database/apps/RZToDoList.1.1.s.tar.gz#/RZToDoList/lock_file.h

This is lock_file.h in view mode; [Download] [Up]

/* 
 * lock_file - functions for file locking
 *
 * You may freely copy, distribute and reuse the code in this example.
 * This code is provided AS IS without warranty of any kind, expressed 
 * or implied, as to its fitness for any particular use.
 *
 * Copyright 1995 Ralph Zazula (zazula@next.com).  All Rights Reserved.
 *
 */
 
#define LOCK_SUCCESS 0
#define LOCK_EXIST -1
#define LOCK_NOCREATE -2

int lock_file(char *filename);
/*
 * Drops a lock file "filename.lock" for "filename".  Returns:
 * 	LOCK_SUCCESS	(0)	success
 * 	LOCK_EXIST		(-1)	lock file already exists
 * 	LOCK_NOCREATE	(-2)	couldn't create lock file
 */

int unlock_file(char *filename);
/*
 * removes the lock file "filename.lock" for "filename".
 * Returns LOCK_SUCCESS on success and a negative error code on failure.
 * The error code is that which resulted from the attempted unlink().
 */

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.