From 61a95bca5bfeb8426bcb6616d10f5eacfc9de612 Mon Sep 17 00:00:00 2001 From: wens Date: Thu, 19 Jun 2008 02:38:21 +0000 Subject: Move stamp* to common library, with weak symbols Remove stamplink Header file cleanup git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4379 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/record.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/record.c b/mbbsd/record.c index 89304604..ec992b0b 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -364,7 +364,7 @@ stampfile(char *fpath, fileheader_t * fh) return stampfile_u(fpath, fh); } -void +int stampdir(char *fpath, fileheader_t * fh) { register char *ip = fpath; @@ -384,28 +384,8 @@ stampdir(char *fpath, fileheader_t * fh) localtime4_r(&dtime, &ptime); snprintf(fh->date, sizeof(fh->date), "%2d/%02d", ptime.tm_mon + 1, ptime.tm_mday); -} - -void -stamplink(char *fpath, fileheader_t * fh) -{ - register char *ip = fpath; - time4_t dtime = COMMON_TIME; - struct tm ptime; - - if (access(fpath, X_OK | R_OK | W_OK)) - mkdir(fpath, 0755); - while (*(++ip)); - *ip++ = '/'; - do { - sprintf(ip, "S%X", (int)++dtime); - } while (symlink("temp", fpath) == -1); - memset(fh, 0, sizeof(fileheader_t)); - strlcpy(fh->filename, ip, sizeof(fh->filename)); - localtime4_r(&dtime, &ptime); - snprintf(fh->date, sizeof(fh->date), - "%2d/%02d", ptime.tm_mon + 1, ptime.tm_mday); + return 0; } int -- cgit v1.2.3