Changeset 32692 in project


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

adds support for custom cflags

Location:
release/4/readline
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/4/readline/extra/Makefile

    r32340 r32692  
    2525build:
    2626        cd $(mydir)/../trunk; \
    27           sudo $(CHK_CC) -trunk
     27          sudo CFLAGS="$(CFLAGS)" $(CHK_CC) -trunk
    2828
    2929kill:
  • 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
  • release/4/readline/trunk/readline.scm

    r32691 r32692  
    127127C_regparm C_word C_enumerate_symbols(C_SYMBOL_TABLE *stable, C_word pos)
    128128{
    129   int i;
    130   C_word
    131     sym,
    132     bucket = C_u_i_car(pos);
    133 
    134   if(!C_truep(bucket)) return C_SCHEME_FALSE; /* end already reached */
    135   else i = C_unfix(bucket);
    136 
    137   bucket = C_u_i_cdr(pos);
    138 
    139   while(bucket == C_SCHEME_END_OF_LIST) {
    140     if(++i >= stable->size) {
    141       C_set_block_item(pos, 0, C_SCHEME_FALSE);        /* no more buckets */
    142       return C_SCHEME_FALSE;
    143     }
    144     else bucket = stable->table[ i ];
    145   }
    146 
    147   sym = C_block_item(bucket, 0);
    148   C_set_block_item(pos, 0, C_fix(i));
    149   C_mutate2(&C_u_i_cdr(pos), C_block_item(bucket, 1));
    150   return sym;
     129     int i;
     130     C_word
     131          sym,
     132          bucket = C_u_i_car(pos);
     133
     134     if(!C_truep(bucket)) return C_SCHEME_FALSE; /* end already reached */
     135     else i = C_unfix(bucket);
     136
     137     bucket = C_u_i_cdr(pos);
     138
     139     while(bucket == C_SCHEME_END_OF_LIST) {
     140          if(++i >= stable->size) {
     141               C_set_block_item(pos, 0, C_SCHEME_FALSE);        /* no more buckets */
     142               return C_SCHEME_FALSE;
     143          }
     144          else bucket = stable->table[ i ];
     145     }
     146
     147     sym = C_block_item(bucket, 0);
     148     C_set_block_item(pos, 0, C_fix(i));
     149     C_mutate2(&C_u_i_cdr(pos), C_block_item(bucket, 1));
     150     return sym;
    151151}
    152152<#
     
    650650
    651651(toplevel-command 'h-load (lambda ()
    652                            (readline#read-history (irregex-replace/all
     652bl                         (readline#read-history (irregex-replace/all
    653653                                                   "~"
    654654                                                   (read-line)
  • release/4/readline/trunk/readline.setup

    r32690 r32692  
    33
    44(use files)
     5
     6;; get environment CFLAGS bindings
     7
    58
    69(define old-files
     
    3336   "-C -D_GNU_SOURCE=1"
    3437   " -C -std=gnu99"
     38   (or (and (get-environment-variable "CFLAGS")
     39            (string-append " -C "
     40                           (string-join
     41                            (string-split (get-environment-variable "CFLAGS") " ")
     42                            " -C ")))
     43       "")
    3544   ))
    3645
Note: See TracChangeset for help on using the changeset viewer.