aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2010-07-03 09:44:17 +0200
committerJuanma Barranquero2010-07-03 09:44:17 +0200
commit3a35a84c9389928a21056f50160ccd1cfca11b9e (patch)
tree92bd1639d1ff3ec28e6e8ac39274936c71cbcbc7
parentfe0aa8207634fd7189868855688265f6476889fe (diff)
downloademacs-3a35a84c9389928a21056f50160ccd1cfca11b9e.tar.gz
emacs-3a35a84c9389928a21056f50160ccd1cfca11b9e.zip
Fix prototypes.
* src/cm.c (evalcost): Fix arg type. * src/cm.h (evalcost): Fix prototype. * src/lisp.h (memory_warnings): Fix prototype. * lib-src/ebrowse.c (match_qualified_namespace_alias): Pass sym* to find_namespace, not link*. * lib-src/emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET. * lib-src/sorted-doc.c (qsort_compare): New typedef. (main): Use it to cast cmpdoc.
-rw-r--r--lib-src/ChangeLog12
-rw-r--r--lib-src/ebrowse.c2
-rw-r--r--lib-src/emacsclient.c6
-rw-r--r--lib-src/sorted-doc.c3
-rw-r--r--src/ChangeLog8
-rw-r--r--src/cm.c2
-rw-r--r--src/cm.h2
-rw-r--r--src/lisp.h2
8 files changed, 29 insertions, 8 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index f9f43ad41e6..e8bb82f749c 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,15 @@
12010-07-03 Juanma Barranquero <lekktu@gmail.com>
2
3 Fix prototype warnings.
4
5 * ebrowse.c (match_qualified_namespace_alias):
6 Pass sym* to find_namespace, not link*.
7
8 * emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET.
9
10 * sorted-doc.c (qsort_compare): New typedef.
11 (main): Use it to cast cmpdoc.
12
12010-07-03 Dan Nicolaescu <dann@ics.uci.edu> 132010-07-03 Dan Nicolaescu <dann@ics.uci.edu>
2 14
3 * update-game-score.c: Convert function definitions to standard C. 15 * update-game-score.c: Convert function definitions to standard C.
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 2f122cbc21d..bb3456f84e8 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -2385,7 +2385,7 @@ match_qualified_namespace_alias (void)
2385 { 2385 {
2386 case IDENT: 2386 case IDENT:
2387 tmp = (struct link *) xmalloc (sizeof *cur); 2387 tmp = (struct link *) xmalloc (sizeof *cur);
2388 tmp->sym = find_namespace (yytext, cur); 2388 tmp->sym = find_namespace (yytext, cur->sym);
2389 tmp->next = NULL; 2389 tmp->next = NULL;
2390 if (head) 2390 if (head)
2391 { 2391 {
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index d96925d2a3c..cb8a4ebcaf8 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -764,7 +764,7 @@ sock_err_message (char *function_name)
764 - the buffer is full (but this shouldn't happen) 764 - the buffer is full (but this shouldn't happen)
765 Otherwise, we just accumulate it. */ 765 Otherwise, we just accumulate it. */
766void 766void
767send_to_emacs (int s, char *data) 767send_to_emacs (HSOCKET s, char *data)
768{ 768{
769 while (data) 769 while (data)
770 { 770 {
@@ -801,9 +801,9 @@ send_to_emacs (int s, char *data)
801 any initial -. Change spaces to underscores, too, so that the 801 any initial -. Change spaces to underscores, too, so that the
802 return value never contains a space. 802 return value never contains a space.
803 803
804 Does not change the string. Outputs the result to STREAM. */ 804 Does not change the string. Outputs the result to S. */
805void 805void
806quote_argument (int s, char *str) 806quote_argument (HSOCKET s, char *str)
807{ 807{
808 char *copy = (char *) xmalloc (strlen (str) * 2 + 1); 808 char *copy = (char *) xmalloc (strlen (str) * 2 + 1);
809 char *p, *q; 809 char *p, *q;
diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c
index 828e8db9a0b..2c138dc348c 100644
--- a/lib-src/sorted-doc.c
+++ b/lib-src/sorted-doc.c
@@ -110,6 +110,7 @@ cmpdoc (DOCSTR **a, DOCSTR **b)
110 return (*a)->type - (*b)->type; 110 return (*a)->type - (*b)->type;
111} 111}
112 112
113typedef int (*qsort_compare) (const void *, const void *);
113 114
114enum state 115enum state
115{ 116{
@@ -227,7 +228,7 @@ main (void)
227 228
228 /* sort the array by name; within each name, by type */ 229 /* sort the array by name; within each name, by type */
229 230
230 qsort ((char*)array, cnt, sizeof (DOCSTR*), cmpdoc); 231 qsort ((char*)array, cnt, sizeof (DOCSTR*), (qsort_compare)cmpdoc);
231 232
232 /* write the output header */ 233 /* write the output header */
233 234
diff --git a/src/ChangeLog b/src/ChangeLog
index ee347e86a51..157b91f476e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12010-07-03 Juanma Barranquero <lekktu@gmail.com>
2
3 * lisp.h (memory_warnings): Fix prototype.
4
5 * cm.h (evalcost): Fix prototype.
6
7 * cm.c (evalcost): Fix arg type.
8
12010-07-02 Dan Nicolaescu <dann@ics.uci.edu> 92010-07-02 Dan Nicolaescu <dann@ics.uci.edu>
2 10
3 * term.c (term_clear_mouse_face, Fidentity): 11 * term.c (term_clear_mouse_face, Fidentity):
diff --git a/src/cm.c b/src/cm.c
index 45d6417f61f..d083c8a1be9 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -46,7 +46,7 @@ int cost; /* sums up costs */
46/* ARGSUSED */ 46/* ARGSUSED */
47int 47int
48evalcost (c) 48evalcost (c)
49 char c; 49 int c;
50{ 50{
51 cost++; 51 cost++;
52 return c; 52 return c;
diff --git a/src/cm.h b/src/cm.h
index 0ca4b33dc95..0ede5e0cc98 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -158,7 +158,7 @@ extern char PC; /* Pad character */
158#define losecursor(tty) (curX(tty) = -1, curY(tty) = -1) 158#define losecursor(tty) (curX(tty) = -1, curY(tty) = -1)
159 159
160extern int cost; 160extern int cost;
161extern int evalcost (char c); 161extern int evalcost (int c);
162 162
163#define emacs_tputs(tty, str, affcnt, putc) (current_tty = (tty), tputs (str, affcnt, putc)) 163#define emacs_tputs(tty, str, affcnt, putc) (current_tty = (tty), tputs (str, affcnt, putc))
164 164
diff --git a/src/lisp.h b/src/lisp.h
index 8f69b92d54f..2f4f3755ab8 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2668,7 +2668,7 @@ extern int pos_visible_p (struct window *, int, int *,
2668extern void syms_of_xsettings (void); 2668extern void syms_of_xsettings (void);
2669 2669
2670/* Defined in vm-limit.c. */ 2670/* Defined in vm-limit.c. */
2671extern void memory_warnings (POINTER_TYPE *, void (*warnfun) (const char*)); 2671extern void memory_warnings (POINTER_TYPE *, void (*warnfun) (char*));
2672 2672
2673/* Defined in alloc.c */ 2673/* Defined in alloc.c */
2674extern void check_pure_size (void); 2674extern void check_pure_size (void);