mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-19 20:40:41 -07:00
* image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct
type. * xterm.c (handle_one_xevent, handle_one_xevent): Likewise. * unexelf.c (fatal): Fix prototype. * term.c (fatal): Implement using varargs. * regex.c (re_char): Move typedef ... * regex.h (re_char): ... here. (re_iswctype, re_wctype, re_set_whitespace_regexp): New prototypes. * emacs.c (malloc_set_state): Fix return type. (endif): Fix type. * lisp.h (fatal): Add argument types. * dispextern.h (fatal): Delete prototype. * systime.h: (make_time): Prototype moved from ... * editfns.c (make_time): ... here. * editfns.c: Move systime.h include after lisp.h. * dired.c: * xsmfns.c: * process.c: Likewise. * alloc.c (old_malloc_hook, old_realloc_hook, old_realloc_hook): Add parameter types. (__malloc_hook, __realloc_hook, __free_hook): Fix prototypes. (emacs_blocked_free): Change definition to match __free_hook. (emacs_blocked_malloc): Change definition to match __malloc_hook. (emacs_blocked_realloc): Change definition to match __realloc_hook.
This commit is contained in:
parent
b17f937955
commit
fa8459a34e
15 changed files with 83 additions and 28 deletions
|
|
@ -1,3 +1,41 @@
|
|||
2005-09-30 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct
|
||||
type.
|
||||
* xterm.c (handle_one_xevent, handle_one_xevent): Likewise.
|
||||
|
||||
* unexelf.c (fatal): Fix prototype.
|
||||
|
||||
* term.c (fatal): Implement using varargs.
|
||||
|
||||
* regex.c (re_char): Move typedef ...
|
||||
* regex.h (re_char): ... here.
|
||||
(re_iswctype, re_wctype, re_set_whitespace_regexp): New
|
||||
prototypes.
|
||||
|
||||
* emacs.c (malloc_set_state): Fix return type.
|
||||
(endif): Fix type.
|
||||
|
||||
* lisp.h (fatal): Add argument types.
|
||||
|
||||
* dispextern.h (fatal): Delete prototype.
|
||||
|
||||
* systime.h: (make_time): Prototype moved from ...
|
||||
* editfns.c (make_time): ... here.
|
||||
|
||||
* editfns.c: Move systime.h include after lisp.h.
|
||||
* dired.c:
|
||||
* xsmfns.c:
|
||||
* process.c: Likewise.
|
||||
|
||||
* alloc.c (old_malloc_hook, old_realloc_hook, old_realloc_hook):
|
||||
Add parameter types.
|
||||
(__malloc_hook, __realloc_hook, __free_hook): Fix prototypes.
|
||||
(emacs_blocked_free): Change definition to match __free_hook.
|
||||
(emacs_blocked_malloc): Change definition to match __malloc_hook.
|
||||
(emacs_blocked_realloc): Change definition to match
|
||||
__realloc_hook.
|
||||
|
||||
2005-09-30 Romain Francoise <romain@orebokech.com>
|
||||
|
||||
* minibuf.c (Fread_buffer): Follow convention for reading from the
|
||||
|
|
|
|||
21
src/alloc.c
21
src/alloc.c
|
|
@ -1161,20 +1161,21 @@ refill_memory_reserve ()
|
|||
#ifndef SYNC_INPUT
|
||||
|
||||
#ifndef DOUG_LEA_MALLOC
|
||||
extern void * (*__malloc_hook) P_ ((size_t));
|
||||
extern void * (*__realloc_hook) P_ ((void *, size_t));
|
||||
extern void (*__free_hook) P_ ((void *));
|
||||
extern void * (*__malloc_hook) P_ ((size_t, const void *));
|
||||
extern void * (*__realloc_hook) P_ ((void *, size_t, const void *));
|
||||
extern void (*__free_hook) P_ ((void *, const void *));
|
||||
/* Else declared in malloc.h, perhaps with an extra arg. */
|
||||
#endif /* DOUG_LEA_MALLOC */
|
||||
static void * (*old_malloc_hook) ();
|
||||
static void * (*old_realloc_hook) ();
|
||||
static void (*old_free_hook) ();
|
||||
static void * (*old_malloc_hook) P_ ((size_t, const void *));
|
||||
static void * (*old_realloc_hook) P_ ((void *, size_t, const void*));
|
||||
static void (*old_free_hook) P_ ((void*, const void*));
|
||||
|
||||
/* This function is used as the hook for free to call. */
|
||||
|
||||
static void
|
||||
emacs_blocked_free (ptr)
|
||||
emacs_blocked_free (ptr, ptr2)
|
||||
void *ptr;
|
||||
const void *ptr2;
|
||||
{
|
||||
BLOCK_INPUT_ALLOC;
|
||||
|
||||
|
|
@ -1221,8 +1222,9 @@ emacs_blocked_free (ptr)
|
|||
/* This function is the malloc hook that Emacs uses. */
|
||||
|
||||
static void *
|
||||
emacs_blocked_malloc (size)
|
||||
emacs_blocked_malloc (size, ptr)
|
||||
size_t size;
|
||||
const void *ptr;
|
||||
{
|
||||
void *value;
|
||||
|
||||
|
|
@ -1268,9 +1270,10 @@ emacs_blocked_malloc (size)
|
|||
/* This function is the realloc hook that Emacs uses. */
|
||||
|
||||
static void *
|
||||
emacs_blocked_realloc (ptr, size)
|
||||
emacs_blocked_realloc (ptr, size, ptr2)
|
||||
void *ptr;
|
||||
size_t size;
|
||||
const void *ptr2;
|
||||
{
|
||||
void *value;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ Boston, MA 02110-1301, USA. */
|
|||
#include <grp.h>
|
||||
#endif
|
||||
|
||||
#include "systime.h"
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef VMS
|
||||
|
|
@ -93,6 +92,7 @@ extern struct direct *readdir ();
|
|||
#endif
|
||||
|
||||
#include "lisp.h"
|
||||
#include "systime.h"
|
||||
#include "buffer.h"
|
||||
#include "commands.h"
|
||||
#include "charset.h"
|
||||
|
|
|
|||
|
|
@ -2940,7 +2940,6 @@ extern void calculate_costs P_ ((struct frame *));
|
|||
extern void set_tty_color_mode P_ ((struct frame *, Lisp_Object));
|
||||
extern void tty_setup_colors P_ ((int));
|
||||
extern void term_init P_ ((char *));
|
||||
extern void fatal P_ ((/* char *, ... */));
|
||||
void cursor_to P_ ((int, int));
|
||||
extern int tty_capable_p P_ ((struct frame *, unsigned, unsigned long, unsigned long));
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ void *malloc_state_ptr;
|
|||
/* From glibc, a routine that returns a copy of the malloc internal state. */
|
||||
extern void *malloc_get_state ();
|
||||
/* From glibc, a routine that overwrites the malloc internal state. */
|
||||
extern void malloc_set_state ();
|
||||
extern int malloc_set_state ();
|
||||
/* Non-zero if the MALLOC_CHECK_ enviroment variable was set while
|
||||
dumping. Used to work around a bug in glibc's malloc. */
|
||||
int malloc_using_checking;
|
||||
|
|
@ -1001,7 +1001,7 @@ main (argc, argv
|
|||
&& !getrlimit (RLIMIT_STACK, &rlim))
|
||||
{
|
||||
long newlim;
|
||||
extern int re_max_failures;
|
||||
extern size_t re_max_failures;
|
||||
/* Approximate the amount regex.c needs per unit of re_max_failures. */
|
||||
int ratio = 20 * sizeof (char *);
|
||||
/* Then add 33% to cover the size of the smaller stacks that regex.c
|
||||
|
|
|
|||
|
|
@ -2178,7 +2178,7 @@ slurp_file (file, size)
|
|||
|
||||
if (stat (file, &st) == 0
|
||||
&& (fp = fopen (file, "rb")) != NULL
|
||||
&& (buf = (char *) xmalloc (st.st_size),
|
||||
&& (buf = (unsigned char *) xmalloc (st.st_size),
|
||||
fread (buf, 1, st.st_size, fp) == st.st_size))
|
||||
{
|
||||
*size = st.st_size;
|
||||
|
|
@ -3029,7 +3029,7 @@ xbm_read_bitmap_data (contents, end, width, height, data)
|
|||
|
||||
bytes_per_line = (*width + 7) / 8 + padding_p;
|
||||
nbytes = bytes_per_line * *height;
|
||||
p = *data = (char *) xmalloc (nbytes);
|
||||
p = *data = (unsigned char *) xmalloc (nbytes);
|
||||
|
||||
if (v10)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3158,7 +3158,7 @@ extern void syms_of_dired P_ ((void));
|
|||
|
||||
/* Defined in term.c */
|
||||
extern void syms_of_term P_ ((void));
|
||||
extern void fatal () NO_RETURN;
|
||||
extern void fatal P_ ((const char *msgid, ...)) NO_RETURN;
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
/* Defined in fontset.c */
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ Boston, MA 02110-1301, USA. */
|
|||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#include "lisp.h"
|
||||
#include "systime.h"
|
||||
#include "systty.h"
|
||||
|
||||
#include "lisp.h"
|
||||
#include "window.h"
|
||||
#include "buffer.h"
|
||||
#include "charset.h"
|
||||
|
|
|
|||
|
|
@ -524,9 +524,6 @@ init_syntax_once ()
|
|||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
/* Type of source-pattern and string chars. */
|
||||
typedef const unsigned char re_char;
|
||||
|
||||
typedef char boolean;
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
|
|
|||
|
|
@ -603,8 +603,16 @@ typedef enum { RECC_ERROR = 0,
|
|||
RECC_ASCII, RECC_UNIBYTE
|
||||
} re_wctype_t;
|
||||
|
||||
extern char re_iswctype (int ch, re_wctype_t cc);
|
||||
extern re_wctype_t re_wctype (const unsigned char* str);
|
||||
|
||||
typedef int re_wchar_t;
|
||||
|
||||
/* Type of source-pattern and string chars. */
|
||||
typedef const unsigned char re_char;
|
||||
|
||||
extern void re_set_whitespace_regexp (re_char *regexp);
|
||||
|
||||
#endif /* not WIDE_CHAR_SUPPORT */
|
||||
|
||||
#endif /* regex.h */
|
||||
|
|
|
|||
|
|
@ -157,6 +157,14 @@ extern int set_file_times __P ((const char *, EMACS_TIME, EMACS_TIME));
|
|||
/* defined in keyboard.c */
|
||||
extern void set_waiting_for_input __P ((EMACS_TIME *));
|
||||
|
||||
/* When lisp.h is not included Lisp_Object is not defined (this can
|
||||
happen when this files is used outside the src directory).
|
||||
Use GCPRO1 to determine if lisp.h was included. */
|
||||
#ifdef GCPRO1
|
||||
/* defined in dired.c */
|
||||
extern Lisp_Object make_time __P ((time_t));
|
||||
#endif
|
||||
|
||||
/* Compare times T1 and T2. Value is 0 if T1 and T2 are the same.
|
||||
Value is < 0 if T1 is less than T2. Value is > 0 otherwise. */
|
||||
|
||||
|
|
|
|||
10
src/term.c
10
src/term.c
|
|
@ -25,6 +25,7 @@ Boston, MA 02110-1301, USA. */
|
|||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "termchar.h"
|
||||
#include "termopts.h"
|
||||
|
|
@ -2689,12 +2690,13 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
|
|||
|
||||
/* VARARGS 1 */
|
||||
void
|
||||
fatal (str, arg1, arg2)
|
||||
char *str, *arg1, *arg2;
|
||||
fatal (const char *str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, str);
|
||||
fprintf (stderr, "emacs: ");
|
||||
fprintf (stderr, str, arg1, arg2);
|
||||
fprintf (stderr, "\n");
|
||||
vfprintf (stderr, str, ap);
|
||||
va_end (ap);
|
||||
fflush (stderr);
|
||||
exit (1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ temacs:
|
|||
#include <string.h>
|
||||
#else
|
||||
#include <config.h>
|
||||
extern void fatal (char *, ...);
|
||||
extern void fatal (const char *msgid, ...);
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ Boston, MA 02110-1301, USA. */
|
|||
#include <sys/param.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "lisp.h"
|
||||
#include "systime.h"
|
||||
#include "sysselect.h"
|
||||
#include "lisp.h"
|
||||
#include "termhooks.h"
|
||||
#include "termopts.h"
|
||||
#include "xterm.h"
|
||||
|
|
|
|||
|
|
@ -6231,7 +6231,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
|
|||
if (status_return == XBufferOverflow)
|
||||
{
|
||||
copy_bufsiz = nbytes + 1;
|
||||
copy_bufptr = (char *) alloca (copy_bufsiz);
|
||||
copy_bufptr = (unsigned char *) alloca (copy_bufsiz);
|
||||
nbytes = XmbLookupString (FRAME_XIC (f),
|
||||
&event.xkey, copy_bufptr,
|
||||
copy_bufsiz, &keysym,
|
||||
|
|
@ -6249,7 +6249,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
|
|||
if (status_return == XBufferOverflow)
|
||||
{
|
||||
copy_bufsiz = nbytes + 1;
|
||||
copy_bufptr = (char *) alloca (copy_bufsiz);
|
||||
copy_bufptr = (unsigned char *) alloca (copy_bufsiz);
|
||||
nbytes = Xutf8LookupString (FRAME_XIC (f),
|
||||
&event.xkey,
|
||||
copy_bufptr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue