head	1.7;
access;
symbols
	RELEASE_4_2_0:1.6
	RELEASE_4_1_1:1.6
	RELEASE_4_1_0:1.6
	RELEASE_3_5_0:1.6
	RELEASE_4_0_0:1.6
	RELEASE_3_4_0:1.6
	RELEASE_3_3_0:1.5
	RELEASE_3_2_0:1.5
	RELEASE_3_1_0:1.5
	RELEASE_2_2_8:1.5
	RELEASE_3_0_0:1.5
	RELEASE_2_2_7:1.2
	RELEASE_2_2_6:1.1.1.1
	zh_pine_3_95:1.1.1.1
	WOJU:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2000.11.17.19.06.52;	author keith;	state dead;
branches;
next	1.6;

1.6
date	99.11.01.00.40.55;	author steve;	state Exp;
branches;
next	1.5;

1.5
date	98.10.10.04.29.21;	author steve;	state Exp;
branches;
next	1.4;

1.4
date	98.08.09.00.51.25;	author steve;	state Exp;
branches;
next	1.3;

1.3
date	98.07.30.12.30.38;	author vanilla;	state Exp;
branches;
next	1.2;

1.2
date	98.07.21.14.11.36;	author vanilla;	state Exp;
branches;
next	1.1;

1.1
date	97.12.01.19.47.23;	author vanilla;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	97.12.01.19.47.23;	author vanilla;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Upgrade from 4.21 to 4.30.

Especially thanks to the maintainer, Tai-hwa Liang (avatar), for
ending those long lasting evil +400k files/patch-*. :-)

According to kkenn, pine4's security will exist until it's totally
rewritten, so I'll leave pkg-install untouched, which shows the
security warning.
PR:		ports/22436
@
text
@--- pico/browse.c.orig	Sat Oct  2 07:21:05 1999
+++ pico/browse.c	Thu Oct 14 10:53:41 1999
@@@@ -126,12 +126,12 @@@@
 
 
 static	KEYMENU menu_browse[] = {
-    {"?", "Get Help", KS_SCREENHELP},	{NULL, NULL, KS_NONE},
-    {NULL, NULL, KS_NONE},		{"-", "Prev Pg", KS_PREVPAGE},
-    {"D", "Delete", KS_NONE},		{"C","Copy", KS_NONE},
+    {"?", "U", KS_SCREENHELP},	{NULL, NULL, KS_NONE},
+    {NULL, NULL, KS_NONE},		{"-", "W@@", KS_PREVPAGE},
+    {"D", "R", KS_NONE},		{"C","ƻs", KS_NONE},
     {NULL, NULL, KS_NONE},		{NULL, NULL, KS_NONE},
-    {"W", "Where is", KS_NONE},		{"Spc", "Next Pg", KS_NEXTPAGE},
-    {"R", "Rename", KS_NONE},		{NULL, NULL, KS_NONE}
+    {"W", "jM", KS_NONE},		{"Spc", "U@@", KS_NEXTPAGE},
+    {"R", "W", KS_NONE},		{NULL, NULL, KS_NONE}
 };
 #define	QUIT_KEY	1
 #define	EXEC_KEY	2
@@@@ -333,7 +333,7 @@@@
     child[0] = '\0';
 
     if((gmode&MDTREE) && !in_oper_tree(dir)){
-	emlwrite("\007Can't read outside of %s in restricted mode", opertree);
+	emlwrite("\007LkbҦŪ %s H~F", opertree);
 	sleep(2);
 	return(0);
     }
@@@@ -421,7 +421,7 @@@@
 	else{
 	    if(timeo && (c == NODATA || time_to_check()))
 	      if(pico_new_mail())
-		emlwrite("You may possibly have new mail.", NULL);
+		emlwrite("zi঳sHC", NULL);
 	}
 
 	if(km_popped)
@@@@ -697,7 +697,7 @@@@
 			gmp->current->fname);
 		/* make sure selected isn't a directory or executable */
 		if(!LikelyASCII(child)){
-		    emlwrite("Can't edit non-text file.  Try Launch.", NULL);
+		    emlwrite("LkŪDrɡCո \"Ұ\"C", NULL);
 		    break;
 		}
 
@@@@ -727,13 +727,13 @@@@
 		return(0);
 	    }
 
-	    emlwrite("\007Unknown command '%c'", (void *)c);
+	    emlwrite("\007RO '%c'", (void *)c);
 	    break;
 
 	  case 'l':			            /* run Command */
 	  case 'L':
 	    if(!(gmode&MDBRONLY)){
-		emlwrite("\007Unknown command '%c'", (void *)c);
+		emlwrite("\007RO '%c'", (void *)c);
 		break;
 	    }
 
@@@@ -750,11 +750,11 @@@@
 		    {NULL, NULL, 0, KS_NONE},
 		};
 
