rem: while(!done) { 
add: while(1) { 
context: function show_emailmenu(){	var cur=1;	/* There's nothing dynamic, so we can fiddle this here */	var emailmenu=new Emailmenu();	/* For consistency */	emailmenu.current=cur;	while(!done) {		var i;		var j;		var ret;		/* Nothing dynamic, so we don't need to save/restore nodraw */		ret=emailmenu.getval();		if(ret==KEY_RIGHT) {			if(emailmenu.items[emailmenu.current].text.substr(-2,2)==' >')				ret=emailmenu.items[emailmenu.current].retval;		}		email: switch(ret) {			case KEY_LEFT:				cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true);				main_left();				return;			case '\b':			case '\x7f':			case '\x1b':				cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true);				return;			case KEY_RIGHT:				cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true);				main_right();				return;			case 'S':				var typemenu=new Lightbar;				var width=30;				typemenu.xpos=emailmenu.xpos+emailmenu.items[0].text.length;				typemenu.ypos=emailmenu.current+1;				typemenu.lpadding="\xb3";				typemenu.rpadding="\xb3";				typemenu.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b";				typemenu.add(top_bar(width),undefined,undefined,"","");				typemenu.add('To |Sysop','S',width,undefined,undefined,user.compare_ars("REST S"));				typemenu.add('To |Local User','L',width,undefined,undefined,user.compare_ars("REST E"));				typemenu.add('To Local User with |Attachment','A',width,undefined,undefined,user.compare_ars("REST E"));				typemenu.add('To |Remote User','R',width,undefined,undefined,user.compare_ars("REST E OR REST M"));				typemenu.add('To Remote User with A|ttachment','T',width,undefined,undefined,user.compare_ars("REST E OR REST M"));				typemenu.add(bottom_bar(width),undefined,undefined,"","");				typemenu.timeout=100;				typemenu.callback=message_callback;				while(1) {					switch(typemenu.getval()) {						case 'S':							clear_screen();							bbs.email(1,WM_EMAIL,bbs.text(ReFeedback));							draw_main(true);							emailmenu.draw();							break;						case 'L':							clear_screen();							console.putmsg("\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w");							str=console.getstr("",40,K_UPRLWR);							if(str!=null && str!="") {								if(str=="Sysop")									str="1";								if(str.search(/\@/)!=-1)									bbs.netmail(str);								else {									i=bbs.finduser(str);									if(i>0)										bbs.email(i,WM_EMAIL);								}							}							draw_main(true);							emailmenu.draw();							break;						case 'A':							clear_screen();							console.putmsg("\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w");							str=console.getstr("",40,K_UPRLWR);							if(str!=null && str!="") {								i=bbs.finduser(str);								if(i>0)									bbs.email(i,WM_EMAIL|WM_FILE);							}							draw_main(true);							emailmenu.draw();							break;						case 'R':							clear_screen();							if(console.noyes("\r\nAttach a file"))								i=0;							else								i=WM_FILE;							console.putmsg(bbs.text(EnterNetMailAddress),P_SAVEATR);							str=console.getstr("",60,K_LINE);							if(str!=null && str !="")								bbs.netmail(str,i);							draw_main(true);							emailmenu.draw();							break;						case 'T':							clear_screen();							console.putmsg("\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w");							str=console.getstr("",40,K_UPRLWR);							if(str!=null && str!="")								bbs.netmail(str,WM_FILE);							draw_main(true);							emailmenu.draw();							break;						case KEY_RIGHT:							cleararea(emailmenu.xpos,emailmenu.ypos,emailmenu.items[0].text.length,emailmenu.items.length,true);							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							main_right();							return;						default:							cleararea(typemenu.xpos,typemenu.ypos,typemenu.items[0].text.length,typemenu.items.length,true);							emailmenu.nodraw=true;							break email;					}				}				break;			case 'R':				clear_screen();				bbs.read_mail(MAIL_YOUR);				console.pause();				draw_main(true);				break;			case 'M':				clear_screen();				bbs.read_mail(MAIL_SENT);				console.pause();				draw_main(true);				break;		}		cur=emailmenu.current;	}}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/70493357eaef9b883fc33977a03652d408e20d61/lbshell.js/buggy/lbshell.js