summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-24 17:37:47 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-24 17:37:47 +0800
commitf03d0717f20d47251703d880fd6b487abefcef67 (patch)
treeafd734943308ab168137d5d1f1a3965822aa3f8f /mbbsd
parentae18d6ceb1b44fdd6178844eb04ac8816038ea50 (diff)
downloadpttbbs-f03d0717f20d47251703d880fd6b487abefcef67.tar
pttbbs-f03d0717f20d47251703d880fd6b487abefcef67.tar.gz
pttbbs-f03d0717f20d47251703d880fd6b487abefcef67.tar.bz2
pttbbs-f03d0717f20d47251703d880fd6b487abefcef67.tar.lz
pttbbs-f03d0717f20d47251703d880fd6b487abefcef67.tar.xz
pttbbs-f03d0717f20d47251703d880fd6b487abefcef67.tar.zst
pttbbs-f03d0717f20d47251703d880fd6b487abefcef67.zip
discard 1998
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2019 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/record.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c
index d50fb611..c8393f6f 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -474,37 +474,6 @@ stampfile(char *fpath, fileheader_t * fh)
return 0;
}
-int
-stampfilefd(char *fpath, fileheader_t * fh)
-{
- char *ip = fpath;
- time_t dtime = COMMON_TIME;
- struct tm *ptime;
- int fd;
-
- if (access(fpath, X_OK | R_OK | W_OK))
- mkdir(fpath, 0755);
-
- while (*(++ip))
- ;
- *ip++ = '/';
-
- while( 1 ) {
- sprintf(ip, "M.%d.A.%3.3X", (int)++dtime, rand() & 0xFFF);
- if( (fd = open(fpath, O_CREAT | O_EXCL | O_WRONLY, 0644)) != -1 )
- break;
- if( errno != EEXIST )
- return -1;
- }
-
- memset(fh, 0, sizeof(fileheader_t));
- strlcpy(fh->filename, ip, sizeof(fh->filename));
- ptime = localtime(&dtime);
- snprintf(fh->date, sizeof(fh->date),
- "%2d/%02d", ptime->tm_mon + 1, ptime->tm_mday);
- return fd;
-}
-
void
stampdir(char *fpath, fileheader_t * fh)
{