Remove a few unused C functions
* src/eval.c (let_shadows_global_binding_p): * src/print.c (write_string): * src/systhread.c (sys_mutex_destroy, sys_thread_equal): Remove. * src/print.c (write_string): Rename from write_string_1. All uses changed.
This commit is contained in:
parent
d8899b9d1b
commit
d83c75ec19
5 changed files with 4 additions and 70 deletions
12
src/eval.c
12
src/eval.c
|
@ -3213,18 +3213,6 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool
|
||||
let_shadows_global_binding_p (Lisp_Object symbol)
|
||||
{
|
||||
union specbinding *p;
|
||||
|
||||
for (p = specpdl_ptr; p > specpdl; )
|
||||
if ((--p)->kind >= SPECPDL_LET && EQ (specpdl_symbol (p), symbol))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
do_specbind (struct Lisp_Symbol *sym, union specbinding *bind,
|
||||
Lisp_Object value, enum Set_Internal_Bind bindflag)
|
||||
|
|
|
@ -3707,7 +3707,6 @@ extern Lisp_Object Vprin1_to_string_buffer;
|
|||
extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
|
||||
extern void temp_output_buffer_setup (const char *);
|
||||
extern int print_level;
|
||||
extern void write_string (const char *);
|
||||
extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
|
||||
Lisp_Object);
|
||||
extern Lisp_Object internal_with_output_to_temp_buffer
|
||||
|
@ -3848,7 +3847,6 @@ extern void mark_specpdl (union specbinding *first, union specbinding *ptr);
|
|||
extern void get_backtrace (Lisp_Object array);
|
||||
Lisp_Object backtrace_top_function (void);
|
||||
extern bool let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol);
|
||||
extern bool let_shadows_global_binding_p (Lisp_Object symbol);
|
||||
|
||||
#ifdef HAVE_MODULES
|
||||
/* Defined in alloc.c. */
|
||||
|
|
18
src/print.c
18
src/print.c
|
@ -522,23 +522,13 @@ print_c_string (char const *string, Lisp_Object printcharfun)
|
|||
Do not use this on the contents of a Lisp string. */
|
||||
|
||||
static void
|
||||
write_string_1 (const char *data, Lisp_Object printcharfun)
|
||||
write_string (const char *data, Lisp_Object printcharfun)
|
||||
{
|
||||
PRINTPREPARE;
|
||||
print_c_string (data, printcharfun);
|
||||
PRINTFINISH;
|
||||
}
|
||||
|
||||
/* Used from outside of print.c to print a C unibyte
|
||||
string at DATA on the default output stream.
|
||||
Do not use this on the contents of a Lisp string. */
|
||||
|
||||
void
|
||||
write_string (const char *data)
|
||||
{
|
||||
write_string_1 (data, Vstandard_output);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
temp_output_buffer_setup (const char *bufname)
|
||||
|
@ -888,7 +878,7 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
|
|||
Lisp_Object errname, errmsg, file_error, tail;
|
||||
|
||||
if (context != 0)
|
||||
write_string_1 (context, stream);
|
||||
write_string (context, stream);
|
||||
|
||||
/* If we know from where the error was signaled, show it in
|
||||
*Messages*. */
|
||||
|
@ -934,7 +924,7 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
|
|||
const char *sep = ": ";
|
||||
|
||||
if (!STRINGP (errmsg))
|
||||
write_string_1 ("peculiar error", stream);
|
||||
write_string ("peculiar error", stream);
|
||||
else if (SCHARS (errmsg))
|
||||
Fprinc (errmsg, stream);
|
||||
else
|
||||
|
@ -945,7 +935,7 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
|
|||
Lisp_Object obj;
|
||||
|
||||
if (sep)
|
||||
write_string_1 (sep, stream);
|
||||
write_string (sep, stream);
|
||||
obj = XCAR (tail);
|
||||
if (!NILP (file_error)
|
||||
|| EQ (errname, Qend_of_file) || EQ (errname, Quser_error))
|
||||
|
|
|
@ -38,11 +38,6 @@ sys_mutex_unlock (sys_mutex_t *m)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
sys_mutex_destroy (sys_mutex_t *m)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
sys_cond_init (sys_cond_t *c)
|
||||
{
|
||||
|
@ -75,12 +70,6 @@ sys_thread_self (void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sys_thread_equal (sys_thread_t x, sys_thread_t y)
|
||||
{
|
||||
return x == y;
|
||||
}
|
||||
|
||||
int
|
||||
sys_thread_create (sys_thread_t *t, const char *name,
|
||||
thread_creation_function *func, void *datum)
|
||||
|
@ -119,12 +108,6 @@ sys_mutex_unlock (sys_mutex_t *mutex)
|
|||
pthread_mutex_unlock (mutex);
|
||||
}
|
||||
|
||||
void
|
||||
sys_mutex_destroy (sys_mutex_t *mutex)
|
||||
{
|
||||
pthread_mutex_destroy (mutex);
|
||||
}
|
||||
|
||||
void
|
||||
sys_cond_init (sys_cond_t *cond)
|
||||
{
|
||||
|
@ -161,12 +144,6 @@ sys_thread_self (void)
|
|||
return pthread_self ();
|
||||
}
|
||||
|
||||
int
|
||||
sys_thread_equal (sys_thread_t one, sys_thread_t two)
|
||||
{
|
||||
return pthread_equal (one, two);
|
||||
}
|
||||
|
||||
int
|
||||
sys_thread_create (sys_thread_t *thread_ptr, const char *name,
|
||||
thread_creation_function *func, void *arg)
|
||||
|
@ -229,17 +206,6 @@ sys_mutex_unlock (sys_mutex_t *mutex)
|
|||
LeaveCriticalSection ((LPCRITICAL_SECTION)mutex);
|
||||
}
|
||||
|
||||
void
|
||||
sys_mutex_destroy (sys_mutex_t *mutex)
|
||||
{
|
||||
/* FIXME: According to MSDN, deleting a critical session that is
|
||||
owned by a thread leaves the other threads waiting for the
|
||||
critical session in an undefined state. Posix docs seem to say
|
||||
the same about pthread_mutex_destroy. Do we need to protect
|
||||
against such calamities? */
|
||||
DeleteCriticalSection ((LPCRITICAL_SECTION)mutex);
|
||||
}
|
||||
|
||||
void
|
||||
sys_cond_init (sys_cond_t *cond)
|
||||
{
|
||||
|
@ -346,12 +312,6 @@ sys_thread_self (void)
|
|||
return (sys_thread_t) GetCurrentThreadId ();
|
||||
}
|
||||
|
||||
int
|
||||
sys_thread_equal (sys_thread_t one, sys_thread_t two)
|
||||
{
|
||||
return one == two;
|
||||
}
|
||||
|
||||
static thread_creation_function *thread_start_address;
|
||||
|
||||
/* _beginthread wants a void function, while we are passed a function
|
||||
|
|
|
@ -92,7 +92,6 @@ typedef void *(thread_creation_function) (void *);
|
|||
extern void sys_mutex_init (sys_mutex_t *);
|
||||
extern void sys_mutex_lock (sys_mutex_t *);
|
||||
extern void sys_mutex_unlock (sys_mutex_t *);
|
||||
extern void sys_mutex_destroy (sys_mutex_t *);
|
||||
|
||||
extern void sys_cond_init (sys_cond_t *);
|
||||
extern void sys_cond_wait (sys_cond_t *, sys_mutex_t *);
|
||||
|
@ -101,7 +100,6 @@ extern void sys_cond_broadcast (sys_cond_t *);
|
|||
extern void sys_cond_destroy (sys_cond_t *);
|
||||
|
||||
extern sys_thread_t sys_thread_self (void);
|
||||
extern int sys_thread_equal (sys_thread_t, sys_thread_t);
|
||||
|
||||
extern int sys_thread_create (sys_thread_t *, const char *,
|
||||
thread_creation_function *,
|
||||
|
|
Loading…
Add table
Reference in a new issue