1 /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
2 * For full copyright and restrictions on use see the file COPYING in the top
3 * level of the LLgen tree.
9 * An Extended LL(1) Parser Generator
11 * Author : Ceriel J.H. Jacobs
16 * Machine dependant things
22 static string rcsid5 = "$Id: machdep.c,v 2.9 1995/07/31 09:16:50 ceriel Exp $";
25 /* In this file the following routines are defined: */
28 extern string libpath();
31 /* Must remove the file "x" */
34 sys_remove(x); /* systemcall to remove file */
40 RENAME(x,y) string x,y; {
41 /* Must move the file "x" to the file "y" */
44 if(! sys_rename(x,y)) fatal(1,"Cannot rename to %s",y);
47 if (link(x,y) != 0) fatal(1,"Cannot rename to %s",y);
52 /* to make it easier to patch ... */
53 char libdir[256] = LIBDIR;
56 libpath(s) string s; {
57 /* Must deliver a full pathname to the library file "s" */
62 string strcpy(), strcat();
64 length = strlen(libdir) + strlen(s) + 2;
65 p = (string) alloc((unsigned) length);