comparison src/emodules.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
211 /* 211 /*
212 * We only get here if we havent found a free slot and the module was 212 * We only get here if we havent found a free slot and the module was
213 * not previously loaded. 213 * not previously loaded.
214 */ 214 */
215 if (modules == (emodules_list *)0) 215 if (modules == (emodules_list *)0)
216 modules = (emodules_list *)xmalloc (sizeof(emodules_list)); 216 modules = (emodules_list *) xmalloc (sizeof (emodules_list));
217 modnum++; 217 modnum++;
218 modules = (emodules_list *) xrealloc (modules, modnum * sizeof(emodules_list)); 218 modules = (emodules_list *) xrealloc (modules, modnum * sizeof (emodules_list));
219 219
220 fs = modnum - 1; 220 fs = modnum - 1;
221 memset (&modules[fs], 0, sizeof(emodules_list)); 221 memset (&modules[fs], 0, sizeof(emodules_list));
222 return fs; 222 return fs;
223 } 223 }
480 void 480 void
481 emodules_doc_subr(CONST char *symname, CONST char *doc) 481 emodules_doc_subr(CONST char *symname, CONST char *doc)
482 { 482 {
483 Bytecount len = strlen (symname); 483 Bytecount len = strlen (symname);
484 Lisp_Object sym = oblookup (Vobarray, (CONST Bufbyte *)symname, len); 484 Lisp_Object sym = oblookup (Vobarray, (CONST Bufbyte *)symname, len);
485 struct Lisp_Subr *subr; 485 Lisp_Subr *subr;
486 486
487 if (SYMBOLP(sym)) 487 if (SYMBOLP(sym))
488 { 488 {
489 subr = XSUBR( XSYMBOL(sym)->function); 489 subr = XSUBR( XSYMBOL(sym)->function);
490 subr->doc = xstrdup (doc); 490 subr->doc = xstrdup (doc);