chared.c File Reference

#include "config.h"
#include <stdlib.h>
#include "el.h"

Include dependency graph for chared.c:

Go to the source code of this file.

Defines

#define EL_LEAVE   2

Functions

 __RCSID ("$NetBSD: chared.c,v 1.15 2002/03/18 16:00:50 christos Exp $")
protected char * c__next_word (char *p, char *high, int n, int(*wtest)(int))
protected char * c__prev_word (char *p, char *low, int n, int(*wtest)(int))
protected void c_delafter (EditLine *el, int num)
protected void c_delbefore (EditLine *el, int num)
protected int c_gets (EditLine *el, char *buf)
protected int c_hpos (EditLine *el)
protected void c_insert (EditLine *el, int num)
protected int ce__isword (int p)
protected void ch_end (EditLine *el)
protected int ch_enlargebufs (EditLine *el, size_t addlen)
protected int ch_init (EditLine *el)
protected void ch_reset (EditLine *el)
protected char * cv__endword (char *p, char *high, int n)
protected int cv__isword (int p)
protected void cv_delfini (EditLine *el)
protected char * cv_next_word (EditLine *el, char *p, char *high, int n, int(*wtest)(int))
protected char * cv_prev_word (EditLine *el, char *p, char *low, int n, int(*wtest)(int))
protected void cv_undo (EditLine *el, int action, size_t size, char *ptr)
public void el_deletestr (EditLine *el, int n)
public int el_insertstr (EditLine *el, const char *s)


Define Documentation

#define EL_LEAVE   2

Definition at line 55 of file chared.c.

Referenced by ch_enlargebufs().


Function Documentation

__RCSID ( "$NetBSD: chared.  c,
v 1.15 2002/03/18 16:00:50 christos Exp $"   
)

protected char* c__next_word ( char *  p,
char *  high,
int  n,
int(*)(int)  wtest 
)

Definition at line 194 of file chared.c.

Referenced by ce_inc_search(), em_capitol_case(), em_delete_next_word(), em_lower_case(), em_next_word(), and em_upper_case().

00195 {
00196    while (n--) {
00197       while ((p < high) && !(*wtest)((unsigned char) *p))
00198          p++;
00199       while ((p < high) && (*wtest)((unsigned char) *p))
00200          p++;
00201    }
00202    if (p > high)
00203       p = high;
00204    /* p now points where we want it */
00205    return (p);
00206 }

protected char* c__prev_word ( char *  p,
char *  low,
int  n,
int(*)(int)  wtest 
)

Definition at line 170 of file chared.c.

Referenced by ed_delete_prev_word(), ed_prev_word(), and em_copy_prev_word().

00171 {
00172    p--;
00173 
00174    while (n--) {
00175       while ((p >= low) && !(*wtest)((unsigned char) *p))
00176          p--;
00177       while ((p >= low) && (*wtest)((unsigned char) *p))
00178          p--;
00179    }
00180 
00181    /* cp now points to one character before the word */
00182    p++;
00183    if (p < low)
00184       p = low;
00185    /* cp now points where we want it */
00186    return (p);
00187 }

protected void c_delafter ( EditLine el,
int  num 
)

Definition at line 99 of file chared.c.

References el_map_t::current, el_line_t::cursor, cv_undo(), el_line(), editline::el_line, editline::el_map, el_map_t::emacs, INSERT, lineinfo::lastchar, and el_line_t::lastchar.

Referenced by cv_delfini(), ed_delete_next_char(), ed_digit(), ed_insert(), em_delete_next_word(), em_delete_or_list(), em_kill_region(), and vi_substitute_char().

00100 {
00101 
00102    if (el->el_line.cursor + num > el->el_line.lastchar)
00103       num = el->el_line.lastchar - el->el_line.cursor;
00104 
00105    if (num > 0) {
00106       char *cp;
00107 
00108       if (el->el_map.current != el->el_map.emacs)
00109          cv_undo(el, INSERT, (size_t)num, el->el_line.cursor);
00110 
00111       for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++)
00112          *cp = cp[num];
00113 
00114       el->el_line.lastchar -= num;
00115    }
00116 }

protected void c_delbefore ( EditLine el,
int  num 
)

Definition at line 123 of file chared.c.

