/[emacs]/emacs/lib-src/make-docfile.c
ViewVC logotype

Diff of /emacs/lib-src/make-docfile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by pj, Thu Nov 15 15:50:31 2001 UTC revision 1.50 by pj, Sat Jan 5 23:37:58 2002 UTC
# Line 363  read_c_string_or_comment (infile, printf Line 363  read_c_string_or_comment (infile, printf
363                if (c == 't')                if (c == 't')
364                  c = '\t';                  c = '\t';
365              }              }
366              
367            if (c == ' ')            if (c == ' ')
368              state.pending_spaces++;              state.pending_spaces++;
369            else if (c == '\n')            else if (c == '\n')
# Line 387  read_c_string_or_comment (infile, printf Line 387  read_c_string_or_comment (infile, printf
387                c = getc (infile);                c = getc (infile);
388                break;                break;
389              }              }
390              
391            scan_keyword_or_put_char ('*', &state);            scan_keyword_or_put_char ('*', &state);
392          }          }
393        else        else
394          {          {
395            if (c != '"')            if (c != '"')
396              break;              break;
397          
398            /* If we had a "", concatenate the two strings.  */            /* If we had a "", concatenate the two strings.  */
399            c = getc (infile);            c = getc (infile);
400          }          }
401      }      }
402      
403    if (printflag < 0)    if (printflag < 0)
404      *state.buf_ptr = 0;      *state.buf_ptr = 0;
405    
# Line 644  scan_c_file (filename, mode) Line 644  scan_c_file (filename, mode)
644    
645        while (c == ' ' || c == '\n' || c == '\r' || c == '\t')        while (c == ' ' || c == '\n' || c == '\r' || c == '\t')
646          c = getc (infile);          c = getc (infile);
647          
648        if (c == '"')        if (c == '"')
649          c = read_c_string_or_comment (infile, 0, 0, 0);          c = read_c_string_or_comment (infile, 0, 0, 0);
650          
651        while (c != EOF && c != ',' && c != '/')        while (c != EOF && c != ',' && c != '/')
652          c = getc (infile);          c = getc (infile);
653        if (c == ',')        if (c == ',')
# Line 674  scan_c_file (filename, mode) Line 674  scan_c_file (filename, mode)
674          {          {
675            int comment = c != '"';            int comment = c != '"';
676            int saw_usage;            int saw_usage;
677              
678            putc (037, outfile);            putc (037, outfile);
679            putc (defvarflag ? 'V' : 'F', outfile);            putc (defvarflag ? 'V' : 'F', outfile);
680            fprintf (outfile, "%s\n", buf);            fprintf (outfile, "%s\n", buf);
# Line 704  scan_c_file (filename, mode) Line 704  scan_c_file (filename, mode)
704                        goto eof;                        goto eof;
705                      c = getc (infile);                      c = getc (infile);
706                    }                    }
707                  
708                /* Skip into arguments.  */                /* Skip into arguments.  */
709                while (c != '(')                while (c != '(')
710                  {                  {
# Line 748  scan_c_file (filename, mode) Line 748  scan_c_file (filename, mode)
748   When we find that, we save it for the following defining-form,   When we find that, we save it for the following defining-form,
749   and we use that instead of reading a doc string within that defining-form.   and we use that instead of reading a doc string within that defining-form.
750    
751   For defvar, defconst, and fset we skip to the docstring with a kludgy   For defvar, defconst, and fset we skip to the docstring with a kludgy
752   formatting convention: all docstrings must appear on the same line as the   formatting convention: all docstrings must appear on the same line as the
753   initial open-paren (the one in column zero) and must contain a backslash   initial open-paren (the one in column zero) and must contain a backslash
754   and a newline immediately after the initial double-quote.  No newlines   and a newline immediately after the initial double-quote.  No newlines
755   must appear between the beginning of the form and the first double-quote.   must appear between the beginning of the form and the first double-quote.
756   For defun, defmacro, and autoload, we know how to skip over the   For defun, defmacro, and autoload, we know how to skip over the
757   arglist, but the doc string must still have a backslash and newline   arglist, but the doc string must still have a backslash and newline
758   immediately after the double quote.   immediately after the double quote.
759   The only source files that must follow this convention are preloaded   The only source files that must follow this convention are preloaded
760   uncompiled ones like loaddefs.el and bindings.el; aside   uncompiled ones like loaddefs.el and bindings.el; aside
761   from that, it is always the .elc file that we look at, and they are no   from that, it is always the .elc file that we look at, and they are no
# Line 801  read_lisp_symbol (infile, buffer) Line 801  read_lisp_symbol (infile, buffer)
801    
802    if (! buffer[0])    if (! buffer[0])
803      fprintf (stderr, "## expected a symbol, got '%c'\n", c);      fprintf (stderr, "## expected a symbol, got '%c'\n", c);
804      
805    skip_white (infile);    skip_white (infile);
806  }  }
807    
# Line 945  scan_lisp_file (filename, mode) Line 945  scan_lisp_file (filename, mode)
945                    c1 = c;                    c1 = c;
946                    c = getc (infile);                    c = getc (infile);
947                  }                  }
948              
949                /* If two previous characters were " and \,                /* If two previous characters were " and \,
950                   this is a doc string.  Otherwise, there is none.  */                   this is a doc string.  Otherwise, there is none.  */
951                if (c2 != '"' || c1 != '\\')                if (c2 != '"' || c1 != '\\')
# Line 1004  scan_lisp_file (filename, mode) Line 1004  scan_lisp_file (filename, mode)
1004                    c1 = c;                    c1 = c;
1005                    c = getc (infile);                    c = getc (infile);
1006                  }                  }
1007              
1008                /* If two previous characters were " and \,                /* If two previous characters were " and \,
1009                   this is a doc string.  Otherwise, there is none.  */                   this is a doc string.  Otherwise, there is none.  */
1010                if (c2 != '"' || c1 != '\\')                if (c2 != '"' || c1 != '\\')
# Line 1061  scan_lisp_file (filename, mode) Line 1061  scan_lisp_file (filename, mode)
1061                    c1 = c;                    c1 = c;
1062                    c = getc (infile);                    c = getc (infile);
1063                  }                  }
1064              
1065                /* If two previous characters were " and \,                /* If two previous characters were " and \,
1066                   this is a doc string.  Otherwise, there is none.  */                   this is a doc string.  Otherwise, there is none.  */
1067                if (c2 != '"' || c1 != '\\')                if (c2 != '"' || c1 != '\\')

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26