Ignore:
Timestamp:
Mar 12, 2006, 6:02:46 PM (19 years ago)
Author:
bird
Message:

applied OS/2 patches (manually).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/texinfo/info/session.c

    r2617 r2619  
    2424#include "search.h"
    2525#include <sys/ioctl.h>
     26
     27#ifdef __EMX__
     28#  include <stdlib.h>
     29#  include "pc.h"
     30#endif /* __EMX__ */
    2631
    2732#if defined (HAVE_SYS_TIME_H)
     
    19941999   prefer the one forward.  The return is in newly-allocated memory,
    19952000   since the caller frees it.
    1996    
     2001
    19972002   This is called from info_menu_or_ref_item with XREF_LIST being all
    19982003   the xrefs in the node, and POS being point.  The ui function that
     
    20092014  int nearest = -1;
    20102015  long best_delta = -1;
    2011  
     2016
    20122017  for (this_xref = 0; xref_list[this_xref]; this_xref++)
    20132018    {
     
    20192024          break;
    20202025        }
    2021      
     2026
    20222027      /* See how far POS is from this xref.  Take into account the
    20232028         `*Note' that begins the xref, since as far as the user is
     
    20252030      delta = MIN (labs (pos - (xref->start - strlen (INFO_XREF_LABEL))),
    20262031                   labs (pos - xref->end));
    2027      
     2032
    20282033      /* It's the <= instead of < that makes us choose the forward xref
    20292034         of POS if two are equidistant.  Of course, because of all the
     
    20362041        }
    20372042    }
    2038  
     2043
    20392044  /* Maybe there was no list to search through.  */
    20402045  if (nearest < 0)
    20412046    return NULL;
    2042  
     2047
    20432048  /* Ok, we have a nearest xref, make a list of it.  */
    20442049  {
     
    32993304
    33003305#if !defined (DEFAULT_INFO_PRINT_COMMAND)
     3306# ifndef __EMX__
    33013307#  define DEFAULT_INFO_PRINT_COMMAND "lpr"
     3308# else
     3309#  define DEFAULT_INFO_PRINT_COMMAND "expand --tabs=4 >>InfoLog.tmp"
     3310# endif /* __EMX__ */
    33023311#endif /* !DEFAULT_INFO_PRINT_COMMAND */
    33033312
     
    41144123            break;
    41154124          }
    4116      
     4125
    41174126
    41184127      if (search_result == 0)
     
    45754584          !info_input_pending_p ())
    45764585        {
    4577 #if defined (FD_SET)
     4586#if defined (FD_SET) && !defined (__EMX__)
    45784587          struct timeval timer;
    45794588          fd_set readfds;
     
    49244933  space_avail = info_input_buffer_space_available ();
    49254934
     4935#ifdef __EMX__
     4936  if ( is_xfree86 == XFREE86_NO )
     4937    {
     4938      while (chars_avail < space_avail && (tty = pc_getc(0)) != -1)
     4939        input[chars_avail++] = tty;
     4940    }
     4941  else
     4942    {
     4943#endif /* __EMX__ */
    49264944  /* If we can just find out how many characters there are to read, do so. */
    49274945#if defined (FIONREAD)
     
    49764994#  endif /* O_NDELAY */
    49774995#endif /* !FIONREAD */
     4996#ifdef __EMX__
     4997    }
     4998#endif /* __EMX__ */
    49784999
    49795000  while (i < chars_avail)
     
    50025023      unsigned char c;
    50035024      int tty = fileno (info_input_stream);
     5025
     5026#ifdef __EMX__
     5027      if (is_xfree86 == XFREE86_NO)
     5028        keystroke = pc_getc(1);
     5029      else
     5030      {
     5031#endif /* __EMX__ */
    50045032
    50055033      /* Using stream I/O causes FIONREAD etc to fail to work
     
    50465074            }
    50475075        }
     5076#ifdef __EMX__
     5077      }
     5078#endif /* __EMX__ */
    50485079    }
    50495080
Note: See TracChangeset for help on using the changeset viewer.