References el_line_t::buffer, lineinfo::buffer, el_map_t::current, el_line_t::cursor, cv_undo(), el_line(), editline::el_line, editline::el_map, el_map_t::emacs, INSERT, el_line_t::lastchar, and lineinfo::lastchar.

Referenced by cv_delfini(), ed_delete_prev_char(), ed_delete_prev_word(), el_deletestr(), em_kill_region(), vi_delete_prev_char(), and vi_kill_line_prev().

00124 {
00125 
00126    if (el->el_line.cursor - num < el->el_line.buffer)
00127       num = el->el_line.cursor - el->el_line.buffer;
00128 
00129    if (num > 0) {
00130       char *cp;
00131 
00132       if (el->el_map.current != el->el_map.emacs)
00133          cv_undo(el, INSERT, (size_t)num,
00134              el->el_line.cursor - num);
00135 
00136       for (cp = el->el_line.cursor - num;
00137           cp <= el->el_line.lastchar;
00138           cp++)
00139          *cp = cp[num];
00140 
00141       el->el_line.lastchar -= num;
00142    }
00143 }

protected int c_gets ( EditLine el,
char *  buf 
)

Definition at line 627 of file chared.c.

References el_line_t::buffer, CC_REFRESH, el_line_t::cursor, ed_end_of_file(), EL_BUFSIZ, el_getc(), editline::el_line, el_line_t::lastchar, len(), re_refresh(), and term_beep().

Referenced by cv_search(), and ed_command().

00628 {
00629    char ch;
00630    int len = 0;
00631 
00632    for (ch = 0; ch == 0;) {
00633       if (el_getc(el, &ch) != 1)
00634          return (ed_end_of_file(el, 0));
00635       switch (ch) {
00636       case 0010:  /* Delete and backspace */
00637       case 0177:
00638          if (len > 1) {
00639             *el->el_line.cursor-- = '\0';
00640             el->el_line.lastchar = el->el_line.cursor;
00641             buf[len--] = '\0';
00642          } else {
00643             el->el_line.buffer[0] = '\0';
00644             el->el_line.lastchar = el->el_line.buffer;
00645             el->el_line.cursor = el->el_line.buffer;
00646             return (CC_REFRESH);
00647          }
00648          re_refresh(el);
00649          ch = 0;
00650          break;
00651 
00652       case 0033:  /* ESC */
00653       case '\r':  /* Newline */
00654       case '\n':
00655          break;
00656 
00657       default:
00658          if (len >= EL_BUFSIZ)
00659             term_beep(el);
00660          else {
00661             buf[len++] = ch;
00662             *el->el_line.cursor++ = ch;
00663             el->el_line.lastchar = el->el_line.cursor;
00664          }
00665          re_refresh(el);
00666          ch = 0;
00667          break;
00668       }
00669    }
00670    buf[len] = ch;
00671    return (len);
00672 }

protected int c_hpos ( EditLine el  ) 

Definition at line 679 of file chared.c.

References el_line_t::buffer, el_line_t::cursor, and editline::el_line.

Referenced by ed_next_line(), and ed_prev_line().

00680 {
00681    char *ptr;
00682 
00683    /*
00684     * Find how many characters till the beginning of this line.
00685     */
00686    if (el->el_line.cursor == el->el_line.buffer)
00687       return (0);
00688    else {
00689       for (ptr = el->el_line.cursor - 1;
00690            ptr >= el->el_line.buffer && *ptr != '\n';
00691            ptr--)
00692          continue;
00693       return (el->el_line.cursor - ptr - 1);
00694    }
00695 }

protected void c_insert ( EditLine el,
int  num 
)

Definition at line 79 of file chared.c.

References el_line_t::cursor, editline::el_line, el_line_t::lastchar, and el_line_t::limit.

Referenced by cv_paste(), cv_search(), ed_command(), ed_digit(), ed_insert(), el_insertstr(), em_copy_prev_word(), em_yank(), and vi_undo().

00080 {
00081    char *cp;
00082 
00083    if (el->el_line.lastchar + num >= el->el_line.limit)
00084       return;        /* can't go past end of buffer */
00085 
00086    if (el->el_line.cursor < el->el_line.lastchar) {
00087       /* if I must move chars */
00088       for (cp = el->el_line.lastchar; cp >= el->el_line.cursor; cp--)
00089          cp[num] = *cp;
00090    }
00091    el->el_line.lastchar += num;
00092 }

