+2010-07-12 Dan Nicolaescu <dann@ics.uci.edu>
+
+ Convert more function definitions to standard C.
+ * xdisp.c (window_box_edges, handle_single_display_spec)
+ (display_string): Convert definition to standard C.
+ * scroll.c (do_direct_scrolling, scrolling_1):
+ * dispnew.c (allocate_matrices_for_frame_redisplay)
+ (mirrored_line_dance):
+ * coding.c (code_convert_string):
+ * charset.c (map_charset_chars):
+ * ccl.c (Fccl_program_p, Fccl_execute, Fccl_execute_on_string)
+ (Fregister_ccl_program, Fregister_code_conversion_map):
+ * keyboard.c (kbd_buffer_nr_stored): Likewise.
+ (head_table): Make static and const.
+
2010-07-12 Andreas Schwab <schwab@linux-m68k.org>
* Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0,
doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code.
See the documentation of `define-ccl-program' for the detail of CCL program. */)
- (object)
- Lisp_Object object;
+ (Lisp_Object object)
{
Lisp_Object val;
See the documentation of `define-ccl-program' for a definition of CCL
programs. */)
- (ccl_prog, reg)
- Lisp_Object ccl_prog, reg;
+ (Lisp_Object ccl_prog, Lisp_Object reg)
{
struct ccl_program ccl;
int i;
See the documentation of `define-ccl-program' for the detail of CCL program.
usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBYTE-P) */)
- (ccl_prog, status, str, contin, unibyte_p)
- Lisp_Object ccl_prog, status, str, contin, unibyte_p;
+ (Lisp_Object ccl_prog, Lisp_Object status, Lisp_Object str, Lisp_Object contin, Lisp_Object unibyte_p)
{
Lisp_Object val;
struct ccl_program ccl;
CCL-PROG should be a compiled CCL program (vector), or nil.
If it is nil, just reserve NAME as a CCL program name.
Return index number of the registered CCL program. */)
- (name, ccl_prog)
- Lisp_Object name, ccl_prog;
+ (Lisp_Object name, Lisp_Object ccl_prog)
{
int len = ASIZE (Vccl_program_table);
int idx;
2, 2, 0,
doc: /* Register SYMBOL as code conversion map MAP.
Return index number of the registered map. */)
- (symbol, map)
- Lisp_Object symbol, map;
+ (Lisp_Object symbol, Lisp_Object map)
{
int len = ASIZE (Vcode_conversion_map_vector);
int i;
}
void
-map_charset_chars (c_function, function, arg,
- charset, from, to)
- void (*c_function) (Lisp_Object, Lisp_Object);
- Lisp_Object function, arg;
- struct charset *charset;
- unsigned from, to;
+map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object function,
+ Lisp_Object arg, struct charset *charset, unsigned from, unsigned to)
{
Lisp_Object range;
int partial;
}
Lisp_Object
-code_convert_string (string, coding_system, dst_object,
- encodep, nocopy, norecord)
- Lisp_Object string, coding_system, dst_object;
- int encodep, nocopy, norecord;
+code_convert_string (Lisp_Object string, Lisp_Object coding_system,
+ Lisp_Object dst_object, int encodep, int nocopy, int norecord)
{
struct coding_system coding;
EMACS_INT chars, bytes;
#define CHANGED_LEAF_MATRIX (1 << 1)
static struct dim
-allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p,
- window_change_flags)
- Lisp_Object window;
- int x, y;
- int dim_only_p;
- int *window_change_flags;
+allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
+ int dim_only_p, int *window_change_flags)
{
struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
int x0 = x, y0 = y;
This function is called from do_scrolling and do_direct_scrolling. */
void
-mirrored_line_dance (matrix, unchanged_at_top, nlines, copy_from,
- retained_p)
- struct glyph_matrix *matrix;
- int unchanged_at_top, nlines;
- int *copy_from;
- char *retained_p;
+mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlines,
+ int *copy_from, char *retained_p)
{
/* A copy of original rows. */
struct glyph_row *old_rows;
/* Return the number of slots occupied in kbd_buffer. */
static int
-kbd_buffer_nr_stored ()
+kbd_buffer_nr_stored (void)
{
return kbd_fetch_ptr == kbd_store_ptr
? 0
Lisp_Object *kind;
};
-struct event_head head_table[] = {
+static const struct event_head head_table[] = {
{&Qmouse_movement, "mouse-movement", &Qmouse_movement},
{&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement},
{&Qswitch_frame, "switch-frame", &Qswitch_frame},
last_point_position_window = Qnil;
{
- struct event_head *p;
+ const struct event_head *p;
for (p = head_table;
p < head_table + (sizeof (head_table) / sizeof (head_table[0]));
the cost matrix for this approach is constructed. */
static void
-do_direct_scrolling (frame, current_matrix, cost_matrix,
- window_size, unchanged_at_top)
- struct frame *frame;
- struct glyph_matrix *current_matrix;
- struct matrix_elt *cost_matrix;
- int window_size;
- int unchanged_at_top;
+do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
+ struct matrix_elt *cost_matrix, int window_size,
+ int unchanged_at_top)
{
struct matrix_elt *p;
int i, j;
\f
void
-scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
- draw_cost, old_draw_cost, old_hash, new_hash, free_at_end)
- FRAME_PTR frame;
- int window_size, unchanged_at_top, unchanged_at_bottom;
- int *draw_cost;
- int *old_draw_cost;
- int *old_hash;
- int *new_hash;
- int free_at_end;
+scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top,
+ int unchanged_at_bottom, int *draw_cost, int *old_draw_cost,
+ int *old_hash, int *new_hash, int free_at_end)
{
struct matrix_elt *matrix;
matrix = ((struct matrix_elt *)
box. */
INLINE void
-window_box_edges (w, area, top_left_x, top_left_y,
- bottom_right_x, bottom_right_y)
- struct window *w;
- int area;
- int *top_left_x, *top_left_y, *bottom_right_x, *bottom_right_y;
+window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y,
+ int *bottom_right_x, int *bottom_right_y)
{
window_box (w, area, top_left_x, top_left_y, bottom_right_x,
bottom_right_y);
of buffer or string text. */
static int
-handle_single_display_spec (it, spec, object, overlay, position,
- display_replaced_before_p)
- struct it *it;
- Lisp_Object spec;
- Lisp_Object object;
- Lisp_Object overlay;
- struct text_pos *position;
- int display_replaced_before_p;
+handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
+ Lisp_Object overlay, struct text_pos *position,
+ int display_replaced_before_p)
{
Lisp_Object form;
Lisp_Object location, value;
Value is the number of columns displayed. */
static int
-display_string (string, lisp_string, face_string, face_string_pos,
- start, it, field_width, precision, max_x, multibyte)
- unsigned char *string;
- Lisp_Object lisp_string;
- Lisp_Object face_string;
- EMACS_INT face_string_pos;
- EMACS_INT start;
- struct it *it;
- int field_width, precision, max_x;
- int multibyte;
+display_string (unsigned char *string, Lisp_Object lisp_string, Lisp_Object face_string,
+ EMACS_INT face_string_pos, EMACS_INT start, struct it *it,
+ int field_width, int precision, int max_x, int multibyte)
{
int hpos_at_start = it->hpos;
int saved_face_id = it->face_id;