🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.sources.patch
1 messages
1 total messages Started by Kari Hurtta Sun, 16 Oct 1994 14:12
kehpager V1.2 to kehpager V1.21 (part 2/2)
#3
Author: Kari Hurtta
Date: Sun, 16 Oct 1994 14:12
780 lines
24282 bytes
Title: kehpager V1.21 - Charset aware pager for VTxxx terminals
Patch-To: kehpager V1.2
Archive-Name: kehpager0120/patch1.2
Author: Kari E. Hurtta <Kari.Hurtta@Helsinki.FI>
Part: 2/2
Environment: Ansi C, SunOS 4.1.2 (OS/MP 4.1B), 4.1.3, 5.2, 5.3, 
	HP-UX A.09.01 (?), IRIX 4.0.5 (?), IRIX 5.2, FreeBSD (?), 
	NetBSD(?), 386BSD(?), VTxxx

#!/bin/sh
# this is part 2 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch1.diff continued
#
CurArch=2
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
     exit 1; fi
( read Scheck
  if test "$Scheck" != $CurArch
  then echo "Please unpack part $Scheck next!"
       exit 1;
  else exit 0; fi
) < s2_seq_.tmp || exit 1
sed 's/^X//' << 'SHAR_EOF' >> patch1.diff
X      make_default(&key_flush,tty_state.c_cc[VFLUSHO]);
X  #else
X--- 799,806 ----
X    make_default(&key_flush,tty_state.c_cc[VDISCARD]);
X  #else
X  #ifdef VFLUSHO
X! /* In Irix 4 termios and termio have same structure, but not in Irix 5 */
X! #if defined (__sgi) && !defined(_SVR4_SOURCE)
X    if (tty_state.c_line == LDISC1)
X      make_default(&key_flush,tty_state.c_cc[VFLUSHO]);
X  #else
X***************
X*** 807,813 ****
X  #endif
X  #endif
X    make_default(&key_abort,tty_state.c_cc[VQUIT]);  
X! #ifdef __sgi
X    if (tty_state.c_line == LDISC1) {
X      make_default(&key_res1,tty_state.c_cc[VSTART]);  
X      make_default(&key_res2,tty_state.c_cc[VSTOP]);
X--- 809,816 ----
X  #endif
X  #endif
X    make_default(&key_abort,tty_state.c_cc[VQUIT]);  
X! /* In Irix 4 termios and termio have same structure, but not in Irix 5 */
X! #if defined (__sgi) && !defined(_SVR4_SOURCE)
X    if (tty_state.c_line == LDISC1) {
X      make_default(&key_res1,tty_state.c_cc[VSTART]);  
X      make_default(&key_res2,tty_state.c_cc[VSTOP]);
X***************
X*** 821,827 ****
X    make_default(&key_redraw,tty_state.c_cc[VREPRINT]);
X  #else
X  #ifdef VRPRNT
X! #ifdef __sgi
X    if (tty_state.c_line == LDISC1)
X      make_default(&key_redraw,tty_state.c_cc[VRPRNT]);
X  #else
X--- 824,831 ----
X    make_default(&key_redraw,tty_state.c_cc[VREPRINT]);
X  #else
X  #ifdef VRPRNT
X! /* In Irix 4 termios and termio have same structure, but not in Irix 5 */
X! #if defined (__sgi) && !defined(_SVR4_SOURCE)
X    if (tty_state.c_line == LDISC1)
X      make_default(&key_redraw,tty_state.c_cc[VRPRNT]);
X  #else
X***************
X*** 833,839 ****
X    make_default(&key_edel,tty_state.c_cc[VERASE]);
X  
X  
X! #ifdef __sgi
X    if (tty_state.c_line != LDISC1) {
X      tty_state.c_line = LDISC1;      /* BSD line discipline */
X      tty_state.c_cc[VLNEXT] = 'V'&31;
X--- 837,844 ----
X    make_default(&key_edel,tty_state.c_cc[VERASE]);
X  
X  
X! /* In Irix 4 termios and termio have same structure, but not in Irix 5 */
X! #if defined (__sgi) && !defined(_SVR4_SOURCE)
X    if (tty_state.c_line != LDISC1) {
X      tty_state.c_line = LDISC1;      /* BSD line discipline */
X      tty_state.c_cc[VLNEXT] = 'V'&31;
X***************
X*** 845,851 ****
X      make_default(&key_flush,tty_state.c_cc[VFLUSHO]);
X      tty_state.c_cc[VSTOP] = 'S'&31;
X      make_default(&key_res2,tty_state.c_cc[VSTOP]);
X!     tty_state.c_cc[VSTART] = 'O'%31;
X      make_default(&key_res1,tty_state.c_cc[VSTART]);  
X    }
X  #endif
X--- 850,856 ----
X      make_default(&key_flush,tty_state.c_cc[VFLUSHO]);
X      tty_state.c_cc[VSTOP] = 'S'&31;
X      make_default(&key_res2,tty_state.c_cc[VSTOP]);
X!     tty_state.c_cc[VSTART] = 'O'&31;
X      make_default(&key_res1,tty_state.c_cc[VSTART]);  
X    }
X  #endif
X***************
X*** 921,929 ****
X    tty_state.c_oflag &= ~OCRNL;     /* No CR -> LF mapping on output */
X  #endif
X  #ifdef OLCUC
X!   tty_state.c_oflag &= ~OLCUC;     /* No lower-case -> upper-case mappin on 
X  				      output */
X  #endif
X  #if (defined(TABDLY) && (defined(XTABS)) || defined(TAB3)) || defined(OXTABS)
X  #if defined(TABDLY) && defined(XTABS)
X  /* SunOS */
X--- 926,938 ----
X    tty_state.c_oflag &= ~OCRNL;     /* No CR -> LF mapping on output */
X  #endif
X  #ifdef OLCUC
X!   tty_state.c_oflag &= ~OLCUC;     /* No lower-case -> upper-case mapping on 
X  				      output */
X  #endif
X+ #ifdef ONOCR
X+   tty_state.c_oflag &= ~ONOCR;      /* Transmit CR also in column 0 */
X+ #endif
X+ 
X  #if (defined(TABDLY) && (defined(XTABS)) || defined(TAB3)) || defined(OXTABS)
X  #if defined(TABDLY) && defined(XTABS)
X  /* SunOS */
X***************
X*** 1030,1036 ****
X      print_error(errno,"Error restoring of SIGHUP (sigaction)");
X  
X    if (-1 == close(terminal))
X! #ifdef __sgi
X      if (ENODEV != errno)   /* I don't know from where this error comes ! */
X  #endif
X        print_error(errno,"Error when closing terminal");
X--- 1039,1045 ----
X      print_error(errno,"Error restoring of SIGHUP (sigaction)");
X  
X    if (-1 == close(terminal))
X! #ifdef CLOSEBUG
X      if (ENODEV != errno)   /* I don't know from where this error comes ! */
X  #endif
X        print_error(errno,"Error when closing terminal");
X***************
X*** 1155,1163 ****
X  
X    /* hopeless */
X    if (terminal_have_lost) {
X-     /* We should not be here ... */
X-     print_notify("(%s) read_from_terminal/terminal_have_lost = 1, aborting...",
X- 		 prog);
X      
X      reset_terminal_state();    /* give original terminal characters */
X      set_caller_ttystate();
X--- 1164,1169 ----
X***************
X*** 1164,1170 ****
X      
X      close_files();
X      close_terminal();
X!     
X      abort();
X    }
X    if (!tty_state_set) set_pager_ttystate();
X--- 1170,1181 ----
X      
X      close_files();
X      close_terminal();
X! 
X!     /* We should not be here ... */
X!     print_notify("(%s) read_from_terminal/terminal_have_lost = 1, aborting...",
X! 		 prog);
X! 
X!     flush_error_buffer();
X      abort();
X    }
X    if (!tty_state_set) set_pager_ttystate();
SHAR_EOF
chmod 0644 patch1.diff || echo "restore of patch1.diff fails"
sed 's/^X//' << 'SHAR_EOF' > patch1.kehpagerrc &&
X# Init file for kehpager ($HOME/.kehpagerrc)
X
X# In this file are default values of fields (this is for information only)
X# If tou want change some value put that field to
X#                   $HOME/.kehpagerrc            (per user file)
X#             or to .../kehpager.init            (global file)
X
X# Input file options ---------------------------------------------------------
X
X# Charset of input file(s)
X# Values:               Ascii             (option -A)
X#                       Latin/1           (option -L)
X#                       Latin/2           (option -L2)
X#                       Latin/3           (option -L3)
X#                       Latin/4           (option -L4)
X#                       Latin/5           (option -L5)
X#                       Multinational     (option -M)
X#                       Finnish           (option -F)
X#                       UK-ASCII          (option -UK)
X#                       Norwegian         (option -NR)
X#			Swedish           (option -SW)    
X#                       French Canadian   (option -CA)
X#                       French/Belgian    (option -FR)
X#                       German            (option -GR)
X#                       Spanish           (option -SP)
X#                       Italian           (option -IT)
X#                       MS-DOS CP437      (option -PC)
X#                       Macintosh         (option -MAC)
X  input.charset:            Latin/1
X# What charset will use if with -CS option have used null name
X  input.charset.null:       Ascii
X
X# Content-type of input file(s)
X# Values:               Terminal          (option -tr)
X#                       Text/Plain        (option -pl)
X#                       Text/Enriched     (option -er)
X#                       Text/Richtext     (option -rt)
X  input.content_type:       Terminal
X
X# Should kehpager interpret TAB,SHY,NBSP -characters in input files
X  input.interpret_tab:      Enabled        # (options: -t -t+)
X
X# Should kehpager wrap words in end of line
X  input.wordwrap:           Enabled        # (options: -w -w+)
X
X# Should enriched (and richtext) text be fully justified by default.
X# Enabled: <FlushBoth> is default. Disabled: <FlushLeft> is default.
X  input.full_justify:       Disabled        # (options: -j -j+)
X
X# Should hekpager eat some spaces
X  input.eat_spaces:         Enabled        # (options: -sp -sp+)
X
X# Should kehpager uses prompt
X  use.prompt:               Enabled        # (options: -p -p+)
X  
X# Should kehpager shows time in prompt
X  use.prompt.time:          Enabled        # (options: -st -st+)
X
X# Should kehpager scrolling screen when going next or previous page in file
X  use.scrolling:            Enabled        # (options: -s -s+)
X
X# Should waits that user press quit key (normally q, when it reaches last page
X# in (last) file
X  use.wait_quit:            Enabled        # (options: -wt -wt+)
X
X# Default lines of terminal
X  use.terminal.lines:       24		   # (***)
X
X# Default columns of terminal
X  use.terminal.columns:     80	           # (***)
X
X# (***) Environment variables $LINES and $COLUMNS is used as default size of
X# terminal if available and following is set:
X  env.size:		    True
X
X# Values used when kehpager exits --------------------------------------------
X
X# Should kehpager personality to 8bit when it exits
X# exit.personality_8bit:    Disabled                             # (*)
X
X# Should kehpager turn Multinational mode (8bit -mode) when it exits
X# exit.multinational:       Enabled                              # (*)
X
X# Should kehpager turn autowrap on when it exits
X  exit.autowrap:            Enabled                              # (*)
X
X# Should cursor keys send application mode codes 
X  exit.application_cursor_keys:    Disabled                      # (*)
X
X# Should keys uses rigth legend characters 
X#      Enabled = right legend
X#      Disbaled = left legend
X  exit.data_processing_keys:       Disabled                      # (*)
X
X# Should terminal acs with LF as CR LF and sould RETURN produce CR LF
X  exit.newline:                    Disabled                      # (*)
X
X# Should terminal uses in Multinational mode Latin/1 -font instead of 
X#    Multinational -font
X# This apply to all terminals which supports Latin/1 (not only VT300 series)
X  exit.vt300.8bit_latin1:   Disabled
X
X# Values used when kehpager starts -------------------------------------------
X
X# Keyboard language - needed for correct font in national mode
X# Supported values:                                     (option: -N )
X#      1 = North American (ASCII)
X#      2 = British (UK-ASCII)
X#      3 = Flemish / 14 = French/Belgian
X#      4 = French Canadian
X#      5 = Danish / 13 = Norwegian
X#      6 = Finnish
X#      7 = German
X#      9 = Italian
X#      12 = Swedish
X#      15 = Spanish
X# If this values is incorrect, kehpager works incorrectly !!!
X# use.keyboard_language:    6                                    # (*)
X
X# Should kehpager use G2 (and posibbly G3) in vt100 
X  use.vt100.G2_available:   Disabled
X
X# Should kehpager limit queries to known with particular terminal type
X  use.limited.queries:      Disabled           # (options: -q, -q+)
X
X# Force National/Multinational mode
X#                 Values:   None
X#                           National             (option: -7)
X#                           Multinational        (option: -8)
X  force.mode:               None
X
X# Force Latin/1 without 8bit test on Xterm. Terminal is considired
X# to be xterm if $TERM is xterm (or $DISPLAY is defined (**))
X  force.xterm.latin1:       Enabled            # (options: -X, -X+)
X# In xterm this should be enabled or 
X#    use.keyboard_language: 1
X# Without that xterm works incorrectly 
X# (**) $DISPLAY is looked only if following is enabled:
X     env.display:           Disabled
X# In our environment DISPLAY is always assigned to value of last X-session
X# so it isn't realiable test 
X
X# (*) Value in this file is only used, if terminal don't report value for that
X#     field
X
X# Following entries can force kehpager to think that terminal have or haven't
X# some feature.
X#  Possible features:	None			(resets field)
X#			Ins/Del characters/lines
X#			Banks G2 & G3 (changeable)
X#			Latin/1 charset
X#			Multinational charset
X#			Technical charset		
X#			C1 control characters
X#			National charset
X#			Shoft characters			# not used
X#			132 columns				# not used
X#			Selective erase				# not used
X#			User defined keys			# not used
X#			Horizontal scrolling			# not used
X#			ReGIS graphic				# not used
X#			SIXEL graphic				# not used
X#			Printer port				# not used
X#			Terminal interrogation commands
X
X# Forces to kehpager think that terminal have some feature even if it haven't.
X# force.feature.enabled:    None
X
X# Forces to kehpager think that terminal haven't some feature even that 
X# terminal reports existence of feature.
X# force.feature.disabled:   None
X
X# If terminal have Technical charset, then use it.
X# You want disbale this if you want that kehpager uses Latin/1 and 
X# Multinational in same time (kehpager can't use same time Latin/1, 
X# Multinational and Technical -charset). You need Technical -charset only
X# if you want show files with have MSDOS (CP 437) charset.
X# use.technical:            Enabled
X
X# Timer values ---------------------------------------------------------------
X# Resulation of timers have 0.1 seconds
X
X  timer.per_char:           0.1
X  timer.identification:     5.0
X  timer.test_8bit:          5.0
X  timer.states_first:       3.0
X  timer.states_interval:    1.0
SHAR_EOF
chmod 0444 patch1.kehpagerrc || echo "restore of patch1.kehpagerrc fails"
sed 's/^X//' << 'SHAR_EOF' > patch1.schedule.c &&
X/*  file: schedule.c
X *
X *  kehpager, Charset aware pager, Kari E. Hurtta
X *
X *  Copyright (c) 1994 Kari E. Hurtta
X *
X *  Redistribution and use in source and binary forms are permitted
X *  provided that the above copyright notice and this paragraph are
X *  duplicated in all such forms. This software is provided 'as is'
X *  and without any warranty. 
X */
X
X#include <stddef.h>
X#include <string.h>
X#include <stdio.h>
X#include <stdlib.h>
X#include <ctype.h>
X/* #include <signal.h> terminal.h includes this */
X
X#include <sys/types.h>
X#include <sys/time.h>
X#include <fcntl.h>
X#if defined(SUNOS4) || defined(SUNOS5)
X#include <sys/filio.h>
X#else
X#include <sys/ioctl.h>
X#endif
X#include <unistd.h>
X
X#include <time.h>
X
X
X#include <errno.h>
Xextern int errno;
X
X#include "kehpager.h"
X#include "memory.h"
X#include "charset.h"
X
X#include "schedule.h"
X
X#include "terminal.h"
X
X#include "control.h"
X#include "esc.h"
X#include "window.h"
X#include "keyboard.h"
X
Xint cancel = 0;
X
Xvoid real_schedule(int *FP, int *EOF_IN_FILE, int *NOT_SELECTABLE,
X		  void (*file_handler)(void),
X		  int (*timeout_callback)(long *value),
X		  void (*timeout_handler)(int key),
X		  int *ready, int (* callback_before)(void),
X		  void (* callback_after)(void),
X		  int call_parser
X		  ) {
X#ifdef _HPUX_SOURCE
X  int readfs,writefs;
X#else
X  fd_set readfs,writefs;
X#endif
X  struct timeval *timeout,Timeout;
X  long atime;
X  int res;
X  int i;
X
X  int tmp_ready=0;
X  if (!ready)
X    ready = &tmp_ready;
X
X  while (!(*ready) || (!tmp_ready && !quitflag)) {
X    int skip = 0, was_input = 0;
X    int biggest = terminal;
X    int have_file;
X    int timeout_key = 0;
X
X    tmp_ready = 1;
X    
X    skip = (* callback_before)();
X
X    /* check pointers */
X    have_file = FP && EOF_IN_FILE && NOT_SELECTABLE;
X
X#ifdef _HPUX_SOURCE
X    readfs = 1 << terminal;    
X    writefs = 0;
X#else
X    FD_ZERO(&readfs);
X    FD_SET(terminal,&readfs);
X    FD_ZERO(&writefs);
X#endif
X
X    if (need_line_flush() || need_flush_buffer()) {
X#ifdef _HPUX_SOURCE
X      writefs |= 1 << terminal;
X#else
X      FD_SET(terminal,&writefs);
X#endif
X    }
X
X    
X    if (have_file && -1 != (*FP) && !(*EOF_IN_FILE)) {
X      if (!(*NOT_SELECTABLE)) {
X#ifdef _HPUX_SOURCE
X	readfs |= 1 << (*FP);
X#else
X	FD_SET((*FP),&readfs);
X#endif
X	if ((*FP) > biggest) biggest = (*FP);
X      } else skip = 1;
X    }
X
X    if (skip) {
X      tmp_ready = 0;
X      timeout = &Timeout;
X      Timeout.tv_sec = 0;
X      Timeout.tv_usec = 0;
X    } else if (0 != (timeout_key=timeout_callback(&atime))) {
X      timeout = &Timeout;
X      Timeout.tv_sec = atime / 10L;
X      Timeout.tv_usec = ( atime % 10L) * 100000L;
X    } else timeout = NULL;
X
X    if (DEBUG_FILIO || DEBUG_TERM || DEBUG_BUFFER) {
X      print_debug("Doing select: max fd=%d, %s (skip=%d)",
X		  biggest, timeout ? "timeout" : "no timeout",
X		  skip);
X    }
X
X#ifdef _HPUX_SOURCE
X    res = select(biggest+1,&readfs,&writefs,(int *)NULL,
X		     timeout);
X#else
X    res = select(biggest+1,&readfs,&writefs,(fd_set *)NULL,
X		     timeout);
X#endif
X
X    if (-1 == res) {
X      int code = errno;
X      if (DEBUG_FILIO) {
X	print_debug("Got errno=%d from select",
X		    code);
X      }
X      if (EINTR == code) {
X	tmp_ready = 0;
X	continue;
X      }
X      if (have_file && ENXIO == code && !(*NOT_SELECTABLE)) {
X	not_selectable(FP);
X	tmp_ready = 0;
X	continue;
X      }
X      print_error(code,
X		  "(%s) Error when waiting response of terminal from /dev/tty",
X		  prog);
X      quitflag = 1;
X      *ready = 1;
X      continue;
X    }
X
X    if (0 == res && !skip) 
X      (*timeout_handler)(timeout_key);
X
X    if (
X#ifdef _HPUX_SOURCE
X	readfs & (1 << terminal)
X#else
X	FD_ISSET(terminal,&readfs)
X#endif
X	)
X      {	
X	CHAR input_buffer[INPUT_BUFFER_SIZE+1];
X	int len = read_from_terminal(input_buffer);
X	if (len > 0) parse_input(input_buffer, len); 
X	was_input = 1;
X      }
X    
X    cancel = 0;
X
X    for (i = 0; command_len > i;) {
X      CHAR *name;
X      if (DEBUG_TERM) {
X	CHAR *R1=printable_command(i);
X	print_debug("Command(%d): %s",i,R1);
X	FREE(R1);
X      }
X      if (do_escape(i)) {
X	rem_command(i);
X	if (DEBUG_TERM) {
X	  print_debug("Command(%d) - handled by module control\n"
X		      "            : REMOVED from buffer",i);
X	}
X      } else if(call_parser) {
X	if (cancel || do_keyboard(i,&cancel)) {
X	  if (DEBUG_TERM) {
X	    print_debug("Command(%d) - handled (or canceled) "
X			"by module keyboard",i);
X	  }
X	} else if (0 != (name = key_name(i))) {
X	  char *buffer1 = "Key ", *buffer3 = " haven't action";
X	  int bl1 = strlen(buffer1), bl3 = strlen(buffer3);
X	  int bl2 = strlen(Cs(name));
X	  CHAR_IDX buffer[50];
X	  map_input(MAP_ASCII,bl1,rCs(buffer1),buffer);
X	  map_input(MAP_ASCII,bl2,name,buffer+bl1);
X	  map_input(MAP_ASCII,bl3,rCs(buffer3),buffer+bl1+bl2);
X	  message_to_error(bl1+bl2+bl3,buffer);
X	} else {
X	  CHAR *R1=printable_sequence(i);
X	  print_notify("Unexpected escape sequence: %s",R1);
X	  free(R1);
X	}
X	rem_command(i);
X	if (DEBUG_TERM) {
X	  print_debug("Command(%d) : REMOVED form buffer",i);
X	}
X      } else {
X	if (DEBUG_TERM) {
X	  print_debug("Command(%d) : SKIPPED",i);
X	}
X	i++;
X      }
X    }
X
X    (*callback_after)();
X
X
X    if (have_file && -1 != (*FP) && !(*EOF_IN_FILE) &&     
X	((*NOT_SELECTABLE) ||
X#ifdef _HPUX_SOURCE
X	 (readfs & (1 << (*FP)))
X#else
X	 FD_ISSET((*FP),&readfs)
X#endif
X	))
X      {
X	(*file_handler)();
X      }
X
X    if (
X#ifdef _HPUX_SOURCE
X	writefs & (1 << terminal)
X#else
X	FD_ISSET(terminal,&writefs)
X#endif
X	)
X      { 
X	int val = need_line_flush();
X	tmp_ready = 0;
X	if (was_input && 2 != val) {
X	  if (DEBUG_BUFFER || DEBUG_LBUFFER) 
X	    print_debug("BUFFER: was_input=%d, "
X			"need_line_flush()=%d - no flush",
X			was_input,val);
X	} else {
X	  if (DEBUG_BUFFER || DEBUG_LBUFFER) 
X	    print_debug("BUFFER: was_input=%d, "
X			"need_line_flush()=%d - flushing...",
X			was_input,val);
X	  if (!flush_some_lines())
X	    flush_buffer(0);
X	}
X      }
X    
X  }
X
X}
X
Xstatic int init_ready = 0;
X
Xstatic void init_do_timeout(int key) {
X  do_timeout();
X}
X
Xstatic int init_callback_before(void) {
X  int skip = 0;
X  int tail_ptr;
X
X  if (got_from_TAIL(&tail_ptr)) {
X    print_errors(tail_ptr);
X    skip = 1; 
X  }
X
X  if (pager_state || quitflag) {
X    init_ready = 1;
X    skip = 1;
X  }
X  
X  return skip;
X}
X
Xstatic void init_callback_after(void) {
X
X  if (pager_state || quitflag) {
X    init_ready = 1;
X  }
X}
X
Xint init_schedule(void) {
X  init_ready = 0;
X
X  real_schedule(NULL,NULL,NULL,
X		NULL,
X		&ask_timeout,&init_do_timeout,
X		&init_ready,&init_callback_before,
X		&init_callback_after,0);
X
X  return pager_state;
X
X}
SHAR_EOF
chmod 0644 patch1.schedule.c || echo "restore of patch1.schedule.c fails"
sed 's/^X//' << 'SHAR_EOF' > patch1.schedule.h &&
X/*  file: schedule.h
X *
X *  kehpager, Charset aware pager, Kari E. Hurtta
X *
X *  Copyright (c) 1994 Kari E. Hurtta
X *
X *  Redistribution and use in source and binary forms are permitted
X *  provided that the above copyright notice and this paragraph are
X *  duplicated in all such forms. This software is provided 'as is'
X *  and without any warranty. 
X */
X
Xextern int cancel; /* Ctrl-G pressed */
X
Xextern void real_schedule(int *FP, int *EOF_IN_FILE, int *NOT_SELECTABLE,
X			 void (*file_handler)(void),
X			 int (*timeout_callback)(long *value),
X			 void (*timeout_handler)(int key),
X			 int *ready, int (* callback_before)(void),
X			 void (* callback_after)(void),
X			 int call_parser
X			 );
X
Xextern int init_schedule(void);
X
X/* Uses, but not define: */
Xextern void not_selectable(int *fp);
Xextern int do_keyboard(int cmd, int *cancel);
Xextern void message_to_error(int len, CHAR_IDX *buffer);
Xextern int got_from_TAIL(int *ptr);
Xextern void print_errors(int ptr);
SHAR_EOF
chmod 0644 patch1.schedule.h || echo "restore of patch1.schedule.h fails"
sed 's/^X//' << 'SHAR_EOF' > patch1.sh &&
X#!/bin/sh
X
Xif [ ! -r VERSION ] ; then
X	echo "$0: No VERSION file! "
X	exit 1
Xfi
Xversion="`cat VERSION`"
Xif [ "$version" != "kehpager V1.2" ] ; then
X	echo "This patch must run agaist kehpager V1.2!"
X	echo "This source is: $version"
X	exit 1
Xfi
Xecho "Creating file schedule.c ..."
Xif cp patch1.schedule.c schedule.c ; then
X	echo "OK"
Xelse
X	exit 1
Xfi
Xecho "Creating file schedule.h ..."
Xif cp patch1.schedule.h schedule.h ; then
X	echo "OK"
Xelse
X	exit 1
Xfi
Xif [ ! -r kehpagerrc ] ; then
X	echo "Creating file kehpagerrc ..."
X	if cp patch1.kehpagerrc kehpagerrc ; then
X		echo "OK"
X	else
X		exit 1
X	fi
Xelse
X	echo "kehpagerrc exists -- not created"
Xfi
Xif [ ! -r COPYRIGHT ] ; then
X	echo "Creating file COPYRIGHT ..."
X	if cp patch1.COPYRIGHT COPYRIGHT ; then
X		echo "OK"
X	else
X		exit 1
X	fi
Xfi
Xecho "Patching rest of source..."
Xif patch -c -N <patch1.diff ; then
X	echo "Patching OK"
Xelse
X	exit 1
Xfi
Xecho "Kehpager is updated to version 1.21"
Xexit 0
SHAR_EOF
chmod 0644 patch1.sh || echo "restore of patch1.sh fails"
rm -f s2_seq_.tmp
echo "You have unpacked the last part"
exit 0
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads