changeset 249:0a1644ef9a0a

[project @ 1993-12-06 18:56:13 by jwe]
author jwe
date Mon, 06 Dec 1993 18:56:51 +0000
parents 5ba769d183b9
children 4d38c4a02799
files info/Makefile.in info/info.h info/session.c src/t-builtins.cc
diffstat 4 files changed, 19 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/info/Makefile.in	Mon Dec 06 13:24:47 1993 +0000
+++ b/info/Makefile.in	Mon Dec 06 18:56:51 1993 +0000
@@ -46,7 +46,7 @@
 	makedoc.c nodemenu.c footnotes.c dribble.c variables.c gc.c \
 	error.c
 
-INCLUDES = display.h doc.h echo_area.h filesys.h general.h getopt.h \
+INCLUDES = display.h doc.h echo_area.h filesys.h general.h \
 	info-utils.h info.h infomap.h nodes.h search.h session.h \
 	signals.h termdep.h terminal.h tilde.h indices.h window.h \
 	footnotes.h dribble.h variables.h gc.h
@@ -75,7 +75,7 @@
 MAKEDOC_SOURCE = makedoc.c xmalloc.c
 
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(LDEFS) -I$(common) $(ALL_CFLAGS) $<
+	$(CC) -c $(CPPFLAGS) $(LDEFS) -I$(common) $(UGLY_ALL_CFLAGS) $<
 
 all: ../libinfo.a # info.info info-stnd.info
 .PHONY: all
--- a/info/info.h	Mon Dec 06 13:24:47 1993 +0000
+++ b/info/info.h	Mon Dec 06 18:56:51 1993 +0000
@@ -86,6 +86,7 @@
 #define NO_POINTER	"No \"%s\" pointer for this node."
 #define UNKNOWN_COMMAND	"Unknown Info command `%c'.  `?' for help."
 #define TERM_TOO_DUMB	"Terminal type \"%s\" is not smart enough to run Info."
+#define TERM_TOO_SMALL	"%d row by %d column terminal too small to run Info."
 #define AT_NODE_BOTTOM	"You are already at the last page of this node."
 #define AT_NODE_TOP	"You are already at the first page of this node."
 #define ONE_WINDOW	"Only one window."
--- a/info/session.c	Mon Dec 06 13:24:47 1993 +0000
+++ b/info/session.c	Mon Dec 06 18:56:51 1993 +0000
@@ -60,9 +60,9 @@
 static int info_windows_slots = 0;
 
 void remember_window_and_node (), forget_window_and_nodes ();
-void initialize_info_session (), info_session ();
-void display_startup_message_and_start ();
+void display_startup_message_and_start (), info_session ();
 void finish_info_session ();
+int initialize_info_session ();
 
 /* Begin an info session finding the nodes specified by FILENAME and NODENAMES.
    For each loaded node, create a new window.  Always split the largest of the
@@ -258,7 +258,7 @@
 
 /* Initialize the first info session by starting the terminal, window,
    and display systems. */
-void
+int
 initialize_info_session (node, clear_screen)
      NODE *node;
      int clear_screen;
@@ -274,10 +274,18 @@
 	term_name = "dumb";
 
       info_error (TERM_TOO_DUMB, term_name);
-      exit (1);
+      return -1;
     }
+
+  if (screenwidth < 4 || screenheight < 4)
+    {
+      info_error (TERM_TOO_SMALL, screenheight, screenwidth);
+      return -1;
+    }
+
   if (clear_screen)
     terminal_clear_screen ();
+
   initialize_info_keymaps ();
   window_initialize_windows (screenwidth, screenheight);
   initialize_info_signal_handler ();
@@ -293,6 +301,8 @@
     info_input_stream = stdin;
 
   info_windows_initialized_p = 1;
+
+  return 0;
 }
 
 /* Tell Info that input is coming from the file FILENAME. */
--- a/src/t-builtins.cc	Mon Dec 06 13:24:47 1993 +0000
+++ b/src/t-builtins.cc	Mon Dec 06 18:56:51 1993 +0000
@@ -444,9 +444,9 @@
     }
   else
     {
-      initialize_info_session (initial_node, 0);
+      status = initialize_info_session (initial_node, 0);
 
-      if (force || index_entry_exists (windows, string))
+      if (status == 0 && (force || index_entry_exists (windows, string)))
 	{
 	  terminal_clear_screen ();