protected int ce__isword ( int  p  ) 

Definition at line 150 of file chared.c.

References NULL.

Referenced by ce_inc_search(), ed_delete_prev_word(), ed_prev_word(), em_capitol_case(), em_copy_prev_word(), em_delete_next_word(), em_lower_case(), em_next_word(), em_upper_case(), vi_next_word(), and vi_prev_word().

00151 {
00152    return (isalpha(p) || isdigit(p) || strchr("*?_-.[]~=", p) != NULL);
00153 }

protected void ch_end ( EditLine el  ) 

protected int ch_enlargebufs ( EditLine el,
size_t  addlen 
)

Definition at line 491 of file chared.c.

References EL_LEAVE, editline::el_line, el_realloc, hist_enlargebuf(), and el_line_t::limit.

Referenced by ed_digit(), ed_insert(), el_gets(), el_insertstr(), and em_yank().

00494 {
00495    size_t sz, newsz;
00496    char *newbuffer, *oldbuf, *oldkbuf;
00497 
00498    sz = el->el_line.limit - el->el_line.buffer + EL_LEAVE;
00499    newsz = sz * 2;
00500    /*
00501     * If newly required length is longer than current buffer, we need
00502     * to make the buffer big enough to hold both old and new stuff.
00503     */
00504    if (addlen > sz) {
00505       while(newsz - sz < addlen)
00506          newsz *= 2;
00507    }
00508 
00509    /*
00510     * Reallocate line buffer.
00511     */
00512    newbuffer = el_realloc(el->el_line.buffer, newsz);
00513    if (!newbuffer)
00514       return 0;
00515 
00516    /* zero the newly added memory, leave old data in */
00517    (void) memset(&newbuffer[sz], 0, newsz - sz);
00518        
00519    oldbuf = el->el_line.buffer;
00520 
00521    el->el_line.buffer = newbuffer;
00522    el->el_line.cursor = newbuffer + (el->el_line.cursor - oldbuf);
00523    el->el_line.lastchar = newbuffer + (el->el_line.lastchar - oldbuf);
00524    el->el_line.limit  = &newbuffer[newsz - EL_LEAVE];
00525 
00526    /*
00527     * Reallocate kill buffer.
00528     */
00529    newbuffer = el_realloc(el->el_chared.c_kill.buf, newsz);
00530    if (!newbuffer)
00531       return 0;
00532 
00533    /* zero the newly added memory, leave old data in */
00534    (void) memset(&newbuffer[sz], 0, newsz - sz);
00535 
00536    oldkbuf = el->el_chared.c_kill.buf;
00537 
00538    el->el_chared.c_kill.buf = newbuffer;
00539    el->el_chared.c_kill.last = newbuffer +
00540                (el->el_chared.c_kill.last - oldkbuf);
00541    el->el_chared.c_kill.mark = el->el_line.buffer +
00542                (el->el_chared.c_kill.mark - oldbuf);
00543 
00544    /*
00545     * Reallocate undo buffer.
00546     */
00547    newbuffer = el_realloc(el->el_chared.c_undo.buf, newsz);
00548    if (!newbuffer)
00549       return 0;
00550 
00551    /* zero the newly added memory, leave old data in */
00552    (void) memset(&newbuffer[sz], 0, newsz - sz);
00553 
00554    el->el_chared.c_undo.ptr = el->el_line.buffer +
00555                 (el->el_chared.c_undo.ptr - oldbuf);
00556    el->el_chared.c_undo.buf = newbuffer;
00557    
00558    if (!hist_enlargebuf(el, sz, newsz))
00559       return 0;
00560 
00561    return 1;
00562 }

protected int ch_init ( EditLine el  ) 

Definition at line 405 of file chared.c.

References c_vcmd_t::action, c_undo_t::action, el_state_t::argument, c_kill_t::buf, c_undo_t::buf, el_line_t::buffer, el_chared_t::c_kill, el_chared_t::c_macro, el_chared_t::c_undo, el_chared_t::c_vcmd, el_map_t::current, el_line_t::cursor, el_state_t::doingarg, c_undo_t::dsize, EL_BUFSIZ, editline::el_chared, editline::el_line, el_malloc, editline::el_map, EL_MAXMACRO, editline::el_state, el_state_t::inputmode, c_vcmd_t::ins, c_undo_t::isize, el_map_t::key, c_kill_t::last, el_line_t::lastchar, el_state_t::lastcmd, c_macro_t::level, el_line_t::limit, c_macro_t::macro, c_kill_t::mark, el_state_t::metanext, MODE_INSERT, c_macro_t::nline, NOP, NULL, c_vcmd_t::pos, and c_undo_t::ptr.

