Changeset 36d920 in git


Ignore:
Timestamp:
Apr 5, 2013, 11:47:27 AM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '48f1dd268d0ff74ef2f7dccbf02545425002ddcc')
Children:
380d25b177e88fcb4bfa2f03b368d2b6996b789f
Parents:
48e8e1c8b5ddc51c12302028a5280f3f3b8d0c03
Message:
fix: module loading, help in modules

from master
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipid.h

    r48e8e1 r36d920  
    8484typedef int (*SModulFunc_t)(SModulFunctions*);
    8585BOOLEAN load_builtin(char *newlib, BOOLEAN autoexport, SModulFunc_t init);
    86 void module_help_main(char *newlib,const char *help);
    87 void module_help_proc(char *newlib,const char *p, const char *help);
     86void module_help_main(const char *newlib,const char *help);
     87void module_help_proc(const char *newlib,const char *p, const char *help);
    8888
    8989/* ================================================================== */
  • Singular/iplib.cc

    r48e8e1 r36d920  
    10571057  idhdl h;
    10581058
     1059  #ifndef NDEBUG
     1060  int dummy;
     1061  if (IsCmd(procname,dummy))
     1062  {
     1063    Werror(">>%s< is a reserved name",procname);
     1064    return 0;
     1065  }
     1066  #endif
     1067
    10591068  h = enterid(procname,0, PROC_CMD, &IDROOT, TRUE);
    10601069  if ( h!= NULL )
     
    12171226}
    12181227/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    1219 void module_help_main(char *newlib,const char *help)
     1228void module_help_main(const char *newlib,const char *help)
    12201229{
    12211230  char *plib = iiConvName(newlib);
    1222   idhdl pl = IDROOT->get(plib,0);
     1231  idhdl pl = basePack->idroot->get(plib,0);
    12231232  if ((pl==NULL)||(IDTYP(pl)!=PACKAGE_CMD))
    1224     Werror(">>%s<< is not a package",plib);
     1233    Werror(">>%s<< is not a package (trying to add package help)",plib);
    12251234  else
    12261235  {
     
    12321241  }
    12331242}
    1234 void module_help_proc(char *newlib,const char *p, const char *help)
     1243void module_help_proc(const char *newlib,const char *p, const char *help)
    12351244{
    12361245  char *plib = iiConvName(newlib);
    1237   idhdl pl = IDROOT->get(plib,0);
     1246  idhdl pl = basePack->idroot->get(plib,0);
    12381247  if ((pl==NULL)||(IDTYP(pl)!=PACKAGE_CMD))
    1239     Werror(">>%s<< is not a package",plib);
     1248    Werror(">>%s<< is not a package(trying to add help for %s)",plib,p);
    12401249  else
    12411250  {
Note: See TracChangeset for help on using the changeset viewer.