Changeset 32692 in project for release/4/readline/trunk/interface.c


Ignore:
Timestamp:
08/10/15 16:13:19 (6 years ago)
Author:
Alexej Magura
Message:

adds support for custom cflags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/readline/trunk/interface.c

    r32690 r32692  
    117117}
    118118
     119static HIST_ENTRY *last_history_entry(const bool del_current, const bool script)
     120{
     121     HIST_ENTRY *he;
     122
     123     using_history();
     124#if RD_DEBUG
     125     if ((he = current_history()) != 0)
     126          RD_DBG("current history: `%s'\n", he->line);
     127#endif
     128     if (del_current && !(script)) {
     129          if ((he = current_history()) != 0) {
     130               RD_DBG("deleting: `%s'\n", he->line);
     131               free_history_entry(remove_history(where_history()));
     132          } else if ((he = previous_history()) != 0) {
     133               RD_DBG("deleting: `%s'\n", he->line);
     134               free_history_entry(remove_history(where_history()));
     135          }
     136     } else if (!script) {
     137          previous_history();
     138     }
     139     he = previous_history();
     140     using_history();
     141     return he;
     142}
     143
    119144/* End of static functions */
    120145
     
    377402}
    378403
    379 static HIST_ENTRY *last_history_entry(const bool del_current, const bool script)
    380 {
    381      HIST_ENTRY *he;
    382 
    383      using_history();
    384 #if RD_DEBUG
    385      if ((he = current_history()) != 0)
    386           RD_DBG("current history: `%s'\n", he->line);
    387 #endif
    388      if (del_current && !(script)) {
    389           if ((he = current_history()) != 0) {
    390                RD_DBG("deleting: `%s'\n", he->line);
    391                free_history_entry(remove_history(where_history()));
    392           } else if ((he = previous_history()) != 0) {
    393                RD_DBG("deleting: `%s'\n", he->line);
    394                free_history_entry(remove_history(where_history()));
    395           }
    396      } else if (!script) {
    397           previous_history();
    398      }
    399      he = previous_history();
    400      using_history();
    401      return he;
    402 }
    403 
    404404char *last_history_line(const bool del_current, const bool script)
    405405{
     
    470470     bzero(rlist, hsize);
    471471
    472      catm(rlist, hsize, hist_list[0]->line, "\n");
     472     catm(rlist, hsize-1, hist_list[0]->line, "\n");
    473473     RD_DBG("buf@%d: %s\n", __LINE__, rlist);
    474474
Note: See TracChangeset for help on using the changeset viewer.