Referenced by el_init().

00406 {
00407    el->el_line.buffer      = (char *) el_malloc(EL_BUFSIZ);
00408    if (el->el_line.buffer == NULL)
00409       return (-1);
00410 
00411    (void) memset(el->el_line.buffer, 0, EL_BUFSIZ);
00412    el->el_line.cursor      = el->el_line.buffer;
00413    el->el_line.lastchar    = el->el_line.buffer;
00414    el->el_line.limit    = &el->el_line.buffer[EL_BUFSIZ - 2];
00415 
00416    el->el_chared.c_undo.buf   = (char *) el_malloc(EL_BUFSIZ);
00417    if (el->el_chared.c_undo.buf == NULL)
00418       return (-1);
00419    (void) memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ);
00420    el->el_chared.c_undo.action   = NOP;
00421    el->el_chared.c_undo.isize = 0;
00422    el->el_chared.c_undo.dsize = 0;
00423    el->el_chared.c_undo.ptr   = el->el_line.buffer;
00424 
00425    el->el_chared.c_vcmd.action   = NOP;
00426    el->el_chared.c_vcmd.pos   = el->el_line.buffer;
00427    el->el_chared.c_vcmd.ins   = el->el_line.buffer;
00428 
00429    el->el_chared.c_kill.buf   = (char *) el_malloc(EL_BUFSIZ);
00430    if (el->el_chared.c_kill.buf == NULL)
00431       return (-1);
00432    (void) memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ);
00433    el->el_chared.c_kill.mark  = el->el_line.buffer;
00434    el->el_chared.c_kill.last  = el->el_chared.c_kill.buf;
00435 
00436    el->el_map.current      = el->el_map.key;
00437 
00438    el->el_state.inputmode     = MODE_INSERT; /* XXX: save a default */
00439    el->el_state.doingarg      = 0;
00440    el->el_state.metanext      = 0;
00441    el->el_state.argument      = 1;
00442    el->el_state.lastcmd    = ED_UNASSIGNED;
00443 
00444    el->el_chared.c_macro.nline   = NULL;
00445    el->el_chared.c_macro.level   = -1;
00446    el->el_chared.c_macro.macro   = (char **) el_malloc(EL_MAXMACRO *
00447        sizeof(char *));
00448    if (el->el_chared.c_macro.macro == NULL)
00449       return (-1);
00450    return (0);
00451 }

protected void ch_reset ( EditLine el  ) 

Definition at line 457 of file chared.c.

References c_vcmd_t::action, c_undo_t::action, el_state_t::argument, el_line_t::buffer, el_chared_t::c_kill, el_chared_t::c_macro, el_chared_t::c_undo, el_chared_t::c_vcmd, el_map_t::current, el_line_t::cursor, el_state_t::doingarg, c_undo_t::dsize, editline::el_chared, editline::el_history, editline::el_line, editline::el_map, editline::el_state, el_history_t::eventno, el_state_t::inputmode, c_vcmd_t::ins, c_undo_t::isize, el_map_t::key, el_line_t::lastchar, el_state_t::lastcmd, c_macro_t::level, c_kill_t::mark, el_state_t::metanext, MODE_INSERT, NOP, c_vcmd_t::pos, and c_undo_t::ptr.

Referenced by ch_end(), ed_start_over(), el_gets(), and el_reset().

