Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!pyrltd!mwuk!tony From: tony@mwuk.UUCP (Tony Mountifield) Newsgroups: comp.mail.mush Subject: Re: Changing the default mailbox for message saving Message-ID: <267@mwuk.UUCP> Date: 14 Feb 91 12:07:19 GMT References: <7871@chorus.fr> Organization: Microware Systems (UK) Ltd., Winchester, UK. Lines: 84 In article <7871@chorus.fr> mgu@chorus.fr (Marc Guillemont) writes: > > I am using mush (7.0.4 1/31/90). Upon saving a message ("s" in curses > mode), mush prompts for a default mailbox which is always the same (mbox). > Is there any means for setting this default mailbox to the last mailbox > used to save a message? Marc, I have found this problem. In fact, it is only the prompt which is always the same - the default if you hit RETURN is the contents of $mbox. My solution, which is not the same as your suggestion, was submitted to Dan Heller for consideration a month or two ago. (I hope he received it!). Anyway, here is a copy in case it is useful to you or anyone else on the net. --------------- I have a small patch to suggest for curses.h. I did it on V6.3, and also on V7.1.1. If it has not been done already, perhaps you could consider it for the next release. The change is regarding the filename prompt in curses-mode save, write and copy. Currently, it displays [mbox] as the default, but hitting return actually uses the filename in $mbox. I have altered it so the the contents of $mbox are displayed in the brackets. ---------------------------------------------------------------------------- diff -w -t -c -r -s MUSH7.orig/curses.c MUSH7/curses.c *** MUSH7.orig/curses.c Wed May 2 17:30:23 1990 --- MUSH7/curses.c Thu Jan 3 17:00:49 1991 *************** *** 407,412 **** --- 407,413 ---- */ when C_WRITE_MSG : case C_SAVE_MSG : case C_COPY_MSG : case C_WRITE_LIST : case C_SAVE_LIST : case C_COPY_LIST : { + register char *q; register char *p = (c == C_WRITE_MSG || c == C_WRITE_LIST)? "write" : (c == C_SAVE_MSG || c == C_SAVE_LIST)? "save" : "copy"; *************** *** 416,423 **** putchar('\n'); break; } ! print(sprintf(buf, "filename to %s%s: ", p, ! (c != C_WRITE_MSG && c != C_WRITE_LIST)? " [mbox]" : "")); if (Getstr(file, COLS-1-strlen(buf), 0) >= 0) { char *argv[3]; clr_bot_line(); --- 417,428 ---- putchar('\n'); break; } ! if (!(q=do_set(set_options, "mbox")) || !*q) ! q = DEF_MBOX; ! if (c != C_WRITE_MSG && c != C_WRITE_LIST) ! print(sprintf(buf, "filename to %s [%s]: ", p, q)); ! else ! print(sprintf(buf, "filename to %s: ", p)); if (Getstr(file, COLS-1-strlen(buf), 0) >= 0) { char *argv[3]; clr_bot_line(); ---------------------------------------------------------------------------- Regards, Tony. -- Tony Mountifield. | Microware Systems (UK) Ltd. MAIL: tony@mwuk.uucp | Leylands Farm, Nobs Crook, INET: tony%mwuk.uucp@ukc.ac.uk | Colden Common, WINCHESTER, SO21 1TH. UUCP: ...!mcsun!ukc!mwuk!tony | Tel: 0703 601990 Fax: 0703 601991 **** OS-9, OS-9000 Real Time Systems **** MS-DOS - just say "No!" **** -- Tony Mountifield. | Microware Systems (UK) Ltd. MAIL: tony@mwuk.uucp | Leylands Farm, Nobs Crook, INET: tony%mwuk.uucp@ukc.ac.uk | Colden Common, WINCHESTER, SO21 1TH. UUCP: ...!mcsun!ukc!mwuk!tony | Tel: 0703 601990 Fax: 0703 601991 **** OS-9, OS-9000 Real Time Systems **** MS-DOS - just say "No!" ****