]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix prototypes.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 3 Jul 2010 07:44:17 +0000 (09:44 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 3 Jul 2010 07:44:17 +0000 (09:44 +0200)
* 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.

lib-src/ChangeLog
lib-src/ebrowse.c
lib-src/emacsclient.c
lib-src/sorted-doc.c
src/ChangeLog
src/cm.c
src/cm.h
src/lisp.h

index f9f43ad41e6b961c98e885c587f769c1a6065ec1..e8bb82f749c656f4939cc2f35346430c5b6178c1 100644 (file)
@@ -1,3 +1,15 @@
+2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
+
+       Fix prototype warnings.
+
+       * ebrowse.c (match_qualified_namespace_alias):
+       Pass sym* to find_namespace, not link*.
+
+       * emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET.
+
+       * sorted-doc.c (qsort_compare): New typedef.
+       (main): Use it to cast cmpdoc.
+
 2010-07-03  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * update-game-score.c: Convert function definitions to standard C.
index 2f122cbc21d53557f0c5b8324e4a8f77b4af7e09..bb3456f84e80b474346c9c340826b0efa1446cf4 100644 (file)
@@ -2385,7 +2385,7 @@ match_qualified_namespace_alias (void)
         {
         case IDENT:
           tmp = (struct link *) xmalloc (sizeof *cur);
-          tmp->sym = find_namespace (yytext, cur);
+          tmp->sym = find_namespace (yytext, cur->sym);
           tmp->next = NULL;
           if (head)
             {
index d96925d2a3c3563c2116d76d0900133ebdf35a37..cb8a4ebcaf8f77cfc6739a11f9e01f01916b761c 100644 (file)
@@ -764,7 +764,7 @@ sock_err_message (char *function_name)
    - the buffer is full (but this shouldn't happen)
    Otherwise, we just accumulate it.  */
 void
-send_to_emacs (int s, char *data)
+send_to_emacs (HSOCKET s, char *data)
 {
   while (data)
     {
@@ -801,9 +801,9 @@ send_to_emacs (int s, char *data)
    any initial -.  Change spaces to underscores, too, so that the
    return value never contains a space.
 
-   Does not change the string.  Outputs the result to STREAM.  */
+   Does not change the string.  Outputs the result to S.  */
 void
-quote_argument (int s, char *str)
+quote_argument (HSOCKET s, char *str)
 {
   char *copy = (char *) xmalloc (strlen (str) * 2 + 1);
   char *p, *q;
index 828e8db9a0bc8e04f0856fea6848fef23df70312..2c138dc348c0968bd8712421163b020e673b5e22 100644 (file)
@@ -110,6 +110,7 @@ cmpdoc (DOCSTR **a, DOCSTR **b)
   return (*a)->type - (*b)->type;
 }
 
+typedef int (*qsort_compare) (const void *, const void *);
 
 enum state
 {
@@ -227,7 +228,7 @@ main (void)
 
     /* sort the array by name; within each name, by type */
 
-    qsort ((char*)array, cnt, sizeof (DOCSTR*), cmpdoc);
+    qsort ((char*)array, cnt, sizeof (DOCSTR*), (qsort_compare)cmpdoc);
 
     /* write the output header */
 
index ee347e86a51893e9de84a0af9e0e93608e052d22..157b91f476e9c784ce3251f334bdfbff18728230 100644 (file)
@@ -1,3 +1,11 @@
+2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
+
+       * lisp.h (memory_warnings): Fix prototype.
+
+       * cm.h (evalcost): Fix prototype.
+
+       * cm.c (evalcost): Fix arg type.
+
 2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * term.c (term_clear_mouse_face, Fidentity):
index 45d6417f61fdbffbc6d736a0943715f7e538f65c..d083c8a1be9fc4d75a9d6a4a48f01b3a1580eaae 100644 (file)
--- a/src/cm.c
+++ b/src/cm.c
@@ -46,7 +46,7 @@ int cost;             /* sums up costs */
 /* ARGSUSED */
 int
 evalcost (c)
-     char c;
+     int c;
 {
   cost++;
   return c;
index 0ca4b33dc95ba16b7167bea684cb6aa7b11a53b7..0ede5e0cc9866ffacb4f4d96ebdb9bca007a8e31 100644 (file)
--- a/src/cm.h
+++ b/src/cm.h
@@ -158,7 +158,7 @@ extern char PC;                     /* Pad character */
 #define losecursor(tty)         (curX(tty) = -1, curY(tty) = -1)
 
 extern int cost;
-extern int evalcost (char c);
+extern int evalcost (int c);
 
 #define emacs_tputs(tty, str, affcnt, putc) (current_tty = (tty), tputs (str, affcnt, putc))
 
index 8f69b92d54f8ba07cffdd38ce76318d086959b8a..2f4f3755ab8a030852c704b257ee450cd65b00e4 100644 (file)
@@ -2668,7 +2668,7 @@ extern int pos_visible_p (struct window *, int, int *,
 extern void syms_of_xsettings (void);
 
 /* Defined in vm-limit.c.  */
-extern void memory_warnings (POINTER_TYPE *, void (*warnfun) (const char*));
+extern void memory_warnings (POINTER_TYPE *, void (*warnfun) (char*));
 
 /* Defined in alloc.c */
 extern void check_pure_size (void);