about summary refs log tree commit diff stats
path: root/src/LYMainLoop.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-07-25 03:14:56 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1998-07-25 03:14:56 -0400
commitaa3258c631eaca9dc2e7e2590b8778b827006144 (patch)
tree8fc25814a576a0db800da7a1421f6a3c76a2ae6d /src/LYMainLoop.c
parent5488a2e17cfeff78f8927f652ecb9750d7a28c29 (diff)
downloadlynx-snapshots-aa3258c631eaca9dc2e7e2590b8778b827006144.tar.gz
snapshot of project "lynx", label v2-8-1dev_18
Diffstat (limited to 'src/LYMainLoop.c')
-rw-r--r--src/LYMainLoop.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 566027f3..fa01fdbe 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -207,7 +207,7 @@ int mainloop NOARGS
     BOOLEAN emacs_keys_flag = emacs_keys;
     BOOLEAN keypad_mode_flag = keypad_mode;
     BOOLEAN user_mode_flag = user_mode;
-    BOOLEAN HTfileSortMethod_flag = HTfileSortMethod;
+    int HTfileSortMethod_flag = HTfileSortMethod;
     int CurrentCharSet_flag = current_char_set;
     int CurrentAssumeCharSet_flag = UCLYhndl_for_unspec;
     int CurrentAssumeLocalCharSet_flag = UCLYhndl_HTFile_for_unspec;
@@ -642,8 +642,14 @@ try_again:
 			       startfile);
 			else
 #endif /* UNIX */
+			{
+
+			    SetOutputMode( O_TEXT );
 			    printf("\nlynx: Can't access startfile %s\n",
 			       startfile);
+			    SetOutputMode( O_BINARY );
+			}
+
 			if (!dump_output_immediately) {
 #ifndef NOSIGHUP
 			    (void) signal(SIGHUP, SIG_DFL);
@@ -740,9 +746,13 @@ try_again:
 			   } else
 #endif /* UNIX */
 			   {
+			       SetOutputMode( O_TEXT );
+
 			       printf(
  "\nlynx: Start file could not be found or is not text/html or text/plain\n");
 			       printf("      Exiting...\n");
+
+			       SetOutputMode( O_BINARY );
 			   }
 			   if (!dump_output_immediately) {
 #ifndef NOSIGHUP
@@ -1047,7 +1057,7 @@ try_again:
 	    } else if (!dump_output_immediately) {
 		StrAllocCopy(curdoc.title, newdoc.title);
 	    }
-	    owner_address = HText_getOwner();
+	    owner_address = (char *)HText_getOwner();
 	    curdoc.safe = HTLoadedDocumentIsSafe();
 	    if (!dump_output_immediately) {
 		LYAddVisitedLink(&curdoc);
@@ -1558,7 +1568,7 @@ try_again:
 		    addstr(FORM_NOVICELINE_TWO);
 		}
 		c = change_form_link(&links[curdoc.link],
-				     FORM_UP, &newdoc, &refresh_screen,
+				     &newdoc, &refresh_screen,
 				     links[curdoc.link].form->name,
 				     links[curdoc.link].form->value);
 
@@ -2895,7 +2905,7 @@ new_cmd:  /*
 				     links[curdoc.link].hightext);
 		    }
 		    c = change_form_link(&links[curdoc.link],
-					 FORM_UP, &newdoc, &refresh_screen,
+					 &newdoc, &refresh_screen,
 					 links[curdoc.link].form->name,
 					 links[curdoc.link].form->value);
 		    if (HTOutputFormat == HTAtom_for("www/download") &&
@@ -3714,7 +3724,7 @@ check_goto_URL:
 	    if (lynx_mode == FORMS_LYNX_MODE) {
 		if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) {
 		    c = change_form_link(&links[curdoc.link],
-					 FORM_UP, &newdoc, &refresh_screen,
+					 &newdoc, &refresh_screen,
 					 links[curdoc.link].form->name,
 					 links[curdoc.link].form->value);
 		    /*
@@ -3739,7 +3749,7 @@ check_goto_URL:
 	    if (lynx_mode==FORMS_LYNX_MODE) {
 		if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) {
 		    c = change_form_link(&links[curdoc.link],
-					 FORM_DOWN,&newdoc,&refresh_screen,
+					 &newdoc,&refresh_screen,
 					 links[curdoc.link].form->name,
 					 links[curdoc.link].form->value);
 		    goto new_keyboard_input;
@@ -4106,17 +4116,17 @@ check_goto_URL:
 			/*
 			 *  The owner_address is a mailto: URL.
 			 */
-			cp = HText_getRevTitle();
+			CONST char *kp = HText_getRevTitle();
 			if (strchr(owner_address,':')!=NULL)
 			     /*
 			      *  Send a reply.	The address is after the colon.
 			      */
 			     reply_by_mail(strchr(owner_address,':')+1,
 					   curdoc.address,
-					   (cp ? cp : ""));
+					   (kp ? kp : ""));
 			else
 			    reply_by_mail(owner_address, curdoc.address,
-					  (cp ? cp : ""));
+					  (kp ? kp : ""));
 
 			refresh_screen = TRUE;	/* to force a showpage */
 		   }