aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/src/doc.c b/src/doc.c
index ed311d918d7..02a5b4b8143 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -37,7 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
37 37
38Lisp_Object Qfunction_documentation; 38Lisp_Object Qfunction_documentation;
39 39
40extern Lisp_Object Qclosure;
41/* Buffer used for reading from documentation file. */ 40/* Buffer used for reading from documentation file. */
42static char *get_doc_string_buffer; 41static char *get_doc_string_buffer;
43static ptrdiff_t get_doc_string_buffer_size; 42static ptrdiff_t get_doc_string_buffer_size;
@@ -48,7 +47,7 @@ static unsigned char *read_bytecode_pointer;
48 If UNREADFLAG is 1, we unread a byte. */ 47 If UNREADFLAG is 1, we unread a byte. */
49 48
50int 49int
51read_bytecode_char (int unreadflag) 50read_bytecode_char (bool unreadflag)
52{ 51{
53 if (unreadflag) 52 if (unreadflag)
54 { 53 {
@@ -70,20 +69,18 @@ read_bytecode_char (int unreadflag)
70 (e.g. because the file has been modified and the location is stale), 69 (e.g. because the file has been modified and the location is stale),
71 return nil. 70 return nil.
72 71
73 If UNIBYTE is nonzero, always make a unibyte string. 72 If UNIBYTE, always make a unibyte string.
74 73
75 If DEFINITION is nonzero, assume this is for reading 74 If DEFINITION, assume this is for reading
76 a dynamic function definition; convert the bytestring 75 a dynamic function definition; convert the bytestring
77 and the constants vector with appropriate byte handling, 76 and the constants vector with appropriate byte handling,
78 and return a cons cell. */ 77 and return a cons cell. */
79 78
80Lisp_Object 79Lisp_Object
81get_doc_string (Lisp_Object filepos, int unibyte, int definition) 80get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
82{ 81{
83 char *from, *to; 82 char *from, *to, *name, *p, *p1;
84 register int fd; 83 int fd;
85 register char *name;
86 register char *p, *p1;
87 ptrdiff_t minsize; 84 ptrdiff_t minsize;
88 int offset; 85 int offset;
89 EMACS_INT position; 86 EMACS_INT position;
@@ -302,7 +299,7 @@ read_doc_string (Lisp_Object filepos)
302 return get_doc_string (filepos, 0, 1); 299 return get_doc_string (filepos, 0, 1);
303} 300}
304 301
305static int 302static bool
306reread_doc_file (Lisp_Object file) 303reread_doc_file (Lisp_Object file)
307{ 304{
308#if 0 305#if 0
@@ -335,7 +332,7 @@ string is passed through `substitute-command-keys'. */)
335 Lisp_Object fun; 332 Lisp_Object fun;
336 Lisp_Object funcar; 333 Lisp_Object funcar;
337 Lisp_Object doc; 334 Lisp_Object doc;
338 int try_reload = 1; 335 bool try_reload = 1;
339 336
340 documentation: 337 documentation:
341 338
@@ -467,7 +464,7 @@ This differs from `get' in that it can refer to strings stored in the
467aren't strings. */) 464aren't strings. */)
468 (Lisp_Object symbol, Lisp_Object prop, Lisp_Object raw) 465 (Lisp_Object symbol, Lisp_Object prop, Lisp_Object raw)
469{ 466{
470 int try_reload = 1; 467 bool try_reload = 1;
471 Lisp_Object tem; 468 Lisp_Object tem;
472 469
473 documentation_property: 470 documentation_property:
@@ -562,12 +559,11 @@ the same file name is found in the `doc-directory'. */)
562{ 559{
563 int fd; 560 int fd;
564 char buf[1024 + 1]; 561 char buf[1024 + 1];
565 register int filled; 562 int filled;
566 register EMACS_INT pos; 563 EMACS_INT pos;
567 register char *p;
568 Lisp_Object sym; 564 Lisp_Object sym;
569 char *name; 565 char *p, *name;
570 int skip_file = 0; 566 bool skip_file = 0;
571 567
572 CHECK_STRING (filename); 568 CHECK_STRING (filename);
573 569
@@ -722,9 +718,9 @@ Otherwise, return a new string, without any text properties. */)
722 (Lisp_Object string) 718 (Lisp_Object string)
723{ 719{
724 char *buf; 720 char *buf;
725 int changed = 0; 721 bool changed = 0;
726 register unsigned char *strp; 722 unsigned char *strp;
727 register char *bufp; 723 char *bufp;
728 ptrdiff_t idx; 724 ptrdiff_t idx;
729 ptrdiff_t bsize; 725 ptrdiff_t bsize;
730 Lisp_Object tem; 726 Lisp_Object tem;
@@ -733,7 +729,7 @@ Otherwise, return a new string, without any text properties. */)
733 ptrdiff_t length, length_byte; 729 ptrdiff_t length, length_byte;
734 Lisp_Object name; 730 Lisp_Object name;
735 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 731 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
736 int multibyte; 732 bool multibyte;
737 ptrdiff_t nchars; 733 ptrdiff_t nchars;
738 734
739 if (NILP (string)) 735 if (NILP (string))
@@ -787,7 +783,7 @@ Otherwise, return a new string, without any text properties. */)
787 else if (strp[0] == '\\' && strp[1] == '[') 783 else if (strp[0] == '\\' && strp[1] == '[')
788 { 784 {
789 ptrdiff_t start_idx; 785 ptrdiff_t start_idx;
790 int follow_remap = 1; 786 bool follow_remap = 1;
791 787
792 changed = 1; 788 changed = 1;
793 strp += 2; /* skip \[ */ 789 strp += 2; /* skip \[ */