summaryrefslogtreecommitdiffstats
path: root/mbbsd/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r--mbbsd/edit.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 8685dfc5..f560167d 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.20 2002/10/26 03:54:15 in2 Exp $ */
+/* $Id: edit.c,v 1.21 2002/11/06 16:25:15 in2 Exp $ */
#include "bbs.h"
typedef struct textline_t {
struct textline_t *prev;
@@ -2290,39 +2290,3 @@ vedit(char *fpath, int saveheader, int *islocal)
}
}
-void editlock(char *fpath)
-{
- char fn[256];
- FILE *fp;
- snprintf(fn, sizeof(fn), "%s.lock", fpath);
- if( (fp = fopen(fn, "w")) != NULL ){
- fprintf(fp, "%d\n", currpid);
- fclose(fp);
- }
-}
-
-void editunlock(char *fpath)
-{
- char fn[256];
- snprintf(fn, sizeof(fn), "%s.lock", fpath);
- unlink(fn);
-}
-
-int iseditlocking(char *fpath, char *action)
-{
- char fn[256];
- FILE *fp;
- snprintf(fn, sizeof(fn), "%s.lock", fpath);
- if( (fp = fopen(fn, "r")) != NULL ){
- int pid;
- fscanf(fp, "%d", &pid);
- fclose(fp);
- if( kill(pid, 0) >= 0 ){
- vmsg("文章編修中, 暫時無法%s", action);
- return 1;
- }
- else
- unlink(fn);
- }
- return 0;
-}