Changeset 116023 in git for Singular/iplib.cc
- Timestamp:
- Jan 8, 2014, 4:26:06 PM (10 years ago)
- Branches:
- (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
- Children:
- 9a236dfb836ff04c250f1791ac6bfcf9c199c40a
- Parents:
- a821d149b494cb7005a11357ee001ae657e735ff
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-01-08 16:26:06+01:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-01-08 16:27:02+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iplib.cc
ra821d14 r116023 797 797 BOOLEAN iiLocateLib(const char* lib, char* where) 798 798 { 799 idhdl hl; 800 801 char *p; 802 803 hl = IDROOT->get("LIB", 0); 804 if (hl == NULL || (p=strstr(IDSTRING(hl), lib)) == NULL) return FALSE; 805 if ((p!=IDSTRING(hl)) && (*(p-1)!=',')) return FALSE; 806 807 if (strstr(IDSTRING(hl), ",") == NULL) 808 { 809 strcpy(where, IDSTRING(hl)); 799 char *plib = iiConvName(lib); 800 idhdl pl = basePack->idroot->get(plib,0); 801 if( (pl!=NULL) && (IDTYPr(pl)==PACKAGE_CMD) && 802 (IDPACKAGE(pl)->language == LANG_SINGULAR)) 803 { 804 strncpy(where,IDPACKAGE(pl)->libname,127); 805 return TRUE; 810 806 } 811 807 else 812 { 813 char* tmp = omStrDup(IDSTRING(hl)); 814 char* tok = strtok(tmp, ","); 815 do 816 { 817 if (strstr(tok, lib) != NULL) break; 818 tok = strtok(NULL, ","); 819 } 820 while (tok != NULL); 821 assume(tok != NULL); 822 strcpy(where, tok); 823 omFree(tmp); 824 } 825 return TRUE; 808 return FALSE;; 826 809 } 827 810 … … 995 978 { 996 979 pi->libname = omStrDup(libname); 997 998 if( strcmp(procname,"_init")==0) 999 { 1000 pi->procname = iiConvName(libname); 1001 } 1002 else 1003 pi->procname = omStrDup(procname); 980 pi->procname = omStrDup(procname); 1004 981 pi->language = LANG_SINGULAR; 1005 982 pi->ref = 1; … … 1021 998 } 1022 999 1023 #if 01024 // TODO!?1025 procinfo *iiInitSingularProcinfo(procinfo* pi, const char *libname,1026 const char *procname, int line, long pos,1027 BOOLEAN pstatic /*= FALSE*/)1028 {1029 pi->libname = (char *)malloc(strlen(libname)+1);1030 memcpy(pi->libname, libname, strlen(libname));1031 *(pi->libname+strlen(libname)) = '\0';1032 1033 pi->procname = (char *)malloc(strlen(procname)+1);1034 strcpy(pi->procname, procname/*, strlen(procname)*/);1035 pi->language = LANG_SINGULAR;1036 pi->ref = 1;1037 pi->is_static = pstatic;1038 pi->data.s.proc_start = pos;1039 pi->data.s.def_end = 0L;1040 pi->data.s.help_start = 0L;1041 pi->data.s.body_start = 0L;1042 pi->data.s.body_end = 0L;1043 pi->data.s.example_start = 0L;1044 pi->data.s.proc_lineno = line;1045 pi->data.s.body_lineno = 0;1046 pi->data.s.example_lineno = 0;1047 pi->data.s.body = NULL;1048 pi->data.s.help_chksum = 0;1049 return(pi);1050 }1051 #endif1052 1053 1000 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 1054 1001 int iiAddCproc(const char *libname, const char *procname, BOOLEAN pstatic,
Note: See TracChangeset
for help on using the changeset viewer.