filepath - return the whole search path of a file
This software belongs to the ALLIANCE CAD system from the CAO-VLSI team at
ASIM/LIP6/UPMC laboratory.
LIP6/ASIM
University P. et M. Curie
4, place Jussieu
75252 PARIS Cedex 05
FRANCE
Fax : {33/0} 1.44.27.62.86
E-mail support : alliance-support@asim.lip6.fr
#include mut315.h"
char *filepath(name, extension)
char *name, *extension;
filepath return the absolute path of a cell. This is useful for error
messages, since the caller of mbk file functions is not able to specify
explicitly which file it opened. Having such an information is also necessary
when last modification times or access times are needed, as for
consistency checks. The file is searched through the environment variable
MBK_WORK_LIB(1)
, and if not found, through MBK_CATA_LIB(1)
in the user
defined order.
The file to be searched is called name.extension, if extension is not
NULL, else it is name. If extension is the empty string, ", then the file
name will be name. .
filepath returns NULL on failure, ie the file is not in the pathes, or the absolute path on success. The value returned, when not NULL, is stored in a static buffer, so this values is to use at return time or copied into a user buffer.
#include <stdio.h>
#include mut315.h"
#include mph315.h"
void vti_error(fig, error)
phfig_list *fig;
char *(*error)();
{
fprintf(stderr, Syntax error in %s\n", filepath(fig->NAME, cp"));
fprintf(stderr, %s\n", error());
}
mbk(1) , MBK_WORK_LIB(1) , MBK_CATA_LIB(1) , mbkfopen(3) . mbkunlink(3) .
This tool is under development at the ASIM/LIP6/UPMC laboratory, cao-vlsi
research team.
We need your feedbak to improve documentation and tools.
If you find bugs, please fill-in the form at
http://asim.lip6.fr/alliance/support/bug-report/
Thanks for doing this.