Changeset c4041ef in git for Singular/iplib.cc
- Timestamp:
- Dec 10, 1998, 9:50:34 AM (25 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- d6cc54d5042c325dfc0aff249e09bd0002ede0e2
- Parents:
- 1c17b6ea37bc2da88a8ab9e39b3f382098c1a1db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iplib.cc
r1c17b6 rc4041ef 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iplib.cc,v 1.4 5 1998-12-09 16:40:23 Singular Exp $ */4 /* $Id: iplib.cc,v 1.46 1998-12-10 08:50:34 krueger Exp $ */ 5 5 /* 6 6 * ABSTRACT: interpreter: LIB and help … … 10 10 #include <stdio.h> 11 11 #include <string.h> 12 //#include <ctype.h>12 #include <ctype.h> 13 13 #include <sys/stat.h> 14 14 … … 50 50 #endif 51 51 52 //int IsCmd(char *n, int tok); 52 53 char mytolower(char c); 53 54 … … 592 593 593 594 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 594 static BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, 595 static BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, char *newlib, 595 596 idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror); 596 597 … … 639 640 } 640 641 namespaceroot->push(IDPACKAGE(packhdl), IDID(packhdl)); 641 LoadResult = iiLoadLIB(fp, libnamebuf, packhdl, FALSE, FALSE); 642 LoadResult = iiLoadLIB(fp, libnamebuf, IDPACKAGE(packhdl)->libname, 643 packhdl, FALSE, FALSE); 642 644 namespaceroot->pop(); 643 645 #else /* HAVE_NAMESPACES */ … … 761 763 } 762 764 namespaceroot->push(IDPACKAGE(pl), IDID(pl)); 763 LoadResult = iiLoadLIB(fp, libnamebuf, pl, autoexport, tellerror);765 LoadResult = iiLoadLIB(fp, libnamebuf, newlib, pl, autoexport, tellerror); 764 766 #else /* HAVE_NAMESPACES */ 765 LoadResult = iiLoadLIB(fp, libnamebuf, NULL, FALSE, tellerror);767 LoadResult = iiLoadLIB(fp, libnamebuf, newlib, NULL, FALSE, tellerror); 766 768 #endif /* HAVE_NAMESPACES */ 767 769 768 770 #ifdef HAVE_NAMESPACES 769 771 if(!LoadResult) IDPACKAGE(pl)->loaded = TRUE; 770 close(fp);772 fclose(fp); 771 773 namespaceroot->pop(); 772 774 #endif /* HAVE_NAMESPACES */ … … 780 782 781 783 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 782 static BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, 784 static BOOLEAN iiLoadLIB(FILE *fp, char *libnamebuf, char*newlib, 783 785 idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror) 784 786 { 785 787 char buf[256]; 786 char *newlib = IDPACKAGE(pl)->libname;787 788 extern FILE *yylpin; 788 789 libstackv ls_start = library_stack; … … 1126 1127 lib_types type_of_LIB(char *newlib, char *libnamebuf) 1127 1128 { 1128 unsignedchar buf[HOWMANY+1]; /* one extra for terminating '\0' */1129 char buf[HOWMANY+1]; /* one extra for terminating '\0' */ 1129 1130 struct stat sb; 1130 1131 int nbytes = 0; … … 1160 1161 1161 1162 lib_type_end: 1162 close(fp);1163 fclose(fp); 1163 1164 return LT; 1164 1165 }
Note: See TracChangeset
for help on using the changeset viewer.