1999-03-15 01:45:43 +00:00
|
|
|
|
--- pico/file.c.orig Sat Jan 30 03:59:32 1999
|
|
|
|
|
+++ pico/file.c Mon Feb 22 22:11:27 1999
|
1998-10-10 04:29:27 +00:00
|
|
|
|
@@ -63,17 +63,17 @@
|
|
|
|
|
return(s);
|
|
|
|
|
|
|
|
|
|
if(gmode&MDSCUR){
|
|
|
|
|
- emlwrite("File reading disabled in secure mode",NULL);
|
|
|
|
|
+ emlwrite("<22>w<EFBFBD><77><EFBFBD>Ҧ<EFBFBD><D2A6><EFBFBD><EFBFBD>w<EFBFBD><77><EFBFBD><EFBFBD>Ū<EFBFBD><C5AA><EFBFBD>ɮת<C9AE><D7AA>\\<5C><>",NULL);
|
|
|
|
|
return(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strlen(fname) == 0) {
|
|
|
|
|
- emlwrite("No file name entered",NULL);
|
|
|
|
|
+ emlwrite("<22>|<7C><><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD>ɮצW",NULL);
|
|
|
|
|
return(0);
|
|
|
|
|
}
|
|
|
|
|
|
1999-03-15 01:45:43 +00:00
|
|
|
|
if((gmode & MDTREE) && !in_oper_tree(fname)){
|
1998-10-10 04:29:27 +00:00
|
|
|
|
- emlwrite("Can't read file from outside of %s", opertree);
|
|
|
|
|
+ emlwrite("<22>L<EFBFBD>kŪ<6B><C5AA> %s <20>H<EFBFBD>~<7E><><EFBFBD>ɮ<EFBFBD>", opertree);
|
|
|
|
|
return(0);
|
|
|
|
|
}
|
|
|
|
|
|
1998-08-09 00:51:28 +00:00
|
|
|
|
@@ -137,13 +137,13 @@
|
|
|
|
|
|
|
|
|
|
menu_ins[last_menu].name = "^T";
|
|
|
|
|
menu_ins[last_menu].key = (CTRL|'T');
|
|
|
|
|
- menu_ins[last_menu].label = "To Files";
|
|
|
|
|
+ menu_ins[last_menu].label = "<22>ɮצC<D7A6><43>";
|
|
|
|
|
KS_OSDATASET(&menu_ins[last_menu], KS_NONE);
|
|
|
|
|
|
|
|
|
|
if(Pmaster && Pmaster->msgntext){
|
|
|
|
|
menu_ins[++last_menu].name = "^W";
|
|
|
|
|
menu_ins[last_menu].key = (CTRL|'W');
|
|
|
|
|
- menu_ins[last_menu].label = msg ? "InsertFile" : "InsertMsg";
|
|
|
|
|
+ menu_ins[last_menu].label = msg ? "<22><><EFBFBD>J<EFBFBD>ɮ<EFBFBD>" : "<22><><EFBFBD>J<EFBFBD>T<EFBFBD><54>";
|
|
|
|
|
KS_OSDATASET(&menu_ins[last_menu], KS_NONE);
|
|
|
|
|
}
|
1998-07-30 12:30:41 +00:00
|
|
|
|
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -159,44 +159,43 @@
|
1998-08-09 00:51:28 +00:00
|
|
|
|
if(gmode & MDCMPLT){
|
|
|
|
|
menu_ins[++last_menu].name = msg ? "" : "TAB";
|
|
|
|
|
menu_ins[last_menu].key = (CTRL|'I');
|
|
|
|
|
- menu_ins[last_menu].label = msg ? "" : "Complete";
|
|
|
|
|
+ menu_ins[last_menu].label = msg ? "" : "<22><><EFBFBD><EFBFBD>";
|
|
|
|
|
KS_OSDATASET(&menu_ins[last_menu], KS_NONE);
|
|
|
|
|
}
|
1998-07-30 12:30:41 +00:00
|
|
|
|
|
1998-08-09 00:51:28 +00:00
|
|
|
|
menu_ins[++last_menu].name = NULL;
|
1998-07-30 12:30:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
1998-08-09 00:51:28 +00:00
|
|
|
|
- sprintf(prompt, "%s to insert from %s %s: ",
|
|
|
|
|
- msg ? "Number of message" : "File",
|
|
|
|
|
+ sprintf(prompt, "<22><>%s%s<><73><EFBFBD>J<EFBFBD><4A>%s<>G",
|
1999-03-15 01:45:43 +00:00
|
|
|
|
(msg || (gmode&MDCURDIR))
|
|
|
|
|
- ? "current"
|
|
|
|
|
- : ((gmode & MDTREE) || opertree[0]) ? opertree : "home",
|
1998-08-09 00:51:28 +00:00
|
|
|
|
- msg ? "folder" : "directory");
|
1999-03-15 01:45:43 +00:00
|
|
|
|
+ ? "<22>ثe<D8AB><65>"
|
|
|
|
|
+ : ((gmode & MDTREE) || opertree[0]) ? opertree : "<22>a",
|
1998-08-09 00:51:28 +00:00
|
|
|
|
+ msg ? "<22>ɮקX" : "<22>ؿ<EFBFBD>", msg ? "<22>H<EFBFBD><48><EFBFBD>s<EFBFBD><73>" : "<22>ɮ<EFBFBD>");
|
1998-10-10 04:29:27 +00:00
|
|
|
|
s = mlreplyd(prompt, fname, NLINE, QDEFLT, msg ? NULL : menu_ins);
|
1998-08-09 00:51:28 +00:00
|
|
|
|
/* something to read and it was edited or the default accepted */
|
|
|
|
|
if(fname[0] && (s == TRUE || s == FALSE)){
|
|
|
|
|
bye++;
|
|
|
|
|
if(msg){
|
|
|
|
|
if((*Pmaster->msgntext)(atol(fname), insmsgchar))
|
|
|
|
|
- emlwrite("Message %s included", fname);
|
|
|
|
|
+ emlwrite("<22>H<EFBFBD><48> %s <20>w<EFBFBD>t<EFBFBD>J", fname);
|
1998-07-30 12:30:41 +00:00
|
|
|
|
}
|
1998-08-09 00:51:28 +00:00
|
|
|
|
else{
|
|
|
|
|
bye++;
|
1998-10-10 04:29:27 +00:00
|
|
|
|
if(gmode&MDSCUR){
|
|
|
|
|
- emlwrite("Can't insert file in restricted mode",NULL);
|
|
|
|
|
+ emlwrite("<22>b<EFBFBD><62><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6><EFBFBD><EFBFBD>L<EFBFBD>k<EFBFBD><6B><EFBFBD>J<EFBFBD>ɮ<EFBFBD>",NULL);
|
|
|
|
|
}
|
|
|
|
|
else{
|
1999-03-15 01:45:43 +00:00
|
|
|
|
if((gmode & MDTREE)
|
|
|
|
|
&& !compresspath(opertree, fname, NLINE)){
|
1998-10-10 04:29:27 +00:00
|
|
|
|
emlwrite(
|
|
|
|
|
- "Can't insert file from outside of %s: too many ..'s",
|
|
|
|
|
+ "<22>L<EFBFBD>k<EFBFBD>b %s <20>H<EFBFBD>~<7E><><EFBFBD>a<EFBFBD>贡<EFBFBD>J<EFBFBD>ɮסG<D7A1>Ӧh .. <20>F",
|
|
|
|
|
opertree);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
fixpath(fname, NLINE);
|
|
|
|
|
|
1999-03-15 01:45:43 +00:00
|
|
|
|
if((gmode & MDTREE) && !in_oper_tree(fname))
|
1998-10-10 04:29:27 +00:00
|
|
|
|
- emlwrite("Can't insert file from outside of %s",
|
|
|
|
|
+ emlwrite("<22>L<EFBFBD>k<EFBFBD>b %s <20>H<EFBFBD>~<7E><><EFBFBD>a<EFBFBD>贡<EFBFBD>J<EFBFBD>ɮ<EFBFBD>",
|
|
|
|
|
opertree);
|
|
|
|
|
else
|
|
|
|
|
retval = ifile(fname);
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -252,7 +251,7 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
break;
|
|
|
|
|
case (CTRL|'T'):
|
|
|
|
|
if(msg){
|
|
|
|
|
- emlwrite("Can't select messages yet!", NULL);
|
|
|
|
|
+ emlwrite("<22>ٵL<D9B5>k<EFBFBD><6B><EFBFBD>ܫH<DCAB><48><EFBFBD>I", NULL);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
if(*fname && isdir(fname, NULL, NULL))
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -267,7 +266,7 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
if((s = FileBrowse(dir, NLINE, fname, NLINE,
|
|
|
|
|
NULL, FB_READ)) == 1){
|
|
|
|
|
if(gmode&MDSCUR){
|
|
|
|
|
- emlwrite("Can't insert in restricted mode",
|
|
|
|
|
+ emlwrite("<22>b<EFBFBD><62><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6><EFBFBD><EFBFBD>L<EFBFBD>k<EFBFBD><6B><EFBFBD>J",
|
|
|
|
|
NULL);
|
|
|
|
|
sleep(2);
|
|
|
|
|
}
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -308,7 +307,7 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
|
|
|
|
|
if(gmode&MDSCUR){
|
|
|
|
|
emlwrite(
|
|
|
|
|
- "\007Restricted mode disallows uploaded command",
|
|
|
|
|
+ "\007<30><37><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD><D2A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\\<5C>W<EFBFBD><57>",
|
|
|
|
|
NULL);
|
|
|
|
|
return(0);
|
|
|
|
|
}
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -408,20 +407,20 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
strcpy(curbp->b_fname, fname);
|
1999-03-15 01:45:43 +00:00
|
|
|
|
if ((s=ffropen(fname)) != FIOSUC){ /* Hard file open. */
|
1998-10-10 04:29:27 +00:00
|
|
|
|
if(s == FIOFNF) /* File not found. */
|
|
|
|
|
- emlwrite("New file", NULL);
|
|
|
|
|
+ emlwrite("<22>s<EFBFBD><73>", NULL);
|
|
|
|
|
else
|
|
|
|
|
fioperr(s, fname);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
- emlwrite("Reading file", NULL);
|
|
|
|
|
+ emlwrite("Ū<><C5AA><EFBFBD>ɮ<EFBFBD>", NULL);
|
|
|
|
|
nline = 0L;
|
|
|
|
|
done = newline = 0;
|
|
|
|
|
while(!done)
|
1999-03-15 01:45:43 +00:00
|
|
|
|
if((s = ffgetline(line, NLINE, 1)) == FIOEOF){
|
|
|
|
|
curbp->b_flag &= ~(BFTEMP|BFCHG);
|
|
|
|
|
gotobob(FALSE, 1);
|
|
|
|
|
- sprintf(line,"Read %d line%s",
|
|
|
|
|
- nline, (nline > 1) ? "s" : "");
|
|
|
|
|
+ sprintf(line,"Ū<><C5AA><EFBFBD><EFBFBD> %d <20><>",
|
|
|
|
|
+ nline);
|
|
|
|
|
emlwrite(line, NULL);
|
|
|
|
|
break;
|
|
|
|
|
}
|
1998-10-10 04:29:27 +00:00
|
|
|
|
@@ -479,14 +478,14 @@
|
|
|
|
|
fname[0] = '\0';
|
|
|
|
|
|
|
|
|
|
menu_write[0].name = "^T";
|
|
|
|
|
- menu_write[0].label = "To Files";
|
|
|
|
|
+ menu_write[0].label = "<22>ɮצC<D7A6><43>";
|
|
|
|
|
menu_write[0].key = (CTRL|'T');
|
|
|
|
|
menu_write[1].name = "TAB";
|
|
|
|
|
- menu_write[1].label = "Complete";
|
|
|
|
|
+ menu_write[1].label = "<22><><EFBFBD><EFBFBD>";
|
|
|
|
|
menu_write[1].key = (CTRL|'I');
|
|
|
|
|
menu_write[2].name = NULL;
|
|
|
|
|
for(;!(gmode & MDTOOL);){
|
|
|
|
|
- s = mlreplyd("File Name to write : ", fname, NFILEN,
|
|
|
|
|
+ s = mlreplyd("<22><><EFBFBD>g<EFBFBD>J<EFBFBD><4A><EFBFBD>ɦW<C9A6>G", fname, NFILEN,
|
|
|
|
|
QDEFLT|QFFILE, menu_write);
|
|
|
|
|
|
|
|
|
|
switch(s){
|
|
|
|
|
@@ -497,7 +496,7 @@
|
|
|
|
|
}
|
|
|
|
|
case TRUE:
|
1999-03-15 01:45:43 +00:00
|
|
|
|
if((gmode & MDTREE) && !compresspath(opertree, fname, NFILEN)){
|
1998-10-10 04:29:27 +00:00
|
|
|
|
- emlwrite("Can't write outside of %s: too many ..'s",
|
|
|
|
|
+ emlwrite("<22>L<EFBFBD>k<EFBFBD>g<EFBFBD>J %s <20>H<EFBFBD>~<7E><><EFBFBD>ɮסG<D7A1>Ӧh .. <20>F",
|
|
|
|
|
opertree);
|
|
|
|
|
sleep(2);
|
|
|
|
|
continue;
|
|
|
|
|
@@ -505,7 +504,7 @@
|
|
|
|
|
else{
|
|
|
|
|
fixpath(fname, NFILEN); /* fixup ~ in file name */
|
1999-03-15 01:45:43 +00:00
|
|
|
|
if((gmode & MDTREE) && !in_oper_tree(fname)){
|
1998-10-10 04:29:27 +00:00
|
|
|
|
- emlwrite("Can't write outside of %s", opertree);
|
|
|
|
|
+ emlwrite("<22>L<EFBFBD>k<EFBFBD>g<EFBFBD>J %s <20>H<EFBFBD>~<7E><><EFBFBD>ɮ<EFBFBD>", opertree);
|
|
|
|
|
sleep(2);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -589,12 +588,12 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
strcpy(fname, shows);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
- emlwrite("Cannot write. File name too long!!",NULL);
|
|
|
|
|
+ emlwrite("<22>L<EFBFBD>k<EFBFBD>g<EFBFBD>J<EFBFBD>C<EFBFBD>ɦW<C9A6>L<EFBFBD><4C><EFBFBD>I",NULL);
|
|
|
|
|
sleep(3);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (s == -1){
|
|
|
|
|
- emlwrite("Cannot write. File name too long!!",NULL);
|
|
|
|
|
+ emlwrite("<22>L<EFBFBD>k<EFBFBD>g<EFBFBD>J<EFBFBD>C<EFBFBD>ɦW<C9A6>L<EFBFBD><4C><EFBFBD>I",NULL);
|
|
|
|
|
sleep(3);
|
|
|
|
|
}
|
|
|
|
|
refresh(FALSE, 1);
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -632,7 +631,7 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
return(ABORT);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
- emlwrite("Writing...", NULL);
|
|
|
|
|
+ emlwrite("<22><><EFBFBD>b<EFBFBD>g<EFBFBD>J...", NULL);
|
|
|
|
|
|
|
|
|
|
if ((s=writeout(fname, 0)) != -1) {
|
|
|
|
|
if(!(gmode&MDTOOL)){
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -649,9 +648,9 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(s > 1)
|
|
|
|
|
- emlwrite("Wrote %d lines", (void *)s);
|
|
|
|
|
+ emlwrite("<22>g<EFBFBD>J %d <20><>", (void *)s);
|
|
|
|
|
else
|
|
|
|
|
- emlwrite("Wrote 1 line", NULL);
|
|
|
|
|
+ emlwrite("<22>g<EFBFBD>J 1 <20><>", NULL);
|
|
|
|
|
}
|
|
|
|
|
return ((s == -1) ? FALSE : TRUE);
|
|
|
|
|
}
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -677,12 +676,12 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
if ((curbp->b_flag&BFCHG) == 0) /* Return, no changes. */
|
|
|
|
|
return (TRUE);
|
|
|
|
|
if (curbp->b_fname[0] == 0) { /* Must have a name. */
|
|
|
|
|
- emlwrite("No file name", NULL);
|
|
|
|
|
+ emlwrite("<22>S<EFBFBD><53><EFBFBD>ɦW", NULL);
|
|
|
|
|
sleep(2);
|
|
|
|
|
return (FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- emlwrite("Writing...", NULL);
|
|
|
|
|
+ emlwrite("<22><><EFBFBD>b<EFBFBD>g<EFBFBD>J...", NULL);
|
|
|
|
|
if ((s=writeout(curbp->b_fname, 0)) != -1) {
|
|
|
|
|
curbp->b_flag &= ~BFCHG;
|
|
|
|
|
wp = wheadp; /* Update mode lines. */
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -693,10 +692,10 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
wp = wp->w_wndp;
|
|
|
|
|
}
|
|
|
|
|
if(s > 1){
|
|
|
|
|
- emlwrite("Wrote %d lines", (void *)s);
|
|
|
|
|
+ emlwrite("<22>g<EFBFBD>J %d <20><>", (void *)s);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
- emlwrite("Wrote 1 line", NULL);
|
|
|
|
|
+ emlwrite("<22>g<EFBFBD>J 1 <20><>", NULL);
|
|
|
|
|
}
|
|
|
|
|
return (s);
|
|
|
|
|
}
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -815,7 +814,7 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
curbp->b_flag &= ~BFTEMP; /* and are not temporary*/
|
|
|
|
|
curbp->b_linecnt = -1; /* must be recalculated */
|
|
|
|
|
|
|
|
|
|
- emlwrite("Inserting %s.", fname);
|
|
|
|
|
+ emlwrite("<22><><EFBFBD>b<EFBFBD><62><EFBFBD>J %s<>C", fname);
|
|
|
|
|
done = newline = 0;
|
|
|
|
|
nline = 0L;
|
|
|
|
|
while(!done)
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -825,7 +824,7 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
else
|
|
|
|
|
forwchar(FALSE, 1);
|
|
|
|
|
|
|
|
|
|
- sprintf(line,"Inserted %d line%s", nline, (nline>1) ? "s" : "");
|
|
|
|
|
+ sprintf(line,"<22>w<EFBFBD><77><EFBFBD>J %d <20><>", nline);
|
|
|
|
|
emlwrite(line, NULL);
|
|
|
|
|
break;
|
|
|
|
|
}
|
1999-03-15 01:45:43 +00:00
|
|
|
|
@@ -913,7 +912,7 @@
|
1998-10-10 04:29:27 +00:00
|
|
|
|
strcat(fn, S_FILESEP);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
- emlwrite("File name too BIG!!",0);
|
|
|
|
|
+ emlwrite("<22>ɦW<C9A6>Ӥj<D3A4>F<EFBFBD>I<EFBFBD>I",0);
|
|
|
|
|
sleep(3);
|
|
|
|
|
*fn = '\0';
|
|
|
|
|
}
|