00458 {
00459    el->el_line.cursor      = el->el_line.buffer;
00460    el->el_line.lastchar    = el->el_line.buffer;
00461 
00462    el->el_chared.c_undo.action   = NOP;
00463    el->el_chared.c_undo.isize = 0;
00464    el->el_chared.c_undo.dsize = 0;
00465    el->el_chared.c_undo.ptr   = el->el_line.buffer;
00466 
00467    el->el_chared.c_vcmd.action   = NOP;
00468    el->el_chared.c_vcmd.pos   = el->el_line.buffer;
00469    el->el_chared.c_vcmd.ins   = el->el_line.buffer;
00470 
00471    el->el_chared.c_kill.mark  = el->el_line.buffer;
00472 
00473    el->el_map.current      = el->el_map.key;
00474 
00475    el->el_state.inputmode     = MODE_INSERT; /* XXX: save a default */
00476    el->el_state.doingarg      = 0;
00477    el->el_state.metanext      = 0;
00478    el->el_state.argument      = 1;
00479    el->el_state.lastcmd    = ED_UNASSIGNED;
00480 
00481    el->el_chared.c_macro.level   = -1;
00482 
00483    el->el_history.eventno     = 0;
00484 }

protected char* cv__endword ( char *  p,
char *  high,
int  n 
)

Definition at line 381 of file chared.c.

Referenced by vi_end_word(), and vi_to_end_word().

00382 {
00383    p++;
00384 
00385    while (n--) {
00386       while ((p < high) && isspace((unsigned char) *p))
00387          p++;
00388 
00389       if (isalnum((unsigned char) *p))
00390          while ((p < high) && isalnum((unsigned char) *p))
00391             p++;
00392       else
00393          while ((p < high) && !(isspace((unsigned char) *p) ||
00394              isalnum((unsigned char) *p)))
00395             p++;
00396    }
00397    p--;
00398    return (p);
00399 }

protected int cv__isword ( int  p  ) 

Definition at line 160 of file chared.c.

Referenced by vi_next_space_word(), and vi_prev_space_word().

00161 {
00162    return (!isspace(p));
00163 }

protected void cv_delfini ( EditLine el  ) 

Definition at line 308 of file chared.c.

References c_undo_t::action, c_vcmd_t::action, c_delafter(), c_delbefore(), el_chared_t::c_undo, el_chared_t::c_vcmd, el_map_t::current, el_line_t::cursor, DELETE, c_undo_t::dsize, EL_ABORT, editline::el_chared, editline::el_errfile, editline::el_line, editline::el_map, INSERT, el_map_t::key, NOP, c_vcmd_t::pos, c_undo_t::ptr, and re_refresh_cursor().

Referenced by cv_csearch_back(), cv_csearch_fwd(), ed_move_to_beg(), ed_move_to_end(), ed_next_char(), ed_prev_char(), ed_prev_word(), em_next_word(), vi_end_word(), vi_next_space_word(), vi_next_word(), vi_prev_space_word(), vi_prev_word(), vi_to_end_word(), and vi_zero().

00309 {
00310    int size;
00311    int oaction;
00312 
00313    if (el->el_chared.c_vcmd.action & INSERT)
00314       el->el_map.current = el->el_map.key;
00315 
00316    oaction = el->el_chared.c_vcmd.action;
00317    el->el_chared.c_vcmd.action = NOP;
00318 
00319    if (el->el_chared.c_vcmd.pos == 0)
00320       return;
00321 
00322 
00323    if (el->el_line.cursor > el->el_chared.c_vcmd.pos) {
00324       size = (int) (el->el_line.cursor - el->el_chared.c_vcmd.pos);
00325       c_delbefore(el, size);
00326       el->el_line.cursor = el->el_chared.c_vcmd.pos;
00327       re_refresh_cursor(el);
00328    } else if (el->el_line.cursor < el->el_chared.c_vcmd.pos) {
00329       size = (int)(el->el_chared.c_vcmd.pos - el->el_line.cursor);
00330       c_delafter(el, size);
00331    } else {
00332       size = 1;
00333       c_delafter(el, size);
00334    }
00335    switch (oaction) {
00336    case DELETE|INSERT:
00337       el->el_chared.c_undo.action = DELETE|INSERT;
00338       break;
00339    case DELETE:
00340       el->el_chared.c_undo.action = INSERT;
00341       break;
00342    case NOP:
00343    case INSERT:
00344    default:
00345       EL_ABORT((el->el_errfile, "Bad oaction %d\n", oaction));
00346       break;
00347    }
00348 
00349 
00350    el->el_chared.c_undo.ptr = el->el_line.cursor;
00351    el->el_chared.c_undo.dsize = size;
00352 }

protected char* cv_next_word ( EditLine el,
char *  p,
char *  high,
int  n,
int(*)(int)  wtest 
)

Definition at line 212 of file chared.c.

