Changeset c0d3e8e in git


Ignore:
Timestamp:
Mar 6, 2006, 3:11:20 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '82fc009ea2b0098c1a4896c841bb70860976bdfc')
Children:
388f91e2970ad20ed6fc9ccde10ed7d87e6e8739
Parents:
913156d747fcaac01f96b003a126a9c5f91ef4cf
Message:
*hannes; LIB() and autoexport fix


git-svn-id: file:///usr/local/Singular/svn/trunk@8996 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r913156 rc0d3e8e  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.389 2006-01-06 11:18:19 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.390 2006-03-06 14:11:19 Singular Exp $ */
    55
    66/*
     
    40614061        if (pl==NULL)
    40624062        {
    4063           pl = enterid( plib,0, PACKAGE_CMD, &IDROOT, TRUE );
     4063          pl = enterid( plib,0, PACKAGE_CMD, &(basePack->idroot), TRUE );
    40644064          IDPACKAGE(pl)->language = LANG_SINGULAR;
    40654065          IDPACKAGE(pl)->libname=omStrDup(plib);
     
    40764076        char libnamebuf[256];
    40774077        FILE * fp = feFopen( s, "r", libnamebuf, TRUE );
    4078         BOOLEAN bo=iiLoadLIB(fp, libnamebuf, s, pl, FALSE, TRUE);
     4078        BOOLEAN bo=iiLoadLIB(fp, libnamebuf, s, pl, autoexport, TRUE);
    40794079        currPack=savepack;
    40804080        IDPACKAGE(pl)->loaded=(!bo);
  • Singular/libparse.cc

    r913156 rc0d3e8e  
    2020
    2121/* Scanner skeleton version:
    22  * $Header: /exports/cvsroot-2/cvsroot/Singular/libparse.cc,v 1.11 2005-10-05 14:18:46 bricken Exp $
     22 * $Header: /exports/cvsroot-2/cvsroot/Singular/libparse.cc,v 1.12 2006-03-06 14:11:20 Singular Exp $
    2323 */
    2424
     
    2828
    2929#include <stdio.h>
    30 #include <unistd.h>
    3130
    3231
     
    4241
    4342#include <stdlib.h>
     43#include <unistd.h>
    4444
    4545/* Use prototypes in function declarations. */
     
    10521052*  Computer Algebra System SINGULAR     *
    10531053****************************************/
    1054 /* $Id: libparse.cc,v 1.11 2005-10-05 14:18:46 bricken Exp $ */
     1054/* $Id: libparse.cc,v 1.12 2006-03-06 14:11:20 Singular Exp $ */
    10551055#include <stdio.h>
    10561056#include <string.h>
     
    16371637               if((!p_static) && autoexport)
    16381638               {
     1639                  package save=currPack;
     1640                  currPack=basePack;
    16391641                  h_top = enterid( proc, 0 /*myynest*/, PROC_CMD,
    16401642                                 &(basePack->idroot), FALSE );
     1643                  currPack=save;
    16411644                  if (h_top==NULL) return(1);
    16421645               }
     
    16811684case 9:
    16821685YY_RULE_SETUP
    1683 #line 377 "libparse.l"
     1686#line 380 "libparse.l"
    16841687{
    16851688             BEGIN(pexample);
     
    16961699case 10:
    16971700YY_RULE_SETUP
    1698 #line 389 "libparse.l"
     1701#line 392 "libparse.l"
    16991702{ quote++;
    17001703             BEGIN(libcmd);
     
    17031706case 11:
    17041707YY_RULE_SETUP
    1705 #line 393 "libparse.l"
     1708#line 396 "libparse.l"
    17061709{ quote++; brace2++;
    17071710             BEGIN(libcmd2);
     
    17101713case 12:
    17111714YY_RULE_SETUP
    1712 #line 397 "libparse.l"
     1715#line 400 "libparse.l"
    17131716{
    17141717             make_version(yytext, 0);
     
    17201723case 13:
    17211724YY_RULE_SETUP
    1722 #line 403 "libparse.l"
     1725#line 406 "libparse.l"
    17231726{
    17241727             #if YYLPDEBUG
     
    17291732case 14:
    17301733YY_RULE_SETUP
    1731 #line 408 "libparse.l"
     1734#line 411 "libparse.l"
    17321735{
    17331736             #if YYLPDEBUG > 1
     
    17381741case 15:
    17391742YY_RULE_SETUP
    1740 #line 413 "libparse.l"
     1743#line 416 "libparse.l"
    17411744{ yyless(0);
    17421745             BEGIN(INITIAL);
     
    17461749case 16:
    17471750YY_RULE_SETUP
    1748 #line 417 "libparse.l"
     1751#line 420 "libparse.l"
    17491752{
    17501753             yyless(0);
     
    17561759case 17:
    17571760YY_RULE_SETUP
    1758 #line 424 "libparse.l"
     1761#line 427 "libparse.l"
    17591762{ quote++;
    17601763             BEGIN(libcmd);
     
    17631766case 18:
    17641767YY_RULE_SETUP
    1765 #line 427 "libparse.l"
     1768#line 430 "libparse.l"
    17661769{ quote++; brace2++;
    17671770             BEGIN(libcmd2);
     
    17701773case 19:
    17711774YY_RULE_SETUP
    1772 #line 430 "libparse.l"
     1775#line 433 "libparse.l"
    17731776{ yylplineno++; }
    17741777        YY_BREAK
    17751778case 20:
    17761779YY_RULE_SETUP
    1777 #line 431 "libparse.l"
     1780#line 434 "libparse.l"
    17781781{
    17791782             #if YYLPDEBUG > 1
     
    17861789case 21:
    17871790YY_RULE_SETUP
    1788 #line 438 "libparse.l"
     1791#line 441 "libparse.l"
    17891792{
    17901793             #if YYLPDEBUG > 1
     
    17951798case 22:
    17961799YY_RULE_SETUP
    1797 #line 443 "libparse.l"
     1800#line 446 "libparse.l"
    17981801{
    17991802             #if YYLPDEBUG > 1
     
    18051808case 23:
    18061809YY_RULE_SETUP
    1807 #line 449 "libparse.l"
     1810#line 452 "libparse.l"
    18081811{
    18091812             yyless(0);
     
    18151818case 24:
    18161819YY_RULE_SETUP
    1817 #line 455 "libparse.l"
     1820#line 458 "libparse.l"
    18181821{
    18191822             yyless(0);
     
    18251828case 25:
    18261829YY_RULE_SETUP
    1827 #line 461 "libparse.l"
     1830#line 464 "libparse.l"
    18281831{ quote++;
    18291832             BEGIN(libcmd);
     
    18321835case 26:
    18331836YY_RULE_SETUP
    1834 #line 464 "libparse.l"
     1837#line 467 "libparse.l"
    18351838{ quote++; brace2++;
    18361839             BEGIN(libcmd2);
     
    18391842case 27:
    18401843YY_RULE_SETUP
    1841 #line 468 "libparse.l"
     1844#line 471 "libparse.l"
    18421845{ yylplineno++; }
    18431846        YY_BREAK
    18441847case 28:
    18451848YY_RULE_SETUP
    1846 #line 469 "libparse.l"
     1849#line 472 "libparse.l"
    18471850{
    18481851             #if YYLPDEBUG
     
    18531856case 29:
    18541857YY_RULE_SETUP
    1855 #line 474 "libparse.l"
     1858#line 477 "libparse.l"
    18561859{
    18571860             found_oldhelp=1;
     
    18631866case 30:
    18641867YY_RULE_SETUP
    1865 #line 482 "libparse.l"
     1868#line 485 "libparse.l"
    18661869{ quote--;
    18671870             yytext[yyleng-1] = '\0';
     
    18801883case 31:
    18811884YY_RULE_SETUP
    1882 #line 495 "libparse.l"
     1885#line 498 "libparse.l"
    18831886{ quote--; brace2--;
    18841887             yytext[yyleng-1] = '\0';
     
    18971900case 32:
    18981901YY_RULE_SETUP
    1899 #line 509 "libparse.l"
     1902#line 512 "libparse.l"
    19001903{ }
    19011904        YY_BREAK
    19021905case 33:
    19031906YY_RULE_SETUP
    1904 #line 510 "libparse.l"
     1907#line 513 "libparse.l"
    19051908{
    19061909             brace2++;
     
    19121915case 34:
    19131916YY_RULE_SETUP
    1914 #line 516 "libparse.l"
     1917#line 519 "libparse.l"
    19151918{
    19161919             brace2--;
     
    19311934case 35:
    19321935YY_RULE_SETUP
    1933 #line 531 "libparse.l"
     1936#line 534 "libparse.l"
    19341937{
    19351938             if(brace2>0)
     
    19531956case 36:
    19541957YY_RULE_SETUP
    1955 #line 549 "libparse.l"
     1958#line 552 "libparse.l"
    19561959{ yylplineno++;
    19571960              if(brace2<=0)
     
    19661969case 37:
    19671970YY_RULE_SETUP
    1968 #line 558 "libparse.l"
     1971#line 561 "libparse.l"
    19691972{ }
    19701973        YY_BREAK
    19711974case 38:
    19721975YY_RULE_SETUP
    1973 #line 559 "libparse.l"
     1976#line 562 "libparse.l"
    19741977{ old_state = YYSTATE; BEGIN(comment); }
    19751978        YY_BREAK
    19761979case 39:
    19771980YY_RULE_SETUP
    1978 #line 560 "libparse.l"
     1981#line 563 "libparse.l"
    19791982{
    19801983             if(brace2<=0)
     
    19871990case 40:
    19881991YY_RULE_SETUP
    1989 #line 568 "libparse.l"
     1992#line 571 "libparse.l"
    19901993{
    19911994              #if YYLPDEBUG
     
    20042007case 41:
    20052008YY_RULE_SETUP
    2006 #line 581 "libparse.l"
     2009#line 584 "libparse.l"
    20072010{
    20082011              #if YYLPDEBUG
     
    20152018case 42:
    20162019YY_RULE_SETUP
    2017 #line 588 "libparse.l"
     2020#line 591 "libparse.l"
    20182021{
    20192022              if(check && yyleng>2)
     
    20332036case 43:
    20342037YY_RULE_SETUP
    2035 #line 602 "libparse.l"
     2038#line 605 "libparse.l"
    20362039{ printf("[%s]", yytext); }
    20372040        YY_BREAK
    20382041case 44:
    20392042YY_RULE_SETUP
    2040 #line 604 "libparse.l"
     2043#line 607 "libparse.l"
    20412044{ }
    20422045        YY_BREAK
    20432046case 45:
    20442047YY_RULE_SETUP
    2045 #line 605 "libparse.l"
     2048#line 608 "libparse.l"
    20462049{
    20472050                SET_HELP_END(mode, pi, current_pos(0));
     
    20652068case 46:
    20662069YY_RULE_SETUP
    2067 #line 623 "libparse.l"
     2070#line 626 "libparse.l"
    20682071{ yylplineno++; }
    20692072        YY_BREAK
    20702073case 47:
    20712074YY_RULE_SETUP
    2072 #line 624 "libparse.l"
     2075#line 627 "libparse.l"
    20732076{ }
    20742077        YY_BREAK
    20752078case 48:
    20762079YY_RULE_SETUP
    2077 #line 626 "libparse.l"
     2080#line 629 "libparse.l"
    20782081{
    20792082             old_state = YYSTATE;
     
    20842087case 49:
    20852088YY_RULE_SETUP
    2086 #line 631 "libparse.l"
     2089#line 634 "libparse.l"
    20872090{}
    20882091        YY_BREAK
    20892092case 50:
    20902093YY_RULE_SETUP
    2091 #line 632 "libparse.l"
     2094#line 635 "libparse.l"
    20922095{
    20932096             brace1++; BEGIN(pbody);
     
    21102113case 51:
    21112114YY_RULE_SETUP
    2112 #line 649 "libparse.l"
     2115#line 652 "libparse.l"
    21132116{ yylplineno++;}
    21142117        YY_BREAK
    21152118case 52:
    21162119YY_RULE_SETUP
    2117 #line 651 "libparse.l"
     2120#line 654 "libparse.l"
    21182121{ }
    21192122        YY_BREAK
    21202123case 53:
    21212124YY_RULE_SETUP
    2122 #line 652 "libparse.l"
     2125#line 655 "libparse.l"
    21232126{ quote++; old_state = YYSTATE;
    21242127                 BEGIN(string); /* printf("%s", yytext); */
     
    21272130case 54:
    21282131YY_RULE_SETUP
    2129 #line 656 "libparse.l"
     2132#line 659 "libparse.l"
    21302133{
    21312134             if(check) printf("*** found 2 proc whithin procedure '%s'.\n",
     
    21362139case 55:
    21372140YY_RULE_SETUP
    2138 #line 661 "libparse.l"
     2141#line 664 "libparse.l"
    21392142{
    21402143             if(check) printf("*** found 1 proc whithin procedure '%s'.\n",
     
    21452148case 56:
    21462149YY_RULE_SETUP
    2147 #line 666 "libparse.l"
     2150#line 669 "libparse.l"
    21482151{
    21492152                 brace1++;
     
    21552158case 57:
    21562159YY_RULE_SETUP
    2157 #line 672 "libparse.l"
     2160#line 675 "libparse.l"
    21582161{
    21592162                           #if YYLPDEBUG > 1
     
    21852188case 58:
    21862189YY_RULE_SETUP
    2187 #line 698 "libparse.l"
     2190#line 701 "libparse.l"
    21882191{
    21892192                           brace2++; /* printf("%s", yytext); */
     
    21922195case 59:
    21932196YY_RULE_SETUP
    2194 #line 701 "libparse.l"
     2197#line 704 "libparse.l"
    21952198{
    21962199                           brace2--; /* printf("%s", yytext); */
     
    22032206case 60:
    22042207YY_RULE_SETUP
    2205 #line 708 "libparse.l"
     2208#line 711 "libparse.l"
    22062209{
    22072210                           brace3++; /* printf("%s", yytext); */
     
    22102213case 61:
    22112214YY_RULE_SETUP
    2212 #line 711 "libparse.l"
     2215#line 714 "libparse.l"
    22132216{
    22142217                           brace3--; /* printf("%s", yytext); */
     
    22212224case 62:
    22222225YY_RULE_SETUP
    2223 #line 718 "libparse.l"
     2226#line 721 "libparse.l"
    22242227{ yylplineno++; }
    22252228        YY_BREAK
    22262229case 63:
    22272230YY_RULE_SETUP
    2228 #line 719 "libparse.l"
     2231#line 722 "libparse.l"
    22292232{ }
    22302233        YY_BREAK
    22312234case 64:
    22322235YY_RULE_SETUP
    2233 #line 721 "libparse.l"
     2236#line 724 "libparse.l"
    22342237{
    22352238             quote++; BEGIN(string);
     
    22422245case 65:
    22432246YY_RULE_SETUP
    2244 #line 728 "libparse.l"
     2247#line 731 "libparse.l"
    22452248{ yylplineno++; }
    22462249        YY_BREAK
    22472250case 66:
    22482251YY_RULE_SETUP
    2249 #line 729 "libparse.l"
     2252#line 732 "libparse.l"
    22502253{ }
    22512254        YY_BREAK
    22522255case 67:
    22532256YY_RULE_SETUP
    2254 #line 731 "libparse.l"
     2257#line 734 "libparse.l"
    22552258{
    22562259             quote++; BEGIN(string);
     
    22632266case 68:
    22642267YY_RULE_SETUP
    2265 #line 738 "libparse.l"
     2268#line 741 "libparse.l"
    22662269{ yylplineno++; }
    22672270        YY_BREAK
    22682271case 69:
    22692272YY_RULE_SETUP
    2270 #line 739 "libparse.l"
     2273#line 742 "libparse.l"
    22712274{ }
    22722275        YY_BREAK
    22732276case 70:
    22742277YY_RULE_SETUP
    2275 #line 742 "libparse.l"
     2278#line 745 "libparse.l"
    22762279{ quote--;
    22772280                           copy_string(mode);
     
    22862289case 71:
    22872290YY_RULE_SETUP
    2288 #line 751 "libparse.l"
     2291#line 754 "libparse.l"
    22892292{ if (old_state == phelp) IncrCheckSum(*yytext);}
    22902293        YY_BREAK
    22912294case 72:
    22922295YY_RULE_SETUP
    2293 #line 752 "libparse.l"
     2296#line 755 "libparse.l"
    22942297{ yylplineno++; if (old_state == phelp) IncrCheckSum('\n');}
    22952298        YY_BREAK
    22962299case 73:
    22972300YY_RULE_SETUP
    2298 #line 753 "libparse.l"
     2301#line 756 "libparse.l"
    22992302{ if (old_state == phelp) IncrCheckSum(*yytext);}
    23002303        YY_BREAK
    23012304case 74:
    23022305YY_RULE_SETUP
    2303 #line 755 "libparse.l"
     2306#line 758 "libparse.l"
    23042307{ }
    23052308        YY_BREAK
    23062309case 75:
    23072310YY_RULE_SETUP
    2308 #line 756 "libparse.l"
     2311#line 759 "libparse.l"
    23092312{ quote++; old_state = YYSTATE;
    23102313                           BEGIN(string); /* printf("%s", yytext); */
     
    23132316case 76:
    23142317YY_RULE_SETUP
    2315 #line 759 "libparse.l"
     2318#line 762 "libparse.l"
    23162319{
    23172320                           brace1++; /* printf("(%d)%s", brace1, yytext); */
     
    23202323case 77:
    23212324YY_RULE_SETUP
    2322 #line 762 "libparse.l"
     2325#line 765 "libparse.l"
    23232326{
    23242327                           brace1--; /* printf("(%d)%s", brace1, yytext); */
     
    23332336case 78:
    23342337YY_RULE_SETUP
    2335 #line 771 "libparse.l"
     2338#line 774 "libparse.l"
    23362339{
    23372340                           brace2++; /* printf("%s", yytext); */
     
    23402343case 79:
    23412344YY_RULE_SETUP
    2342 #line 774 "libparse.l"
     2345#line 777 "libparse.l"
    23432346{
    23442347                           brace2--; /* printf("%s", yytext); */
     
    23472350case 80:
    23482351YY_RULE_SETUP
    2349 #line 777 "libparse.l"
     2352#line 780 "libparse.l"
    23502353{
    23512354                           brace3++; /* printf("%s", yytext); */
     
    23542357case 81:
    23552358YY_RULE_SETUP
    2356 #line 780 "libparse.l"
     2359#line 783 "libparse.l"
    23572360{
    23582361                           brace3--; /* printf("%s", yytext); */
     
    23612364case 82:
    23622365YY_RULE_SETUP
    2363 #line 783 "libparse.l"
     2366#line 786 "libparse.l"
    23642367{ yylplineno++; }
    23652368        YY_BREAK
    23662369case 83:
    23672370YY_RULE_SETUP
    2368 #line 784 "libparse.l"
     2371#line 787 "libparse.l"
    23692372{ }
    23702373        YY_BREAK
    23712374case 84:
    23722375YY_RULE_SETUP
    2373 #line 786 "libparse.l"
     2376#line 789 "libparse.l"
    23742377{ quote--;
    23752378                           BEGIN(pexample); /* printf("%s", yytext); */
     
    23782381case 85:
    23792382YY_RULE_SETUP
    2380 #line 789 "libparse.l"
    2381 { }
    2382         YY_BREAK
    2383 case 86:
    2384 YY_RULE_SETUP
    2385 #line 790 "libparse.l"
    2386 { }
    2387         YY_BREAK
    2388 case 87:
    2389 YY_RULE_SETUP
    2390 #line 791 "libparse.l"
    2391 { yylplineno++; }
    2392         YY_BREAK
    2393 case 88:
    2394 YY_RULE_SETUP
    23952383#line 792 "libparse.l"
    23962384{ }
    23972385        YY_BREAK
     2386case 86:
     2387YY_RULE_SETUP
     2388#line 793 "libparse.l"
     2389{ }
     2390        YY_BREAK
     2391case 87:
     2392YY_RULE_SETUP
     2393#line 794 "libparse.l"
     2394{ yylplineno++; }
     2395        YY_BREAK
     2396case 88:
     2397YY_RULE_SETUP
     2398#line 795 "libparse.l"
     2399{ }
     2400        YY_BREAK
    23982401case 89:
    23992402YY_RULE_SETUP
    2400 #line 794 "libparse.l"
     2403#line 797 "libparse.l"
    24012404{ BEGIN(old_state); }
    24022405        YY_BREAK
    24032406case 90:
    2404 YY_RULE_SETUP
    2405 #line 795 "libparse.l"
    2406 { yylplineno++; }
    2407         YY_BREAK
    2408 case 91:
    2409 YY_RULE_SETUP
    2410 #line 796 "libparse.l"
    2411 { }
    2412         YY_BREAK
    2413 case 92:
    24142407YY_RULE_SETUP
    24152408#line 798 "libparse.l"
    24162409{ yylplineno++; }
    24172410        YY_BREAK
    2418 case 93:
     2411case 91:
    24192412YY_RULE_SETUP
    24202413#line 799 "libparse.l"
    24212414{ }
    24222415        YY_BREAK
     2416case 92:
     2417YY_RULE_SETUP
     2418#line 801 "libparse.l"
     2419{ yylplineno++; }
     2420        YY_BREAK
     2421case 93:
     2422YY_RULE_SETUP
     2423#line 802 "libparse.l"
     2424{ }
     2425        YY_BREAK
    24232426case 94:
    24242427YY_RULE_SETUP
    2425 #line 800 "libparse.l"
     2428#line 803 "libparse.l"
    24262429{ p_static = FALSE;
    24272430                            #if YYLPDEBUG > 1
     
    24322435case 95:
    24332436YY_RULE_SETUP
    2434 #line 805 "libparse.l"
     2437#line 808 "libparse.l"
    24352438{ p_static = FALSE;
    24362439                           yylp_errno = YYLP_BAD_CHAR;
     
    24502453case 96:
    24512454YY_RULE_SETUP
    2452 #line 820 "libparse.l"
     2455#line 823 "libparse.l"
    24532456ECHO;
    24542457        YY_BREAK
     
    28532856
    28542857
    2855 #ifndef YY_NO_INPUT
    28562858#ifdef __cplusplus
    28572859static int yyinput()
     
    29262928        return c;
    29272929        }
    2928 #endif /* YY_NO_INPUT */
     2930
    29292931
    29302932#ifdef YY_USE_PROTOS
     
    30373039
    30383040
     3041#ifndef YY_ALWAYS_INTERACTIVE
     3042#ifndef YY_NEVER_INTERACTIVE
     3043extern int isatty YY_PROTO(( int ));
     3044#endif
     3045#endif
    30393046
    30403047#ifdef YY_USE_PROTOS
     
    33543361        }
    33553362#endif
    3356 #line 820 "libparse.l"
     3363#line 823 "libparse.l"
    33573364
    33583365
  • Singular/libparse.l

    r913156 rc0d3e8e  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: libparse.l,v 1.60 2005-09-24 15:02:09 Singular Exp $ */
     5/* $Id: libparse.l,v 1.61 2006-03-06 14:11:20 Singular Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    334334               if((!p_static) && autoexport)
    335335               {
     336                  package save=currPack;
     337                  currPack=basePack;
    336338                  h_top = enterid( proc, 0 /*myynest*/, PROC_CMD,
    337339                                 &(basePack->idroot), FALSE );
     340                  currPack=save;
    338341                  if (h_top==NULL) return(1);
    339342               }
Note: See TracChangeset for help on using the changeset viewer.