Make make-docfile understand DEFUN arguments written in standard C.
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 9 Jul 2010 01:09:50 +0000 (18:09 -0700)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 9 Jul 2010 01:09:50 +0000 (18:09 -0700)
* lib-src/make-docfile.c (write_c_args): Deal with type names in DEFUN
arguments.

lib-src/ChangeLog
lib-src/make-docfile.c

index aa9fab0..4cbf5dd 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-09  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * make-docfile.c (write_c_args): Deal with type names in DEFUN
+       arguments.
+
 2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * update-game-score.c (P_): Remove macro.
index b3b6b19..3df7ec6 100644 (file)
@@ -450,9 +450,24 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
 
   for (p = buf; *p; p++)
     {
-      char c = *p;
+      char c;
       int ident_start = 0;
 
+      /* FIXME: this must be made a bit more robust*/
+      
+      /* Skip "register Lisp_Object", this can be removed when we get
+        rid of "register" for DEFUNs. */
+      if (strncmp ("register Lisp_Object", p, 20) == 0)
+       p += 20;
+
+      if (strncmp ("Lisp_Object", p, 11) == 0)
+       p += 11;
+
+      if (strncmp ("void", p, 4) == 0)
+       p += 4;
+
+      c  = *p;
+      
       /* Notice when we start printing a new identifier.  */
       if ((('A' <= c && c <= 'Z')
           || ('a' <= c && c <= 'z')