X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsysmsgs.c;h=70a46de99a846efe11543a0b50add0b8e2b64c22;hb=fb6f6fa4ec4e3277e30d84326d48e6850822d318;hp=879b851507f80210f8a0c5673eae63880fcf8742;hpb=20253aa51ce03b31709570523bf8be22bf737093;p=citadel.git diff --git a/webcit/sysmsgs.c b/webcit/sysmsgs.c index 879b85150..70a46de99 100644 --- a/webcit/sysmsgs.c +++ b/webcit/sysmsgs.c @@ -1,33 +1,38 @@ /* - * $Id$ + * Copyright (c) 1996-2012 by the citadel.org team + * + * This program is open source software. You can redistribute it and/or + * modify it under the terms of the GNU General Public License, version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ -/** - * \defgroup ShowSysMsgs Editing of various text files on the Citadel server. - * \ingroup WebcitDisplayItems - */ -/*@{*/ + #include "webcit.h" /** - * \brief display the form for editing something (room info, bio, etc) - * \param description the descriptive text for the box - * \param check_cmd command to check???? - * \param read_cmd read answer from citadel server??? - * \param save_cmd save comand to the citadel server?? - * \param with_room_banner should we bisplay a room banner? + * display the form for editing something (room info, bio, etc) + * description the descriptive text for the box + * check_cmd command to check???? + * read_cmd read answer from citadel server??? + * save_cmd save comand to the citadel server?? + * with_room_banner should we bisplay a room banner? */ void display_edit(char *description, char *check_cmd, char *read_cmd, char *save_cmd, int with_room_banner) { - char buf[SIZ]; + StrBuf *Line; serv_puts(check_cmd); - serv_getln(buf, sizeof buf); - - if (buf[0] != '2') { - safestrncpy(WC->ImportantMessage, &buf[4], sizeof WC->ImportantMessage); + Line = NewStrBuf(); + StrBuf_ServGetln(Line); + if (GetServerStatusMsg(Line, NULL, 1, 2) != 2) { + FreeStrBuf(&Line); display_main_menu(); + FreeStrBuf(&Line); return; } if (with_room_banner) { @@ -37,70 +42,87 @@ void display_edit(char *description, char *check_cmd, output_headers(1, 1, 0, 0, 0, 0); } - svprintf("BOXTITLE", WCS_STRING, _("Edit %s"), description); - do_template("beginbox"); + do_template("box_begin_1"); + StrBufAppendPrintf (WC->WBuf, _("Edit %s"), description); + do_template("box_begin_2"); - wprintf("
");
- wprintf(_("Enter %s below. Text is formatted to "
- "the reader's screen width. To defeat the "
- "formatting, indent a line at least one space."), description);
- wprintf("
");
+ wc_printf(_("Enter %s below. Text is formatted to the reader's browser."
+ " A newline is forced by preceding the next line by a blank."), description);
- wprintf("