IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14449


Ignore:
Timestamp:
Aug 8, 2007, 12:27:44 PM (19 years ago)
Author:
eugene
Message:

support the BSD libedit as well as readlin

Location:
trunk/Ohana/src/opihi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/quit.c

    r4302 r14449  
    1212  }
    1313
     14// the libedit version of readline does not support an incremental write to history file
     15# ifndef RL_READLINE_VERSION
     16  history = get_variable("HISTORY");
     17  if (history != NULL) write_history (history);
     18# endif
     19
    1420  exit (state);
    1521
  • trunk/Ohana/src/opihi/lib.shell/CommandOps.c

    r7917 r14449  
    11# include "opihi.h"
     2
     3// if the user has installed the libedit version of readline, we need to modify a couple symbols:
     4# ifndef RL_READLINE_VERSION
     5# define rl_completion_matches(A,B) completion_matches(A,B)
     6# endif
    27
    38static Command  *commands;
     
    118123  matches = (char **) NULL;
    119124 
    120   if (start == 0)
     125  if (start == 0) {
    121126    matches = rl_completion_matches (text, command_generator);
     127  }
    122128
    123129  return (matches);
  • trunk/Ohana/src/opihi/lib.shell/opihi.c

    r13504 r14449  
    4141      status = multicommand (line);
    4242      add_history (line);
     43
     44// the libedit version of readline does not support an incremental write to history file
     45# ifdef RL_READLINE_VERSION
    4346      if (history != NULL) append_history (1, history);
     47# endif
     48
    4449    }
    4550    free (line);
Note: See TracChangeset for help on using the changeset viewer.