/[ascend]/trunk/base/generic/compiler/packages.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/packages.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 528 by wangym, Wed Apr 19 08:21:13 2006 UTC revision 529 by johnpye, Sat Apr 22 06:26:23 2006 UTC
# Line 1  Line 1 
1  /*  /*  ASCEND modelling environment
2   *  User Packages      Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly, Kirk Abbott.
3   *  by Kirk Abbott      Copyright (C) 2006 Carnegie Mellon University
4   *  Created: July 4, 1994  
5   *      This program is free software; you can redistribute it and/or modify
6   *  This file is part of the Ascend Language Interpreter.      it under the terms of the GNU General Public License as published by
7   *      the Free Software Foundation; either version 2, or (at your option)
8   *  Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly, Kirk Abbott.      any later version.
9   *  
10   *  The Ascend Language Interpreter is free software; you can redistribute      This program is distributed in the hope that it will be useful,
11   *  it and/or modify it under the terms of the GNU General Public License as      but WITHOUT ANY WARRANTY; without even the implied warranty of
12   *  published by the Free Software Foundation; either version 2 of the      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   *  License, or (at your option) any later version.      GNU General Public License for more details.
14   *  
15   *  The Ascend Language Interpreter is distributed in hope that it will be      You should have received a copy of the GNU General Public License
16   *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of      along with this program; if not, write to the Free Software
17   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      Foundation, Inc., 59 Temple Place - Suite 330,
18   *  General Public License for more details.      Boston, MA 02111-1307, USA.
19   *  *//**
  *  You should have received a copy of the GNU General Public License  
  *  along with the program; if not, write to the Free Software Foundation,  
  *  Inc., 675 Mass Ave, Cambridge, MA 02139 USA.  Check the file named  
  *  COPYING.  
  *  
  *  Last rev in old CVS: 1.14 ballan 1998/03/06 15:47:14  
  */  
   
 /**  
20      Code to support dynamic and static loading of user packages.      Code to support dynamic and static loading of user packages.
21    
22      The default state is to have packages. As such it takes an explicit      The default state is to have packages. As such it takes an explicit
23      definition of NO_PACKAGES, if packages are not to be handled.      definition of NO_PACKAGES, if packages are not to be handled.
24      An explicit definition of STATIC_PACKAGES or DYNAMIC_PACKAGES is also      An explicit definition of STATIC_PACKAGES or DYNAMIC_PACKAGES is also
25      required.      required.
26    *//*
27        User Packages
28        by Kirk Abbott
29        Created: July 4, 1994
30        Last rev in old CVS: 1.14 ballan 1998/03/06 15:47:14
31  */  */
32    
33  #if !defined(DYNAMIC_PACKAGES) && !defined(STATIC_PACKAGES) && !defined(NO_PACKAGES)  #if !defined(DYNAMIC_PACKAGES) && !defined(STATIC_PACKAGES) && !defined(NO_PACKAGES)
34  # error "Package linking option not set!"  # error "Package linking option not set!"
35  #endif  #endif
# Line 95  symchar *MakeArchiveLibraryName(CONST ch Line 92  symchar *MakeArchiveLibraryName(CONST ch
92      buffer = (char *)ascmalloc(len+40);      buffer = (char *)ascmalloc(len+40);
93    
94  #if defined(ASC_SHLIBSUFFIX) && defined(ASC_SHLIBPREFIX)  #if defined(ASC_SHLIBSUFFIX) && defined(ASC_SHLIBPREFIX)
95  # define ASC_STRINGIFY(ARG) #ARG      sprintf(buffer,"%s%s%s",ASC_SHLIBPREFIX,prefix,ASC_SHLIBSUFFIX);
     sprintf(buffer,"%s%s%s",ASC_STRINGIFY(ASC_SHLIBPREFIX),prefix,ASC_STRINGIFY(ASC_SHLIBSUFFIX));  
 # undef ASC_STRINGIFY  
96  #else  #else
97  # ifdef __WIN32__  # ifdef __WIN32__
98      sprintf(buffer,"%s.dll",prefix);      sprintf(buffer,"%s.dll",prefix);
# Line 231  int LoadArchiveLibrary(CONST char *name, Line 226  int LoadArchiveLibrary(CONST char *name,
226    
227    full_file_name = SearchArchiveLibraryPath(SCP(name_with_extn),default_path,env);    full_file_name = SearchArchiveLibraryPath(SCP(name_with_extn),default_path,env);
228    if (!full_file_name) {    if (!full_file_name) {
229      ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"The named library '%s' was not found in the search path",name_with_extn);      ERROR_REPORTER_NOLINE(ASC_USER_ERROR,"The named library '%s' was not found in the search path.",name_with_extn);
230      return 1;      return 1;
231    }    }
232    

Legend:
Removed from v.528  
changed lines
  Added in v.529

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22