/[guile]/guile/guile-core/guile-readline/readline.c
ViewVC logotype

Diff of /guile/guile-core/guile-readline/readline.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42 by ela, Sun Nov 4 15:52:29 2001 UTC revision 1.43 by mvo, Sun Oct 27 20:27:10 2002 UTC
# Line 1  Line 1 
1  /* readline.c --- line editing support for Guile */  /* readline.c --- line editing support for Guile */
2    
3  /* Copyright (C) 1997,1999,2000,2001 Free Software Foundation, Inc.  /* Copyright (C) 1997,1999,2000,2001, 2002 Free Software Foundation, Inc.
4   *   *
5   * This program is free software; you can redistribute it and/or modify   * This program is free software; you can redistribute it and/or modify
6   * it under the terms of the GNU General Public License as published by   * it under the terms of the GNU General Public License as published by
# Line 149  redisplay () Line 149  redisplay ()
149    
150  static int in_readline = 0;  static int in_readline = 0;
151  #ifdef USE_THREADS  #ifdef USE_THREADS
152  static scm_t_mutex reentry_barrier_mutex;  static SCM reentry_barrier_mutex;
153  #endif  #endif
154    
155  static SCM internal_readline (SCM text);  static SCM internal_readline (SCM text);
# Line 229  reentry_barrier () Line 229  reentry_barrier ()
229    int reentryp = 0;    int reentryp = 0;
230  #ifdef USE_THREADS  #ifdef USE_THREADS
231    /* We should rather use scm_t_mutexry_lock when it becomes available */    /* We should rather use scm_t_mutexry_lock when it becomes available */
232    scm_mutex_lock (&reentry_barrier_mutex);    scm_lock_mutex (reentry_barrier_mutex);
233  #endif  #endif
234    if (in_readline)    if (in_readline)
235      reentryp = 1;      reentryp = 1;
236    else    else
237      ++in_readline;      ++in_readline;
238  #ifdef USE_THREADS  #ifdef USE_THREADS
239    scm_mutex_unlock (&reentry_barrier_mutex);    scm_unlock_mutex (reentry_barrier_mutex);
240  #endif  #endif
241    if (reentryp)    if (reentryp)
242      scm_misc_error (s_scm_readline, "readline is not reentrant", SCM_EOL);      scm_misc_error (s_scm_readline, "readline is not reentrant", SCM_EOL);
# Line 577  scm_init_readline () Line 577  scm_init_readline ()
577  #endif  #endif
578    
579  #ifdef USE_THREADS  #ifdef USE_THREADS
580    scm_mutex_init (&reentry_barrier_mutex);    reentry_barrier_mutex = scm_permanent_object (scm_make_mutex ());
581  #endif  #endif
582    scm_init_opts (scm_readline_options,    scm_init_opts (scm_readline_options,
583                   scm_readline_opts,                   scm_readline_opts,

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26