Changeset 8436eb4 in git


Ignore:
Timestamp:
Feb 5, 2013, 12:32:38 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
44fac1f7d6452783407efa315a7e588d75d35842
Parents:
3621e7317a4ff5f11cb74f268c348ff205ce8b0e
Message:
avoid autoloading of non-pacakges

from master
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r3621e73 r8436eb4  
    687687  {
    688688      case 0:
    689         Print("%s of type 'ANY'. Trying load.\n", v->name);
    690         if(iiTryLoadLib(u, u->name))
     689      {
     690        int name_err=0;
     691        if(isupper(u->name[0]))
    691692        {
    692           Werror("'%s' no such package", u->name);
    693           return TRUE;
     693          const char *c=u->name+1;
     694          while((*c!='\0')&&(islower(*c))) c++;
     695          if (*c!='\0')
     696            name_err=1;
     697          else
     698          {
     699            Print("%s of type 'ANY'. Trying load.\n", u->name);
     700            if(iiTryLoadLib(u, u->name))
     701            {
     702              Werror("'%s' no such package", u->name);
     703              return TRUE;
     704            }
     705            syMake(u,u->name,NULL);
     706          }
    694707        }
    695         syMake(u,u->name,NULL);
    696         // else: use next case !!! no break !!!
     708        else name_err=1;
     709        if(name_err)
     710        { Werror("'%s' is an invalid package name",u->name);return TRUE;}
     711        // and now, after the loading: use next case !!! no break !!!
     712      }
    697713      case PACKAGE_CMD:
    698714        packhdl = (idhdl)u->data;
Note: See TracChangeset for help on using the changeset viewer.