-		status = mlreply("Command to execute: ",
+		status = mlreply("檺ROG",
 				 tmp, NLINE, QNORML, opts);
 		switch(status){
 		  case HELPCH:
-		    emlwrite("\007No help yet!", NULL);
+		    emlwrite("\007|LU!", NULL);
 /* remove break and sleep after help text is installed */
 		    sleep(3);
 		    break;
@@@@ -765,7 +765,7 @@@@
 		    PaintBrowser(gmp, 0, &crow, &ccol);
 		    break;
 		  case ABORT:
-		    emlwrite("Command cancelled", NULL);
+		    emlwrite("ROw", NULL);
 		    i++;
 		    break;
 		  case FALSE:
@@@@ -773,7 +773,7 @@@@
 		    i++;
 
 		    if(tmp[0] == '\0'){
-			emlwrite("No command specified", NULL);
+			emlwrite("|UFRO", NULL);
 			break;
 		    }
 
@@@@ -792,12 +792,12 @@@@
 	  case 'D':
 	    if(gmp->current->mode == FIODIR){
 /* BUG: if dir is empty it should be deleted */
-		emlwrite("\007Can't delete a directory", NULL);
+		emlwrite("\007LkRӥؿ", NULL);
 		break;
 	    }
 
 	    if(gmode&MDSCUR){				/* not allowed! */
-		emlwrite("Delete not allowed in restricted mode",NULL);
+		emlwrite("LkbҦϥΧRO",NULL);
 		break;
 	    }
 
@@@@ -808,17 +808,17 @@@@
 	    while(i++ < 2){		/* verify twice!! */
 		if(i == 1){
 		    if(fexist(child, "w", (off_t *)NULL) != FIOSUC)
-		      strcpy(tmp, "File is write protected! OVERRIDE");
+		      strcpy(tmp, "ɮ׬g! nLgO@@");
 		    else
-		      sprintf(tmp, "Delete file \"%.*s\"", NLINE - 20, child);
+		      sprintf(tmp, "Rɮ \"%.*s\"", NLINE - 20, child);
 		}
 		else
-		  strcpy(tmp, "File CANNOT be UNdeleted!  Really delete");
+		  strcpy(tmp, "ɮױNLkQϧR! TwR");
 
 		if((status = mlyesno(tmp, FALSE)) != TRUE){
 		    emlwrite((status ==  ABORT)
-			       ? "Delete Cancelled"
-			       : "File Not Deleted",
+			       ? "R"
+			       : "ɮרSQR",
 			     NULL);
 		    break;
 		}
@@@@ -826,7 +826,7 @@@@
 
 	    if(status == TRUE){
 		if(unlink(child) < 0){
-		    emlwrite("Delete Failed: %s", errstr(errno));
+		    emlwrite("RѡG%s", errstr(errno));
 		}
 		else{			/* fix up pointers and redraw */
 		    tp = gmp->current;
@@@@ -903,12 +903,12 @@@@
  
 	    while(!i){
  
-		status = mlreply("Directory to go to: ", child, NLINE, QNORML,
+		status = mlreply("ܭ@@ӥؿG", child, NLINE, QNORML,
 				 NULL);
  
 		switch(status){
 		  case HELPCH:
-		    emlwrite("\007No help yet!", NULL);
+		    emlwrite("\007|LU!", NULL);
 		    /* remove break and sleep after help text is installed */
 		    sleep(3);
 		    break;
@@@@ -916,7 +916,7 @@@@
 		    PaintBrowser(gmp, 0, &crow, &ccol);
 		  break;
 		  case ABORT:
-		    emlwrite("Goto cancelled", NULL);
+		    emlwrite("ؿ", NULL);
 		    i++;
 		    break;
 		  case FALSE:
@@@@ -927,17 +927,17 @@@@
 		      strcpy(child, gethomedir(NULL));
  
 		    if(!compresspath(gmp->dname, child, NLINE)){
-			emlwrite("Invalid Directory: %s", child);
+			emlwrite("LĪؿG%s", child);
 			break;
 		    }
 
 		    if((gmode&MDSCUR) && homeless(child)){
-			emlwrite("Restricted mode browsing limited to home directory",NULL);
+			emlwrite("Ҧȯs home directory",NULL);
 			break;
 		    }
  
 		    if((gmode&MDTREE) && !in_oper_tree(child)){
-		      emlwrite("\007 Can't go outside of %s in restricted mode",
+		      emlwrite("\007 ҦLk} %s",
 			       opertree);
 			break;
 		    }
@@@@ -954,7 +954,7 @@@@
 			PaintBrowser(gmp, 0, &crow, &ccol);
 		    }
 		    else
-		      emlwrite("\007Not a directory: \"%s\"", child);
+		      emlwrite("\007\"%s\"O@@ӥؿ", child);
  
 		    break;
 		  default:
@@@@ -976,10 +976,10 @@@@
 
 	    while(!i){
 
-		switch(status=mlreply("Name of file to add: ", child, NLINE,
+		switch(status=mlreply("sWɦWG", child, NLINE,
 				      QFFILE, NULL)){
 		  case HELPCH:
-		    emlwrite("\007No help yet!", NULL);
+		    emlwrite("\007|LUI", NULL);
 /* remove break and sleep after help text is installed */
 		    sleep(3);
 		    break;
@@@@ -987,7 +987,7 @@@@
 		    PaintBrowser(gmp, 0, &crow, &ccol);
 		    break;
 		  case ABORT:
-		    emlwrite("Add File Cancelled", NULL);
+		    emlwrite("sWɮ", NULL);
 		    i++;
 		    break;
 		  case FALSE:
@@@@ -998,23 +998,23 @@@@
 		    i++;
 
 		    if(child[0] == '\0'){
-			emlwrite("No file named.  Add Cancelled.", NULL);
+			emlwrite("wɦWAsWɮסC", NULL);
 			break;
 		    }
 
 		    if(!compresspath(gmp->dname, child, NLINE)){
-			emlwrite("Too many ..'s in name", NULL);
+			emlwrite("ɦWӦh .. F", NULL);
 			break;
 		    }
 
 		    if((gmode&MDTREE) && !in_oper_tree(child)){
-		       emlwrite("\007Restricted mode allows Add in %s only",
+		       emlwrite("\007ҦȤ\\b %s sWɮ",
 				opertree);
 			break;
 		    }
 
 		    if((status = fexist(child, "w", (off_t *)NULL)) == FIOSUC){
-			sprintf(tmp,"File \"%.*s\" already exists!",
+			sprintf(tmp,"ɮ \"%.*s\" wsbI",
 				NLINE - 20, child);
 			emlwrite(tmp, NULL);
 			break;
@@@@ -1030,7 +1030,7 @@@@
 		    }
 		    else{			/* highlight new file */
 			ffclose();
-			emlwrite("Added File \"%s\"", child);
+			emlwrite("sWɮ \"%s\"", child);
 
 			if((p = strrchr(child, C_FILESEP)) == NULL){
 			    emlwrite("Problems refiguring browser", NULL);
@@@@ -1078,12 +1078,12 @@@@
 	  case 'c':					/* copy */
 	  case 'C':
 	    if(gmp->current->mode == FIODIR){
-		emlwrite("\007Can't copy a directory", NULL);
+		emlwrite("\007Lkƻsؿ", NULL);
 		break;
 	    }
 
 	    if(gmode&MDSCUR){				/* not allowed! */
-		emlwrite("Copy not allowed in restricted mode",NULL);
+		emlwrite("LkbҦƻsɮ",NULL);
 		break;
 	    }
 
@@@@ -1092,10 +1092,10 @@@@
 
 	    while(!i){
 
-		switch(status=mlreply("Name of new copy: ", child, NLINE,
+		switch(status=mlreply("sƻsɦWG", child, NLINE,
 				      QFFILE, NULL)){
 		  case HELPCH:
-		    emlwrite("\007No help yet!", NULL);
+		    emlwrite("\007|LU!", NULL);
 /* remove break and sleep after help text is installed */
 		    sleep(3);
 		    break;
@@@@ -1103,7 +1103,7 @@@@
 		    PaintBrowser(gmp, 0, &crow, &ccol);
 		    break;
 		  case ABORT:
-		    emlwrite("Make Copy Cancelled", NULL);
+		    emlwrite("ƻsɮ", NULL);
 		    i++;
 		    break;
 		  case FALSE:
@@@@ -1114,33 +1114,33 @@@@
 		    i++;
 
 		    if(child[0] == '\0'){
-			emlwrite("No destination, file not copied", NULL);
+			emlwrite("wئaɦWAɮרSQƻsC", NULL);
 			break;
 		    }
 
 		    if(!strcmp(gmp->current->fname, child)){
-			emlwrite("\007Can't copy file on to itself!", NULL);
+			emlwrite("\007LkNɮ׽ƻsܥۤv!", NULL);
 			break;
 		    }
 
 		    if(!compresspath(gmp->dname, child, NLINE)){
-			emlwrite("Too many ..'s in name", NULL);
+			emlwrite("ɦWӦh .. F", NULL);
 			break;
 		    }
 
 		    if((gmode&MDTREE) && !in_oper_tree(child)){
-		       emlwrite("\007Restricted mode allows Copy in %s only",
+		       emlwrite("\007ҦȤ\\b %s ƻsɮ",
 				opertree);
 			break;
 		    }
 
 		    if((status = fexist(child, "w", (off_t *)NULL)) == FIOSUC){
-			sprintf(tmp,"File \"%.*s\" exists! OVERWRITE",
+			sprintf(tmp,"ɮ \"%.*s\" wsb! nл\\",
 				NLINE - 20, child);
 			if((status = mlyesno(tmp, 0)) != TRUE){
 			    emlwrite((status == ABORT)
-				      ? "Make copy cancelled" 
-				      : "File Not Renamed",
+				      ? "ƻs" 
+				      : "ɮרSQƻs",
 				     NULL);
 			    break;
 			}
@@@@ -1158,7 +1158,7 @@@@
 			break;
 		    }
 		    else{			/* highlight new file */
-			emlwrite("File copied to %s", child);
+			emlwrite("ƻsɮר %s", child);
 
 			if((p = strrchr(child, C_FILESEP)) == NULL){
 			    emlwrite("Problems refiguring browser", NULL);
@@@@ -1201,12 +1201,12 @@@@
 	    i = 0;
 
 	    if(!strcmp(gmp->current->fname, "..")){
-		emlwrite("\007Can't rename \"..\"", NULL);
+		emlwrite("\007Lk \"..\" W", NULL);
 		break;
 	    }
 
 	    if(gmode&MDSCUR){				/* not allowed! */
-		emlwrite("Rename not allowed in restricted mode",NULL);
+		emlwrite("LkbҦɮצW",NULL);
 		break;
 	    }
 
@@@@ -1214,10 +1214,10 @@@@
 
 	    while(!i){
 
-		switch(status=mlreply("Rename file to: ", child, NLINE, QFFILE,
+		switch(status=mlreply("ɮצW٧אּG", child, NLINE, QFFILE,
 				      NULL)){
 		  case HELPCH:
-		    emlwrite("\007No help yet!", NULL);
+		    emlwrite("\007|LU!", NULL);
 /* remove break and sleep after help text is installed */
 		    sleep(3);
 		    break;
@@@@ -1225,7 +1225,7 @@@@
 		    PaintBrowser(gmp, 0, &crow, &ccol);
 		    break;
 		  case ABORT:
-		    emlwrite("Rename cancelled", NULL);
+		    emlwrite("ɮצW", NULL);
 		    i++;
 		    break;
 		  case FALSE:
@@@@ -1238,12 +1238,12 @@@@
 		    }
 
 		    if(!compresspath(gmp->dname, child, NLINE)){
-			emlwrite("Too many ..'s in name", NULL);
+			emlwrite("ɦWӦh .. F", NULL);
 			break;
 		    }
 
 		    if((gmode&MDTREE) && !in_oper_tree(child)){
-		       emlwrite("\007Restricted mode allows Rename in %s only",
+		       emlwrite("\007ҦȤ\\b %s ɦW",
 				opertree);
 			break;
 		    }
@@@@ -1251,13 +1251,13 @@@@
 		    status = fexist(child, "w", (off_t *)NULL);
 		    if(status == FIOSUC || status == FIOFNF){
 			if(status == FIOSUC){
-			    sprintf(tmp,"File \"%.*s\" exists! OVERWRITE",
+			    sprintf(tmp,"ɮ \"%.*s\" wsb! nл\\",
 				    NLINE - 20, child);
 
 			    if((status = mlyesno(tmp, FALSE)) != TRUE){
 				emlwrite((status ==  ABORT)
-					  ? "Rename cancelled"
-					  : "Not Renamed",
+					  ? "W"
+					  : "ɮרSQW",
 					 NULL);
 				break;
 			    }
@@@@ -1267,7 +1267,7 @@@@
 				gmp->current->fname);
 
 			if(rename(tmp, child) < 0){
-			    emlwrite("Rename Failed: %s", errstr(errno));
+			    emlwrite("WѡG%s", errstr(errno));
 			}
 			else{
 			    if((p = strrchr(child, C_FILESEP)) == NULL){
@@@@ -1326,7 +1326,7 @@@@
 
 			if((gmode&MDTREE) && !in_oper_tree(tmp)){
 			    emlwrite(
-				   "\007Can't visit parent in restricted mode",
+				   "\007LkbҦ˵Whؿ",
 				   NULL);
 			    break;
 			}
@@@@ -1347,7 +1347,7 @@@@
 			        strcpy(tmp, S_FILESEP);
 #endif
 			      else{
-				  emlwrite("\007Can't move up a directory",
+				  emlwrite("\007LkܤW@@hؿ",
 					   NULL);
 				  break;
 			      }
@@@@ -1374,12 +1374,12 @@@@
 			PlaceCell(gmp, gmp->current, &row, &col);
 		    }
 		    else
-		      emlwrite("\007Problem finding dir \"%s\"",child);
+		      emlwrite("\007jMؿ \"%s\" ɥXFD",child);
 		}
 
 		PaintBrowser(gmp, 0, &crow, &ccol);
 		if(!*child)
-		  emlwrite("Select/View \".. parent dir\" to return to previous directory.",
+		  emlwrite("H []/[˵] \".. parent dir\" ^e@@ӥؿC",
 			   NULL);
 
 		break;
@@@@ -1425,7 +1425,7 @@@@
 
 		switch(readpattern("File name to find", FALSE)){
 		  case HELPCH:
-		    emlwrite("\007No help yet!", NULL);
+		    emlwrite("\007|LU!", NULL);
 /* remove break and sleep after help text is installed */
 		    sleep(3);
 		    break;
@@@@ -1456,10 +1456,10 @@@@
 			}
 			while(tp->next);
 
-			emlwrite("Searched to end of directory", NULL);
+			emlwrite("jMܥؿ", NULL);
 		    }
 		    else
-		      emlwrite("Searched to start of directory", NULL);
+		      emlwrite("jMܥؿ_l", NULL);
 
 		    if(tp){
 			PlaceCell(gmp, gmp->current, &row, &col);
@@@@ -1478,7 +1478,7 @@@@
 		    i++;			/* make sure we jump out */
 		    break;
 		  case ABORT:
-		    emlwrite("Whereis cancelled", NULL);
+		    emlwrite("jM", NULL);
 		    i++;
 		    break;
 		  case FALSE:
@@@@ -1502,7 +1502,7 @@@@
 			mlerase();
 		    }
 		    else
-		      emlwrite("\"%s\" not found", pat);
+		      emlwrite("䤣 \"%s\"", pat);
 
 		    i++;
 		    break;
@@@@ -1524,11 +1524,11 @@@@
 	  default:				/* what? */
 	  Default:
 	    if(c < 0xff)
-	      emlwrite("\007Unknown command: '%c'", (void *) c);
+	      emlwrite("\007ROG'%c'", (void *) c);
 	    else if(c & CTRL)
-	      emlwrite("\007Unknown command: ^%c", (void *)(c&0xff));
+	      emlwrite("\007ROG^%c", (void *)(c&0xff));
 	    else
-	      emlwrite("\007Unknown command", NULL);
+	      emlwrite("\007RO", NULL);
 	  case NODATA:				/* no op */
 	    break;
 	}
@@@@ -1560,7 +1560,7 @@@@
 
     errbuf[0] = '\0';
     if((mp=(struct bmaster *)malloc(sizeof(struct bmaster))) == NULL){
-	emlwrite("\007Can't malloc space for master filename cell", NULL);
+	emlwrite("\007LktmOŶ master filename cell", NULL);
 	return(NULL);
     }
 
@@@@ -1584,7 +1584,7 @@@@
     mp->cpf = mp->fpl = 0;
     mp->longest = 5;				/* .. must be labeled! */
 
-    emlwrite("Building file list of %s...", mp->dname);
+    emlwrite("bإ %s ɮצC...", mp->dname);
 
     if((mp->names = getfnames(mp->dname, NULL, &nentries, errbuf)) == NULL){
 	free((char *) mp);
@@@@ -1603,7 +1603,7 @@@@
      * easily be made a user option later on...
      */
     if((filtnames=(char **)malloc((nentries+1) * sizeof(char *))) == NULL){
-	emlwrite("\007Can't malloc space for name array", NULL);
+	emlwrite("\007LktmOŶ name array", NULL);
 	zotmaster(&mp);
 	return(NULL);
     }
@@@@ -1654,7 +1654,7 @@@@
     while(nentries--){				/* stat filtered files */
 	/* get a new cell */
 	if((ncp=(struct fcell *)malloc(sizeof(struct fcell))) == NULL){
-	    emlwrite("\007Can't malloc cells for browser!", NULL);
+	    emlwrite("\007LktmOŶ browser!", NULL);
 	    zotfcells(mp->head);		/* clean up cells */
 	    free((char *) filtnames);
 	    free((char *) mp);
@@@@ -1840,22 +1840,22 @@@@
 BrowserKeys()
 {
     menu_browse[QUIT_KEY].name  = (gmode&MDBRONLY) ? "Q" : "E";
-    menu_browse[QUIT_KEY].label = (gmode&MDBRONLY) ? "Quit" : "Exit Brwsr";
+    menu_browse[QUIT_KEY].label = (gmode&MDBRONLY) ? "}" : "}s";
     menu_browse[GOTO_KEY].name  = (gmode&MDGOTO) ? "G" : NULL;
-    menu_browse[GOTO_KEY].label = (gmode&MDGOTO) ? "Goto" : NULL;
+    menu_browse[GOTO_KEY].label = (gmode&MDGOTO) ? "" : NULL;
     if(gmode & MDBRONLY){
 	menu_browse[EXEC_KEY].name  = "L";
-	menu_browse[EXEC_KEY].label = "Launch";
+	menu_browse[EXEC_KEY].label = "Ұ";
 	menu_browse[SELECT_KEY].name  = "V";
-	menu_browse[SELECT_KEY].label = "[View]";
+	menu_browse[SELECT_KEY].label = "[˵]";
 	menu_browse[PICO_KEY].name  = "E";
-	menu_browse[PICO_KEY].label = "Edit";
+	menu_browse[PICO_KEY].label = "s";
     }
     else{
 	menu_browse[SELECT_KEY].name  = "S";
-	menu_browse[SELECT_KEY].label = "[Select]";
+	menu_browse[SELECT_KEY].label = "[]";
 	menu_browse[PICO_KEY].name  = "A";
-	menu_browse[PICO_KEY].label = "Add";
+	menu_browse[PICO_KEY].label = "sW";
     }
 
     wkeyhelp(menu_browse);
@@@@ -1958,7 +1958,7 @@@@
 
 	if((tp = tp->next) == NULL){		/* above top? */
 	    if(secondtry++){
-		emlwrite("\007Internal error: can't find fname cell", NULL);
+		emlwrite("\007~G 䤣 fname cell", NULL);
 		return(-1);
 	    }
 	    else{
@@@@ -2124,10 +2124,10 @@@@
 	if(!p)					/* no suitable length! */
 	  p = &dir[l-(term.t_ncol-i-19)];
 
-	sprintf(buf, "%s Dir ...%s", (gmode&MDBRONLY) ? "" : " BROWSER  ", p);
+	sprintf(buf, "%s ؿ ...%s", (gmode&MDBRONLY) ? "" : " BROWSER  ", p);
     }
     else 
-      sprintf(buf,"%s  Dir: %s", (gmode&MDBRONLY) ? "" : " BROWSER  ", dir);
+      sprintf(buf,"%s  ؿG %s", (gmode&MDBRONLY) ? "" : " BROWSER  ", dir);
 
     if(i < j)					/* keep it centered */
       j = j - i;				/* as long as we can */
@@@@ -2256,18 +2256,18 @@@@
 	      if((line = (buf[i] == '\n') ? 0 : line + 1) >= LA_LINE_LIMIT
 		 || !buf[i]){
 		  rv = FALSE;
-		  emlwrite("Can't display non-text file.  Try \"Launch\".",
+		  emlwrite("LkܫDrɡCո \"Ұ\"C",
 			   NULL);
 		  break;
 	      }
 	}
 	else
-	  emlwrite("Can't read file: %s", file);
+	  emlwrite("LkŪɮסG%s", file);
 
 	fclose(fp);
     }
     else
-      emlwrite("Can't open file: %s", file);
+      emlwrite("Lk}ɮסG%s", file);
 
     return(rv);
 }
@


1.6
log
@Update to version 4.20.

PR:		14575
Submitted by:	maintainer
@
text
@@


1.5
log
@Update to version 4.05.

PR:		8025
Submitted by:	maintainer
@
text
@d1 2
a2 2
--- pico/browse.c.orig	Wed Sep 16 08:19:17 1998
+++ pico/browse.c	Tue Sep 22 17:29:07 1998
d456 1
a456 1
 		switch(readpattern("File name to find")){
@


1.4
log
@Cleanups from maintainer.

PR:		7468
Submitted by:	maintainer
@
text
@d1 2
a2 2
--- pico/browse.c.orig	Sat Jul 11 06:41:25 1998
+++ pico/browse.c	Tue Aug  4 12:42:13 1998
d21 1
a21 1
@@@@ -331,7 +331,7 @@@@
d30 1
a30 1
@@@@ -419,7 +419,7 @@@@
d39 1
a39 1
@@@@ -695,7 +695,7 @@@@
d48 1
a48 1
@@@@ -725,13 +725,13 @@@@
d64 1
a64 1
@@@@ -748,11 +748,11 @@@@
d78 1
a78 1
@@@@ -763,7 +763,7 @@@@
d87 1
a87 1
@@@@ -771,7 +771,7 @@@@
d96 1
a96 1
@@@@ -790,12 +790,12 @@@@
d111 1
a111 1
@@@@ -806,17 +806,17 @@@@
d134 1
a134 1
@@@@ -824,7 +824,7 @@@@
d143 1
a143 1
@@@@ -893,12 +893,12 @@@@
d158 1
a158 1
@@@@ -906,7 +906,7 @@@@
d167 1
a167 1
@@@@ -917,17 +917,17 @@@@
d183 3
a185 2
-			emlwrite("Attempt to Goto directory denied", NULL);
+			emlwrite("wڵϥΪ̤ؿШD", NULL);
d188 1
a188 2
  
@@@@ -943,7 +943,7 @@@@
d197 1
a197 10
@@@@ -956,7 +956,7 @@@@
 	  case 'a':					/* Add */
 	  case 'A':
 	    if(gmode&MDSCUR){				/* not allowed! */
-		emlwrite("Copy not allowed in restricted mode",NULL);
+		emlwrite("LkbҦsWɮ",NULL);
 		break;
 	    }
 
@@@@ -965,10 +965,10 @@@@
d206 1
a206 1
+		    emlwrite("\007|LU!", NULL);
d210 1
a210 1
@@@@ -976,7 +976,7 @@@@
d219 1
a219 1
@@@@ -987,7 +987,7 @@@@
d228 12
a239 2
@@@@ -995,7 +995,7 @@@@
 		    sprintf(child, "%s%c%s", gmp->dname, C_FILESEP, tmp);
d243 1
a243 1
+			sprintf(tmp,"ɮ \"%.*s\" wsb!",
d247 1
a247 1
@@@@ -1011,7 +1011,7 @@@@
d256 1
a256 1
@@@@ -1059,12 +1059,12 @@@@
d271 1
a271 1
@@@@ -1073,10 +1073,10 @@@@
d284 1
a284 1
@@@@ -1084,7 +1084,7 @@@@
d293 1
a293 1
@@@@ -1095,12 +1095,12 @@@@
d308 12
a319 2
@@@@ -1108,12 +1108,12 @@@@
 		    sprintf(child, "%s%c%s", gmp->dname, C_FILESEP, tmp);
d334 1
a334 1
@@@@ -1131,7 +1131,7 @@@@
d343 1
a343 1
@@@@ -1174,12 +1174,12 @@@@
d358 1
a358 1
@@@@ -1187,10 +1187,10 @@@@
d371 1
a371 1
@@@@ -1198,7 +1198,7 @@@@
d380 16
a395 1
@@@@ -1216,13 +1216,13 @@@@
d412 1
a412 1
@@@@ -1232,7 +1232,7 @@@@
d421 1
a421 1
@@@@ -1291,7 +1291,7 @@@@
d430 1
a430 1
@@@@ -1312,7 +1312,7 @@@@
d439 1
a439 1
@@@@ -1339,12 +1339,12 @@@@
d454 1
a454 1
@@@@ -1383,7 +1383,7 @@@@
d463 1
a463 1
@@@@ -1414,10 +1414,10 @@@@
d476 1
a476 1
@@@@ -1436,7 +1436,7 @@@@
d485 1
a485 1
@@@@ -1460,7 +1460,7 @@@@
d494 1
a494 1
@@@@ -1482,11 +1482,11 @@@@
d509 1
a509 1
@@@@ -1516,7 +1516,7 @@@@
d518 1
a518 1
@@@@ -1540,7 +1540,7 @@@@
d527 1
a527 1
@@@@ -1559,7 +1559,7 @@@@
d536 1
a536 1
@@@@ -1610,7 +1610,7 @@@@
d545 1
a545 1
@@@@ -1780,22 +1780,22 @@@@
d575 1
a575 1
@@@@ -1898,7 +1898,7 @@@@
d584 1
a584 1
@@@@ -2064,10 +2064,10 @@@@
d597 1
a597 1
@@@@ -2196,18 +2196,18 @@@@
@


1.3
log
@Upgrade to 4.02,
Submitted by:	maintainer
@
text
@d1 17
a17 18
--- pico/composer.c.orig	Fri Jul  3 07:00:40 1998
+++ pico/composer.c	Tue Jul 28 08:34:59 1998
@@@@ -136,12 +136,12 @@@@
 
 
 static KEYMENU menu_header[] = {
-    {"^G", "Get Help", KS_SCREENHELP},	{"^X", "Send", KS_SEND},
-    {"^R", "Rich Hdr", KS_RICHHDR},	{"^Y", "PrvPg/Top", KS_PREVPAGE},
-    {"^K", "Cut Line", KS_CURPOSITION},	{"^O", "Postpone", KS_POSTPONE},
-    {"^C", "Cancel", KS_CANCEL},	{"^D", "Del Char", KS_NONE},
-    {"^J", "Attach", KS_ATTACH},	{"^V", "NxtPg/End", KS_NEXTPAGE},
-    {"^U", "UnDel Line", KS_NONE},	{NULL, NULL}
+    {"^G", "U", KS_SCREENHELP},	{"^X", "eX", KS_SEND},
+    {"^R", "Y", KS_RICHHDR},	{"^Y", "W@@", KS_PREVPAGE},
+    {"^K", "ŤU@@", KS_CURPOSITION},	{"^O", "ȽwgH", KS_POSTPONE},
+    {"^C", "", KS_CANCEL},	{"^D", "Rr", KS_NONE},
+    {"^J", "", KS_ATTACH},	{"^V", "U@@", KS_NEXTPAGE},
+    {"^U", "_R", KS_NONE},	{NULL, NULL}
d19 10
a28 18
 #define	SEND_KEY	1
 #define	RICH_KEY	2
@@@@ -231,7 +231,7 @@@@
 		     if(strlen(addrbuf) + strlen(buf) >= addrbuflen){
 			 addrbuflen += NLINE * 4;
 			 if(!(addrbuf = (char *)realloc(addrbuf, addrbuflen))){
-			     emlwrite("\007Can't realloc addrbuf to %d bytes",
+			     emlwrite("\007Lk addrbuf Otm %d bytes",
 				      (void *) addrbuflen);
 			     return(ABORT);
 			 }
@@@@ -298,7 +298,7 @@@@
      * get first chunk of memory, and tie it to structure...
      */
     if((curline = HALLOC()) == NULL){
-        emlwrite("Unable to make room for full Header.", NULL);
+        emlwrite("LktmŶYC", NULL);
         return(FALSE);
d30 20
a49 2
     longest = term.t_ncol - e->prlen - 1;
@@@@ -680,7 +680,7 @@@@
d51 11
a61 4
 	    else{
 		(*term.t_beep)();
-		emlwrite("Unknown Command: ^Z", NULL);
+		emlwrite("ROG^Z", NULL);
a62 1
 	    break;
d64 30
a93 21
@@@@ -693,12 +693,12 @@@@
 	    err = NULL;
 	    if(headents[ods.cur_e].is_attach){
 		if(SyncAttach() < 0){
-		    if(mlyesno("Problem with attachments. Postpone anyway?",
+		    if(mlyesno("󦳰DCLצp󳣭nȽwӫHܡH",
 			       FALSE) != TRUE){
 			if(FormatLines(headents[ods.cur_e].hd_text, "",
 				       term.t_ncol - headents[ods.cur_e].prlen,
 				       headents[ods.cur_e].break_on_comma, 0) == -1)
-			  emlwrite("\007Format lines failed!", NULL);
+			  emlwrite("\007z!", NULL);
 			UpdateHeader();
 			PaintHeader(COMPOSER_TOP_LINE, FALSE);
 			PaintBody(1);
@@@@ -952,7 +952,7 @@@@
 		    if(FormatLines(headents[ods.cur_e].hd_text, buf,
 				   term.t_ncol - headents[ods.cur_e].prlen,
 				   headents[ods.cur_e].break_on_comma,0)==-1){
-			emlwrite("\007Format lines failed!", NULL);
+			emlwrite("\007z!", NULL);
d96 7
a102 48
 		    UpdateHeader();
@@@@ -1011,7 +1011,7 @@@@
                         if(FormatLines(ods.cur_l, bufp,
 				      (term.t_ncol-headents[ods.cur_e].prlen), 
                                       headents[ods.cur_e].break_on_comma, 0) == -1){
-                            emlwrite("Problem adding address to header !",
+                            emlwrite("bY[Ja}ɥXFD!",
                                      NULL);
                             (*term.t_beep)();
                             break;
@@@@ -1092,10 +1092,10 @@@@
 	  default :				/* huh? */
 bleep:
 	    if(ch&CTRL)
-	      emlwrite("\007Unknown command: ^%c", (void *)(ch&0xff));
+	      emlwrite("\007ROG^%c", (void *)(ch&0xff));
 	    else
 	  case BADESC:
-	      emlwrite("\007Unknown command", NULL);
+	      emlwrite("\007RO", NULL);
 
 	  case NODATA:
 	    break;
@@@@ -1135,14 +1135,14 @@@@
 	if(gripe){
 	    char xx[81];
 
-	    strcpy(xx, "Can't move down. Use ^X to ");
+	    strcpy(xx, "LkAUFCХ ^X ");
 	    strcat(xx, (Pmaster && Pmaster->exit_label)
 			    ? Pmaster->exit_label
 			    : (gmode & MDHDRONLY)
-			      ? "eXit/Save"
+			      ? "}/eX"
 			      : (gmode & MDVIEW)
-				? "eXit"
-				: "Send");
+				? "}"
+				: "eX");
 	    strcat(xx, ".");
 	    emlwrite(xx, NULL);
 	}
@@@@ -1177,7 +1177,7 @@@@
 		if(FormatLines(headents[ods.cur_e].hd_text, "",
 			       term.t_ncol-headents[new_e].prlen,
 			       headents[ods.cur_e].break_on_comma, 0) == -1)
-		  emlwrite("\007Format lines failed!", NULL);
+		  emlwrite("\007z!", NULL);
a103 10
 	} else if(headents[ods.cur_e].builder) { /* expand addresses	    */
 	    int mangled = 0;
@@@@ -1248,8 +1248,8 @@@@
     if(!(new_l = prev_sel_hline(&new_e, ods.cur_l))){	/* all the way up! */
 	ods.p_line = COMPOSER_TOP_LINE;
 	if(gripe)
-	  emlwrite("Can't move beyond top of %s",
-	      (Pmaster->pine_flags & MDHDRONLY) ? "entry" : "header");
+	  emlwrite("LkWX%s",
+	      (Pmaster->pine_flags & MDHDRONLY) ? "" : "Y");
d105 4
a108 8
 	return(0);
     }
@@@@ -1278,7 +1278,7 @@@@
 		if(FormatLines(headents[ods.cur_e].hd_text, "",
 			       term.t_ncol - headents[ods.cur_e].prlen,
 			       headents[ods.cur_e].break_on_comma,0) == -1)
-		  emlwrite("\007Format lines failed!", NULL);
+		  emlwrite("\007z!", NULL);
a109 34
 	}
 	else if(headents[ods.cur_e].builder){
@@@@ -1357,7 +1357,7 @@@@
 	    lp = lp->next;
 	}
 	else{
-	    emlwrite("\007Can't allocate line for new attachment!", NULL);
+	    emlwrite("\007LkstmŶ!", NULL);
 	    return(0);
 	}
     }
@@@@ -1371,12 +1371,12 @@@@
     /* validate the new attachment, and reformat if needed */
     if(status = SyncAttach()){
 	if(status < 0)
-	  emlwrite("\007Problem attaching: %s", fn);
+	  emlwrite("\007DG%s", fn);
 
 	if(FormatLines(headents[a_e].hd_text, "",
 		       term.t_ncol - headents[a_e].prlen,
 		       headents[a_e].break_on_comma, 0) == -1){
-	    emlwrite("\007Format lines failed!", NULL);
+	    emlwrite("\007z!", NULL);
 	    return(0);
 	}
     }
@@@@ -1452,7 +1452,7 @@@@
 	
 	if (term.t_nrow < 6 && ch != NODATA){
 	    (*term.t_beep)();
-	    emlwrite("Please make the screen bigger.", NULL);
+	    emlwrite("бNeդj@@ǡC", NULL);
 	    continue;
 	}
d111 9
a119 8
@@@@ -1523,13 +1523,13 @@@@
 		if(headents[ods.cur_e].only_file_chars
 		   && !fallowc((unsigned char) ch)){
 		    /* no garbage in filenames */
-		    emlwrite("\007Can't have a '%c' in folder name",
+		    emlwrite("\007ƧX঳ '%c' oӦr",
 			     (void *) ch);
 		    continue;
d121 12
a132 5
 		else if(headents[ods.cur_e].is_attach
 			&& intag(strng,ods.p_off)){
-		    emlwrite("\007Can't edit attachment number!", NULL);
+		    emlwrite("\007Lks󪺥NX!", NULL);
 		    continue;
d134 1
d136 4
a139 16
@@@@ -1675,7 +1675,7 @@@@
 		    headents[ods.cur_e].dirty  = 1;
 		}
 		else
-		  emlwrite("Problem Unkilling text", NULL);
+		  emlwrite("DϧRr", NULL);
 		continue;
 
 	      case (CTRL|'F') :
@@@@ -1726,7 +1726,7 @@@@
 		  continue;
 
 		if(headents[ods.cur_e].is_attach && intag(strng, ods.p_off)){
-		    emlwrite("\007Can't edit attachment number!", NULL);
+		    emlwrite("\007Lks󪺥NX!", NULL);
 		    continue;
d141 159
d301 5
a305 2
@@@@ -1740,7 +1740,7 @@@@
 		}
d307 2
a308 5
 		if(headents[ods.cur_e].is_attach && intag(strng, ods.p_off-1)){
-		    emlwrite("\007Can't edit attachment number!", NULL);
+		    emlwrite("\007Lks󪺥NX!", NULL);
 		    continue;
 		}
d310 30
a339 1
@@@@ -1951,7 +1951,7 @@@@
d341 4
a344 6
 	if(nlp == NULL){			/* no place to add below? */
 	    if((lp = HALLOC()) == NULL){
-		emlwrite("Can't allocate any more lines for header!", NULL);
+		emlwrite("LkAtmhŶY!", NULL);
 		free(buf);
 		return(-1);
a345 1
@@@@ -1986,7 +1986,7 @@@@
d347 72
a418 6
 	    if(strlen(buf) && !nlp){
 		if((lp = HALLOC()) == NULL){
-		    emlwrite("Can't allocate any more lines for header!",NULL);
+		    emlwrite("LkAtmhŶY!",NULL);
 		    free(buf);
 		    return(-1);
a419 1
@@@@ -2272,14 +2272,14 @@@@
d421 26
a446 7
     if(level < 0 || !headents[level].name){
 	(*term.t_beep)();
-	emlwrite("Sorry, I can't help you with that.", NULL);
+	emlwrite("ܩpA󨺭ӧڵLkC", NULL);
 	sleep(2);
 	return(FALSE);
     }
d448 13
a460 43
-    sprintf(buf, "Help for %s %.40s Field",
-		 (Pmaster->pine_flags & MDHDRONLY) ? "Address Book"
-						 : "Composer",
+    sprintf(buf, "%s%.40sU",
+		 (Pmaster->pine_flags & MDHDRONLY) ? "a}ï"
+						 : "s边",
 		 headents[level].name);
     (*Pmaster->helper)(headents[level].help, buf, 1);
     ttresize();
@@@@ -2909,7 +2909,7 @@@@
     }
     
     if((sbuf=(char *)malloc((unsigned) i)) == NULL){
-	emlwrite("Can't malloc space to expand address", NULL);
+	emlwrite("LktmOŶHi}a}", NULL);
 	return(-1);
     }
     
@@@@ -2966,7 +2966,7 @@@@
 		if(!arg){
 		    headarg = arg = (BUILDER_ARG *)malloc(sizeof(BUILDER_ARG));
 		    if(!arg){
-			emlwrite("Can't malloc space for fcc", NULL);
+			emlwrite("LktmOŶ fcc", NULL);
 			return(-1);
 		    }
 		    else{
@@@@ -2979,7 +2979,7 @@@@
 		else{
 		    nextarg = (BUILDER_ARG *)malloc(sizeof(BUILDER_ARG));
 		    if(!nextarg){
-			emlwrite("Can't malloc space for fcc", NULL);
+			emlwrite("LktmOŶ fcc", NULL);
 			return(-1);
 		    }
 		    else{
@@@@ -2995,7 +2995,7 @@@@
 		if(!e->sticky){
 		    line = e->hd_text;
 		    if(!(arg->tptr=(char *)malloc(strlen(line->text) + 1))){
-			emlwrite("Can't malloc space for fcc", NULL);
+			emlwrite("LktmOŶ fcc", NULL);
 			return(-1);
d463 19
a481 7
@@@@ -3012,7 +3012,7 @@@@
     if(!headarg){
 	headarg = (BUILDER_ARG *)malloc(sizeof(BUILDER_ARG));
 	if(!headarg){
-	    emlwrite("Can't malloc space", NULL);
+	    emlwrite("LktmOŶ", NULL);
 	    return(-1);
d483 8
a490 2
 	else{
@@@@ -3321,7 +3321,7 @@@@
d492 54
a545 6
     if(ksize()){
 	if((bp = buf = (char *)malloc(ksize()+5)) == NULL){
-	    emlwrite("Can't malloc space for saved text", NULL);
+	    emlwrite("LktmOsrOŶ", NULL);
 	    return(FALSE);
 	}
a546 8
@@@@ -3355,7 +3355,7 @@@@
 	work_buf_len = strlen(ods.cur_l->text) + buf_len;
 	work_buf = (char *) malloc((work_buf_len + 1) * sizeof(char));
 	if (work_buf == NULL) {
-	    emlwrite("Can't malloc space for saved text", NULL);
+	    emlwrite("LktmOsrOŶ", NULL);
 	    return(FALSE);
 	}
d548 13
a560 9
@@@@ -3564,9 +3564,9 @@@@
     if(Pmaster && Pmaster->exit_label)
       menu_header[SEND_KEY].label = Pmaster->exit_label;
     else if(gmode & (MDVIEW | MDHDRONLY))
-      menu_header[SEND_KEY].label =  (gmode & MDHDRONLY) ? "eXit/Save" : "eXit";
+      menu_header[SEND_KEY].label =  (gmode & MDHDRONLY) ? "}/xs" : "}";
     else
-      menu_header[SEND_KEY].label = "Send";
+      menu_header[SEND_KEY].label = "eX";
d562 2
a563 4
     if(gmode & MDVIEW){
 	menu_header[CUT_KEY].name  = NULL;
@@@@ -3587,7 +3587,7 @@@@
 	menu_header[RICH_KEY].name  = NULL;
d565 21
a585 4
     else{
-	menu_header[RICH_KEY].label = "Rich Hdr";
+	menu_header[RICH_KEY].label = "Y";
 	menu_header[RICH_KEY].name  = "^R";
d587 3
d591 2
a592 9
@@@@ -3666,7 +3666,7 @@@@
                 *headents[i].realaddr = bufp;
             }
             else{
-                emlwrite("Can't make room to pack header field.", NULL);
+                emlwrite("Lktm]˪Y쪺OŶC", NULL);
                 retval = FALSE;
             }
         }
@


1.2
log
@Upgrade to 4.00
Submitted by:	Liang Tai-hwa <avatar@@www.mmlab.cse.yzu.edu.tw>
@
text
@d2 1
a2 1
+++ pico/composer.c	Wed Jul 15 17:02:30 1998
@


1.1
log
@Initial revision
@
text
@d1 348
a348 69
*** pine/send.c.orig	Tue Feb 25 00:57:38 1997
--- pine/send.c	Sun Jul 20 02:50:31 1997
***************
*** 5352,5364 ****
  		body->subtype = cpystr("octet-stream");
  	    }
  
  	    /*
  	     * Apply maximal encoding regardless of previous
  	     * setting.  This segment's either not text, or is 
  	     * unlikely to be readable with > 30% of the
  	     * text encoded anyway, so we might as well save space...
  	     */
! 	    new_encoding = ENCBINARY;   /*  > 30% 8 bit chars */
  	}
      }
  
--- 5352,5367 ----
  		body->subtype = cpystr("octet-stream");
  	    }
  
+ 	    if(body->type == TYPETEXT)
+ 	      new_encoding = ENC8BIT;
+ 	    else
  	    /*
  	     * Apply maximal encoding regardless of previous
  	     * setting.  This segment's either not text, or is 
  	     * unlikely to be readable with > 30% of the
  	     * text encoded anyway, so we might as well save space...
  	     */
! 	      new_encoding = ENCBINARY;   /*  > 30% 8 bit chars */
  	}
      }
  
***************
*** 6113,6119 ****
  
  	switch (body->encoding) {	/* all else needs filtering */
  	  case ENC8BIT:			/* encode 8BIT into QUOTED-PRINTABLE */
! 	    gf_link_filter(gf_8bit_qp);
  	    break;
  
  	  case ENCBINARY:		/* encode binary into BASE64 */
--- 6116,6123 ----
  
  	switch (body->encoding) {	/* all else needs filtering */
  	  case ENC8BIT:			/* encode 8BIT into QUOTED-PRINTABLE */
! 	    if(F_OFF(F_ENABLE_8BIT, ps_global))
! 		gf_link_filter(gf_8bit_qp);
  	    break;
  
  	  case ENCBINARY:		/* encode binary into BASE64 */
***************
*** 6172,6178 ****
        sprintf (*dst += strlen (*dst), "Content-Transfer-Encoding: %s\015\012",
  	       body_encodings[(body->encoding == ENCBINARY)
  				? ENCBASE64
! 				: (body->encoding == ENC8BIT)
  				    ? ENCQUOTEDPRINTABLE
  				    : (body->encoding <= ENCMAX)
  					? body->encoding : ENCOTHER]);
--- 6176,6182 ----
        sprintf (*dst += strlen (*dst), "Content-Transfer-Encoding: %s\015\012",
  	       body_encodings[(body->encoding == ENCBINARY)
  				? ENCBASE64
! 				: (body->encoding == ENC8BIT && F_OFF(F_ENABLE_8BIT, ps_global))
  				    ? ENCQUOTEDPRINTABLE
  				    : (body->encoding <= ENCMAX)
  					? body->encoding : ENCOTHER]);
@


1.1.1.1
log
@Fix chinese display/input problem in pine.
PR:		ports/5083
Submitted by:	Yen-Shuo Su <yssu@@CCCA.NCTU.edu.tw>
@
text
@@
