Mercurial > hg > xemacs-beta
comparison src/doc.c @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 441bb1e64a06 |
children | c7528f8e288d |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
153 case 1: *to++ = c; break; | 153 case 1: *to++ = c; break; |
154 case '0': *to++ = '\0'; break; | 154 case '0': *to++ = '\0'; break; |
155 case '_': *to++ = '\037'; break; | 155 case '_': *to++ = '\037'; break; |
156 default: | 156 default: |
157 return_me = list2 (build_string | 157 return_me = list2 (build_string |
158 ("Invalid data in documentation file -- ^A followed by weird code"), | 158 ("Invalid data in documentation file -- ^A followed by weird code"), |
159 make_int (c)); | 159 make_int (c)); |
160 goto done; | 160 goto done; |
161 } | 161 } |
162 } | 162 } |
163 } | 163 } |
178 dest[XSTRING_LENGTH (s1) + XSTRING_LENGTH (s2)] = '\0' | 178 dest[XSTRING_LENGTH (s1) + XSTRING_LENGTH (s2)] = '\0' |
179 | 179 |
180 /* Extract a doc string from a file. FILEPOS says where to get it. | 180 /* Extract a doc string from a file. FILEPOS says where to get it. |
181 (This could actually be byte code instructions/constants instead | 181 (This could actually be byte code instructions/constants instead |
182 of a doc string.) | 182 of a doc string.) |
183 If it is an integer, use that position in the standard DOC file. | 183 If it is an integer, use that position in the standard DOC-... file. |
184 If it is (FILE . INTEGER), use FILE as the file name | 184 If it is (FILE . INTEGER), use FILE as the file name |
185 and INTEGER as the position in that file. | 185 and INTEGER as the position in that file. |
186 But if INTEGER is negative, make it positive. | 186 But if INTEGER is negative, make it positive. |
187 (A negative integer is used for user variables, so we can distinguish | 187 (A negative integer is used for user variables, so we can distinguish |
188 them without actually fetching the doc string.) */ | 188 them without actually fetching the doc string.) */ |
253 strcat (name_nonreloc, (char *) XSTRING_DATA (file)); | 253 strcat (name_nonreloc, (char *) XSTRING_DATA (file)); |
254 munge_doc_file_name (name_nonreloc); | 254 munge_doc_file_name (name_nonreloc); |
255 | 255 |
256 fd = open (name_nonreloc, O_RDONLY, 0); | 256 fd = open (name_nonreloc, O_RDONLY, 0); |
257 } | 257 } |
258 #endif /* CANNOT_DUMP */ | 258 #endif /* CANNOT DUMP */ |
259 | 259 |
260 if (fd < 0) | 260 if (fd < 0) |
261 error ("Cannot open doc string file \"%s\"", | 261 error ("Cannot open doc string file \"%s\"", |
262 name_nonreloc ? name_nonreloc : | 262 name_nonreloc ? name_nonreloc : |
263 (char *) XSTRING_DATA (name_reloc)); | 263 (char *) XSTRING_DATA (name_reloc)); |
419 } | 419 } |
420 | 420 |
421 static void | 421 static void |
422 weird_doc (Lisp_Object sym, CONST char *weirdness, CONST char *type, int pos) | 422 weird_doc (Lisp_Object sym, CONST char *weirdness, CONST char *type, int pos) |
423 { | 423 { |
424 /*#if defined(ENERGIZE) || defined(SUNPRO)*/ /* hide kludgery... */ | 424 #if defined(ENERGIZE) || defined(SUNPRO) /* hide kludgery... */ |
425 /* (for everyone) */ | |
426 if (!strcmp (weirdness, GETTEXT ("duplicate"))) return; | 425 if (!strcmp (weirdness, GETTEXT ("duplicate"))) return; |
427 /*#endif*/ | 426 #endif |
428 message ("Note: Strange doc (%s) for %s %s @ %d", | 427 message ("Note: Strange doc (%s) for %s %s @ %d", |
429 weirdness, type, string_data (XSYMBOL (sym)->name), pos); | 428 weirdness, type, string_data (XSYMBOL (sym)->name), pos); |
430 } | 429 } |
431 | 430 |
432 | 431 |