Commit b2a83eed authored by Paul Eggert's avatar Paul Eggert

Use 'char *FOO' instead of 'char* FOO'

parent 7f89c208
......@@ -7237,9 +7237,9 @@ find_suspicious_object_in_range (void *begin, void *end)
}
static void
note_suspicious_free (void* ptr)
note_suspicious_free (void *ptr)
{
struct suspicious_free_record* rec;
struct suspicious_free_record *rec;
rec = &suspicious_free_history[suspicious_free_history_index++];
if (suspicious_free_history_index ==
......@@ -7254,7 +7254,7 @@ note_suspicious_free (void* ptr)
}
static void
detect_suspicious_free (void* ptr)
detect_suspicious_free (void *ptr)
{
int i;
......
......@@ -1381,7 +1381,7 @@ getenv_internal (const char *var, ptrdiff_t varlen, char **value,
without recording them in Vprocess_environment. */
#ifdef WINDOWSNT
{
char* tmpval = getenv (var);
char *tmpval = getenv (var);
if (tmpval)
{
*value = tmpval;
......
......@@ -1426,7 +1426,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
static void
set_symbol_trapped_write (Lisp_Object symbol, enum symbol_trapped_write trap)
{
struct Lisp_Symbol* sym = XSYMBOL (symbol);
struct Lisp_Symbol *sym = XSYMBOL (symbol);
if (sym->trapped_write == SYMBOL_NOWRITE)
xsignal1 (Qtrapping_constant, symbol);
sym->trapped_write = trap;
......
......@@ -941,7 +941,7 @@ xd_get_connection_references (DBusConnection *connection)
}
/* Convert a Lisp D-Bus object to a pointer. */
static DBusConnection*
static DBusConnection *
xd_lisp_dbus_to_dbus (Lisp_Object bus)
{
return (DBusConnection *) XSAVE_POINTER (bus, 0);
......
......@@ -148,7 +148,7 @@ emacs_fixed_class_init (EmacsFixedClass *klass)
{
GtkWidgetClass *widget_class;
widget_class = (GtkWidgetClass*) klass;
widget_class = (GtkWidgetClass *) klass;
widget_class->get_preferred_width = emacs_fixed_get_preferred_width;
widget_class->get_preferred_height = emacs_fixed_get_preferred_height;
......@@ -205,9 +205,9 @@ emacs_fixed_get_preferred_height (GtkWidget *widget,
(Bug#8919), and so users can resize our frames as they wish. */
void
XSetWMSizeHints (Display* d,
XSetWMSizeHints (Display *d,
Window w,
XSizeHints* hints,
XSizeHints *hints,
Atom prop)
{
struct x_display_info *dpyinfo = x_display_info_for_display (d);
......
......@@ -142,7 +142,7 @@ DEF_DLL_FN (int, gnutls_x509_crt_get_dn,
(gnutls_x509_crt_t, char *, size_t *));
DEF_DLL_FN (int, gnutls_x509_crt_get_pk_algorithm,
(gnutls_x509_crt_t, unsigned int *));
DEF_DLL_FN (const char*, gnutls_pk_algorithm_get_name,
DEF_DLL_FN (const char *, gnutls_pk_algorithm_get_name,
(gnutls_pk_algorithm_t));
DEF_DLL_FN (int, gnutls_pk_bits_to_sec_param,
(gnutls_pk_algorithm_t, unsigned int));
......@@ -154,22 +154,22 @@ DEF_DLL_FN (int, gnutls_x509_crt_get_signature_algorithm,
(gnutls_x509_crt_t));
DEF_DLL_FN (int, gnutls_x509_crt_get_key_id,
(gnutls_x509_crt_t, unsigned int, unsigned char *, size_t *_size));
DEF_DLL_FN (const char*, gnutls_sec_param_get_name, (gnutls_sec_param_t));
DEF_DLL_FN (const char*, gnutls_sign_get_name, (gnutls_sign_algorithm_t));
DEF_DLL_FN (const char *, gnutls_sec_param_get_name, (gnutls_sec_param_t));
DEF_DLL_FN (const char *, gnutls_sign_get_name, (gnutls_sign_algorithm_t));
DEF_DLL_FN (int, gnutls_server_name_set,
(gnutls_session_t, gnutls_server_name_type_t,
const void *, size_t));
DEF_DLL_FN (gnutls_kx_algorithm_t, gnutls_kx_get, (gnutls_session_t));
DEF_DLL_FN (const char*, gnutls_kx_get_name, (gnutls_kx_algorithm_t));
DEF_DLL_FN (const char *, gnutls_kx_get_name, (gnutls_kx_algorithm_t));
DEF_DLL_FN (gnutls_protocol_t, gnutls_protocol_get_version,
(gnutls_session_t));
DEF_DLL_FN (const char*, gnutls_protocol_get_name, (gnutls_protocol_t));
DEF_DLL_FN (const char *, gnutls_protocol_get_name, (gnutls_protocol_t));
DEF_DLL_FN (gnutls_cipher_algorithm_t, gnutls_cipher_get,
(gnutls_session_t));
DEF_DLL_FN (const char*, gnutls_cipher_get_name,
DEF_DLL_FN (const char *, gnutls_cipher_get_name,
(gnutls_cipher_algorithm_t));
DEF_DLL_FN (gnutls_mac_algorithm_t, gnutls_mac_get, (gnutls_session_t));
DEF_DLL_FN (const char*, gnutls_mac_get_name, (gnutls_mac_algorithm_t));
DEF_DLL_FN (const char *, gnutls_mac_get_name, (gnutls_mac_algorithm_t));
static bool
......
......@@ -1694,7 +1694,7 @@ pop_down_dialog (void *arg)
}
/* If there are any emacs timers pending, add a timeout to main loop in DATA.
We pass in DATA as gpointer* so we can use this as a callback. */
Pass DATA as gpointer so we can use this as a callback. */
static gboolean
xg_maybe_add_timer (gpointer data)
......
......@@ -145,7 +145,7 @@ inotify_callback (int fd, void *_)
i = 0;
while (i < (size_t)n)
{
struct inotify_event *ev = (struct inotify_event*)&buffer[i];
struct inotify_event *ev = (struct inotify_event *) &buffer[i];
watch_object = Fassoc (make_watch_descriptor (ev->wd), watch_list);
if (!NILP (watch_object))
......
......@@ -290,7 +290,7 @@ Lisp_Object text_property_list (Lisp_Object, Lisp_Object, Lisp_Object,
void add_text_properties_from_list (Lisp_Object, Lisp_Object, Lisp_Object);
Lisp_Object extend_property_ranges (Lisp_Object, Lisp_Object, Lisp_Object);
Lisp_Object get_char_property_and_overlay (Lisp_Object, Lisp_Object,
Lisp_Object, Lisp_Object*);
Lisp_Object, Lisp_Object *);
extern int text_property_stickiness (Lisp_Object prop, Lisp_Object pos,
Lisp_Object buffer);
......
......@@ -93,7 +93,7 @@ static void describe_command (Lisp_Object, Lisp_Object);
static void describe_translation (Lisp_Object, Lisp_Object);
static void describe_map (Lisp_Object, Lisp_Object,
void (*) (Lisp_Object, Lisp_Object),
bool, Lisp_Object, Lisp_Object*, bool, bool);
bool, Lisp_Object, Lisp_Object *, bool, bool);
static void describe_vector (Lisp_Object, Lisp_Object, Lisp_Object,
void (*) (Lisp_Object, Lisp_Object), bool,
Lisp_Object, Lisp_Object, bool, bool);
......
......@@ -603,7 +603,7 @@ free_menubar_widget_value_tree (widget_value *wv)
wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
if (wv->contents && (wv->contents != (widget_value*)1))
if (wv->contents && (wv->contents != (widget_value *) 1))
{
free_menubar_widget_value_tree (wv->contents);
wv->contents = (widget_value *) 0xDEADBEEF;
......
......@@ -2074,10 +2074,10 @@ and GNUstep implementations ("distributor-specific release
ns_do_applescript (Lisp_Object script, Lisp_Object *result)
{
NSAppleEventDescriptor *desc;
NSDictionary* errorDict;
NSAppleEventDescriptor* returnDescriptor = NULL;
NSDictionary *errorDict;
NSAppleEventDescriptor *returnDescriptor = NULL;
NSAppleScript* scriptObject =
NSAppleScript *scriptObject =
[[NSAppleScript alloc] initWithSource:
[NSString stringWithUTF8String: SSDATA (script)]];
......
......@@ -855,7 +855,7 @@ when setting family in ns_spec_to_descriptor(). */
((CFStringRef)@"Monaco", kATSOptionFlagsDefault);
}
}
font_info->cgfont = CGFontCreateWithPlatformFont ((void*)&atsFont);
font_info->cgfont = CGFontCreateWithPlatformFont ((void *) &atsFont);
}
#endif
......
......@@ -53,7 +53,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* CGFloat on GNUstep may be 4 or 8 byte, but functions expect float* for some
versions.
On Cocoa >= 10.5, functions expect CGFloat*. Make compatible type. */
On Cocoa >= 10.5, functions expect CGFloat *. Make compatible type. */
#ifdef NS_IMPL_COCOA
typedef CGFloat EmacsCGFloat;
#elif GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION >= 22
......@@ -1198,7 +1198,7 @@ extern void ns_finish_events (void);
#ifdef __OBJC__
/* Needed in nsfns.m. */
extern void
ns_set_represented_filename (NSString* fstr, struct frame *f);
ns_set_represented_filename (NSString *fstr, struct frame *f);
#endif
......
......@@ -423,14 +423,14 @@ - (NSColor *)colorUsingDefaultColorSpace
========================================================================== */
void
ns_set_represented_filename (NSString* fstr, struct frame *f)
ns_set_represented_filename (NSString *fstr, struct frame *f)
{
represented_filename = [fstr retain];
represented_frame = f;
}
void
ns_init_events (struct input_event* ev)
ns_init_events (struct input_event *ev)
{
EVENT_INIT (*ev);
emacs_event = ev;
......@@ -5817,7 +5817,7 @@ flag set (this is probably a bug in the OS).
Handle uchrHandle = GetResource
('uchr', GetScriptVariable (smv, smScriptKeys));
UInt32 dummy = 0;
UCKeyTranslate ((UCKeyboardLayout*)*uchrHandle,
UCKeyTranslate ((UCKeyboardLayout *) *uchrHandle,
[[theEvent characters] characterAtIndex: 0],
kUCKeyActionDisplay,
(flags & ~NSEventModifierFlagCommand) >> 8,
......
......@@ -4379,7 +4379,7 @@ network_interface_info (Lisp_Object ifname)
for (it = ifap; it != NULL; it = it->ifa_next)
{
struct sockaddr_dl *sdl = (struct sockaddr_dl*) it->ifa_addr;
struct sockaddr_dl *sdl = (struct sockaddr_dl *) it->ifa_addr;
unsigned char linkaddr[6];
int n;
......
......@@ -1421,7 +1421,7 @@ do { \
{ \
/* It's a counter. */ \
/* Here, we discard `const', making re_match non-reentrant. */ \
unsigned char *ptr = (unsigned char*) POP_FAILURE_POINTER (); \
unsigned char *ptr = (unsigned char *) POP_FAILURE_POINTER (); \
pfreg = POP_FAILURE_INT (); \
STORE_NUMBER (ptr, pfreg); \
DEBUG_PRINT (" Pop counter %p = %ld\n", ptr, pfreg); \
......@@ -4220,8 +4220,8 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, size_t size1,
struct re_registers *regs, ssize_t stop)
{
regoff_t val;
re_char *string1 = (re_char*) str1;
re_char *string2 = (re_char*) str2;
re_char *string1 = (re_char *) str1;
re_char *string2 = (re_char *) str2;
register char *fastmap = bufp->fastmap;
register RE_TRANSLATE_TYPE translate = bufp->translate;
size_t total_size = size1 + size2;
......@@ -4887,7 +4887,7 @@ regoff_t
re_match (struct re_pattern_buffer *bufp, const char *string,
size_t size, ssize_t pos, struct re_registers *regs)
{
regoff_t result = re_match_2_internal (bufp, NULL, 0, (re_char*) string,
regoff_t result = re_match_2_internal (bufp, NULL, 0, (re_char *) string,
size, pos, regs, size);
return result;
}
......@@ -4921,8 +4921,8 @@ re_match_2 (struct re_pattern_buffer *bufp, const char *string1,
SETUP_SYNTAX_TABLE_FOR_OBJECT (re_match_object, charpos, 1);
#endif
result = re_match_2_internal (bufp, (re_char*) string1, size1,
(re_char*) string2, size2,
result = re_match_2_internal (bufp, (re_char *) string1, size1,
(re_char *) string2, size2,
pos, regs, stop);
return result;
}
......@@ -5785,8 +5785,8 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
{
re_char *p1 = p; /* Next operation. */
/* Here, we discard `const', making re_match non-reentrant. */
unsigned char *p2 = (unsigned char*) p + mcnt; /* Jump dest. */
unsigned char *p3 = (unsigned char*) p - 3; /* opcode location. */
unsigned char *p2 = (unsigned char *) p + mcnt; /* Jump dest. */
unsigned char *p3 = (unsigned char *) p - 3; /* opcode location. */
p -= 3; /* Reset so that we will re-execute the
instruction once it's been changed. */
......@@ -5837,7 +5837,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
if (mcnt != 0)
{
/* Here, we discard `const', making re_match non-reentrant. */
unsigned char *p2 = (unsigned char*) p + 2; /* counter loc. */
unsigned char *p2 = (unsigned char *) p + 2; /* counter loc. */
mcnt--;
p += 4;
PUSH_NUMBER (p2, mcnt);
......@@ -5856,7 +5856,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
if (mcnt != 0)
{
/* Here, we discard `const', making re_match non-reentrant. */
unsigned char *p2 = (unsigned char*) p + 2; /* counter loc. */
unsigned char *p2 = (unsigned char *) p + 2; /* counter loc. */
mcnt--;
PUSH_NUMBER (p2, mcnt);
goto unconditional_jump;
......@@ -5873,7 +5873,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
EXTRACT_NUMBER_AND_INCR (mcnt, p);
/* Here, we discard `const', making re_match non-reentrant. */
p2 = (unsigned char*) p + mcnt;
p2 = (unsigned char *) p + mcnt;
/* Signedness doesn't matter since we only copy MCNT's bits. */
EXTRACT_NUMBER_AND_INCR (mcnt, p);
DEBUG_PRINT (" Setting %p to %d.\n", p2, mcnt);
......@@ -6283,7 +6283,7 @@ re_compile_pattern (const char *pattern, size_t length,
setting no_sub. */
bufp->no_sub = 0;
ret = regex_compile ((re_char*) pattern, length,
ret = regex_compile ((re_char *) pattern, length,
#ifdef emacs
posix_backtracking,
whitespace_regexp,
......@@ -6446,7 +6446,7 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern,
/* POSIX says a null character in the pattern terminates it, so we
can use strlen here in compiling the pattern. */
ret = regex_compile ((re_char*) pattern, strlen (pattern), syntax, preg);
ret = regex_compile ((re_char *) pattern, strlen (pattern), syntax, preg);
/* POSIX doesn't distinguish between an unmatched open-group and an
unmatched close-group: both are REG_EPAREN. */
......
......@@ -2536,7 +2536,8 @@ term_mouse_click (struct input_event *result, Gpm_Event *event,
}
int
handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event, struct input_event* hold_quit)
handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event,
struct input_event *hold_quit)
{
struct frame *f = XFRAME (tty->top_frame);
struct input_event ie;
......@@ -4134,9 +4135,11 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
#ifdef TERMINFO
/* Non-standard support for 24-bit colors. */
{
const char* fg = tigetstr ("setf24");
const char* bg = tigetstr ("setb24");
if (fg && bg && fg != (char *)-1 && bg != (char *)-1)
const char *fg = tigetstr ("setf24");
const char *bg = tigetstr ("setb24");
if (fg && bg
&& fg != (char *) (intptr_t) -1
&& bg != (char *) (intptr_t) -1)
{
tty->TS_set_foreground = fg;
tty->TS_set_background = bg;
......
......@@ -148,7 +148,7 @@ WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec;
static void
get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
{
struct frame* f = ew->emacs_frame.frame;
struct frame *f = ew->emacs_frame.frame;
*pixel_width = FRAME_COLUMN_WIDTH (f);
*pixel_height = FRAME_LINE_HEIGHT (f);
}
......@@ -156,7 +156,7 @@ get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
static void
pixel_to_char_size (EmacsFrame ew, Dimension pixel_width, Dimension pixel_height, int *char_width, int *char_height)
{
struct frame* f = ew->emacs_frame.frame;
struct frame *f = ew->emacs_frame.frame;
*char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width);
*char_height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, (int) pixel_height);
}
......@@ -164,7 +164,7 @@ pixel_to_char_size (EmacsFrame ew, Dimension pixel_width, Dimension pixel_height
static void
pixel_to_text_size (EmacsFrame ew, Dimension pixel_width, Dimension pixel_height, int *text_width, int *text_height)
{
struct frame* f = ew->emacs_frame.frame;
struct frame *f = ew->emacs_frame.frame;
*text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, (int) pixel_width);
*text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, (int) pixel_height);
}
......@@ -172,7 +172,7 @@ pixel_to_text_size (EmacsFrame ew, Dimension pixel_width, Dimension pixel_height
static void
char_to_pixel_size (EmacsFrame ew, int char_width, int char_height, Dimension *pixel_width, Dimension *pixel_height)
{
struct frame* f = ew->emacs_frame.frame;
struct frame *f = ew->emacs_frame.frame;
*pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width);
*pixel_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, char_height);
}
......@@ -365,8 +365,8 @@ EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2)
static void
resize_cb (Widget widget,
XtPointer closure,
XEvent* event,
Boolean* continue_to_dispatch)
XEvent *event,
Boolean *continue_to_dispatch)
{
EmacsFrameResize (widget);
}
......
......@@ -92,7 +92,7 @@ typedef struct _EmacsFrameClassRec *EmacsFrameClass;
extern WidgetClass emacsFrameClass;
extern struct _DisplayContext* display_context;
extern struct _DisplayContext *display_context;
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
......
......@@ -25,11 +25,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <X11/CoreP.h>
typedef struct {
struct frame* frame; /* the *emacs* frame object */
struct frame *frame; /* the *emacs* frame object */
/* Resources that can't be done from lisp.
*/
char* geometry; /* geometry spec of this frame */
char * geometry; /* geometry spec of this frame */
Boolean iconic; /* whether this frame is iconic */
/* The rest of this is crap and should be deleted.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment