summaryrefslogtreecommitdiffstats
path: root/util/initbbs.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-10 01:29:36 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-10 01:29:36 +0800
commit90451291f8f509d0f0e3f1c442bb3325de30d9b0 (patch)
tree1d5737feb5cb95e231206b875c21d2d8f88607c6 /util/initbbs.c
parenta0baab6a9bbe6e76779927273f3faeba5b4d3990 (diff)
downloadpttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar
pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.gz
pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.bz2
pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.lz
pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.xz
pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.tar.zst
pttbbs-90451291f8f509d0f0e3f1c442bb3325de30d9b0.zip
boards/<hash>/<brdname>
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@15 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/initbbs.c')
-rw-r--r--util/initbbs.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/initbbs.c b/util/initbbs.c
index ce6c4361..c70ab826 100644
--- a/util/initbbs.c
+++ b/util/initbbs.c
@@ -1,4 +1,4 @@
-/* $Id: initbbs.c,v 1.1 2002/03/07 15:13:46 in2 Exp $ */
+/* $Id: initbbs.c,v 1.2 2002/03/09 17:29:20 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -51,9 +51,9 @@ static void newboard(FILE *fp, boardheader_t *b) {
char buf[256];
fwrite(b, sizeof(boardheader_t), 1, fp);
- sprintf(buf, "boards/%s", b->brdname);
+ sprintf(buf, "boards/%c/%s", b->brdname[0], b->brdname);
mkdir(buf, 0755);
- sprintf(buf, "man/boards/%s", b->brdname);
+ sprintf(buf, "man/boards/%c/%s", b->brdname[0], b->brdname);
mkdir(buf, 0755);
}
@@ -159,31 +159,31 @@ static void initMan() {
f.money = 0;
f.filemode = 0;
- if((fp = fopen("man/boards/Note/.DIR", "w"))) {
+ if((fp = fopen("man/boards/N/Note/.DIR", "w"))) {
strcpy(f.filename, "SONGBOOK");
strcpy(f.title, "◆ 【點 歌 歌 本】");
fwrite(&f, sizeof(f), 1, fp);
- mkdir("man/boards/Note/SONGBOOK", 0755);
+ mkdir("man/boards/N/Note/SONGBOOK", 0755);
strcpy(f.filename, "SONGO");
strcpy(f.title, "◆ <點歌> 動態看板");
fwrite(&f, sizeof(f), 1, fp);
- mkdir("man/boards/Note/SONGO", 0755);
+ mkdir("man/boards/N/Note/SONGO", 0755);
strcpy(f.filename, "SYS");
strcpy(f.title, "◆ <系統> 動態看板");
fwrite(&f, sizeof(f), 1, fp);
- mkdir("man/boards/Note/SYS", 0755);
+ mkdir("man/boards/N/Note/SYS", 0755);
strcpy(f.filename, "AD");
strcpy(f.title, "◆ <廣告> 動態看板");
fwrite(&f, sizeof(f), 1, fp);
- mkdir("man/boards/Note/AD", 0755);
+ mkdir("man/boards/N/Note/AD", 0755);
strcpy(f.filename, "NEWS");
strcpy(f.title, "◆ <新聞> 動態看板");
fwrite(&f, sizeof(f), 1, fp);
- mkdir("man/boards/Note/NEWS", 0755);
+ mkdir("man/boards/N/Note/NEWS", 0755);
fclose(fp);
}
@@ -191,9 +191,9 @@ static void initMan() {
}
static void initSymLink() {
- symlink(BBSHOME "/man/boards/Note/SONGBOOK", BBSHOME "/etc/SONGBOOK");
- symlink(BBSHOME "/man/boards/Note/SONGO", BBSHOME "/etc/SONGO");
- symlink(BBSHOME "/man/boards/EditExp", BBSHOME "/etc/editexp");
+ symlink(BBSHOME "/man/boards/N/Note/SONGBOOK", BBSHOME "/etc/SONGBOOK");
+ symlink(BBSHOME "/man/boards/N/Note/SONGO", BBSHOME "/etc/SONGO");
+ symlink(BBSHOME "/man/boards/E/EditExp", BBSHOME "/etc/editexp");
}
static void initHistory() {