References c_vcmd_t::action, el_chared_t::c_vcmd, DELETE, editline::el_chared, and INSERT.

Referenced by vi_next_space_word(), and vi_next_word().

00213 {
00214    int test;
00215 
00216    while (n--) {
00217       test = (*wtest)((unsigned char) *p);
00218       while ((p < high) && (*wtest)((unsigned char) *p) == test)
00219          p++;
00220       /*
00221        * vi historically deletes with cw only the word preserving the
00222        * trailing whitespace! This is not what 'w' does..
00223        */
00224       if (el->el_chared.c_vcmd.action != (DELETE|INSERT))
00225          while ((p < high) && isspace((unsigned char) *p))
00226             p++;
00227    }
00228 
00229    /* p now points where we want it */
00230    if (p > high)
00231       return (high);
00232    else
00233       return (p);
00234 }

protected char* cv_prev_word ( EditLine el,
char *  p,
char *  low,
int  n,
int(*)(int)  wtest 
)

Definition at line 241 of file chared.c.

References c_vcmd_t::action, el_chared_t::c_vcmd, DELETE, editline::el_chared, and INSERT.

Referenced by vi_prev_space_word(), and vi_prev_word().

00242 {
00243    int test;
00244 
00245    while (n--) {
00246       p--;
00247       /*
00248        * vi historically deletes with cb only the word preserving the
00249        * leading whitespace! This is not what 'b' does..
00250        */
00251       if (el->el_chared.c_vcmd.action != (DELETE|INSERT))
00252          while ((p > low) && isspace((unsigned char) *p))
00253             p--;
00254       test = (*wtest)((unsigned char) *p);
00255       while ((p >= low) && (*wtest)((unsigned char) *p) == test)
00256          p--;
00257       p++;
00258       while (isspace((unsigned char) *p))
00259          p++;
00260    }
00261 
00262    /* p now points where we want it */
00263    if (p < low)
00264       return (low);
00265    else
00266       return (p);
00267 }

protected void cv_undo ( EditLine el,
int  action,
size_t  size,
char *  ptr 
)

Definition at line 61 of file chared.c.

References c_undo_t::action, c_undo_t::buf, el_chared_t::c_undo, c_undo_t::dsize, editline::el_chared, editline::el_errfile, c_undo_t::isize, and c_undo_t::ptr.

Referenced by c_delafter(), and c_delbefore().

00062 {
00063    c_undo_t *vu = &el->el_chared.c_undo;
00064    vu->action = action;
00065    vu->ptr    = ptr;
00066    vu->isize  = size;
00067    (void) memcpy(vu->buf, vu->ptr, size);
00068 #ifdef DEBUG_UNDO
00069    (void) fprintf(el->el_errfile, "Undo buffer \"%s\" size = +%d -%d\n",
00070           vu->ptr, vu->isize, vu->dsize);
00071 #endif
00072 }

public void el_deletestr ( EditLine el,
int  n 
)

Definition at line 609 of file chared.c.

References el_line_t::buffer, c_delbefore(), el_line_t::cursor, and editline::el_line.

Referenced by cli_complete(), and rl_complete_internal().

00610 {
00611    if (n <= 0)
00612       return;
00613 
00614    if (el->el_line.cursor < &el->el_line.buffer[n])
00615       return;
00616 
00617    c_delbefore(el, n);     /* delete before dot */
00618    el->el_line.cursor -= n;
00619    if (el->el_line.cursor < el->el_line.buffer)
00620       el->el_line.cursor = el->el_line.buffer;
00621 }

public int el_insertstr ( EditLine el,
const char *  s 
)

Definition at line 587 of file chared.c.

References c_insert(), ch_enlargebufs(), el_line_t::cursor, editline::el_line, el_line_t::lastchar, len(), and el_line_t::limit.

Referenced by cli_complete(), complete(), and rl_complete_internal().

00588 {
00589    size_t len;
00590 
00591    if ((len = strlen(s)) == 0)
00592       return (-1);
00593    if (el->el_line.lastchar + len >= el->el_line.limit) {
00594       if (!ch_enlargebufs(el, len))
00595          return (-1);
00596    }
00597 
00598    c_insert(el, (int)len);
00599    while (*s)
00600       *el->el_line.cursor++ = *s++;
00601    return (0);
00602 }


Generated on Thu Apr 16 06:30:11 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6