added Slackware build script
[k8jam.git] / pathsys.h
blobcb796874b596c6911cf0aca4643a0219f975c48e
1 /*
2 * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
4 * This file is part of Jam - see jam.c for Copyright information.
5 */
7 /*
8 * pathsys.h - PATHNAME struct
10 * 11/04/02 (seiwald) - const-ing for string literals
14 * PATHNAME - a name of a file, broken into <grist>dir/base/suffix(member)
16 * <grist> is salt to distinguish between targets that otherwise would
17 * have the same name: it never appears in the bound name of a target.
18 * (member) is an archive member name: the syntax is arbitrary, but must
19 * agree in path_parse(), path_build() and the Jambase.
21 * On VMS, we keep track of whether the original path was a directory
22 * (without a file), so that $(VAR:D) can climb to the parent.
25 typedef struct _pathname PATHNAME;
26 typedef struct _pathpart PATHPART;
28 struct _pathpart {
29 const char *ptr;
30 int len;
33 struct _pathname {
34 PATHPART part[6];
35 # ifdef OS_VMS
36 int parent;
37 # endif
39 # define f_grist part[0]
40 # define f_root part[1]
41 # define f_dir part[2]
42 # define f_base part[3]
43 # define f_suffix part[4]
44 # define f_member part[5]
46 } ;
48 void path_build( PATHNAME *f, char *file, int binding );
49 void path_parse( const char *file, PATHNAME *f );
50 void path_parent( PATHNAME *f );